JP3166667B2 - Emulation microcomputer - Google Patents

Emulation microcomputer

Info

Publication number
JP3166667B2
JP3166667B2 JP21185897A JP21185897A JP3166667B2 JP 3166667 B2 JP3166667 B2 JP 3166667B2 JP 21185897 A JP21185897 A JP 21185897A JP 21185897 A JP21185897 A JP 21185897A JP 3166667 B2 JP3166667 B2 JP 3166667B2
Authority
JP
Japan
Prior art keywords
emulation
vpp
signal
register
mode
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.)
Expired - Fee Related
Application number
JP21185897A
Other languages
Japanese (ja)
Other versions
JPH1153210A (en
Inventor
隆生 近藤
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 JP21185897A priority Critical patent/JP3166667B2/en
Publication of JPH1153210A publication Critical patent/JPH1153210A/en
Application granted granted Critical
Publication of JP3166667B2 publication Critical patent/JP3166667B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、エミュレーション
用マイクロコンピュータに関し、特に、外部入力端子の
電圧レベルをセンスし、その結果をレジスタのリード値
とするエミュレーション用マイクロコンピュータに関す
る。
The present invention relates to an emulation microcomputer, and more particularly to an emulation microcomputer which senses a voltage level of an external input terminal and uses the result as a read value of a register.

【0002】[0002]

【従来の技術】従来、エミュレーション用マイクロコン
ピュータは、フラッシュメモリセルフ書き込み機能をエ
ミュレーションする、インサーキットエミュレータとし
て適用される。最近、フラッシュメモリ内蔵マイクロコ
ンピュータ(以下、フラッシュマイコンともいう)は、
ユーザのプログラムにより専用ライタを用いることなく
ファームウェアの制御により、ユーザのプログラムが格
納されているフラッシュメモリを書き換える機能を有す
るものが増加している。これはいわゆるフラッシュメモ
リセルフ書き込み機能であり、本機能の増加に伴い、こ
の機能をエミュレーションできるインサーキットエミュ
レータが求められている。
2. Description of the Related Art Conventionally, an emulation microcomputer is applied as an in-circuit emulator for emulating a flash memory self-writing function. Recently, microcomputers with built-in flash memory (hereinafter also referred to as flash microcomputers)
The number of devices having a function of rewriting a flash memory in which a user program is stored by controlling firmware without using a dedicated writer according to the user program is increasing. This is a so-called flash memory self-writing function. With the increase of this function, an in-circuit emulator capable of emulating this function is required.

【0003】従来例のインサーキットエミュレータの構
成を、図5を参照して説明する。本従来例のインサーキ
ットエミュレータ100は、ターゲットシステム6とホ
スト7との間に設定される。このインサーキットエミュ
レータ100は、大きく分けると、エミュレーション部
101とデバッグ部2とで構成されている。一方のエミ
ュレーション部101は、ターゲットとなるマイコン
と、機能的に等価であるCPUエバチップ3と、ターゲ
ットマイコンの周辺部と機能的に等価である周辺エバチ
ップ102と、ターゲットマイコンのメモリに該当する
エミュレーションメモリ5と、で構成される。
A configuration of a conventional in-circuit emulator will be described with reference to FIG. The conventional in-circuit emulator 100 is set between the target system 6 and the host 7. The in-circuit emulator 100 is roughly composed of an emulation unit 101 and a debug unit 2. One emulation unit 101 includes a CPU evaluation chip 3 that is functionally equivalent to the target microcomputer, a peripheral evaluation chip 102 that is functionally equivalent to the peripheral part of the target microcomputer, and an emulation memory corresponding to the memory of the target microcomputer. And 5.

【0004】上記インサーキットエミュレータ100の
構成部であるエミュレーション部101においては、タ
ーゲットマイコンのCPU機能をCPUエバチップ3
で、ターゲットマイコンの周辺機能を周辺エバチップ1
02で、ターゲットマイコンのメモリをエミュレーショ
ンメモリ5で、それぞれエミュレーションしている。ま
た、ターゲットシステム6とのインターフェース(以
後、I/Fともいう)としてデバッグ部2との不図示の
I/Fを有する。周辺エバチップ102は、ターゲット
となるエミュレーション用マイクロコンピュータ(本従
来例ではフラッシュマイコンを適用している)をエミュ
レーションモードで使用することで周辺エバチップとし
て機能させている。デバッグ部2は、ブレーク機能やト
レース機能などのデバッグに必要な機能と、パソコンや
ワークステーションなどのホスト7とのI/Fと、エミ
ュレーション部101とのI/Fを有する。
An emulation section 101 which is a component of the in-circuit emulator 100 has a CPU function of a target microcomputer and a CPU evaluation chip 3.
Peripheral functions of the target microcomputer
At 02, the memory of the target microcomputer is emulated by the emulation memory 5, respectively. Further, an interface (not shown) with the debug unit 2 is provided as an interface (hereinafter, also referred to as an I / F) with the target system 6. The peripheral evaluation chip 102 functions as a peripheral evaluation chip by using a target emulation microcomputer (a flash microcomputer is applied in the conventional example) in an emulation mode. The debug unit 2 has functions necessary for debugging such as a break function and a trace function, an I / F with the host 7 such as a personal computer or a workstation, and an I / F with the emulation unit 101.

【0005】図6は、図5の周辺エバチップ102のよ
り詳細な構成例を示すブロック図である。周辺エバチッ
プ102の詳細を、モード引き込み部と伴に示した本図
6を参照して以下に説明する。
FIG. 6 is a block diagram showing a more detailed configuration example of the peripheral evaluation chip 102 of FIG. The details of the peripheral evaluation chip 102 will be described below with reference to FIG.

【0006】周辺エバチップ102のRESET端子1
10には外部よりLOWアクティブであるRESET信
号30が入力されており、VPP/MODE端子111
にはモード引き込み部103からの出力信号111が入
力されている。モード引き込み部103は、外部からの
入力信号であるVPP信号120と、GND固定の信号
31との、どちらかを信号121として出力する機能を
もつセレクタである。RESET信号30がLOWレベ
ルになると信号31を選択し、RESET信号30がH
IGHレベルになると40μsec 経過後にVPP信号1
20を選択する。
RESET terminal 1 of peripheral evaluation chip 102
The RESET signal 30 which is LOW active is input to the outside from the VPP / MODE terminal 111.
Is supplied with an output signal 111 from the mode pull-in unit 103. The mode pull-in unit 103 is a selector having a function of outputting either the VPP signal 120 as an external input signal or the signal 31 fixed to GND as the signal 121. When the RESET signal 30 becomes LOW level, the signal 31 is selected, and the RESET signal 30 becomes H level.
When it reaches the IGH level, the VPP signal 1
Select 20.

【0007】モード検出部112は、周辺エバチップ1
02のモードを検出する機能を有する。RESET信号
30のLOWからHIGHレベルの立ち上がりエッジ
で、VPP/MODE端子111の信号121のレベル
を検出する。周辺エバチップ102は、信号121のレ
ベルがHIGHレベル以上ならば通常モードに、LOW
レベルならばエミュレーションモードに設定される。
[0007] The mode detection unit 112
02 mode is detected. At the rising edge of the RESET signal 30 from LOW to HIGH, the level of the signal 121 of the VPP / MODE terminal 111 is detected. The peripheral evaluation chip 102 enters the normal mode if the level of the signal 121 is higher than the HIGH level,
If the level is set, the emulation mode is set.

【0008】高電圧検出部113は、高電圧(10V)
が印可されているかどうかを検出する機能を有する。V
PP/MODE端子111の信号121のレベルが10
VならばHIGHレベルを、そうでなければLOWレベ
ルを信号125へ出力する。デコード部114は、レジ
スタにアクセスする際のアドレスデコーダである。リー
ド/ライト信号生成部115は、FLPMCレジスタ1
17の書き込みと読み出しを制御する。FLPMCレジ
スタ117は8ビットのレジスタであるが、VPPビッ
ト(bit1)にはデータを書き込んで保持するラッチ
がなく、高電圧検出部113の出力信号をリードデータ
として出力する。
[0008] The high voltage detecting unit 113 detects a high voltage (10 V).
Has a function of detecting whether or not is applied. V
When the level of the signal 121 of the PP / MODE terminal 111 is 10
If it is V, it outputs a HIGH level; otherwise, it outputs a LOW level to the signal 125. The decoding unit 114 is an address decoder for accessing a register. The read / write signal generation unit 115 outputs the FLPMC register 1
17 controls writing and reading. The FLPMC register 117 is an 8-bit register, but has no latch for writing and holding data in the VPP bit (bit 1), and outputs the output signal of the high voltage detection unit 113 as read data.

【0009】次に従来例のインサーキットエミュレータ
100において、フラッシュメモリセルフ書き込みのエ
ミュレーションを行う時の動作を、図5および図6を参
照して説明する。
Next, the operation of the conventional in-circuit emulator 100 when emulating flash memory self-writing will be described with reference to FIGS.

【0010】フラッシュメモリセルフ書き込みは、フラ
ッシュマイコン中の通常は有効でない裏ROMへ格納さ
れているファームウェアをユーザのブートプログラムに
より有効にして実行させ、フラッシュメモリを書き換え
る機能である。ただ、実際にフラッシュメモリを書き換
えるには高電圧が必要である。よって、ファームウェア
が実行される前に、ブートプログラムで、フラッシュマ
イコンのVPP/MODE端子に高電圧(10V)が印
加されているかどうかを、FLPMCレジスタのVPP
ビットをリードすることによりチェックしなくてはなら
ない。このFLPMCレジスタのVPPビットが、VP
P=1ならば、VPP/MODE端子に高電圧が印加さ
れている状態である。
The flash memory self-writing is a function of rewriting the flash memory by making the firmware stored in the normally invalid back ROM in the flash microcomputer valid by a user's boot program and executing it. However, a high voltage is required to actually rewrite the flash memory. Therefore, before the firmware is executed, the boot program determines whether a high voltage (10 V) is applied to the VPP / MODE terminal of the flash microcomputer by checking the VPP of the FLPMC register.
It must be checked by reading the bit. The VPP bit of this FLPMC register is VP
If P = 1, a high voltage is applied to the VPP / MODE terminal.

【0011】インサーキットエミュレータ100におい
て、エミュレーションメモリ5中のフラッシュメモリセ
ルフ書き込みのブートプログラムを実行すると、周辺エ
バチップ102のFLPMCレジスタのVPPビットを
リードする命令が実行される。この命令の実行は、VP
P/MODE端子111に10Vが印加されているかど
うかチェックするためである。このときの周辺エバチッ
プ102内の動作は、まずVPP信号120のレベルを
10Vにしておくと高電圧検出用のVPP/MODE端
子111にも10Vが印加され、高電圧検出部113に
より10Vが検出され、HIGHレベルの信号125が
出力される。ただし、VPP/MODE端子111はモ
ード検出との兼用端子であり、周辺エバチップ102
は、リセットされるとモードを設定する必要があるの
で、リセットでエミュレーションモード設定をしてその
後高電圧検出できるようにするために、モード引き込み
部103のようなセレクタをマイコン外部に必要とす
る。
In the in-circuit emulator 100, when the flash memory self-writing boot program in the emulation memory 5 is executed, an instruction to read the VPP bit of the FLPMC register of the peripheral evaluation chip 102 is executed. Execution of this instruction is VP
This is to check whether 10 V is applied to the P / MODE terminal 111. At this time, when the level of the VPP signal 120 is set to 10 V, 10 V is applied to the VPP / MODE terminal 111 for high voltage detection, and 10 V is detected by the high voltage detection unit 113. , HIGH level signal 125 is output. However, the VPP / MODE terminal 111 is a terminal shared with mode detection, and the peripheral evaluation chip 102
It is necessary to set a mode after resetting. Therefore, a selector such as a mode pull-in unit 103 is required outside the microcomputer in order to set an emulation mode by resetting and then detect a high voltage.

【0012】次に、ブートプログラムでFLPMCレジ
スタのVPPビットをリードすると、アドレスデータバ
ス122にFLPMCレジスタのアドレスが送られてく
る。そしてデコード部114でアドレスがデコードされ
て出力信号123がHIGHレベルになる。信号123
によりリード/ライト信号生成部115がアクティブに
なると、リード信号124を出力しトライステートバッ
ファ116のゲートが開くことで、高電圧検出部113
からの出力信号125がFLPMCレジスタのVPPビ
ットのリード値としてアドレスデータバス122へと出
力され、VPP=1がリードできる。
Next, when the VPP bit of the FLPMC register is read by the boot program, the address of the FLPMC register is sent to the address data bus 122. Then, the address is decoded by the decoding unit 114, and the output signal 123 becomes HIGH level. Signal 123
When the read / write signal generation unit 115 becomes active, the read signal 124 is output and the gate of the tri-state buffer 116 is opened, so that the high voltage detection unit 113
Is output to the address data bus 122 as a read value of the VPP bit of the FLPMC register, and VPP = 1 can be read.

【0013】以上のように、この機能をエミュレーショ
ンするとき、インサーキットエミュレータ100では、
フラッシュメモリではなくエミュレーションメモリ5を
書き換えるので、エミュレーションメモリ5の書き込み
自体に高電圧は必要ないが、ブートプログラムでFLP
MCレジスタのVPPビットをチェックするために、高
電圧を入力する必要がある。
As described above, when emulating this function, the in-circuit emulator 100
Since the emulation memory 5 is rewritten instead of the flash memory, a high voltage is not required for writing the emulation memory 5 itself.
In order to check the VPP bit of the MC register, it is necessary to input a high voltage.

【0014】本願発明と技術分野の類似する他の従来例
に特開平2−130640号公報の「マイクロコンピュ
ータ、エバリュエータチップ及びそれらを用いたエミュ
レータ」がある。本従来例は、通常の動作モードとエミ
ュレーションモードに切り換え可能とすると共に、エミ
ュレーションモードに大きなウェイトを占めている。エ
ミュレーションの提供がタイミング良く行われなければ
開発スケジュールに大きな支障を与える。この点で本発
明は効果的である、としている。
Another conventional example having a similar technical field to the present invention is "Microcomputer, evaluator chip and emulator using the same" in JP-A-2-130640. In this conventional example, switching between the normal operation mode and the emulation mode is possible, and the emulation mode occupies a large weight. If emulation is not provided in a timely manner, it will seriously hinder the development schedule. The present invention is said to be effective in this regard.

【0015】[0015]

【発明が解決しようとする課題】しかしながら、上記従
来の技術では、インサーキットエミュレータにおいてフ
ラッシュメモリのセルフ書き込みのエミュレーションを
行う際に、FLPMCレジスタのVPPビットは、VP
P/MODE端子の電圧レベルをセンスしてリードして
いるため、VPP/MODE端子に高電圧(10V)を
印加してVPP=1の状態を作らなければならない。ま
た、VPP/MODE端子は、高電圧検出とモード検出
の兼用端子であるために、モード引き込み部のようなセ
レクタの機能をもつ外部回路が必要になる問題を伴う。
However, according to the above-mentioned prior art, when the in-circuit emulator emulates the self-writing of the flash memory, the VPP bit of the FLPMC register is set to VP.
Since the voltage level of the P / MODE terminal is sensed and read, a high voltage (10 V) must be applied to the VPP / MODE terminal to create a state of VPP = 1. Further, since the VPP / MODE terminal is a terminal for both high voltage detection and mode detection, there is a problem that an external circuit having a selector function such as a mode pull-in unit is required.

【0016】本発明は、外部回路を必要とせず、且つV
PP/MODE端子に高電圧信号を入力しなくてもフラ
ッシュメモリセルフ書き込みのエミュレーションが行え
る、エミュレーション用マイクロコンピュータを提供す
ることを目的とする。
The present invention requires no external circuit, and
An object of the present invention is to provide an emulation microcomputer capable of emulating flash memory self-writing without inputting a high voltage signal to a PP / MODE terminal.

【0017】[0017]

【課題を解決するための手段】かかる目的を達成するた
め、本発明のエミュレーション用マイクロコンピュータ
は、フラッシュメモリを書き換えるのに必要な高電圧が
印加されている状態を示す所定のレベルのデータを、あ
らかじめVPPビットに記憶するレジスタを有し、エミ
ュレーションモード中に、ブートプログラムによりレジ
スタのVPPビットを読み出すことができることを特徴
としている。
In order to achieve the above object, an emulation microcomputer according to the present invention stores a predetermined level of data indicating a state where a high voltage necessary for rewriting a flash memory is applied. It is characterized in that it has a register that stores the VPP bit in advance, and the VPP bit of the register can be read by the boot program during the emulation mode.

【0018】さらに、上記のVPPビットはブレーク状
態のみにおいてライトでき、このブレーク状態時にVP
Pビットを「1」または「0」とすることにより、フラ
ッシュメモリセルフ書き込みのエミュレーションを可能
とするとよい。
Further, the above-mentioned VPP bit can be written only in the break state.
By setting the P bit to “1” or “0”, it is preferable to enable emulation of flash memory self-writing.

【0019】[0019]

【発明の実施の形態】次に添付図面を参照して本発明に
よるエミュレーション用マイクロコンピュータの実施の
形態を詳細に説明する。図1〜図4を参照すると本発明
のエミュレーション用マイクロコンピュータの一実施形
態が示されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of an emulation microcomputer according to the present invention will be described in detail with reference to the accompanying drawings. 1 to 4 show an embodiment of an emulation microcomputer according to the present invention.

【0020】<第1の実施形態> 図1は、本第1の実施形態のエミュレーション用マイク
ロコンピュータを用いたインサーキットエミュレータの
構成図である。また、図2は、図1のインサーキットエ
ミュレータの一構成部である周辺エバチップ4の、より
詳細な構成図である。
<First Embodiment> FIG. 1 is a configuration diagram of an in-circuit emulator using an emulation microcomputer according to the first embodiment. FIG. 2 is a more detailed configuration diagram of the peripheral evaluation chip 4 which is a component of the in-circuit emulator of FIG.

【0021】本実施形態のエミュレーション用マイクロ
コンピュータを、周辺エバチップ4として適用したイン
サーキットエミュレータ8は、エミュレーション部1と
デバッグ部2とにより構成される。この構成部であるエ
ミュレーション部1は、エミュレーションメモリ5とC
PUエバチップ3と周辺エバチップ4とを有している。
なお、図1のインサーキットエミュレータ8の構成と図
5の従来例のインサーキットエミュレータ100との構
成上の相違点は、周辺エバチップ4および102にあ
る。よって、周辺エバチップ4の詳細図である図2を中
心に、本実施形態を説明する。
An in-circuit emulator 8 in which the emulation microcomputer of the present embodiment is applied as the peripheral evaluation chip 4 includes an emulation unit 1 and a debug unit 2. The emulation unit 1, which is a component of the emulation unit, has an emulation memory 5
It has a PU evaluation chip 3 and a peripheral evaluation chip 4.
The difference between the configuration of the in-circuit emulator 8 of FIG. 1 and the configuration of the conventional in-circuit emulator 100 of FIG. 5 lies in the peripheral evaluation chips 4 and 102. Therefore, the present embodiment will be described mainly with reference to FIG. 2 which is a detailed view of the peripheral evaluation chip 4.

【0022】本実施形態の周辺エバチップ4には、図6
に示した従来例のモード引き込み部103のような外部
回路がなく、RESET信号30がRESET端子10
に、VPP/MODE端子11には信号31が直接入力
されて構成されている。モード検出部12は、従来例の
モード検出部112の機能に、通常モードならHIGH
レベルを、エミュレーションモードならLOWレベルを
出力する機能が追加されている。高電圧検出部13の機
能は、従来例の高電圧検出部113の機能と同一であ
る。また、デコード部14の機能も、従来例のデコード
部114の機能と同一である。
FIG. 6 shows the peripheral evaluation chip 4 of this embodiment.
And there is no external circuit like the conventional mode pull-in unit 103 shown in FIG.
The signal 31 is directly input to the VPP / MODE terminal 11. The mode detection unit 12 has a function of the conventional mode detection unit 112,
The function to output the level and the LOW level in the emulation mode is added. The function of the high voltage detector 13 is the same as the function of the high voltage detector 113 of the conventional example. Also, the function of the decoding unit 14 is the same as the function of the decoding unit 114 of the conventional example.

【0023】ブレーク検出部25は、インサーキットエ
ミュレータ8において、ユーザのプログラムが実行され
ていない状態(以下ブレーク状態とする)のときHIG
Hレベルの信号を出力し、ユーザのプログラムが動いて
いる状態のときLOWレベルの信号を出力する。
The break detection unit 25 is connected to the HIG when the user's program is not executed in the in-circuit emulator 8 (hereinafter referred to as a break state).
An H-level signal is output, and a LOW-level signal is output when the user program is running.

【0024】FLPMCレジスタ23の読み出し書き込
みを制御するリード/ライト信号生成部15と、FLP
MCレジスタ24の読み出し書き込みを制御するリード
/ライト信号生成部16は、同一アドレスにマッピング
されている。これらのリード/ライト信号生成部15お
よび16は、デコード部14からの出力信号33をモー
ド検出部12の出力信号34とその反転信号であるイン
バータ17の出力信号35とでそれぞれマスクしたAN
D19の出力信号36と、AND18の出力信号37と
で、どちらをアクティブにするかが選択される。
A read / write signal generator 15 for controlling reading / writing of the FLPMC register 23;
The read / write signal generator 16 that controls reading and writing of the MC register 24 is mapped to the same address. These read / write signal generators 15 and 16 respectively mask the output signal 33 from the decoder 14 with the output signal 34 of the mode detector 12 and the output signal 35 of the inverter 17 which is an inverted signal of the output signal 34.
Which of the output signals 36 to be activated is selected by the output signal 36 of D19 and the output signal 37 of AND18.

【0025】FLPMCレジスタ23は従来例のFLP
MCレジスタ117と同じ構成であり、リード/ライト
信号生成部15がアクティブなとき、周辺エバチップ4
は従来例の周辺エバチップ102と回路的に等価にな
る。
The FLPMC register 23 is a conventional FLP
The configuration is the same as that of the MC register 117. When the read / write signal generation unit 15 is active, the peripheral evaluation chip 4
Is equivalent in circuit to the peripheral evaluation chip 102 of the conventional example.

【0026】本実施形態のFLPMCレジスタ24は、
従来例のFLPMCレジスタ117とはVPPビットの
構成が異なる。つまり、データを書き込み保存するため
のラッチ21を有し、FLPMCレジスタ24のVPP
ビットは、リード/ライト信号生成部16のライト信号
出力39を、ブレーク検出部25の出力信号42でマス
クしたAND26の出力信号43によりデータライトが
できる。また、リード/ライト信号生成部16のリード
信号出力40により、トライステートバッファ22のゲ
ートを開き、データをリードすることができる。さら
に、ラッチ21はリセットで保存している値を変化させ
ない。
The FLPMC register 24 of this embodiment is
The configuration of the VPP bit is different from the FLPMC register 117 of the conventional example. That is, it has a latch 21 for writing and storing data, and the VPP of the FLPMC register 24
The bits can be written by the output signal 43 of the AND 26 obtained by masking the write signal output 39 of the read / write signal generator 16 with the output signal 42 of the break detector 25. Further, the gate of the tri-state buffer 22 can be opened by the read signal output 40 of the read / write signal generator 16 to read data. Further, the latch 21 does not change the value stored by the reset.

【0027】次に、第1の実施形態におけるフラッシュ
メモリセルフ書き込みのエミュレーション時の動作を、
図1および図2を用いて説明する。従来例と同様に、ユ
ーザのブートプログラム中ではFLPMCレジスタ2
3、24のVPPビットをリードして、VPP=1かど
うかチェックする。このチェックとエミュレーション開
始との関係は以下となる。
Next, the operation at the time of emulation of flash memory self-writing in the first embodiment will be described.
This will be described with reference to FIGS. As in the conventional example, the FLPMC register 2 is used in the user's boot program.
The VPP bits 3, 24 are read to check whether VPP = 1. The relationship between this check and the start of emulation is as follows.

【0028】アドレスデータバス32にFLPMCレジ
スタのアドレスが送られてくると、デコード部14でア
ドレスがデコードされて出力信号33がHIGHレベル
になる。エミュレーションモード中は、信号35がHI
GHレベルになるので、リード/ライト信号生成部16
がアクティブになり、FLPMCレジスタ24にアクセ
スできる。
When the address of the FLPMC register is sent to the address data bus 32, the address is decoded by the decoding unit 14, and the output signal 33 becomes HIGH. During the emulation mode, the signal 35 becomes HI.
GH level, the read / write signal generator 16
Becomes active, and the FLPMC register 24 can be accessed.

【0029】FLPMCレジスタ24のVPPビット
は、ブレーク状態のみにおいてライトできる。よって、
ブレーク状態時に、あらかじめデバッグ部2からFLP
MCレジスタ24のVPPビットに「1」または「0」
を書き込むようにホスト7に設定しておけば、VPP=
1または0、の状態を作ることができる。よって、VP
P/MODE端子11に高電圧を印可しなくても、フラ
ッシュメモリセルフ書き込みのエミュレーションが行え
るようになる。
The VPP bit of the FLPMC register 24 can be written only in the break state. Therefore,
In the break state, the FLP
"1" or "0" in the VPP bit of the MC register 24
Is set in the host 7 so that VPP =
One or zero states can be created. Therefore, VP
Emulation of flash memory self-writing can be performed without applying a high voltage to the P / MODE terminal 11.

【0030】また、外部端子の電圧レベルをセンスする
必要がないため、VPP/MODE端子11はモード検
出用の端子としてだけ機能すればよい。故に、GNDに
固定しておけば、リセットで周辺エバチップ4はエミュ
レーションモードに設定される。リセットされても、F
LPMCレジスタのVPPビットは保持している値を変
更させない。
Since there is no need to sense the voltage level of the external terminal, the VPP / MODE terminal 11 only needs to function as a terminal for mode detection. Therefore, if fixed to GND, the peripheral evaluation chip 4 is set to the emulation mode by reset. Even if reset, F
The VPP bit of the LPMC register does not change the held value.

【0031】<第2の実施形態> 図3の第2の実施形態のインサーキットエミュレータ5
0の構成と、図5の従来例のインサーキットエミュレー
タの構成との相違点は、周辺エバチップ52および10
2の違いにある。よって、周辺エバチップ52の詳細図
である図4を中心に本実施形態の説明をする。本実施形
態の周辺エバチップ52には、従来図4のモード引き込
み部103のような外部回路がなく、RESET信号が
30がRESET端子60に、VPP/MODE端子6
1には信号31が直接入力され構成されている。
<Second Embodiment> An in-circuit emulator 5 according to a second embodiment of FIG.
0 and the configuration of the conventional in-circuit emulator of FIG.
There are two differences. Therefore, the present embodiment will be described mainly with reference to FIG. 4 which is a detailed view of the peripheral evaluation chip 52. The peripheral evaluation chip 52 of the present embodiment does not have an external circuit like the mode pull-in unit 103 of FIG. 4 in the related art, and the RESET signal 30 is transmitted to the RESET terminal 60 and the
A signal 31 is directly input to 1.

【0032】モード検出部62は従来例のモード検出部
112の機能に、通常モードならHIGHレベルを、エ
ミュレーションモードならLOWレベルを出力する機能
を追加してある。高電圧検出部63の機能は従来例の高
電圧検出部113の機能と同一である。また、デコード
部64の機能も従来例のデコード部114の機能と同一
である。
The mode detecting section 62 has a function of outputting a HIGH level in the normal mode and a LOW level in the emulation mode to the function of the mode detecting section 112 of the conventional example. The function of the high voltage detection unit 63 is the same as the function of the high voltage detection unit 113 of the conventional example. The function of the decoding unit 64 is also the same as the function of the decoding unit 114 of the conventional example.

【0033】ブレーク検出部66は、インサーキットエ
ミュレータ50において、ユーザのプログラムが実行さ
れていない状態(以下ブレーク状態とする)のときHI
GHレベルの信号を出力し、ユーザのプログラムが動い
ている状態のときLOWレベルの信号を出力する。リー
ド/ライト信号生成部65はデコード部64からの出力
信号81によりアクティブになり、FLPMCレジスタ
69の読み出し書き込みを制御する。
The break detecting section 66 sets the HI in the in-circuit emulator 50 when the user's program is not executed (hereinafter referred to as a break state).
It outputs a GH level signal and outputs a LOW level signal when the user program is running. The read / write signal generation unit 65 is activated by an output signal 81 from the decoding unit 64, and controls reading and writing of the FLPMC register 69.

【0034】FLPMCレジスタ69は、従来図のFL
PMCレジスタ117とはVPPビットの構成が異な
り、FLPMCレジスタ69のVPPビットは、データ
を書き込み保持し、リセットで保持している値を変更し
ないラッチ70を有する。ラッチ70は、リード/ライ
ト信号生成部65のライト信号出力84をブレーク検出
部66の出力信号85でマスクしたAND67の出力信
号86によりデータをライトできる。
The FLPMC register 69 corresponds to the FL shown in FIG.
The configuration of the VPP bit is different from that of the PMC register 117. The VPP bit of the FLPMC register 69 has a latch 70 for writing and holding data and not changing the value held by reset. The latch 70 can write data by the output signal 86 of the AND 67 obtained by masking the write signal output 84 of the read / write signal generator 65 with the output signal 85 of the break detector 66.

【0035】FLPMCレジスタ69のVPPビットを
リードするときは、ラッチ70のデータをリードするか
高電圧検出部63の出力信号87をリードするかを選択
する。この選択は、リード/ライト信号生成部65のリ
ード信号出力83を、モード検出部62からの出力信号
82とその反転信号であるインバータ68の出力信号8
8でそれぞれマスクしたAND71の出力信号90とA
ND72の出力信号91により、トライステートバッフ
ァ73かトライステートバッファ74のゲートを開いて
行う。
When reading the VPP bit of the FLPMC register 69, it selects whether to read the data of the latch 70 or the output signal 87 of the high voltage detector 63. This selection is performed by setting the read signal output 83 of the read / write signal generation unit 65 to the output signal 82 from the mode detection unit 62 and the inverted signal of the output signal 8 of the inverter 68.
8 and the output signals 90 and A of the AND 71 respectively masked.
The gate of the tri-state buffer 73 or the tri-state buffer 74 is opened by the output signal 91 of the ND 72 to perform the operation.

【0036】次に、第2の実施形態におけるフラッシュ
メモリセルフ書き込みのエミュレーション時の動作例
を、図3および図4を用いて説明する。本動作例は、従
来例と同様に、ユーザのブートプログラム中ではFLP
MCレジスタ69のVPPビットをリードして、VPP
=1かどうかチェックする。このチェックとエミュレー
ション開始との関係は以下による。
Next, an operation example during emulation of flash memory self-writing in the second embodiment will be described with reference to FIGS. In this operation example, as in the conventional example, the FLP
The VPP bit of the MC register 69 is read and the VPP
Check if = 1. The relationship between this check and the start of emulation is as follows.

【0037】アドレスデータバス80にFLPMCレジ
スタのアドレスが送られてくると、デコード部64でア
ドレスがデコードされて出力信号81がHIGHレベル
になり、リード/ライト信号生成部65がアクティブに
なるのでFLPMCレジスタ69にアクセスできる。ま
た、FLPMCレジスタ69のVPPビットはブレーク
状態のみにおいてラッチ70にデータをライトでき、エ
ミュレーションモード中はラッチ70のデータを読み出
す。このため、ブレーク状態時にあらかじめデバッグ部
2からFLPMCレジスタ69のVPPビットに「1」
または「0」を書き込むようにホスト7に設定しておけ
ば、VPP=1または0、の状態を作ることができる。
さらに、VPP/MODE端子61に高電圧を印可しな
くても、フラッシュメモリセルフ書き込みのエミュレー
ションが行えるようになる。
When the address of the FLPMC register is sent to the address data bus 80, the address is decoded by the decoding unit 64, the output signal 81 becomes HIGH, and the read / write signal generation unit 65 becomes active. Register 69 can be accessed. The VPP bit of the FLPMC register 69 can write data to the latch 70 only in the break state, and reads the data of the latch 70 during the emulation mode. Therefore, in the break state, the debugger 2 previously sets the VPP bit of the FLPMC register 69 to “1”.
Alternatively, if the host 7 is set to write “0”, a state of VPP = 1 or 0 can be created.
Further, emulation of flash memory self-writing can be performed without applying a high voltage to the VPP / MODE terminal 61.

【0038】また、外部端子の電圧レベルをセンスする
必要がないため、VPP/MODE端子61はモード検
出用の端子としてだけ機能すればよく、GNDに固定し
ておけば、リセットで周辺エバチップ52はエミュレー
ションモードに設定される。リセットによりFLPMC
レジスタ69のVPPビットは、保持している値を変更
させない。
Further, since it is not necessary to sense the voltage level of the external terminal, the VPP / MODE terminal 61 only has to function as a terminal for mode detection. Set to emulation mode. FLPMC by reset
The value of the VPP bit of the register 69 is not changed.

【0039】尚、上述の実施形態は本発明の好適な実施
の一例である。但し、これに限定されるものではなく、
本発明の要旨を逸脱しない範囲内において種々変形実施
が可能である。
The above embodiment is an example of a preferred embodiment of the present invention. However, it is not limited to this.
Various modifications can be made without departing from the spirit of the present invention.

【0040】[0040]

【発明の効果】以上の説明より明かなように、本発明の
エミュレーション用マイクロコンピュータは、フラッシ
ュメモリを書き換えるのに必要な高電圧が印加されてい
る状態を示す所定のレベルのデータを、あらかじめVP
Pビットに記憶し、エミュレーションモード中に、ブー
トプログラムによりVPPビットを読み出し可能として
いる。よって、VPP/MODE端子に高電圧信号を入
力しなくても、フラッシュメモリセルフ書き込みのエミ
ュレーションが行え、高電圧の必要がなくなる。
As is clear from the above description, the emulation microcomputer of the present invention stores a predetermined level of data indicating a state in which a high voltage necessary for rewriting the flash memory is applied to the VP in advance.
The data is stored in the P bit, and the VPP bit can be read by the boot program during the emulation mode. Therefore, even when a high voltage signal is not input to the VPP / MODE terminal, emulation of flash memory self-writing can be performed, and high voltage is not required.

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

【図1】本発明のエミュレーション用マイクロコンピュ
ータが適用される第1の実施形態のインサーキットエミ
ュレータの構成図である。
FIG. 1 is a configuration diagram of an in-circuit emulator of a first embodiment to which an emulation microcomputer of the present invention is applied.

【図2】図1の周辺エバチップ4のより詳細なブロック
構成図である。
FIG. 2 is a more detailed block diagram of the peripheral evaluation chip 4 of FIG. 1;

【図3】第2の実施形態のインサーキットエミュレータ
の構成図である。
FIG. 3 is a configuration diagram of an in-circuit emulator according to a second embodiment.

【図4】図3の周辺エバチップ52のより詳細なブロッ
ク構成図である。
FIG. 4 is a more detailed block diagram of the peripheral evaluation chip 52 of FIG. 3;

【図5】従来例のインサーキットエミュレータの構成図
である。
FIG. 5 is a configuration diagram of a conventional in-circuit emulator.

【図6】図5の周辺エバチップ102のより詳細なブロ
ック構成図である。
FIG. 6 is a more detailed block diagram of the peripheral evaluation chip 102 of FIG. 5;

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

1 第1の実施形態のエミュレーション部 2 デバッグ部 3 CPUエバチップ 4 第1の実施形態の周辺エバチップ(フラッシュマイ
コン) 5 エミュレーションメモリ 6 ターゲットシステム 7 ホスト 8 第1の実施形態のインサーキットエミュレータ 10 第1の実施形態のRESET端子 11 第1の実施形態のVPP/MODE端子 12 第1の実施形態のモード検出部 13 第1の実施形態の高電圧検出部 14 第1の実施形態のデコード部 15 第1の実施形態のリード/ライト信号生成部 16 第1の実施形態のリード/ライト信号生成部 17 インバータ 18 AND回路 19 AND回路 20 トライステートバッファ 21 ラッチ 22 トライステートバッファ 23 第1の実施形態のFLPMCレジスタ 24 第1の実施形態のFLPMCレジスタ 25 第1の実施形態のブレーク検出部 26 AND回路 30 RESET信号 31 GND固定の信号 32 アドレスデータバス 33 デコード部14の出力信号 34 モード検出部12の出力信号 35 インバータ17の出力信号 36 AND19の出力信号 37 AND18の出力信号 38 リード/ライト信号生成部15のリード信号出力 39 リード/ライト信号生成部16のリード信号出力 40 リード/ライト信号生成部16のライト信号出力 41 高電圧検出部13の出力信号 42 ブレーク検出部25の出力信号 43 AND26の出力信号 44 ラッチ21の出力信号 50 第2の実施形態のインサーキットエミュレータ 51 第2の実施形態のエミュレーション部 52 第2の実施形態の周辺エバチップ(フラッシュマ
イコン) 60 第2の実施形態のリセット端子 61 第2の実施形態のVPP/MODE端子 62 第2の実施形態のモード検出部 63 第2の実施形態の高電圧検出部 64 第2の実施形態のデコード部 65 第2の実施形態のリード/ライト信号生成部 66 第2の実施形態のブレーク検出部 67 AND回路 68 インバータ 69 第2の実施形態のFLPMCレジスタ 70 ラッチ 71 AND回路 72 AND回路 73 トライステートバッファ 74 トライステートバッファ 80 アドレスデータバス 81 デコード部81の出力信号 82 モード検出部62の出力信号 83 リード/ライト信号生成部65のリード信号出力 84 リード/ライト信号生成部65のライト信号出力 85 ブレーク検出部66の出力信号 86 AND67の出力信号 87 高電圧検出部63の出力信号 88 インバータ68の出力信号 89 ラッチ70の出力信号 90 AND71の出力信号 91 AND72の出力信号 100 従来例のインサーキットエミュレータ 101 従来例のエミュレーション部 102 従来例の周辺エバチップ(フラッシュマイコ
ン) 103 モード引き込み部 110 従来例のリセット端子 111 従来例のVPP/MODE端子 112 従来例のモード検出部 113 従来例の高電圧検出部 114 従来例のデコード部 115 従来例のリード/ライト信号生成部 116 トライステートバッファ 117 従来例のFLPMCレジスタ 120 VPP信号 121 モード引き込み部103の出力信号 122 アドレスデータバス 123 デコード部114の出力信号 124 リード/ライト信号生成部115のリード信号
出力 125 高電圧検出部113の出力信号
DESCRIPTION OF SYMBOLS 1 Emulation part of 1st embodiment 2 Debugging part 3 CPU evaluation chip 4 Peripheral evaluation chip (flash microcomputer) of 1st embodiment 5 Emulation memory 6 Target system 7 Host 8 In-circuit emulator of 1st embodiment 10 First RESET terminal of the embodiment 11 VPP / MODE terminal of the first embodiment 12 Mode detection unit of the first embodiment 13 High voltage detection unit of the first embodiment 14 Decoding unit of the first embodiment 15 First Read / write signal generator of the embodiment 16 Read / write signal generator of the first embodiment 17 Inverter 18 AND circuit 19 AND circuit 20 Tristate buffer 21 Latch 22 Tristate buffer 23 FLPMC register 24 of the first embodiment 24 F of the first embodiment PMC register 25 Break detector of the first embodiment 26 AND circuit 30 RESET signal 31 GND fixed signal 32 Address data bus 33 Output signal of decode unit 34 Output signal of mode detector 12 35 Output signal of inverter 17 36 AND19 Output signal 37 AND 18 output signal 38 read signal output of read / write signal generator 15 39 read signal output of read / write signal generator 16 40 write signal output of read / write signal generator 16 41 high voltage detector 13 42 output signal of the break detection unit 25 43 output signal of the AND 26 44 output signal of the latch 21 50 in-circuit emulator 51 of the second embodiment 51 emulation unit 52 of the second embodiment 52 peripheral evaluation chip of the second embodiment (Flash 60) Reset terminal according to the second embodiment 61 VPP / MODE terminal according to the second embodiment 62 Mode detection unit 63 according to the second embodiment 63 High voltage detection unit according to the second embodiment 64 Decode unit 65 Read / write signal generation unit of the second embodiment 66 Break detection unit of the second embodiment 67 AND circuit 68 Inverter 69 FLPMC register of the second embodiment 70 Latch 71 AND circuit 72 AND circuit 73 Tristate Buffer 74 Tri-state buffer 80 Address data bus 81 Output signal of decoding section 81 82 Output signal of mode detecting section 62 83 Read signal output of read / write signal generating section 65 84 Write signal output of read / write signal generating section 65 85 Break Output signal 86 of detection section 66 and output of AND67 Force signal 87 Output signal of high voltage detector 63 88 Output signal of inverter 68 89 Output signal of latch 70 Output signal of AND71 91 Output signal of AND72 100 Conventional in-circuit emulator 101 Conventional emulation section 102 Conventional example Peripheral evaluation chip (flash microcomputer) 103 Mode pull-in section 110 Conventional reset terminal 111 Conventional VPP / MODE terminal 112 Conventional mode detection section 113 Conventional high voltage detection section 114 Conventional decoding section 115 Conventional read / Write signal generator 116 Tristate buffer 117 FLPMC register 120 of conventional example 120 VPP signal 121 Output signal of mode pull-in unit 103 122 Address data bus 123 Output signal of decode unit 114 124 Read The output signal of the read signal output 125 high voltage detection unit 113 of the write signal generator 115

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平7−28665(JP,A) 特開 平4−77883(JP,A) 特開 昭63−76023(JP,A) 特開 平7−182198(JP,A) 特開 平5−46430(JP,A) 特開 平2−77848(JP,A) 特開 平8−328889(JP,A) 特開 平8−147186(JP,A) 特開2000−222199(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 11/22 - 11/34 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-7-28665 (JP, A) JP-A-4-77883 (JP, A) JP-A-63-76023 (JP, A) 182198 (JP, A) JP-A-5-46430 (JP, A) JP-A-2-77848 (JP, A) JP-A 8-328889 (JP, A) JP-A 8-147186 (JP, A) JP-A-2000-222199 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 11/22-11/34

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 フラッシュメモリを書き換えるのに必要
な高電圧が印加されている状態を示す所定のレベルのデ
ータを、あらかじめVPPビットに記憶するレジスタを
有し、 エミュレーションモード中に、ブートプログラムにより
前記レジスタの前記VPPビットを読み出すことができ
ことを特徴とする工ミュレーション用マイクロコンピ
ュータ。
1. Necessary for rewriting flash memory
Of a predetermined level indicating a state where an extremely high voltage is applied.
Register that stores the data in the VPP bit in advance.
And in the emulation mode, by the boot program
The VPP bit of the register can be read
Micro-computer for engineering simulation, characterized in that that.
【請求項2】 前記VPPビットはブレーク状態のみに
おいてライトでき、該ブレーク状態時に前記VPPビッ
トを「1」または「0」とすることにより、フラッシュ
メモリセルフ書き込みのエミュレーションを可能とした
ことを特徴とする請求項1記載のエミュレーション用マ
イクロコンピュータ。
2. The flash memory according to claim 1, wherein said VPP bit can be written only in a break state, and emulation of flash memory self-writing is enabled by setting said VPP bit to "1" or "0" in said break state. The microcomputer for emulation according to claim 1 .
JP21185897A 1997-08-06 1997-08-06 Emulation microcomputer Expired - Fee Related JP3166667B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21185897A JP3166667B2 (en) 1997-08-06 1997-08-06 Emulation microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21185897A JP3166667B2 (en) 1997-08-06 1997-08-06 Emulation microcomputer

Publications (2)

Publication Number Publication Date
JPH1153210A JPH1153210A (en) 1999-02-26
JP3166667B2 true JP3166667B2 (en) 2001-05-14

Family

ID=16612775

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21185897A Expired - Fee Related JP3166667B2 (en) 1997-08-06 1997-08-06 Emulation microcomputer

Country Status (1)

Country Link
JP (1) JP3166667B2 (en)

Also Published As

Publication number Publication date
JPH1153210A (en) 1999-02-26

Similar Documents

Publication Publication Date Title
US6094730A (en) Hardware-assisted firmware tracing method and apparatus
US5566303A (en) Microcomputer with multiple CPU&#39;S on a single chip with provision for testing and emulation of sub CPU&#39;s
WO1990002376A1 (en) Circuitry for producing emulation mode in single chip microcomputer
JPH1091529A (en) Register access method for data processing system
US6775734B2 (en) Memory access using system management interrupt and associated computer system
JP3202700B2 (en) Signal processing device
KR100251381B1 (en) Apparatas and method for initializing of volatile memory
US4947478A (en) Switching control system for multipersonality computer system
US5751641A (en) Microprocessor memory test circuit and method
JPH0827730B2 (en) Single-chip microcomputer and test method thereof
JP3166667B2 (en) Emulation microcomputer
US6560698B1 (en) Register change summary resource
CN107544909B (en) Processor chip simulator
JP4324149B2 (en) Emulator and development support system using it
JPS6346466B2 (en)
JP3093642B2 (en) Single chip microcomputer and test method thereof
JPH02186448A (en) Integrated circuit with debugging environment
JPS6320545A (en) Register read-out device for emulator
JP3214413B2 (en) emulator
JP3028779B2 (en) Semiconductor device
JPH0934795A (en) Copy protection method for cpu program
JP3008914B2 (en) Semiconductor integrated circuit
JPH0679278B2 (en) Microcomputer development equipment
JP2000020498A (en) Microcomputer and its restoring method
JPH11212945A (en) Microcomputer and it memory

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20010206

LAPS Cancellation because of no payment of annual fees