JP2003186693A - Microcontroller with emulation function - Google Patents
Microcontroller with emulation functionInfo
- Publication number
- JP2003186693A JP2003186693A JP2001384107A JP2001384107A JP2003186693A JP 2003186693 A JP2003186693 A JP 2003186693A JP 2001384107 A JP2001384107 A JP 2001384107A JP 2001384107 A JP2001384107 A JP 2001384107A JP 2003186693 A JP2003186693 A JP 2003186693A
- Authority
- JP
- Japan
- Prior art keywords
- input
- mode
- circuit
- output
- debug
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Microcomputers (AREA)
Abstract
(57)【要約】
【課題】 デバッグ時にリソースの漏洩を防止する。
【解決手段】 エミュレート機能を有するマイクロコン
トローラのデバッグ機能制御回路1500は、JTAG
−ICEに接続されたデバッグIF入出力回路1560
と、機能制限モードレジスタ1584と、アクセスキー
レジスタ1582と、プロテクトチェック回路1580
と、リソースアクセス回路1520とを含む。プロテク
トチェック回路1580は、JTAG−ICEからデバ
ッグコマンドが入力されると、機能制限モードレジスタ
1584に格納された動作モードが制限モードでない
と、入力されたデバッグコマンドをリソースアクセス回
路1520に送信する。プロテクトチェック回路158
0は、JTAG−ICEから入力されたアクセスキー
と、アクセスキーレジスタ1582に格納されたアクセ
スキーとが一致すると、動作モードを許可モードに書換
える。
(57) [Summary] [Problem] To prevent leakage of resources during debugging. SOLUTION: A debug function control circuit 1500 of a microcontroller having an emulation function is provided by JTAG.
A debug IF input / output circuit 1560 connected to the ICE
, A function restriction mode register 1584, an access key register 1582, a protection check circuit 1580.
And a resource access circuit 1520. When a debug command is input from JTAG-ICE, if the operation mode stored in function restriction mode register 1584 is not the restriction mode, protect check circuit 1580 transmits the input debug command to resource access circuit 1520. Protect check circuit 158
If the access key input from the JTAG-ICE matches the access key stored in the access key register 1582, 0 is set to rewrite the operation mode to the permission mode.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、マイクロコントロ
ーラのデータの保持に関し、特に、マイクロコントロー
ラのデバッグ時においてデータの読出を制限する技術に
関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to holding data in a microcontroller, and more particularly to a technique for restricting data reading during debugging of a microcontroller.
【0002】[0002]
【従来の技術】近年、CPU(Central Processing Uni
t)とメモリと周辺I/O(Input/Output)とを1チッ
プに内蔵したマイクロコントローラが、高性能化および
高機能化している。このようなマイクロコントローラの
プログラム開発においては、従来から、マイクロコント
ローラの外部にオンチップデバッグICE(In-Circuit
Emulator)を設けて、デバッグを実施している。2. Description of the Related Art In recent years, CPUs (Central Processing Uni
t), memory, and peripheral I / O (Input / Output) are built in one chip, and the performance and functionality of the microcontroller are increasing. In the program development of such a microcontroller, on-chip debug ICE (In-Circuit
Emulator) is provided and debugging is carried out.
【0003】このオンチップデバッグICEによると、
ターゲットシステムのCPUの代わりにICE用CPU
に開発中のプログラムを実行させて、そのプログラムの
動作を解析する。ICE用CPUは、デバッグ対象のC
PUにより実行される演算と、デバッグ用の演算とを実
行する必要があり、デバッグ対象のCPUの処理速度を
上回る必要がある。According to this on-chip debug ICE,
ICE CPU instead of target system CPU
The program under development is executed and the operation of the program is analyzed. The ICE CPU is the debug target C
It is necessary to execute the operation executed by the PU and the operation for debugging, and it is necessary to exceed the processing speed of the CPU to be debugged.
【0004】しかしながら、近年のマイクロコントロー
ラの高性能化および高機能化に伴い、ターゲットシステ
ムのCPUの処理速度が高速化し、このようなICE用
のCPUによる開発環境を実現できない場合が発生して
いる。また、CPUの高性能化および小型化により、I
CEとターゲットシステムとを容易に接続することがで
きなくなっている。However, with the recent advances in performance and functionality of microcontrollers, the processing speed of the CPU of the target system has increased, and there are cases in which such a development environment using the CPU for ICE cannot be realized. . Also, due to the high performance and miniaturization of the CPU, I
The CE and the target system cannot be easily connected.
【0005】そこで、このような課題を解決するため
に、プログラムのデバッグ機能をマイクロコントローラ
で実現しつつ、マイクロコントローラにデバッグ用の専
用インターフェイスを追加したマイクロコントローラが
実現されている。このようなマイクロコントローラに対
応するICEをJTAG(IEEE1149.1)−I
CEという。JTAG−ICEは、通常のオンチップデ
バッグICEとは異なり、ターゲットシステムのエミュ
レーションを実行せず、ターゲットシステムとの間でデ
バッグインターフェイスを介してデバッグ用データの送
受信のみを実行する。このようなターゲットシステムを
デバッグするJTAG−ICEシステムについて、図面
を参照して説明する。In order to solve such a problem, therefore, a microcontroller has been realized in which a debugging function of a program is realized by a microcontroller and a dedicated interface for debugging is added to the microcontroller. The ICE corresponding to such a microcontroller is JTAG (IEEE1149.1) -I.
Called CE. Unlike the normal on-chip debug ICE, the JTAG-ICE does not execute emulation of the target system and only transmits / receives debug data to / from the target system via the debug interface. A JTAG-ICE system for debugging such a target system will be described with reference to the drawings.
【0006】図7を参照して、マイクロコントローラ1
00は、CPU110と、RAM(Random Access Memo
ry)120と、ROM(Read Only Memory)130と、
デバッグ機能制御回路150と、デバッグIF(Interf
ace)端子160と、周辺I/O170と、これらを接
続するバス140と、バス140を制御するバス制御回
路180と、外部バス端子190とを含む。JTAG−
ICE200は、この開発ターゲットであるマイクロコ
ントローラ100の外部に、デバッグIF端子160を
介して接続される。Referring to FIG. 7, the microcontroller 1
00 is a CPU 110 and a RAM (Random Access Memo).
ry) 120, ROM (Read Only Memory) 130,
The debug function control circuit 150 and the debug IF (Interf
ace) terminal 160, peripheral I / O 170, bus 140 connecting these, bus control circuit 180 controlling bus 140, and external bus terminal 190. JTAG-
The ICE 200 is connected to the outside of the microcontroller 100, which is the development target, via the debug IF terminal 160.
【0007】JTAG−ICE200は、ユーザの要求
に対応して、デバッグ用コマンドをデバッグ機能制御回
路150へ出力する。デバッグ機能制御回路150は、
JTAG−ICE200から入力されたデバッグ用コマ
ンドに基づいて、CPU制御回路154を用いてCPU
110に所定のプログラムを実行させたり、リソースア
クセス回路152を用いてRAM120、ROM130
および周辺I/Oに対するアクセスを実行したりする。The JTAG-ICE 200 outputs a debug command to the debug function control circuit 150 in response to a user request. The debug function control circuit 150
The CPU is controlled by the CPU control circuit 154 based on the debug command input from the JTAG-ICE 200.
110 to execute a predetermined program, and by using the resource access circuit 152, RAM 120, ROM 130
And access to peripheral I / O.
【0008】図8にデバッグ機能制御回路150の内部
構成を示す。図8に示すように、デバッグ制御回路15
0は、リソースアクセス回路152と、CPU制御回路
154と、デバッグIF入出力回路156とを含む。J
TAG−ICE200から受信したデバッグ用コマンド
は、デバッグIF端子160を介して、デバッグIF入
出力回路156に入力される。FIG. 8 shows the internal structure of the debug function control circuit 150. As shown in FIG. 8, the debug control circuit 15
0 includes a resource access circuit 152, a CPU control circuit 154, and a debug IF input / output circuit 156. J
The debug command received from the TAG-ICE 200 is input to the debug IF input / output circuit 156 via the debug IF terminal 160.
【0009】リソースアクセス回路152は、バス14
0を介してリソース(RAM120、ROM130、周
辺I/O170)に接続され、リソースのアクセスを制
御する。CPU制御回路154は、バス140を介して
CPU110に接続され、CPU110を制御する。デ
バッグIF入出力回路156は、デバッグIF端子16
0に接続され、デバッグIF端子160を介して接続さ
れたJTAG−ICE200からのデバッグ用コマンド
に基づいて、リソースアクセス回路152、CPU制御
回路154を制御する。デバッグIF入出力回路156
は、デバッグ用コマンドをデコードして、JTAG−I
CE200から送信されたデバッグ用コマンドの種類を
判断する。The resource access circuit 152 includes a bus 14
It is connected to resources (RAM 120, ROM 130, peripheral I / O 170) via 0 and controls access to resources. The CPU control circuit 154 is connected to the CPU 110 via the bus 140 and controls the CPU 110. The debug IF input / output circuit 156 has a debug IF terminal 16
The resource access circuit 152 and the CPU control circuit 154 are controlled on the basis of a debug command from the JTAG-ICE 200 connected to 0 and connected via the debug IF terminal 160. Debug IF input / output circuit 156
Decodes the debug command, and returns JTAG-I
The type of debug command transmitted from the CE 200 is determined.
【0010】デバッグIF入出力回路156は、デバッ
グ用コマンドがCPU110のレジスタ値の変更および
参照などのCPU110の処理に関するコマンドである
場合、CPU制御回路154に制御信号を送信する。C
PU制御回路154は、受信した制御信号に基づいて、
バス140を介してCPU110に指示信号を出力す
る。CPU110は、応答信号(たとえば、特定のレジ
スタ値の参照コマンドに対する応答信号)を、バス14
0を介して、CPU制御回路154に送信する。CPU
制御回路154は、デバッグIF入出力回路156に応
答信号を送信する。デバッグIF入出力回路156は、
制御信号に対応する応答信号をデバッグ用コマンドに対
する応答として、デバッグIF端子160を介して、J
TAG−ICE200に送信する。The debug IF input / output circuit 156 sends a control signal to the CPU control circuit 154 when the debug command is a command relating to the processing of the CPU 110 such as the change and reference of the register value of the CPU 110. C
The PU control circuit 154, based on the received control signal,
An instruction signal is output to the CPU 110 via the bus 140. The CPU 110 sends a response signal (for example, a response signal to a reference command of a specific register value) to the bus 14
It is transmitted to the CPU control circuit 154 via 0. CPU
The control circuit 154 transmits a response signal to the debug IF input / output circuit 156. The debug IF input / output circuit 156 is
The response signal corresponding to the control signal is used as a response to the command for debugging via the debug IF terminal 160.
It transmits to TAG-ICE200.
【0011】デバッグIF入出力回路156は、デバッ
グ用コマンドが内部メモリの内容の参照などの処理に関
するコマンドである場合、リソースアクセス回路152
に制御信号を送信する。リソースアクセス回路152
は、受信した制御信号に基づいて、バス140を介して
対応するリソース(RAM120、ROM130、周辺
I/O170)に指示信号を出力する。リソース(RA
M120、ROM130、周辺I/O170)は、応答
信号を、バス140を介して、リソースアクセス回路1
52に送信する。リソースアクセス回路152は、デバ
ッグIF入出力回路156に応答信号を送信する。デバ
ッグIF入出力回路156は、制御信号に対応する応答
信号をデバッグ用コマンドに対する応答として、デバッ
グIF端子160を介して、JTAG−ICE200に
送信する。The debug IF input / output circuit 156, when the debug command is a command relating to processing such as referring to the contents of the internal memory, the resource access circuit 152.
Control signal to. Resource access circuit 152
Outputs an instruction signal to the corresponding resource (RAM 120, ROM 130, peripheral I / O 170) via the bus 140 based on the received control signal. Resource (RA
M120, ROM 130, peripheral I / O 170) sends a response signal to the resource access circuit 1 via the bus 140.
52. The resource access circuit 152 sends a response signal to the debug IF input / output circuit 156. The debug IF input / output circuit 156 transmits the response signal corresponding to the control signal as a response to the debug command to the JTAG-ICE 200 via the debug IF terminal 160.
【0012】このようにして、JTAG−ICEを用い
てデバッグが実行される。このとき、製品に実装された
マイクロコントローラ100のROM130の内容を読
出すことができる。特開2000−347942公報
は、第三者による不正なROM130の内容を読出しを
防止する情報処理装置を開示する。In this way, debugging is executed using JTAG-ICE. At this time, the contents of the ROM 130 of the microcontroller 100 mounted on the product can be read. Japanese Unexamined Patent Publication No. 2000-347942 discloses an information processing device that prevents unauthorized reading of the contents of the ROM 130 by a third party.
【0013】この公報に開示された情報処理装置は、通
常のオンチップデバッグICEを用いた不正なアクセス
を防止する。この情報処理装置は、メモリと、エミュレ
ータに接続されて、エミュレータと情報処理装置との間
でデバッグに必要な信号の入出力信号を制御する入出力
制御回路と、情報処理装置のデバッグをサポートするオ
ンチップデバッグ回路と、セキュリティ回路とを含む。
セキュリティ回路は、電源投入時に情報処理装置をリセ
ットするリセット信号を受けて、オンチップデバッグ回
路の機能を無効化する回路と、メモリに記憶された情報
の読出し禁止を解除するコードを受けて、オンチップデ
バッグ回路の機能を有効化する回路とを含む。メモリ
は、ユーザにより個別に設定可能なユーザプログラムか
らなるセキュリティ解除プログラムと、外部に設けられ
たエミュレータによる不正アクセスから保護される情報
とを記憶する。The information processing apparatus disclosed in this publication prevents unauthorized access using a normal on-chip debug ICE. This information processing device supports debugging of the information processing device, and an input / output control circuit connected to the memory and controlling input / output signals of signals required for debugging between the emulator and the information processing device. Includes on-chip debug circuitry and security circuitry.
The security circuit receives a reset signal that resets the information processing device when the power is turned on, receives a circuit that invalidates the function of the on-chip debug circuit, and a code that removes the read prohibition of the information stored in the memory, And a circuit for enabling the function of the chip debug circuit. The memory stores a security release program that is a user program that can be individually set by the user, and information that is protected from unauthorized access by an emulator provided externally.
【0014】この情報処理装置によると、オンチップデ
バッグ回路の機能を無効化されている場合に、ユーザに
解放されたI/Oレジスタに読出し禁止を解除するコー
ドが入力されると、セキュリティ回路は、オンチップデ
バッグ回路の機能を有効化する。これにより、読出し禁
止を解除するコードを知らない第三者は、オンチップデ
バッグ回路の機能を有効化することができず、ターゲッ
トシステムに実装されたROMの内容を読出すことがで
きない。According to this information processing device, when the function of the on-chip debug circuit is disabled, when the code for canceling the read prohibition is input to the released I / O register by the user, the security circuit operates. , Enable the function of the on-chip debug circuit. As a result, a third party who does not know the code for releasing the read prohibition cannot activate the function of the on-chip debug circuit and cannot read the contents of the ROM mounted on the target system.
【0015】[0015]
【発明が解決しようとする課題】上述した公報に開示さ
れた装置を、JTAG−ICEに適用すると、以下のよ
うな問題点が発生する。すなわち、JTAG−ICE
は、ターゲットシステムのCPUの小型化に伴い、IC
Eとターゲットシステムとを容易に接続できないために
開発されたものである。しかしながら、上述の公報に開
示された装置では、デバッグコマンドおよびデバッグコ
マンドに対する応答信号を送受信する以外に、読出し禁
止を解除するコードを入力するためにユーザに開放され
たI/Oが必要になる。このことは、JTAG−ICE
とターゲットシステムとの接続を、より困難にする。ま
た、上述の公報に開示された装置では、ユーザプログラ
ムによりセキュリティ解除プログラムを実行するため、
このようなプログラムを開発する必要があった。When the device disclosed in the above publication is applied to JTAG-ICE, the following problems occur. That is, JTAG-ICE
Is the IC of the target system with the miniaturization of the CPU.
It was developed because E and the target system cannot be easily connected. However, the device disclosed in the above-mentioned publication requires an I / O opened to the user for inputting a code for canceling the read prohibition in addition to transmitting and receiving a debug command and a response signal to the debug command. This is JTAG-ICE
Connection with the target system becomes more difficult. Further, in the device disclosed in the above publication, since the security release program is executed by the user program,
It was necessary to develop such a program.
【0016】本発明は、上述の課題を解決するためにな
されたものであって、簡易なシステムで、確実にデバッ
ク時などにリソースの漏洩を防止することができる、エ
ミュレート機能を有するマイクロコントローラを提供す
ることである。The present invention has been made to solve the above-mentioned problems, and a microcontroller having an emulation function capable of reliably preventing resource leakage at the time of debugging with a simple system. Is to provide.
【0017】[0017]
【課題を解決するための手段】第1の発明に係るマイク
ロコントローラは、マイクロコントローラを制御するプ
ロセッサと、プロセッサの内部の状態を表わすデータを
読出すためのプロセッサ制御手段と、エミュレート機能
の動作モードを記憶するためのモード記憶手段と、プロ
セッサ制御手段に接続され、マイクロコントローラの外
部に設けられた機器との間で情報を入出力するための入
出力手段と、プロセッサ制御手段とモード記憶手段と入
出力手段とを制御するための制御手段とを含む。入出力
手段は、プロセッサ制御手段に対する制御コマンドを機
器が入力するための手段と、データを機器に出力するた
めの手段とを含む。制御手段は、入出力手段に機器から
制御コマンドが入力されると、モード記憶手段に記憶さ
れた動作モードが予め定められた第1の条件を満足する
ときには、制御コマンドをプロセッサ制御手段に送信し
て、プロセッサ制御手段からデータを受信するようにプ
ロセッサ制御手段を制御するための手段と、受信したデ
ータを機器へ出力するように入出力手段を制御するため
の手段と、入出力手段に機器からモード変更コマンドが
入力されると、入力されたモード変更コマンドが予め定
められた第2の条件を満足するときには、動作モードを
変更するように、モード記憶手段を制御するための手段
とを含む。A microcontroller according to a first aspect of the present invention includes a processor for controlling the microcontroller, processor control means for reading data representing an internal state of the processor, and operation of an emulation function. A mode storage unit for storing the mode and an input / output unit connected to the processor control unit for inputting / outputting information to / from a device provided outside the microcontroller, the processor control unit and the mode storage unit And a control means for controlling the input / output means. The input / output means includes means for the equipment to input a control command for the processor control means and means for outputting data to the equipment. When the control command is input from the device to the input / output unit, the control unit transmits the control command to the processor control unit when the operation mode stored in the mode storage unit satisfies the first predetermined condition. Means for controlling the processor control means so as to receive the data from the processor control means, means for controlling the input / output means so as to output the received data to the equipment, and the input / output means from the equipment When the mode change command is input, when the input mode change command satisfies the predetermined second condition, the mode storage unit is controlled to change the operation mode.
【0018】第1の発明によると、エミュレート機能と
して、プロセッサ制御手段がプロセッサの内部の状態を
表わすデータを読出す。コントローラには、外部の機器
から、プロセッサの内部の状態を表わすデータを読出す
ような制御コマンドが送信されると、プロセッサ制御手
段がプロセッサの内部の状態を表わすデータを読出し
て、このデータをコントローラの外部の機器に出力す
る。このようなコントローラとして、たとえばJTAG
−ICEがある。制御手段は、制御コマンドが送信され
ると、モード記憶手段に記憶されたエミュレータの動作
モードを確認して、たとえば動作モードがエミュレート
機能を制限するモードでなければ、プロセッサ制御手段
に制御コマンドを送信する。これにより、プロセッサの
内部の状態を表わすデータは、動作モードがエミュレー
ト機能を制限するモードであるときには、外部の機器へ
出力されない。制御手段は、プロセッサの内部の状態を
表わすデータを外部の機器に送信する入出力手段を用い
てモード変更コマンドが入力されると、たとえば入力さ
れたモード変更コマンドが予め定められたコマンドに一
致するときには、モード記憶手段に記憶された動作モー
ドを、制限モードから許可モードへ変更したり、許可モ
ードから制限モードへ変更したりする。これにより、J
TAG−ICEシステムなどにおいて、デバッグデータ
を送受信する信号線を用いて、エミュレート機能を許可
するか制限するかを制御できる。その結果、簡易なシス
テムで、確実にデバック時などにリソースの漏洩を防止
することができる、エミュレート機能を有するマイクロ
コントローラを提供することができる。According to the first aspect of the present invention, as the emulation function, the processor control means reads out data representing the internal state of the processor. When a control command for reading data representing the internal state of the processor is transmitted to the controller from an external device, the processor control means reads the data representing the internal state of the processor, and this data is stored in the controller. To a device external to the. As such a controller, for example, JTAG
-There is an ICE. When the control command is transmitted, the control means confirms the operation mode of the emulator stored in the mode storage means, and if the operation mode is not a mode for limiting the emulation function, the control means sends the control command to the processor control means. Send. Thus, the data representing the internal state of the processor is not output to the external device when the operation mode is the mode that limits the emulation function. When the mode change command is input using the input / output unit that transmits the data indicating the internal state of the processor to the external device, the control unit matches the input mode change command with a predetermined command, for example. At times, the operation mode stored in the mode storage means is changed from the limited mode to the permitted mode or from the permitted mode to the limited mode. This makes J
In a TAG-ICE system or the like, it is possible to control whether the emulation function is permitted or restricted by using a signal line for transmitting / receiving debug data. As a result, with a simple system, it is possible to provide a microcontroller having an emulation function that can surely prevent resource leakage during debugging.
【0019】第2の発明に係るマイクロコントローラ
は、データを記憶する記憶デバイスと、記憶デバイスか
らデータを読出すための記憶デバイス制御手段と、エミ
ュレート機能の動作モードを記憶するためのモード記憶
手段と、記憶デバイス制御手段に接続され、マイクロコ
ントローラの外部に設けられた機器との間で情報を入出
力するための入出力手段と、記憶デバイス制御手段とモ
ード記憶手段と入出力手段とを制御するための制御手段
とを含む。入出力手段は、記憶デバイス制御手段に対す
る制御コマンドを機器が入力するための手段と、データ
を機器に出力するための手段とを含む。制御手段は、入
出力手段に機器から制御コマンドが入力されると、モー
ド記憶手段に記憶された動作モードが予め定められた第
1の条件を満足するときには、制御コマンドを記憶デバ
イス制御手段に送信して、記憶デバイス制御手段からデ
ータを受信するように記憶デバイス制御手段を制御する
ための手段と、受信したデータを機器へ出力するように
入出力手段を制御するための手段と、入出力手段に機器
からモード変更コマンドが入力されると、入力されたモ
ード変更コマンドが予め定められた第2の条件を満足す
るときには、動作モードを変更するように、モード記憶
手段を制御するための手段とを含む。A microcontroller according to a second aspect of the present invention is a storage device for storing data, storage device control means for reading data from the storage device, and mode storage means for storing the operation mode of the emulation function. And an input / output unit connected to the storage device control unit for inputting / outputting information to / from a device provided outside the microcontroller, and controlling the storage device control unit, the mode storage unit, and the input / output unit. And a control means for controlling the operation. The input / output unit includes a unit for the device to input a control command for the storage device control unit and a unit for outputting the data to the device. When a control command is input from the device to the input / output unit, the control unit transmits the control command to the storage device control unit when the operation mode stored in the mode storage unit satisfies the first predetermined condition. And means for controlling the storage device control means so as to receive data from the storage device control means, means for controlling the input / output means so as to output the received data to the device, and input / output means When a mode change command is input from the device to the device, means for controlling the mode storage means to change the operation mode when the input mode change command satisfies the second predetermined condition. including.
【0020】第2の発明によると、エミュレート機能と
して、記憶デバイス制御手段が記憶デバイスに格納され
たデータを読出す。コントローラには、外部の機器か
ら、記憶デバイスに格納されたデータを読出すような制
御コマンドが送信されると、記憶デバイス制御手段が記
憶デバイスであるRAMやROMに格納されたデータを
読出して、このデータをコントローラの外部の機器に出
力する。このようなコントローラとして、たとえばJT
AG−ICEがある。制御手段は、制御コマンドが送信
されると、モード記憶手段に記憶されたエミュレータの
動作モードを確認して、たとえば動作モードがエミュレ
ート機能を制限するモードでなければ、記憶デバイス制
御手段に制御コマンドを送信する。これにより、記憶デ
バイスに格納されたデータは、動作モードがエミュレー
ト機能を制限するモードであるときには、外部の機器へ
出力されない。制御手段は、記憶デバイスに格納された
データを外部の機器に送信する入出力手段を用いてモー
ド変更コマンドが入力されると、たとえば入力されたモ
ード変更コマンドが予め定められたコマンドに一致する
ときには、モード記憶手段に記憶された動作モードを、
制限モードから許可モードへ変更したり、許可モードか
ら制限モードへ変更したりする。これにより、JTAG
−ICEシステムなどにおいて、デバッグデータを送受
信する信号線を用いて、エミュレート機能を許可するか
制限するかを制御できる。その結果、簡易なシステム
で、確実にデバック時などにリソースの漏洩を防止する
ことができる、エミュレート機能を有するマイクロコン
トローラを提供することができる。According to the second invention, as the emulation function, the storage device control means reads out the data stored in the storage device. When a control command for reading the data stored in the storage device is transmitted to the controller from an external device, the storage device control unit reads the data stored in the RAM or ROM, which is the storage device, This data is output to a device outside the controller. As such a controller, for example, JT
There is AG-ICE. When the control command is transmitted, the control means confirms the operation mode of the emulator stored in the mode storage means. For example, if the operation mode is not a mode for limiting the emulation function, the control command is sent to the storage device control means. To send. Thus, the data stored in the storage device is not output to the external device when the operation mode is the mode that limits the emulation function. When the mode change command is input by using the input / output unit that transmits the data stored in the storage device to the external device, the control unit, for example, when the input mode change command matches the predetermined command, , The operation mode stored in the mode storage means,
Change from restricted mode to allowed mode, or from allowed mode to restricted mode. As a result, JTAG
In an ICE system or the like, it is possible to control whether the emulation function is permitted or restricted by using a signal line for transmitting / receiving debug data. As a result, with a simple system, it is possible to provide a microcontroller having an emulation function that can surely prevent resource leakage during debugging.
【0021】第3の発明に係るマイクロコントローラ
は、第1または第2の発明の構成に加えて、モード記憶
手段は、エミュレート機能を動作させる許可モードおよ
びエミュレート機能を動作させない制限モードのいずれ
かを記憶するための手段を含む。第1の条件は、モード
記憶手段に記憶された動作モードが、許可モードである
ことである。In the microcontroller according to the third aspect of the invention, in addition to the configuration of the first or second aspect of the invention, the mode storage means has either a permission mode for operating the emulation function or a limitation mode for not operating the emulation function. And means for storing the The first condition is that the operation mode stored in the mode storage means is the permission mode.
【0022】第3の発明によると、モード記憶手段に許
可モードが記憶されている場合にのみ、エミュレート機
能を実行でき、外部の機器に、プロセッサの内部の状態
を表わすデータまたは記憶デバイスに記憶されたデータ
を出力できる。According to the third invention, the emulation function can be executed only when the permission mode is stored in the mode storage means, and the external device stores the data in the data indicating the internal state of the processor or in the storage device. The output data can be output.
【0023】第4の発明に係るマイクロコントローラ
は、第3の発明の構成に加えて、制限モードを解除する
情報を記憶するための解除情報記憶手段をさらに含む。
第2の条件は、入力されたモード変更コマンドが、解除
情報記憶手段に記憶された情報に対応するコマンドであ
ることである。In addition to the structure of the third invention, the microcontroller according to the fourth invention further includes cancellation information storage means for storing information for canceling the restriction mode.
The second condition is that the input mode change command is a command corresponding to the information stored in the release information storage means.
【0024】第4の発明によると、入出力手段を用いて
入力されたモード変更コマンド(たとえば、解除キー)
が、解除情報記憶手段に記憶された情報(たとえば、解
除キー)に一致すると、モード記憶手段に記憶された動
作モードが、制限モードから許可モードへ変更される。
この解除キーを入力できない者は、エミュレート機能を
実行できず、外部の機器に、プロセッサの内部の状態を
表わすデータまたは記憶デバイスに記憶されたデータを
出力できない。According to the fourth invention, a mode change command (for example, a release key) input by using the input / output means.
However, when the information matches the information (for example, the release key) stored in the release information storage means, the operation mode stored in the mode storage means is changed from the restriction mode to the permission mode.
A person who cannot input the release key cannot execute the emulation function, and cannot output the data representing the internal state of the processor or the data stored in the storage device to the external device.
【0025】第5の発明に係るマイクロコントローラ
は、第3の発明の構成に加えて、制限モードを解除する
情報を記憶するための解除情報記憶手段をさらに含む。
第2の条件は、入力されたモード変更コマンドが、解除
情報記憶手段に記憶された情報に対応するコマンドであ
った回数が、予め定められた回数を満足することであ
る。In addition to the configuration of the third aspect, the microcontroller according to the fifth aspect of the present invention further includes release information storage means for storing information for releasing the restricted mode.
The second condition is that the number of times the input mode change command is a command corresponding to the information stored in the release information storage means satisfies a predetermined number of times.
【0026】第5の発明によると、入出力手段を用いて
入力されたモード変更コマンド(たとえば、解除キー)
が、解除情報記憶手段に記憶された情報(たとえば、解
除キー)に、予め定められた回数だけ一致すると、モー
ド記憶手段に記憶された動作モードが、制限モードから
許可モードへ変更される。この解除キーを予め定められ
た回数だけ入力できない者は、エミュレート機能を実行
できず、外部の機器に、プロセッサの内部の状態を表わ
すデータまたは記憶デバイスに記憶されたデータを出力
できない。According to the fifth invention, a mode change command (for example, a release key) inputted by using the input / output means.
However, when the information (for example, the release key) stored in the release information storage means matches a predetermined number of times, the operation mode stored in the mode storage means is changed from the restriction mode to the permission mode. A person who cannot input the release key a predetermined number of times cannot execute the emulation function and cannot output the data representing the internal state of the processor or the data stored in the storage device to the external device.
【0027】第6の発明に係るマイクロコントローラ
は、第3の発明の構成に加えて、エミュレータの動作モ
ードを変更するためのモード変更コマンドと、モード変
更コマンドに対応する解除情報とを記憶するための解除
情報記憶手段をさらに含む。制御手段は、解除情報を機
器へ出力するように入出力手段を制御するための手段を
さらに含む。第2の条件は、入力されたモード変更コマ
ンドが、解除情報記憶手段に記憶された、解除情報に対
応するモード変更コマンドであることである。In addition to the configuration of the third invention, the microcontroller according to the sixth invention stores a mode change command for changing the operation mode of the emulator and release information corresponding to the mode change command. The release information storage means is further included. The control means further includes means for controlling the input / output means to output the release information to the device. The second condition is that the input mode change command is the mode change command corresponding to the release information stored in the release information storage means.
【0028】第6の発明によると、入出力手段を用いて
出力された解除情報(たとえば、公開キー)に対応する
モード変更コマンド(たとえば、解除キー)が、解除情
報記憶手段に記憶された情報(たとえば、解除キー)に
一致すると、モード記憶手段に記憶された動作モード
が、制限モードから許可モードへ変更される。この公開
キーに対応する解除キーを入力できない者は、エミュレ
ート機能を実行できず、外部の機器に、プロセッサの内
部の状態を表わすデータまたは記憶デバイスに記憶され
たデータを出力できない。According to the sixth aspect, the mode change command (eg, release key) corresponding to the release information (eg, public key) output using the input / output means is stored in the release information storage means. When it coincides with (for example, a release key), the operation mode stored in the mode storage means is changed from the restriction mode to the permission mode. A person who cannot input the release key corresponding to the public key cannot execute the emulation function, and cannot output the data representing the internal state of the processor or the data stored in the storage device to the external device.
【0029】[0029]
【発明の実施の形態】以下、図面を参照しつつ、本発明
の実施の形態について説明する。以下の説明では、同一
の部品には同一の符号を付してある。それらの名称およ
び機能も同じである。したがってそれらについての詳細
な説明は繰返さない。BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. In the following description, the same parts are designated by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.
【0030】<第1の実施の形態>図1を参照して、本
実施の形態に係るマイクロコントローラのデバッグ機能
制御回路1500について説明する。なお、本実施の形
態に係るマイクロコンピュータは、図7に示すマイクロ
コントローラ100のデバッグ機能制御回路150に代
えて、デバッグ機能制御回路1500を有する。その他
のハードウェア構成は図7に示す構成と同じである。そ
れらの機能も、図7を参照して説明した機能と同じであ
る。したがってそれらについての詳細な説明は繰返さな
い。<First Embodiment> A debug function control circuit 1500 of a microcontroller according to the present embodiment will be described with reference to FIG. The microcomputer according to the present embodiment has a debug function control circuit 1500 instead of the debug function control circuit 150 of the microcontroller 100 shown in FIG. The other hardware configuration is the same as that shown in FIG. Those functions are also the same as the functions described with reference to FIG. 7. Therefore, detailed description thereof will not be repeated.
【0031】図1に示すように、デバッグ機能制御回路
1500は、バス140に接続されたリソースアクセス
回路1520およびCPU制御回路1540と、リソー
スアクセス回路1520およびCPU制御回路1540
に接続されたプロテクトチェック回路1580と、プロ
テクトチェック回路1580に接続されたアクセスキー
レジスタ1582と、プロテクトチェック回路1580
に接続された機能制限モードレジスタ1584と、プロ
テクトチェック回路1580に接続されたデバッグIF
入出力回路1560と、デバッグIF入出力回路156
0に接続されたデバッグ端子160とを含む。As shown in FIG. 1, debug function control circuit 1500 includes resource access circuit 1520 and CPU control circuit 1540 connected to bus 140, and resource access circuit 1520 and CPU control circuit 1540.
A protect check circuit 1580 connected to the access check register 1580, an access key register 1582 connected to the protect check circuit 1580, and a protect check circuit 1580.
Function limit mode register 1584 connected to the protection check circuit 1580 and the debug IF connected to the protection check circuit 1580.
Input / output circuit 1560 and debug IF input / output circuit 156
And a debug terminal 160 connected to 0.
【0032】これらのデバイスの中で、リソースアクセ
ス回路1520、CPU制御回路1540およびデバッ
グIF入出力回路1560については、接続関係を除い
てその機能は、図8を参照して説明したリソースアクセ
ス回路152、CPU制御回路154およびデバッグI
F入出力回路156とそれぞれ同じである。したがって
それらについての説明は繰返さない。Among these devices, the functions of the resource access circuit 1520, the CPU control circuit 1540 and the debug IF input / output circuit 1560 are the same as those of the resource access circuit 152 described with reference to FIG. , CPU control circuit 154 and debug I
Each is the same as the F input / output circuit 156. Therefore, description thereof will not be repeated.
【0033】プロテクトチェック回路1580は、機能
制限モードレジスタ1584に格納された値が機能制限
モードでないことを示す場合(レジスタの値が「0」)
には、リソースアクセス回路1520およびCPU制御
回路1540に、制御信号を送信する。プロテクトチェ
ック回路1580は、電源が投入されると、機能制限モ
ードレジスタ1584に機能制限モードであることを示
す値(レジスタの値が「1」)を格納する。プロテクト
チェック回路1580は、デバッグIF端子160とデ
バッグIF入出力回路1560とを介してユーザにより
入力されたアクセスキーと、予め格納されたアクセスキ
ーとが一致すると、機能制限モードレジスタ1584に
機能制限モードでないことを示す値(レジスタの値が
「0」)を格納する。The protect check circuit 1580 indicates that the value stored in the function restriction mode register 1584 is not in the function restriction mode (the value of the register is "0").
Control signal is transmitted to the resource access circuit 1520 and the CPU control circuit 1540. When the power is turned on, the protect check circuit 1580 stores a value (register value is “1”) in the function restriction mode register 1584 indicating that the function is in the function restriction mode. When the access key input by the user via the debug IF terminal 160 and the debug IF input / output circuit 1560 and the prestored access key match, the protect check circuit 1580 causes the function limit mode register 1584 to store the function limit mode. A value indicating that it is not (the value of the register is “0”) is stored.
【0034】アクセスキーレジスタ1582は、プロテ
クトチェック回路1580による機能制限を解除するた
めに、内部メモリ(RAM120、ROM130)から
読出されたアクセスキーを格納する。なお、アクセスキ
ーを内部メモリに書込む際にJTAG−ICEを使用す
るため、アクセスキーが内部メモリに格納されていない
場合には、JTAG−ICEによるリソースアクセスが
可能である。The access key register 1582 stores the access key read from the internal memory (RAM 120, ROM 130) in order to cancel the function restriction by the protect check circuit 1580. Since the JTAG-ICE is used when writing the access key in the internal memory, resource access by the JTAG-ICE is possible when the access key is not stored in the internal memory.
【0035】機能制限モードレジスタ1584には、プ
ロテクトチェック回路1580により、機能制限モード
であることを示す値(レジスタに格納された値が
「1」)および機能制限モードでないことを示す値(レ
ジスタに格納された値が「0」)のいずれかが格納され
る。In the function restriction mode register 1584, a value indicating that the function is in the function restriction mode (the value stored in the register is “1”) and a value indicating that the function is not in the function restriction mode (in the register) by the protect check circuit 1580. One of the stored values is "0") is stored.
【0036】プロテクトチェック回路1580は、リソ
ースアクセス回路1520およびCPU制御回路154
0の動作を実行するか否かを判断する。デバッグIF入
出力回路1560は、JTAG−ICE200から受信
したデバッグ用コマンドをデコードして、リソースアク
セス回路1520およびCPU制御回路1540に対す
る制御信号を、プロテクトチェック回路1580に送信
する。The protect check circuit 1580 includes a resource access circuit 1520 and a CPU control circuit 154.
It is determined whether or not the operation of 0 is executed. The debug IF input / output circuit 1560 decodes the debug command received from the JTAG-ICE 200 and sends a control signal for the resource access circuit 1520 and the CPU control circuit 1540 to the protect check circuit 1580.
【0037】プロテクトチェック回路1580は、機能
制限モードレジスタ1584に格納された値を参照して
動作モードが機能制限モードでなければ、デバッグIF
入出力回路1560から受信した制御信号を、リソース
アクセス回路1520およびCPU制御回路1540に
送信する。プロテクトチェック回路1580は、機能制
限モードレジスタ1584に格納された値を参照して動
作モードが機能制限モードであれば、デバッグIF入出
力回路1560から受信した制御信号を、リソースアク
セス回路1520およびCPU制御回路1540に送信
しない。The protect check circuit 1580 refers to the value stored in the function restriction mode register 1584, and if the operation mode is not the function restriction mode, the debug check circuit 1580.
The control signal received from the input / output circuit 1560 is transmitted to the resource access circuit 1520 and the CPU control circuit 1540. The protect check circuit 1580 refers to the value stored in the function restriction mode register 1584, and if the operation mode is the function restriction mode, the control signal received from the debug IF input / output circuit 1560 controls the resource access circuit 1520 and the CPU. Do not send to circuit 1540.
【0038】その結果、機能制限モードである場合に
は、制御信号がリソースアクセス回路1520およびC
PU制御回路1540に送信されないため、デバック機
能は実行されず、内部メモリ(RAM120、ROM1
30)に格納されたデータおよびCPUの内部の状態を
示すデータが外部に読出されることがない。As a result, when in the function limited mode, the control signals are transmitted to the resource access circuits 1520 and C.
Since it is not transmitted to the PU control circuit 1540, the debug function is not executed and the internal memory (RAM 120, ROM 1
The data stored in 30) and the data indicating the internal state of the CPU are not read out to the outside.
【0039】図2を参照して、本実施の形態に係るコン
トローラ100で実行されるプログラムは、デバッグ処
理に関し、以下のような制御構造を有する。Referring to FIG. 2, the program executed by controller 100 according to the present embodiment has the following control structure for the debug process.
【0040】ステップ(以下、ステップをSと略す。)
100にて、コントローラ100に電源が投入されるこ
となどにより、デバッグ機能制御回路1500がリセッ
トされる。S102にて、プロテクトチェック回路15
80は、機能制限モードレジスタ1584の値を「1」
にセットする。S104にて、プロテクトチェック回路
1580は、デバッグIF入出力回路1560へのリセ
ット解除信号の入力を確認する。S106にて、デバッ
グIF入出力回路1560へ、リセット解除信号が入力
されたか否かが判断される。デバッグIF入出力回路1
560にリセット解除信号が入力されると(S106に
てYES)、処理はS108へ移される。もしそうでな
いと(S106にてNO)、処理はS104へ戻され、
デバッグIF入出力回路1560へのリセット解除信号
の入力を待つ。Step (hereinafter, step is abbreviated as S)
At 100, the debug function control circuit 1500 is reset by powering on the controller 100 or the like. At S102, the protect check circuit 15
The value 80 of the function restriction mode register 1584 is "1".
Set to. At S104, protect check circuit 1580 confirms the input of the reset release signal to debug IF input / output circuit 1560. In S106, it is determined whether the reset release signal is input to debug IF input / output circuit 1560. Debug IF input / output circuit 1
When the reset release signal is input to 560 (YES in S106), the process proceeds to S108. If not (NO in S106), the process returns to S104,
The input of the reset release signal to the debug IF input / output circuit 1560 is waited for.
【0041】S108にて、プロテクトチェック回路1
580は、リソースアクセス回路1520に、メモリア
クセス制御信号を送信する。S110にて、リソースア
クセス回路1520は、内部メモリ(RAM120、R
OM130)からアクセスキーを読出す。At S108, the protect check circuit 1
580 transmits a memory access control signal to the resource access circuit 1520. In S110, the resource access circuit 1520 causes the internal memory (RAM 120, R
The access key is read from the OM 130).
【0042】S112にて、リソースアクセス回路15
20は、プロテクトチェック回路1580にアクセスキ
ーを送信する。S114にて、プロテクトチェック回路
1580は、アクセスキーの有効性を確認する。S11
6にて、アクセスキーが有効であるか否かが判断され
る。このとき、アクセスキーのビットがすべて「1」な
どである場合には、有効でないと判断される。アクセス
キーが有効である場合には(S116にてYES)、処
理はS118へ移される。もしそうでないと(S116
にてNO)、処理はS130へ移される。In S112, the resource access circuit 15
20 transmits the access key to the protection check circuit 1580. In S114, protect check circuit 1580 confirms the validity of the access key. S11
At 6, it is determined whether the access key is valid. At this time, if all bits of the access key are “1” or the like, it is determined that the access key is not valid. If the access key is valid (YES in S116), the process proceeds to S118. If not (S116
NO), the process proceeds to S130.
【0043】S118にて、プロテクトチェック回路1
580は、有効なアクセスキーを保存する。At S118, the protect check circuit 1
580 stores a valid access key.
【0044】S120にて、プロテクトチェック回路1
580は、デバッグIF入出力回路1560へのアクセ
スキーの入力を確認する。S122にて、アクセスキー
が入力されたか否かが判断される。アクセスキーが入力
されると(S122にてYES)、処理はS124へ移
される。もしそうでないと(S122にてNO)、処理
はS120へ戻され、デバッグIF入出力回路1560
へアクセスキーが入力されるまで待つ。At S120, the protect check circuit 1
580 confirms the input of the access key to the debug IF input / output circuit 1560. In S122, it is determined whether or not the access key has been input. When the access key is input (YES in S122), the process proceeds to S124. If not (NO in S122), the process is returned to S120 and debug IF input / output circuit 1560 is executed.
Wait until the access key is input to.
【0045】S124にて、デバッグIF入出力回路1
560は、検知したアクセスキーをプロテクトチェック
回路1580に送信する。S126にて、プロテクトチ
ェック回路1580は、入力されたアクセスキーと保存
したアクセスキーとを比較する。S128にてアクセス
キーが一致するか否かが判断される。アクセスキーが一
致する場合には(S128にてYES)、処理はS13
0へ移される。もしそうでないと(S128にてN
O)、処理はS104へ戻される。At S124, the debug IF input / output circuit 1
560 sends the detected access key to the protection check circuit 1580. In S126, protect check circuit 1580 compares the input access key with the stored access key. In S128, it is determined whether the access keys match. If the access keys match (YES in S128), the process proceeds to S13.
Moved to 0. If not (N at S128)
O), the process is returned to S104.
【0046】S130にて、プロテクトチェック回路1
580は、機能制限モードレジスタ1584の値を
「0」にセットする。At S130, the protect check circuit 1
The 580 sets the value of the function restriction mode register 1584 to "0".
【0047】以上のような構造およびフローチャートに
基づく、本実施の形態に係るコントローラの動作につい
て説明する。The operation of the controller according to the present embodiment based on the above structure and flowchart will be described.
【0048】コントローラ100の電源が投入される
と、デバッグ機能制御回路1500がリセットされる
(S100)。プロテクトチェック回路1580が、機
能制限モードレジスタ1584の値を「1」にセットす
る(S102)。デバッグIF端子160に接続された
JTAG−ICEを用いてユーザがリセット解除信号を
入力すると(S106にてYES)、プロテクトチェッ
ク回路1580がリソースアクセス回路1520に、メ
モリアクセス制御信号を送信する(S108)。When the controller 100 is powered on, the debug function control circuit 1500 is reset (S100). The protect check circuit 1580 sets the value of the function restriction mode register 1584 to "1" (S102). When the user inputs a reset release signal using the JTAG-ICE connected to the debug IF terminal 160 (YES in S106), the protection check circuit 1580 transmits a memory access control signal to the resource access circuit 1520 (S108). .
【0049】リソースアクセス回路1520は、内部メ
モリからアクセスキーを読出し(S110)、リソース
アクセス回路1520は、プロテクトチェック回路15
80に読出したアクセスキーを送信する(S112)。
プロテクトチェック回路1580は、受信したアクセス
キーの有効性を判断し、アクセスキーが有効である場合
には(S116にてYES)、プロテクトチェック回路
1580がアクセスキーを保存する(S118)。The resource access circuit 1520 reads the access key from the internal memory (S110), and the resource access circuit 1520 reads the protection check circuit 15 from the internal memory.
The read access key is transmitted to 80 (S112).
Protect check circuit 1580 determines the validity of the received access key, and if the access key is valid (YES in S116), protect check circuit 1580 stores the access key (S118).
【0050】ユーザが、デバッグIF端子160に接続
されたJTAG−ICEを用いてアクセスキーを入力す
ると(S122にてYES)、入力されたアクセスキー
がプロテクトチェック回路1580に送信される(S1
24)。プロテクトチェック回路1580は、入力され
たアクセスキーと保存したアクセスキーとを比較し(S
126)、アクセスキーが一致すると(S128にてY
ES)、プロテクトチェック回路1580は、機能制限
モードレジスタ1584の値を「0」にセットする(S
130)。When the user inputs an access key using JTAG-ICE connected to debug IF terminal 160 (YES in S122), the input access key is transmitted to protection check circuit 1580 (S1).
24). The protect check circuit 1580 compares the input access key with the stored access key (S
126), if the access keys match (Y in S128)
ES), the protection check circuit 1580 sets the value of the function restriction mode register 1584 to "0" (S).
130).
【0051】プロテクトチェック回路1580が、機能
制限モードレジスタ1584の値を「0」にセットした
後は、デバッグIF端子160を介して、JTAG−I
CEから入力された制御コマンドが、プロテクトチェッ
ク回路1580にてデコードされ、制御信号がリソース
アクセス回路1520またはCPU制御回路1540に
送信される。リソースアクセス回路1520またはCP
U制御回路1540は、バス140を介して、内部メモ
リから内部メモリに格納されたデータ、CPUからCP
Uの内部状態を表わすデータを受信する。After the protect check circuit 1580 sets the value of the function restriction mode register 1584 to "0", the JTAG-I is passed through the debug IF terminal 160.
The control command input from the CE is decoded by the protect check circuit 1580, and the control signal is transmitted to the resource access circuit 1520 or the CPU control circuit 1540. Resource access circuit 1520 or CP
The U control circuit 1540 transfers data stored in the internal memory from the internal memory to the CP via the bus 140.
Receive data representing the internal state of U.
【0052】プロテクトチェック回路1580は、受信
したそれらのデータをデバッグIF入出力回路1560
およびデバッグIF端子160を介して、コントローラ
の外部に設けられたJTAG−ICEに送信する。これ
により、プロセッサの内部状態、内部メモリに記憶され
たデータの内容を知ることができる。The protect check circuit 1580 converts the received data into the debug IF input / output circuit 1560.
And via the debug IF terminal 160 to the JTAG-ICE provided outside the controller. As a result, the internal state of the processor and the contents of the data stored in the internal memory can be known.
【0053】以上のようにして、本実施の形態に係るマ
イクロコントローラによると、JTAG−ICEを用い
てターゲットシステムのエミュレーションを行なう場
合、JTAG−ICEとターゲットシステムであるマイ
クロコントローラとを接続する信号線を用いて、ユーザ
がアクセスキーを入力し、そのアクセスキーがコントロ
ーラ内部で記憶されたアクセスキーと一致しない限り、
エミュレート機能は制限される。この制限を解除するた
めには、新たに設けた外部端子を用いることなく、デバ
ッグIF端子に接続された信号線を用いて、正規のアク
セスキーを入力することにより解除することができる。
その結果、簡易なシステムで、確実にデバッグ時などに
リソースの漏洩を防止することができる、エミュレート
機能を有するマイクロコントローラを提供することがで
きる。As described above, according to the microcontroller of this embodiment, when the target system is emulated using JTAG-ICE, the signal line connecting the JTAG-ICE and the microcontroller which is the target system. Using, the user enters the access key, and unless that access key matches the access key stored inside the controller,
Emulation function is limited. In order to cancel this restriction, it is possible to cancel the restriction by using a signal line connected to the debug IF terminal and inputting a regular access key without using a newly provided external terminal.
As a result, with a simple system, it is possible to provide a microcontroller having an emulation function that can reliably prevent resource leakage during debugging or the like.
【0054】<第2の実施の形態>以下、本発明の第2
の実施の形態に係るマイクロコントローラについて説明
する。<Second Embodiment> The second embodiment of the present invention will be described below.
The microcontroller according to the embodiment will be described.
【0055】図3を参照して、本実施の形態に係るマイ
クロコントローラのデバッグ機能制御回路1500に
は、前述の第1の実施の形態に係るデバッグ機能制御回
路1500のアクセスキーレジスタ1582を有さな
い。これ以外のハードウェア構成は、前述の第1の実施
の形態と同じである。したがって、それらについての詳
細な説明はここでは繰返さない。Referring to FIG. 3, debug function control circuit 1500 of the microcontroller according to the present embodiment has access key register 1582 of debug function control circuit 1500 according to the above-described first embodiment. Absent. The other hardware configuration is the same as that of the first embodiment described above. Therefore, detailed description thereof will not be repeated here.
【0056】図4を参照して、本実施の形態に係るコン
トローラのデバッグ機能制御回路1500にて実行され
るプログラムは、以下のような制御構造を有する。な
お、図4に示すフローチャートの中で、前述の図2と同
じ処理については同じステップ番号を付してある。それ
らの処理も同じである。したがって、それらについての
詳細な説明はここでは繰返さない。Referring to FIG. 4, the program executed by debug function control circuit 1500 of the controller according to the present embodiment has the following control structure. In the flowchart shown in FIG. 4, the same steps as those in FIG. 2 described above are designated by the same step numbers. The processing is the same. Therefore, detailed description thereof will not be repeated here.
【0057】S200にて、リセット解除信号が入力さ
れると、プロテクトチェック回路1580は、リソース
アクセス回路1520に、メモリアクセス制御信号を送
信する。このとき、アドレスが指定される。S202に
て、リソースアクセス回路1520は、内部メモリの指
定アドレス(アクセスキーチェック用のプログラムの開
始アドレス)を読出す。S204にて、リソースアクセ
ス回路1520は、プロテクトチェック回路1580
に、指定アドレスの内容を送信する。S206にてプロ
テクトチェック回路1580は、指定アドレスの内容を
確認する。S208にて、指定アドレスが有効であるか
否かが判断される。指定アドレスが有効である場合には
(S208にてYES)、処理はS210へ移される。
もしそうでないと(S208にてNO)、処理はS13
0へ移される。When the reset release signal is input in S200, protect check circuit 1580 transmits a memory access control signal to resource access circuit 1520. At this time, an address is designated. In S202, resource access circuit 1520 reads the designated address (start address of the access key check program) in the internal memory. In S204, the resource access circuit 1520 causes the protection check circuit 1580 to operate.
The contents of the designated address are transmitted to. In S206, the protect check circuit 1580 confirms the contents of the designated address. In S208, it is determined whether the designated address is valid. If the designated address is valid (YES in S208), the process proceeds to S210.
If not (NO in S208), the process proceeds to S13.
Moved to 0.
【0058】S210にて、プロテクトチェック回路1
580は、CPU制御回路1540に、実行アドレス変
更コマンドを送信する。これにより、実行プログラムが
通常のプログラムからアクセスキーチェック用のプログ
ラムに変更される。At S210, the protection check circuit 1
580 sends an execution address change command to the CPU control circuit 1540. As a result, the execution program is changed from the normal program to the access key check program.
【0059】S212にて、デバッグIF入出力回路1
560は、検知したアクセスキーをCPU制御回路15
40に送信する。S214にて、CPUは、CPUの内
部で実行されるプログラムの中で、入力されたアクセス
キーとプログラム内のアクセスキーとを比較する。その
後、処理はS128へ移される。At S212, the debug IF input / output circuit 1
560 indicates the detected access key by the CPU control circuit 15
Send to 40. In S214, the CPU compares the input access key with the access key in the program in the program executed inside the CPU. After that, the process proceeds to S128.
【0060】以上のような構造およびフローチャートに
基づく、本実施の形態に係るマイクロコントローラの動
作について説明する。なお、以下の説明において、前述
の第1の実施の形態のマイクロコントローラと同じ動作
についての説明は、ここでは繰返さない。The operation of the microcontroller according to the present embodiment based on the above structure and flowchart will be described. In the following description, the description of the same operation as that of the microcontroller according to the first embodiment described above will not be repeated here.
【0061】ユーザが、JTAG−ICEを用いてリセ
ット解除信号を入力すると(S106にてYES)、プ
ロテクトチェック回路1580は、リソースアクセス回
路1520に、メモリアクセス制御信号を送信する(S
200)。リソースアクセス回路1520は、内部メモ
リの指定アドレスを読出す(S202)。このとき、ア
クセスキーチェックへのプログラムの開始アドレスが指
定されている。When the user inputs a reset release signal using JTAG-ICE (YES in S106), protect check circuit 1580 transmits a memory access control signal to resource access circuit 1520 (S).
200). The resource access circuit 1520 reads the designated address of the internal memory (S202). At this time, the program start address for the access key check is specified.
【0062】リソースアクセス回路1520は、プロテ
クトチェック回路1580に、指定アドレスの内容を送
信する(S204)。プロテクトチェック回路1580
は、指定アドレスの内容を確認し(S206)、アドレ
スが有効である場合には(S208にてYES)、プロ
テクトチェック回路1580は、CPU制御回路154
0に実行アドレス変更コマンドを送信する(S21
0)。これにより、CPUにより実行されるプログラム
が、通常のプログラムからアクセスキーチェック用プロ
グラムに変更される。The resource access circuit 1520 sends the contents of the designated address to the protection check circuit 1580 (S204). Protect check circuit 1580
Confirms the contents of the designated address (S206), and if the address is valid (YES in S208), the protect check circuit 1580 causes the CPU control circuit 154 to operate.
The execution address change command is transmitted to 0 (S21
0). As a result, the program executed by the CPU is changed from the normal program to the access key checking program.
【0063】ユーザがJTAG−ICEを用いてアクセ
スキーを入力すると(S122にてYES)、デバッグ
IF入出力回路1560は、入力されたアクセスキーを
CPU制御回路1540に送信する(S212)。CP
Uにより実行されるプログラムの中で、入力されたアク
セスキーとプログラム内のアクセスキーとが比較される
(S214)。アクセスキーが一致すると(S218に
てYES)、プロテクトチェック回路1580は、機能
制限モードレジスタ1580の値を「0」にセットする
(S130)。When the user inputs the access key using JTAG-ICE (YES in S122), debug IF input / output circuit 1560 transmits the input access key to CPU control circuit 1540 (S212). CP
In the program executed by U, the input access key is compared with the access key in the program (S214). If the access keys match (YES in S218), protect check circuit 1580 sets the value of function restriction mode register 1580 to "0" (S130).
【0064】以上のようにして、本実施の形態に係るマ
イクロコントローラによると、CPUにより実行される
プログラムの中で、アクセスキーが一致しているか否か
を判断することができる。As described above, the microcontroller according to the present embodiment can determine whether or not the access keys match in the program executed by the CPU.
【0065】<第3の実施の形態>以下、本発明の第3
の実施の形態について説明する。本実施の形態に係るマ
イクロコントローラのハードウェア構成は、前述の第2
の実施の形態のマイクロコントローラのハードウェア構
成と同じである。したがって、それらについての詳細な
説明はここでは繰返さない。<Third Embodiment> The third embodiment of the present invention will be described below.
The embodiment will be described. The hardware configuration of the microcontroller according to the present embodiment is the same as the above-mentioned second configuration.
This is the same as the hardware configuration of the microcontroller of the embodiment. Therefore, detailed description thereof will not be repeated here.
【0066】図5を参照して、本実施の形態に係るマイ
クロコントローラで実行されるプログラムは、デバッグ
処理に関し、以下のような制御構造を有する。なお、図
5に示すフローチャートの中で、前述の図4と同じ処理
については同じステップ番号を付してある。それらにつ
いての処理も同じである。したがって、それらについて
の詳細な説明はここでは繰返さない。Referring to FIG. 5, the program executed by the microcontroller according to the present embodiment has the following control structure for debug processing. In the flowchart shown in FIG. 5, the same steps as those in FIG. 4 described above are designated by the same step numbers. The processing for them is also the same. Therefore, detailed description thereof will not be repeated here.
【0067】S300にて、CPUはカウンタをリセッ
ト(C=1)する。CPUにより実行されるプログラム
の中で、入力されたアクセスキーとプログラム内のアク
セスキーとが一致すると、S302にて、カウンタ値に
1が加算される。S304にて、CPUは、カウンタ値
が規定回数よりも大きいか否かを判断する。カウンタ値
が規定回数より大きい場合には(S304にてYE
S)、処理はS130へ移される。もしそうでないと
(S304にてNO)、処理はS120へ戻される。At S300, the CPU resets the counter (C = 1). When the input access key and the access key in the program match in the program executed by the CPU, 1 is added to the counter value in S302. In S304, the CPU determines whether the counter value is larger than the specified number of times. If the counter value is greater than the specified number of times (YES in S304
S), the process proceeds to S130. If not (NO in S304), the process returns to S120.
【0068】以上のような構造およびフローチャートに
基づく、本発明の実施の形態に係るマイクロコントロー
ラの動作について説明する。The operation of the microcontroller according to the embodiment of the present invention will be described based on the above structure and flowchart.
【0069】ユーザがJTAG−ICEを用いてアクセ
スキーを入力すると(S122にてYES)、CPUに
より実行されるプログラムの中で、入力されたアクセス
キーとプログラム内のアクセスキーとが比較される(S
214)。アクセスキーが一致すると(S218にてY
ES)、カウンタ値に1が加算される(S302)。カ
ウンタ値が規定回数を上回ると(S304にてYE
S)、プロテクトチェック回路1580が機能制限モー
ドレジスタ1584の値を「0」にセットする(S13
0)。When the user inputs an access key using JTAG-ICE (YES in S122), the input access key is compared with the access key in the program in the program executed by the CPU ( S
214). If the access keys match (Y in S218)
ES), and 1 is added to the counter value (S302). When the counter value exceeds the specified number of times (YES in S304
S), the protect check circuit 1580 sets the value of the function restriction mode register 1584 to "0" (S13).
0).
【0070】以上のようにして、本実施の形態に係るマ
イクロコンピュータによると、アクセスキーが入力さ
れ、入力されたアクセスキーが一致した回数が所定の回
数を上回らないと機能制限モードレジスタの値が変更さ
れない。これにより、デバッグ時のデータの漏洩をさら
に防止することができる。As described above, according to the microcomputer of this embodiment, if the access key is input and the number of times the input access keys match does not exceed the predetermined number, the value of the function restriction mode register is set. Not changed This makes it possible to further prevent data leakage during debugging.
【0071】<第4の実施の形態>以下、本発明の第4
の実施の形態について説明する。なお本実施の形態に係
るマイクロコンピュータのハードウェア構成は、前述の
第2の実施の形態のマイクロコントローラのハードウェ
ア構成と同じである。したがって、それらについての詳
細な説明はここでは繰返さない。<Fourth Embodiment> The fourth embodiment of the present invention will be described below.
The embodiment will be described. The hardware configuration of the microcomputer according to the present embodiment is the same as the hardware configuration of the microcontroller according to the second embodiment described above. Therefore, detailed description thereof will not be repeated here.
【0072】図6を参照して、本実施の形態に係るマイ
クロコントローラで実行されるプログラムは、デバッグ
処理に関し、以下のような制御構造を有する。なお、図
6に示すフローチャートの中で、前述の図4に示す処理
と同じ処理については同じステップ番号を付してある。
それらについての処理も同じである。したがって、それ
らについての詳細な説明はここでは繰返さない。Referring to FIG. 6, the program executed by the microcontroller according to the present embodiment has the following control structure for debug processing. In the flowchart shown in FIG. 6, the same steps as those shown in FIG. 4 are designated by the same step numbers.
The processing for them is also the same. Therefore, detailed description thereof will not be repeated here.
【0073】S400にて、CPUは、CPUで実行さ
れるプログラムで、公開キーを作成する。S402に
て、CPUは、デバッグIF入出力回路1560に、公
開キー出力コマンドを送信する。S404にて、デバッ
グIF入出力回路1560は、公開キーをデバッグIF
端子160からJTAG−ICEに出力する。ユーザか
らアクセスキーが入力されると、S406にて、CPU
は、CPUにより実行されるプログラムの中で、入力さ
れたアクセスキーと公開キーに基づくアクセスキーと比
較する。S128にてアクセスキーが一致するか否かが
判断される。アクセスキーが一致する場合には(S12
8にてYES)、処理はS130へ移される。もしそう
でないと(S128にてNO)、処理はS400へ戻さ
れる。S130にて、プロテクトチェック回路1580
は、機能制限モードレジスタ1584の値を「0」にセ
ットする。At S400, the CPU creates a public key by a program executed by the CPU. In S402, the CPU transmits a public key output command to debug IF input / output circuit 1560. In step S404, the debug IF input / output circuit 1560 sets the public key to the debug IF.
Output from terminal 160 to JTAG-ICE. When the access key is input by the user, in S406, the CPU
Compares the input access key and the access key based on the public key in the program executed by the CPU. In S128, it is determined whether the access keys match. If the access keys match (S12)
If YES, the process proceeds to S130. If not (NO in S128), the process returns to S400. At S130, the protect check circuit 1580
Sets the value of the function restriction mode register 1584 to "0".
【0074】以上のような構造およびフローチャートに
基づく、本実施の形態に係るマイクロコントローラの動
作について説明する。The operation of the microcontroller according to the present embodiment based on the above structure and flowchart will be described.
【0075】ユーザが、デバッグIF端子160に接続
されたJTAG−ICEを用いてリセット解除信号を入
力すると(S106にてYES)、内部メモリの指定の
アドレスが読出される(S202)。指定のアドレスの
内容が確認され(S206)、アドレスが有効である場
合には(S208にてYES)、CPU制御回路154
0に実行アドレス変更コマンドが送信され、CPUは、
アクセスキーチェックプログラムを実行する(S21
0)。When the user inputs a reset release signal using JTAG-ICE connected to debug IF terminal 160 (YES in S106), the specified address in the internal memory is read (S202). The contents of the designated address are confirmed (S206), and if the address is valid (YES in S208), the CPU control circuit 154
The execution address change command is sent to 0, and the CPU
Execute the access key check program (S21
0).
【0076】CPUで実行されるプログラムで公開キー
が作成され(S400)、CPUがデバッグIF入出力
回路1560に公開キー出力コマンドを送信する。デバ
ッグIF入出力回路1560は、公開キーをデバッグI
F端子160からJTAG−ICEに出力する。A public key is created by the program executed by the CPU (S400), and the CPU sends a public key output command to the debug IF input / output circuit 1560. The debug IF input / output circuit 1560 uses the public key to debug I
Output from the F terminal 160 to JTAG-ICE.
【0077】ユーザは、JTAG−ICEから出力され
た公開キーに対応するアクセスキーを入力する。アクセ
スキーが、JTAG−ICEから入力されると(S12
2にてYES)、CPUにより実行されるプログラムの
中で、入力されたアクセスキーと公開キーに基づくアク
セスキーとが比較される(S406)。アクセスキーが
一致すると(S128にてYES)、プロテクトチェッ
ク回路1580が機能制限モードレジスタ1584の値
を「0」にセットする。The user inputs the access key corresponding to the public key output from JTAG-ICE. When the access key is input from JTAG-ICE (S12
2), the input access key is compared with the access key based on the public key in the program executed by the CPU (S406). If the access keys match (YES in S128), protect check circuit 1580 sets the value of function restriction mode register 1584 to "0".
【0078】以上のようにして、本実施の形態に係るマ
イクロコントローラによると、マイクロコントローラか
らJTAG−ICEに送信された公開キーに対応するア
クセスキーを入力することにより、エミュレート機能の
制限がなくなり、エミュレートを実行することができ
る。これにより、デバッグ時などにリソースの漏洩を確
実に防止することができる。As described above, according to the microcontroller of this embodiment, the emulation function is not restricted by inputting the access key corresponding to the public key transmitted from the microcontroller to the JTAG-ICE. , Can be emulated. As a result, it is possible to reliably prevent resource leakage during debugging or the like.
【0079】今回開示された実施の形態はすべての点で
例示であって制限的なものではないと考えられるべきで
ある。本発明の範囲は上記した説明ではなくて特許請求
の範囲によって示され、特許請求の範囲と均等の意味お
よび範囲内でのすべての変更が含まれることが意図され
る。The embodiments disclosed this time are to be considered as illustrative in all points and not restrictive. The scope of the present invention is shown not by the above description but by the claims, and is intended to include meanings equivalent to the claims and all modifications within the scope.
【図1】 本発明の第1の実施の形態に係るマイクロコ
ントローラにおけるデバッグ機能制御回路の制御ブロッ
ク図である。FIG. 1 is a control block diagram of a debug function control circuit in a microcontroller according to a first embodiment of the present invention.
【図2】 本発明の第1の実施の形態に係るマイクロコ
ントローラで実行されるデバッグ処理の制御の手順を示
すフローチャートである。FIG. 2 is a flowchart showing a procedure of control of debug processing executed by the microcontroller according to the first embodiment of the present invention.
【図3】 本発明の第2の実施の形態に係るマイクロコ
ントローラにおけるデバッグ機能制御回路の制御ブロッ
ク図である。FIG. 3 is a control block diagram of a debug function control circuit in a microcontroller according to a second embodiment of the present invention.
【図4】 本発明の第2の実施の形態に係るマイクロコ
ントローラで実行されるデバッグ処理の制御の手順を示
すフローチャートである。FIG. 4 is a flowchart showing a procedure of control of debug processing executed by the microcontroller according to the second embodiment of the present invention.
【図5】 本発明の第3の実施の形態に係るマイクロコ
ントローラで実行されるデバッグ処理の制御の手順を示
すフローチャートである。FIG. 5 is a flowchart showing a procedure of control of debug processing executed by the microcontroller according to the third embodiment of the present invention.
【図6】 本発明の第4の実施の形態に係るマイクロコ
ントローラで実行されるデバッグ処理の制御の手順を示
すフローチャートである。FIG. 6 is a flowchart showing a procedure of control of debug processing executed by the microcontroller according to the fourth embodiment of the present invention.
【図7】 本発明に関連するJTAG−ICEシステム
の全体構成を示す図である。FIG. 7 is a diagram showing an overall configuration of a JTAG-ICE system related to the present invention.
【図8】 本発明に関連するマイクロコントローラにお
けるデバッグ機能制御回路の制御ブロック図である。FIG. 8 is a control block diagram of a debug function control circuit in the microcontroller related to the present invention.
100 マイクロコントローラ、110 CPU、12
0 RAM、130ROM、140 バス、150、1
500 デバッグ機能制御回路、152、1520 リ
ソースアクセス回路、154、1540 CPU制御回
路、156、1560 デバッグIF入出力回路、16
0、1600 デバッグIF端子、170 周辺I/
O、180 バス制御回路、190 外部バス端子、2
00 JTAG−ICE、1580 プロテクトチェッ
ク回路、1582 アクセスキーレジスタ、1584
機能制限モードレジスタ。100 Micro controller, 110 CPU, 12
0 RAM, 130 ROM, 140 bus, 150, 1
500 debug function control circuit, 152, 1520 resource access circuit, 154, 1540 CPU control circuit, 156, 1560 debug IF input / output circuit, 16
0, 1600 debug IF terminal, 170 peripheral I /
O, 180 bus control circuit, 190 external bus terminal, 2
00 JTAG-ICE, 1580 Protect check circuit, 1582 Access key register, 1584
Function-restricted mode register.
───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B042 GA13 HH07 HH50 5B048 AA13 DD08 DD10 FF01 5B062 AA07 EE03 EE10 GG01 GG05 JJ08 ─────────────────────────────────────────────────── ─── Continued front page F-term (reference) 5B042 GA13 HH07 HH50 5B048 AA13 DD08 DD10 FF01 5B062 AA07 EE03 EE10 GG01 GG05 JJ08
Claims (6)
トローラであって、前記マイクロコントローラを制御す
るプロセッサと、 前記プロセッサの内部の状態を表わすデータを読出すた
めのプロセッサ制御手段と、 前記エミュレート機能の動作モードを記憶するためのモ
ード記憶手段と、 前記プロセッサ制御手段に接続され、前記マイクロコン
トローラの外部に設けられた機器との間で情報を入出力
するための入出力手段と、 前記プロセッサ制御手段と前記モード記憶手段と前記入
出力手段とを制御するための制御手段とを含み、 前記入出力手段は、前記プロセッサ制御手段に対する制
御コマンドを前記機器が入力するための手段と、前記デ
ータを前記機器に出力するための手段とを含み、 前記制御手段は、前記入出力手段に前記機器から前記制
御コマンドが入力されると、前記モード記憶手段に記憶
された動作モードが予め定められた第1の条件を満足す
るときには、前記制御コマンドを前記プロセッサ制御手
段に送信して、前記プロセッサ制御手段から前記データ
を受信するように前記プロセッサ制御手段を制御するた
めの手段と、前記受信したデータを前記機器へ出力する
ように前記入出力手段を制御するための手段と、前記入
出力手段に前記機器からモード変更コマンドが入力され
ると、前記入力されたモード変更コマンドが予め定めら
れた第2の条件を満足するときには、前記動作モードを
変更するように、前記モード記憶手段を制御するための
手段とを含む、マイクロコントローラ。1. A micro controller having an emulation function, a processor for controlling the micro controller, processor control means for reading data representing an internal state of the processor, and operation of the emulation function. A mode storage unit for storing a mode; an input / output unit connected to the processor control unit for inputting / outputting information to / from a device provided outside the microcontroller; and the processor control unit. A control unit for controlling the mode storage unit and the input / output unit, wherein the input / output unit is a unit for the device to input a control command to the processor control unit; And a means for outputting to the input / output means from the device. When the control command is input and the operation mode stored in the mode storage means satisfies a predetermined first condition, the control command is transmitted to the processor control means and the processor control means is transmitted. Means for controlling the processor control means to receive the data from the device, means for controlling the input / output means to output the received data to the device, and the input / output means When a mode change command is input from the device, the mode storage means is controlled so as to change the operation mode when the input mode change command satisfies a predetermined second condition. A microcontroller, including :.
トローラであって、 データを記憶する記憶デバイスと、 前記記憶デバイスからデータを読出すための記憶デバイ
ス制御手段と、 前記エミュレート機能の動作モードを記憶するためのモ
ード記憶手段と、 前記記憶デバイス制御手段に接続され、前記マイクロコ
ントローラの外部に設けられた機器との間で情報を入出
力するための入出力手段と、 前記記憶デバイス制御手段と前記モード記憶手段と前記
入出力手段とを制御するための制御手段とを含み、 前記入出力手段は、前記記憶デバイス制御手段に対する
制御コマンドを前記機器が入力するための手段と、前記
データを前記機器に出力するための手段とを含み、 前記制御手段は、前記入出力手段に前記機器から前記制
御コマンドが入力されると、前記モード記憶手段に記憶
された動作モードが予め定められた第1の条件を満足す
るときには、前記制御コマンドを前記記憶デバイス制御
手段に送信して、前記記憶デバイス制御手段から前記デ
ータを受信するように前記記憶デバイス制御手段を制御
するための手段と、前記受信したデータを前記機器へ出
力するように前記入出力手段を制御するための手段と、
前記入出力手段に前記機器からモード変更コマンドが入
力されると、前記入力されたモード変更コマンドが予め
定められた第2の条件を満足するときには、前記動作モ
ードを変更するように、前記モード記憶手段を制御する
ための手段とを含む、マイクロコントローラ。2. A microcontroller having an emulation function, the storage device storing data, a storage device control unit for reading data from the storage device, and an operation mode of the emulation function. Mode storage means for inputting / outputting information to / from the storage device control means for inputting / outputting information to / from a device provided outside the microcontroller, the storage device control means and the mode Storage means and control means for controlling the input / output means, wherein the input / output means allows the equipment to input a control command for the storage device control means, and the data to the equipment. And a means for outputting the control command from the device to the input / output means. Then, when the operation mode stored in the mode storage means satisfies the predetermined first condition, the control command is transmitted to the storage device control means, and the data is transmitted from the storage device control means. Means for controlling the storage device control means so as to receive, and means for controlling the input / output means so as to output the received data to the device,
When a mode change command is input to the input / output unit from the device, the mode storage is changed so that the operation mode is changed when the input mode change command satisfies a second predetermined condition. A means for controlling the means.
ト機能を動作させる許可モードおよび前記エミュレート
機能を動作させない制限モードのいずれかを記憶するた
めの手段を含み、 前記第1の条件は、前記モード記憶手段に記憶された動
作モードが、前記許可モードであることである、請求項
1または2に記載のコントローラ。3. The mode storage means includes means for storing either a permission mode in which the emulation function is operated or a restriction mode in which the emulation function is not operated, and the first condition is The controller according to claim 1, wherein the operation mode stored in the mode storage means is the permission mode.
解除する情報を記憶するための解除情報記憶手段をさら
に含み、 前記第2の条件は、前記入力されたモード変更コマンド
が、前記解除情報記憶手段に記憶された情報に対応する
コマンドであることである、請求項3に記載のコントロ
ーラ。4. The controller further includes release information storage means for storing information for releasing the restriction mode, wherein the second condition is that the input mode change command is the release information storage means. The controller according to claim 3, wherein the controller is a command corresponding to the information stored in.
解除する情報を記憶するための解除情報記憶手段をさら
に含み、 前記第2の条件は、前記入力されたモード変更コマンド
が、前記解除情報記憶手段に記憶された情報に対応する
コマンドであった回数が、予め定められた回数を満足す
ることである、請求項3に記載のコントローラ。5. The controller further includes release information storage means for storing information for releasing the restriction mode, wherein the second condition is that the input mode change command is the release information storage means. The controller according to claim 3, wherein the number of times the command is the command corresponding to the information stored in (4) satisfies a predetermined number of times.
の動作モードを変更するためのモード変更コマンドと、
前記モード変更コマンドに対応する解除情報とを記憶す
るための解除情報記憶手段をさらに含み、 前記制御手段は、前記解除情報を前記機器へ出力するよ
うに前記入出力手段を制御するための手段をさらに含
み、 前記第2の条件は、前記入力されたモード変更コマンド
が、前記解除情報記憶手段に記憶された、前記解除情報
に対応するモード変更コマンドであることである、請求
項3に記載のコントローラ。6. The controller includes a mode change command for changing an operation mode of the emulator,
Release information storage means for storing release information corresponding to the mode change command, and the control means includes means for controlling the input / output means to output the release information to the device. Further including, the second condition is that the inputted mode change command is a mode change command corresponding to the release information stored in the release information storage means. controller.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001384107A JP2003186693A (en) | 2001-12-18 | 2001-12-18 | Microcontroller with emulation function |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001384107A JP2003186693A (en) | 2001-12-18 | 2001-12-18 | Microcontroller with emulation function |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2003186693A true JP2003186693A (en) | 2003-07-04 |
Family
ID=27593920
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001384107A Pending JP2003186693A (en) | 2001-12-18 | 2001-12-18 | Microcontroller with emulation function |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2003186693A (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008234129A (en) * | 2007-03-19 | 2008-10-02 | Yaskawa Information Systems Co Ltd | Integrated circuit with data protection function, and data protection program for integrated circuit with data protection function |
| JP2008269388A (en) * | 2007-04-23 | 2008-11-06 | Nec Electronics Corp | Semiconductor device |
| KR100878098B1 (en) * | 2006-08-01 | 2009-01-14 | 가부시키가이샤 히타치세이사쿠쇼 | Fault analysis system, fault analysis method and emulator device |
| JP2010160765A (en) * | 2009-01-09 | 2010-07-22 | Oki Semiconductor Co Ltd | System lsi and debugging method thereof |
| JP2011511383A (en) * | 2008-02-07 | 2011-04-07 | アナログ・デバイシズ・インコーポレーテッド | Method and apparatus for controlling system access during a protected mode of operation |
| US8056142B2 (en) | 2008-12-17 | 2011-11-08 | Samsung Electronics Co., Ltd. | Apparatus and method of authenticating joint test action group (JTAG) |
| JP2018128874A (en) * | 2017-02-08 | 2018-08-16 | 京セラドキュメントソリューションズ株式会社 | Electronic apparatus |
| JP2020091849A (en) * | 2018-11-01 | 2020-06-11 | インフィネオン テクノロジーズ アーゲーInfineon Technologies Ag | System on chip and method for operating system on chip |
-
2001
- 2001-12-18 JP JP2001384107A patent/JP2003186693A/en active Pending
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100878098B1 (en) * | 2006-08-01 | 2009-01-14 | 가부시키가이샤 히타치세이사쿠쇼 | Fault analysis system, fault analysis method and emulator device |
| JP2008234129A (en) * | 2007-03-19 | 2008-10-02 | Yaskawa Information Systems Co Ltd | Integrated circuit with data protection function, and data protection program for integrated circuit with data protection function |
| JP2008269388A (en) * | 2007-04-23 | 2008-11-06 | Nec Electronics Corp | Semiconductor device |
| US7917818B2 (en) | 2007-04-23 | 2011-03-29 | Renesas Electronics Corporation | Semiconductor device controlling debug operation of processing unit in response to permission or prohibition from other processing unit |
| US8010855B2 (en) | 2007-04-23 | 2011-08-30 | Renesas Electronics Corporation | Semiconductor device controlling debug operation of processing unit in response to permission or prohibition from other processing unit |
| US8103923B2 (en) | 2007-04-23 | 2012-01-24 | Renesas Electronics Corporation | Semiconductor device controlling debug operation of processing unit in response to permission or prohibition from other processing unit |
| JP2011511383A (en) * | 2008-02-07 | 2011-04-07 | アナログ・デバイシズ・インコーポレーテッド | Method and apparatus for controlling system access during a protected mode of operation |
| US8056142B2 (en) | 2008-12-17 | 2011-11-08 | Samsung Electronics Co., Ltd. | Apparatus and method of authenticating joint test action group (JTAG) |
| JP2010160765A (en) * | 2009-01-09 | 2010-07-22 | Oki Semiconductor Co Ltd | System lsi and debugging method thereof |
| JP2018128874A (en) * | 2017-02-08 | 2018-08-16 | 京セラドキュメントソリューションズ株式会社 | Electronic apparatus |
| JP2020091849A (en) * | 2018-11-01 | 2020-06-11 | インフィネオン テクノロジーズ アーゲーInfineon Technologies Ag | System on chip and method for operating system on chip |
| JP7366691B2 (en) | 2018-11-01 | 2023-10-23 | インフィネオン テクノロジーズ アーゲー | System-on-chip and methods for operating system-on-chip |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12346488B2 (en) | Methods and systems to restrict usage of a DMA channel | |
| US8959311B2 (en) | Methods and systems involving secure RAM | |
| US9111097B2 (en) | Secure execution architecture | |
| CN100375422C (en) | Method and system for authentication code and/or data | |
| US7669243B2 (en) | Method and system for detection and neutralization of buffer overflow attacks | |
| US20070011419A1 (en) | Method and system for a multi-sharing security firewall | |
| JPWO2006134691A1 (en) | Information processing apparatus, recovery apparatus, program, and recovery method | |
| JP2006523347A (en) | Data processing system and method having peripheral device access protection | |
| KR20000048718A (en) | Secure boot | |
| EP2573675A1 (en) | External boot device, external boot method, information processing device and network communication system | |
| US6912663B1 (en) | Method and system for securing a personal computer bus | |
| JPH11272560A (en) | Integrated circuit | |
| JP2003186693A (en) | Microcontroller with emulation function | |
| US7512761B2 (en) | Programmable processor and methods thereof having memory access locking | |
| EP3208738A1 (en) | Initiator and target firewalls | |
| CN112653668B (en) | Data interaction method and device, computer equipment and storage medium | |
| EP1843250A1 (en) | System and method for checking the integrity of computer program code | |
| JP2003288564A (en) | Memory card | |
| JPH0675861A (en) | Memory access protector | |
| US20240320359A1 (en) | System-on-chip including resource isolation framework and countermeasure circuit, and corresponding method | |
| CN114154163B (en) | Vulnerability detection method and device | |
| JP2002312053A (en) | Execution protection method and data processing device | |
| JP2025098735A (en) | Semiconductor integrated circuit device | |
| KR960702651A (en) | Security memory card | |
| Bowling et al. | Using the PIC® Devices’ SSP and MSSP Modules for Slave I 2 CTM Communication |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041210 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20061219 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20070508 |