JPH08161190A - Emulation processor and emulator mounting the processor - Google Patents

Emulation processor and emulator mounting the processor

Info

Publication number
JPH08161190A
JPH08161190A JP6298234A JP29823494A JPH08161190A JP H08161190 A JPH08161190 A JP H08161190A JP 6298234 A JP6298234 A JP 6298234A JP 29823494 A JP29823494 A JP 29823494A JP H08161190 A JPH08161190 A JP H08161190A
Authority
JP
Japan
Prior art keywords
emulation
mode
emulator
signal
emulation processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP6298234A
Other languages
Japanese (ja)
Other versions
JP3323341B2 (en
Inventor
Naomiki Mitsuishi
直幹 三ッ石
Atsushi Hirose
敦 廣瀬
Tatsuya Suzuki
達也 鈴木
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.)
Hitachi Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Microcomputer System Ltd
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Microcomputer System Ltd, Hitachi Ltd filed Critical Hitachi Microcomputer System Ltd
Priority to JP29823494A priority Critical patent/JP3323341B2/en
Publication of JPH08161190A publication Critical patent/JPH08161190A/en
Application granted granted Critical
Publication of JP3323341B2 publication Critical patent/JP3323341B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE: To provide an emulation processor constituting an emulator capable of quickly and easily controlling the emulation processor and attaining emulation without increasing the number of signal line between the emulation processor and the emulator and without increasing excess load to an external circuit and to provide also the emulator mounting the emulation processor. CONSTITUTION: The emulation processor capable of emulating a microprocessor is provided with a single chip microcomputer part constituted of a CPU, a DTC, a ROM, a RAM, a timer, an SCI, an A/D IOPs 1 to 11, an interruption controller, a BSC, a CPG, etc., as function blocks, and an emulation processor exclusive block having an emulation-only control register for executing brake control, bus control, module selecting control, etc.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロコンピュータ
およびマイクロコンピュータ応用システムの開発装置で
あるエミュレータに関し、たとえばマイクロコンピュー
タのエミュレーション用プロセッサ、さらにこのエミュ
レーション用プロセッサを搭載してなるエミュレータに
適用して有効な技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an emulator, which is a developing device for a microcomputer and a microcomputer application system, and is effective when applied to, for example, a microcomputer emulation processor and an emulator equipped with this emulation processor. Related technology.

【0002】[0002]

【従来の技術】たとえば、シングルチップマイクロコン
ピュータを用いた応用システムの開発を行うために、い
わゆるインサーキットエミュレータと呼ばれるマイクロ
コンピュータ開発装置が用いられる。このマイクロコン
ピュータ開発装置は、いわゆるパーソナルコンピュータ
などのシステム開発装置と開発中の応用システム(ユー
ザシステム)との間に接続され、その応用システムに装
着されるべきシングルチップマイクロコンピュータ(タ
ーゲットマイクロコンピュータ)の機能を代行しつつデ
バッガとしての機能を有し、ソフトウェア或いは応用シ
ステムの開発を支援するものである。
2. Description of the Related Art For example, a microcomputer development device called a so-called in-circuit emulator is used to develop an application system using a single-chip microcomputer. This microcomputer development device is connected between a system development device such as a so-called personal computer and an application system (user system) under development, and is a single-chip microcomputer (target microcomputer) to be installed in the application system. It has a function as a debugger while substituting for the function, and supports the development of software or an application system.

【0003】このマイクロコンピュータ開発装置には、
上記シングルチップマイクロコンピュータに対応したエ
バリュエーションチップと呼ばれる評価用のエミュレー
ション用プロセッサにシングルチップマイクロコンピュ
ータを包含する機能と、マイクロコンピュータの内部状
態を出力したり、マイクロコンピュータの動作を制御し
たりする専用の機能を追加することにより、マイクロコ
ンピュータ開発装置の開発が容易にされる。
In this microcomputer development device,
A function that includes a single-chip microcomputer in an evaluation emulation processor called an evaluation chip that corresponds to the single-chip microcomputer, and that outputs the internal state of the microcomputer and controls the operation of the microcomputer. By adding the function of, the development of the microcomputer development device is facilitated.

【0004】このようなマイクロコンピュータ開発装
置、またはインサーキットエミュレータについては、た
とえば昭和59年11月30日オーム社発行の『LSI
ハンドブック』P562およびP563などによって、
またエミュレーション用プロセッサについては、たとえ
ば特開昭63−106840号公報などによって公知で
あるので詳細な説明は省略する。
For such a microcomputer development device or in-circuit emulator, for example, "LSI" issued by Ohmsha, Ltd. on November 30, 1984 is issued.
Handbook ”P562 and P563,
Further, the emulation processor is well known from, for example, Japanese Patent Laid-Open No. 63-106840, so detailed description thereof will be omitted.

【0005】また、エミュレーション用プロセッサ専用
の機能としては、CPUが所定のアドレスをアクセスし
た場合にCPUを停止し、エミュレータ側に制御を移し
たりする(ブレーク)機能や、かかるブレーク時にエミ
ュレーション専用のプログラムを実行したり、またユー
ザのメモリをモニタしたり、変更したりする機能があ
る。ブレーク時にすることは、たとえば特願平4−10
5779号などに記載されている。
As a function dedicated to the emulation processor, there is a function to stop the CPU when the CPU accesses a predetermined address and transfer control to the emulator side (break), and a program dedicated to the emulation at the time of the break. And to monitor and change the user's memory. What to do at break is, for example, Japanese Patent Application No. 4-10.
No. 5779.

【0006】[0006]

【発明が解決しようとする課題】ところが、前記のよう
なエミュレーション用プロセッサにおいては、マイクロ
コンピュータの高速化によって、エミュレーション用プ
ロセッサを制御する外部回路の設計が困難になってい
る。たとえば、エミュレーション用プロセッサをリセッ
トする場合には、リセット要求がユーザ側の要因による
ものか、エミュレータ側の要因によるものかによってエ
ミュレーション用プロセッサがユーザプログラムを実行
するか、変更する。
In the emulation processor as described above, however, it is difficult to design an external circuit for controlling the emulation processor due to the speeding up of the microcomputer. For example, when resetting the emulation processor, the emulation processor executes or changes the user program depending on whether the reset request is due to a factor on the user side or a factor on the emulator side.

【0007】かかる変更を、公知とされた技術ではない
が、エミュレーション用プロセッサ外部の外部回路によ
って、エミュレーション用プロセッサのリードするベク
タ(スタートアドレス)を変更することによって行って
いた。マイクロコンピュータの高速化によってアクセス
時間が高速化すると、かかるベクタの変更に許容される
時間も短くなってしまう。
Although not a publicly known technique, such a change is performed by changing a vector (start address) read by the emulation processor by an external circuit outside the emulation processor. When the access time is shortened by the speedup of the microcomputer, the time allowed for such vector change is also shortened.

【0008】また、CPUのアドレス空間上にエミュレ
ーション用メモリを配置するが、これはユーザメモリと
重なりあってしまう。CPUの出力したアドレスに対し
てエミュレーション用メモリをアクセスするか、ユーザ
メモリをアクセスするかを判定して、エミュレーション
バスとユーザバスを有する場合はいずれかのバスを有効
にしなければならない。マイクロコンピュータの高速化
によってアクセス時間が高速化すると、かかるアドレス
の判定やバスの制御に許容される時間も短くなってしま
う。
An emulation memory is arranged in the address space of the CPU, which overlaps the user memory. It is necessary to determine whether to access the emulation memory or the user memory with respect to the address output from the CPU, and if either the emulation bus or the user bus is provided, either bus must be enabled. If the access time is shortened by the speedup of the microcomputer, the time allowed for such address determination and bus control will be shortened.

【0009】さらに、CPUのアクセス状態に応じてC
PUのプログラムの実行を中断し、エミュレーション側
に制御を移す(ブレーク)ためにブレーク割込を要求す
るが、エミュレーション用プロセッサ外部でCPUのア
クセス状態を判定して、ブレーク割込を要求したのでは
所望の命令実行状態でCPUをブレークさせることが困
難である。たとえば、所望の命令実行状態よりも数命令
余分に実行したところでブレークするようになってしま
う。シングルステップ動作のような所望の命令実行直後
にブレークさせるようなことが困難になる。
In addition, C depending on the access state of the CPU
A break interrupt is requested to interrupt the execution of the PU program and transfer control to the emulation side (break). However, it is judged that the access status of the CPU is judged outside the emulation processor and the break interrupt is requested. It is difficult to break the CPU in a desired instruction execution state. For example, a break occurs when several instructions are executed in excess of the desired instruction execution state. It becomes difficult to make a break immediately after executing a desired instruction such as a single step operation.

【0010】また、エミュレーション用プロセッサとエ
ミュレータ間は、入出力できる信号本数が、半導体集積
回路装置としてのエミュレーション用プロセッサの端子
数に制約されてしまう。このため、エミュレーション用
プロセッサ内部の、たとえばCPUの命令実行状態を示
す信号などを十分にエミュレータに出力できるとは限ら
ない。また、エミュレータのエミュレーション用プロセ
ッサへの制御信号も十分な本数を入力できるとは限らな
い。
Further, the number of signals that can be input / output between the emulation processor and the emulator is limited by the number of terminals of the emulation processor as the semiconductor integrated circuit device. For this reason, it is not always possible to sufficiently output, for example, a signal indicating the instruction execution state of the CPU inside the emulation processor to the emulator. Further, it is not always possible to input a sufficient number of control signals to the emulation processor of the emulator.

【0011】さらに、エミュレーション用信号の増加
は、エミュレーション用プロセッサのパッケージサイズ
の増加をする。さらに、エミュレータ自体のサイズを大
きくし、たとえば応用システムを実動作状態にして評価
するようなことが困難になってしまう。
Further, the increase in the emulation signal causes an increase in the package size of the emulation processor. Further, it becomes difficult to increase the size of the emulator itself and evaluate the application system in an actual operating state, for example.

【0012】そこで、本発明の目的は、エミュレーショ
ン用プロセッサとエミュレータ間の信号本数を増加させ
ることなく(エミュレータの大きさを大きくせず、実装
状態でも評価可能としつつ)、外部回路に対する負荷を
さほど増加させずに、高速かつ容易にエミュレーション
用プロセッサを制御し、エミュレーションを実現できる
エミュレータを構成するエミュレーション用プロセッ
サ、さらにこれを搭載したエミュレータを提供すること
にある。
Therefore, an object of the present invention is to reduce the load on the external circuit without increasing the number of signals between the emulation processor and the emulator (without increasing the size of the emulator and enabling evaluation even in the mounted state). An object of the present invention is to provide an emulation processor which constitutes an emulator capable of controlling the emulation processor at high speed and easily without increasing the number and emulating it, and an emulator equipped with the emulation processor.

【0013】本発明の前記ならびにその他の目的と新規
な特徴は、本明細書の記述および添付図面から明らかに
なるであろう。
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

【0014】[0014]

【課題を解決するための手段】本願において開示される
発明のうち、代表的なものの概要を簡単に説明すれば、
以下のとおりである。
Of the inventions disclosed in the present application, a representative one will be briefly described below.
It is as follows.

【0015】すなわち、本発明のエミュレーション用プ
ロセッサは、マイクロコンピュータをエミュレートでき
るプロセッサに適用されるものであり、エミュレーショ
ン用プログラムが動作する第1のモードであるブレーク
モードと、エミュレート対象となるユーザプログラムが
動作する第2のモードであるユーザモードとを有し、か
つそれぞれのモードに対応するブレークリセット、ユー
ザリセットを有し、リセット後に直ちにブレークモード
に遷移するか、ユーザモードとするかを入力端子の状態
で選択可能にしたものである。
That is, the emulation processor of the present invention is applied to a processor capable of emulating a microcomputer. The emulation program operates in a break mode which is the first mode and a user to be emulated. It has a second mode in which the program operates, that is, a user mode, and has a break reset and a user reset corresponding to each mode, and inputs whether to immediately transit to the break mode or to be in the user mode after the reset. It is selectable by the state of the terminal.

【0016】また、エミュレート対象となるマイクロコ
ンピュータのアドレス空間を分割し、ブレークモード時
に、エリア毎にエミュレーションメモリをアクセスする
か、ユーザメモリをアクセスするかを指定する手段とし
てメモリ選択レジスタ(MEMCR)を有するものであ
る。
The address space of the microcomputer to be emulated is divided, and in the break mode, a memory selection register (MEMCR) is used as a means for designating whether to access the emulation memory or the user memory for each area. Is to have.

【0017】さらに、エミュレーション内部にブレーク
条件を設定するようにし、特にシングルステップ処理を
要求する制御ビット(SSTP)を有する場合には、か
かるビットが所定の状態である場合にユーザプログラム
の1命令毎にブレーク割込を自動的に要求可能にし、ま
たブレーク割込制御ビット(BIEA,B)を有する場
合にはPCブレークを可能にし、さらに多重ブレーク割
込制御ビット(BMBE)を有する場合には多重割込を
禁止するようにしたものである。
Further, if a break condition is set inside the emulation, and especially if a control bit (SSTP) for requesting single step processing is provided, each instruction of the user program when the bit is in a predetermined state. To automatically request a break interrupt, and when it has a break interrupt control bit (BIEA, B), it enables a PC break, and when it has a multiple break interrupt control bit (BMBE), it can multiplex. It is designed to prohibit interrupts.

【0018】また、本発明のエミュレータは、前記エミ
ュレーション用プロセッサを搭載したものであり、ユー
ザシステムのリセット信号が活性状態のときはユーザリ
セットが選択される状態にし、エミュレータのリセット
信号が活性状態のときはブレークリセットが選択される
状態にする手段としてのブレークリセット制御回路を有
したり、さらにマイクロコンピュータが指定したバスサ
イクルによってユーザシステムのメモリのリードまたは
ライトを行い、エミュレーション用のバスサイクルによ
ってエミュレータシステムの貸し出しメモリのリードま
たはライトを行うことを可能とするものである。
The emulator of the present invention is equipped with the emulation processor. When the reset signal of the user system is active, user reset is selected, and the reset signal of the emulator is active. In this case, it has a break reset control circuit as a means to bring the break reset into a selected state, and further reads or writes the memory of the user system in a bus cycle specified by the microcomputer, and emulates it in a bus cycle for emulation. It is possible to read or write the rental memory of the system.

【0019】[0019]

【作用】前記したエミュレーション用プロセッサおよび
それを搭載したエミュレータによれば、エミュレーショ
ン用プロセッサ外部で制御していたものをエミュレーシ
ョン用プロセッサに取り込むことによって、エミュレー
ション用プロセッサ内部の豊富な情報を用いることがで
き、またエミュレーション用プロセッサからエミュレー
タへの信号の遅延やエミュレータからエミュレーション
用プロセッサへの信号の遅延に影響されることがなくな
り、さらにエミュレーション用プロセッサとエミュレー
タ間の入出力信号を増加させずに、容易かつ高速にエミ
ュレーション用プロセッサの制御を行うことができる。
According to the emulation processor and the emulator equipped with the emulation processor described above, it is possible to use a wealth of information inside the emulation processor by incorporating into the emulation processor what was controlled outside the emulation processor. In addition, it is not affected by the delay of the signal from the emulation processor to the emulator and the delay of the signal from the emulator to the emulation processor. The emulation processor can be controlled at high speed.

【0020】[0020]

【実施例】以下、本発明の実施例を図面に基づいて詳細
に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0021】図1は本発明の一実施例であるエミュレー
ション用プロセッサのエミュレート対象となるマイクロ
コンピュータの一例を示すブロック図、図2は本実施例
におけるエミュレーション用プロセッサを示すブロック
図、図3〜図20はエミュレーション用プロセッサの詳
細のブロック図、タイミング図、または動作フローチャ
ート、図21は本実施例におけるエミュレーション用プ
ロセッサを搭載したエミュレータのブロック図、図22
はエミュレータの動作フローチャートである。
FIG. 1 is a block diagram showing an example of a microcomputer as an emulation target of an emulation processor according to an embodiment of the present invention, FIG. 2 is a block diagram showing an emulation processor according to the present embodiment, and FIGS. FIG. 20 is a detailed block diagram, timing diagram, or operation flowchart of the emulation processor. FIG. 21 is a block diagram of an emulator equipped with the emulation processor according to the present embodiment.
Is an operation flowchart of the emulator.

【0022】まず、図1により本実施例のエミュレーシ
ョン用プロセッサのエミュレート対象となるマイクロコ
ンピュータの構成を説明する。
First, the configuration of a microcomputer to be emulated by the emulation processor of this embodiment will be described with reference to FIG.

【0023】本実施例におけるマイクロコンピュータ
は、たとえばシングルチップマイクロコンピュータとさ
れ、中央処理装置CPU、データトランスファコントロ
ーラDTC、リードオンリメモリROM、ランダムアク
セスメモリRAM、タイマ、シリアルコミュニケーショ
ンインタフェースSCI、A/D変換器A/D、入出力
ポートIOP1〜11、割込コントローラ、バスコント
ローラBSC、クロック発振器CPGの機能ブロック
(またはモジュール)から構成され、これらの機能ブロ
ックは内部バスによって相互に接続されている。
The microcomputer in this embodiment is, for example, a single-chip microcomputer, and has a central processing unit CPU, a data transfer controller DTC, a read only memory ROM, a random access memory RAM, a timer, a serial communication interface SCI, and an A / D conversion. A / D, input / output ports IOP1 to IOP1, an interrupt controller, a bus controller BSC, and a clock oscillator CPG, which are functional blocks (or modules), and these functional blocks are interconnected by an internal bus.

【0024】バスコントローラは、アドレスの内容を判
定するモジュールセレクト部MSを含む。図示はされな
いものの、タイマは5チャネル分、SCIは3チャネル
分のブロックを含んでいる。
The bus controller includes a module select unit MS that determines the contents of the address. Although not shown, the timer includes blocks for 5 channels and the SCI includes blocks for 3 channels.

【0025】内部バスはアドレスバス・データバスの
他、リード信号・ライト信号を含み、さらにバスサイズ
信号あるいはシステムクロックを含んでもよい。内部ア
ドレスバスには、IAB、PABが存在する。内部デー
タバスにはIDB、PDBが存在する。IABとPA
B、IDBとPDBはバスコントローラでインタフェー
スされる。
The internal bus includes a read signal / write signal in addition to an address bus / data bus, and may further include a bus size signal or a system clock. The internal address bus has IAB and PAB. The internal data bus has IDB and PDB. IAB and PA
B, IDB and PDB are interfaced by a bus controller.

【0026】内部データバスIDB、PDBは16ビッ
ト構成である。CPUの命令は16ビット単位としてい
る。また、CPUのアドレス空間は16MBとする。P
AB、PDBは、バスコントローラ、タイマ、SCI、
A/D変換器、割込コントローラ、IOP1〜11に接
続される。割込コントローラは、タイマ、SCI、入出
力ポートの出力する割込信号を入力し、CPUおよびD
TCに割込要求信号とベクタ番号を出力する。
The internal data buses IDB and PDB have a 16-bit structure. The CPU instruction is in 16-bit units. The CPU address space is 16 MB. P
AB and PDB are bus controller, timer, SCI,
It is connected to the A / D converter, interrupt controller, and IOP1-11. The interrupt controller inputs the interrupt signals output from the timer, SCI, and the input / output port, and the CPU and D
An interrupt request signal and a vector number are output to TC.

【0027】入出力ポートは、外部バス信号、入出力回
路の入出力信号と兼用とされている。IOP1〜3はア
ドレスバス出力、IOP4,5はデータバス入出力、I
OP6,7はバス制御信号入出力信号と兼用されてい
る。外部アドレス、外部データは、それぞれこれらの入
出力ポートに含まれるバッファ回路を介してIAB、I
DBと接続されている。
The input / output port is also used as an external bus signal and an input / output signal of the input / output circuit. IOP1-3 are address bus outputs, IOP4, 5 are data bus input / output, IOP
OP6 and 7 are also used as bus control signal input / output signals. External addresses and external data are transferred to IAB and IAB via buffer circuits included in these input / output ports, respectively.
It is connected to DB.

【0028】PAB、PDBは入出力ポートのレジスタ
をリード/ライトするために使用し、外部バスとは直接
の関係はない。バス制御信号出力は、チップセレクト、
アドレスストローブ、ハイ/ロウデータストローブ、リ
ードストローブ、ライトストローブ、カラムアドレスス
トローブ、バスアクノリッジ信号などがある。バス制御
入力信号にはウェイト信号、バスリクエスト信号などが
ある。これらの入出力信号は図示はされない。外部バス
拡張を行うことは動作モードなどで選択され、これらの
入出力ポートの機能も選択される。
PAB and PDB are used to read / write the registers of the input / output ports and have no direct relationship with the external bus. Bus control signal output is chip select,
There are address strobe, high / low data strobe, read strobe, write strobe, column address strobe, bus acknowledge signal and the like. Bus control input signals include wait signals and bus request signals. These input / output signals are not shown. The expansion of the external bus is selected depending on the operation mode and the functions of these input / output ports are also selected.

【0029】また、IOP8はタイマ入出力、IOP9
はSCI入出力、IOP10はアナログ入力、IOP1
1は外部割込要求IRQ入力と兼用されている。タイ
マ、SCI、A/D変換器とIOP8〜IOP10との
入出力信号は図示はされない。そのほか、電源端子Vc
c、Vss、アナログ電源端子AVcc、AVss、リ
セット入力端子RES、スタンバイ入力端子STBY、
割込入力端子NMI、クロック入力端子EXTAL、X
TAL、動作モード入力端子MD0、MD1、MD2な
どの入力端子がある。
IOP8 is a timer input / output and IOP9
Is SCI input / output, IOP10 is analog input, IOP1
1 is also used as an external interrupt request IRQ input. Input / output signals of the timer, SCI, A / D converter and IOP8 to IOP10 are not shown. Besides, power supply terminal Vc
c, Vss, analog power supply terminals AVcc, AVss, reset input terminal RES, standby input terminal STBY,
Interrupt input terminal NMI, clock input terminals EXTAL, X
There are input terminals such as TAL and operation mode input terminals MD0, MD1, MD2.

【0030】続いて、図2のブロック図によりエミュレ
ーション用プロセッサの構成を説明する。
Next, the configuration of the emulation processor will be described with reference to the block diagram of FIG.

【0031】エミュレーション用プロセッサは、前記マ
イクロコンピュータ部分、および図示はされないバッフ
ァ回路などを含むエミュレーション用プロセッサ専用ブ
ロックから構成され、公知の半導体製造技術によって1
つの半導体基板上に形成されている。マイクロコンピュ
ータ部分の本発明に直接の関係のない信号などは省略さ
れている。I/Oはタイマ、SCI、A/D、IOPを
含む。BUFは、IOP1〜7に含まれるアドレスバス
・データバス・バス制御信号のバッファ部分である。
The emulation processor comprises the emulation processor dedicated block including the microcomputer portion and a buffer circuit (not shown).
Formed on one semiconductor substrate. Signals and the like which are not directly related to the present invention in the microcomputer portion are omitted. The I / O includes a timer, SCI, A / D and IOP. The BUF is a buffer portion of the address bus / data bus / bus control signals included in the IOPs 1 to 7.

【0032】上記エミュレーション用プロセッサは、応
用システムと信号の送受信を行うユーザインタフェー
ス、およびマイクロコンピュータ開発装置と信号の送受
信を行うエミュレーションインタフェースを有してい
る。
The emulation processor has a user interface for transmitting and receiving signals to and from the application system, and an emulation interface for transmitting and receiving signals to and from the microcomputer development device.

【0033】エミュレーションインタフェースには、入
力信号としてブレーク割込信号BRK、エミュレータ割
込信号EMLIRQ、エミュレータウェイト信号EML
WAITが存在し、出力信号としてブレークアクノリッ
ジ信号BRKAK、トリガ出力信号TOA、TOBが存
在する。そのほかに、アドレスバス、データバス、リー
ド信号、ライト信号などが含まれる。
The emulation interface has a break interrupt signal BRK, an emulator interrupt signal EMLIRQ, and an emulator wait signal EML as input signals.
WAIT is present, and break acknowledge signal BRKAK and trigger output signals TOA and TOB are present as output signals. In addition, an address bus, a data bus, a read signal, a write signal, etc. are included.

【0034】エミュレーション用プロセッサ専用ブロッ
クには、エミュレーション専用制御レジスタを有し、ブ
レーク制御、バス制御、モジュール選択制御などを行
う。たとえば、特開平3−271834号公報あるいは
特願平4−316068号に記載されているように、エ
ミュレーション用プロセッサに内蔵の機能の禁止や動作
の変更を指定して、1個のエミュレーション用プロセッ
サによって複数のマイクロコンピュータのエミュレーシ
ョンを行わせることができる。
The emulation processor dedicated block has an emulation dedicated control register and performs break control, bus control, module selection control and the like. For example, as described in Japanese Patent Application Laid-Open No. 3-271843 or Japanese Patent Application No. 4-316068, one emulation processor is used to specify prohibition of a function built in the emulation processor or change of operation. It is possible to emulate multiple microcomputers.

【0035】モジュール選択制御は、モジュール選択レ
ジスタMSELRによって指定され、かかるモジュール
選択レジスタの設定によってかかるエミュレーション対
象となるマイクロコンピュータの選択を行い、エミュレ
ーション用プロセッサに内蔵の機能の禁止や動作の変更
を指定する制御信号を、バスコントローラBSCに含ま
れる前記モジュールセレクト回路や、そのほかのマイク
ロコンピュータ部分に供給する。
The module selection control is designated by the module selection register MSELR, the microcomputer to be emulated is selected by the setting of the module selection register, and prohibition of the function built in the emulation processor and change of the operation are designated. The control signal to be supplied is supplied to the module select circuit included in the bus controller BSC and other microcomputer parts.

【0036】たとえば、タイマやSCIの使用可能なチ
ャネル数を指定したり、有効なIOPの本数を指定した
りする。また、内蔵ROM、RAMの容量を指定したり
する。禁止されたモジュールは、モジュール選択信号が
非活性状態に固定されるなどによって、リード/ライト
などの動作が抑止される。
For example, the number of usable channels of a timer or SCI is designated, or the number of valid IOPs is designated. Also, the capacity of the built-in ROM and RAM is designated. For the prohibited module, operations such as read / write are suppressed by fixing the module selection signal to the inactive state.

【0037】バス制御は、メモリ制御レジスタMEMC
Rとウェイト制御レジスタEWTCR、ウィンドウ制御
ビットWD1,0と、ブレークアクノリッジ信号BRK
AKとによって指定され、ユーザバスとエミュレーショ
ンバスの制御や、エミュレーション側からのウェイト要
求の許可/禁止などをバスコントローラに指示をする。
バスコントローラは、モジュールセレクト回路のアドレ
ス判定結果とによってバス制御を行う。
The bus control is performed by the memory control register MEMC.
R, wait control register EWTCR, window control bits WD1, 0, and break acknowledge signal BRK
Designated by AK, the bus controller is instructed to control the user bus and the emulation bus and to enable / disable the wait request from the emulation side.
The bus controller performs bus control according to the address determination result of the module select circuit.

【0038】ブレーク制御は、BRK割込信号と、ブレ
ーク制御レジスタBRKCR、ブレークアドレスレジス
タBAR、ブレークアドレスマスクレジスタBAMRに
よって行われ、かかるレジスタとアドレスなどの情報に
応じてブレーク要求、およびシングルステップブレーク
要求をCPUに要求する。
Break control is performed by a BRK interrupt signal, a break control register BRKCR, a break address register BAR, and a break address mask register BAMR. A break request and a single step break request are made according to information such as the register and address. To the CPU.

【0039】EMLWAIT信号がバスコントローラと
リセット制御回路に与えられる。リセット制御回路は特
に制限はされないものの、ユーザリセットRST信号と
ブレークリセットBRST信号を出力し、マイクロコン
ピュータ部分にはユーザリセットRSTが供給され、エ
ミュレーション用プロセッサ専用ブロックにはユーザリ
セットRSTとブレークリセットBRST信号が供給さ
れる。
The EMLWAIT signal is provided to the bus controller and reset control circuit. Although the reset control circuit is not particularly limited, it outputs a user reset RST signal and a break reset BRST signal, the microcomputer reset section is supplied with the user reset RST, and the emulation processor dedicated block is supplied with the user reset RST and break reset BRST signals. Is supplied.

【0040】エミュレータ専用割込制御は、EMLIR
Q信号とエミュレータ専用割込制御レジスタIRQCR
によって制御され、マイクロコンピュータ部分の割込コ
ントローラを介してCPUに割込を要求する。
The emulator-only interrupt control is EMLIR
Q signal and emulator interrupt control register IRQCR
Controlled by the CPU and requests the CPU to interrupt through the interrupt controller of the microcomputer part.

【0041】続いて、図3〜図9のレジスタ構成図によ
り、エミュレータ専用ブロックに含まれるエミュレータ
専用レジスタの構成を説明する。
Next, the configuration of the emulator dedicated register included in the emulator dedicated block will be described with reference to the register configuration diagrams of FIGS.

【0042】リセット初期値が、ユーザリセットとブレ
ークリセットとで相違される。ユーザリセットでは初期
化されず、前値保持とされる。ブレークリセットではエ
ミュレーション用専用レジスタが全て初期化される。
The initial reset value differs between user reset and break reset. It is not initialized by the user reset and is held at the previous value. At break reset, all the dedicated emulation registers are initialized.

【0043】(1).モジュール選択レジスタMSELRは
8ビット構成のレジスタで、DTCの許可禁止、タイマ
のチャネル数、SCIのチャネル数、パッケージ(入出
力ポートの本数)、ROM容量、RAM容量の指定を行
う。
(1). Module selection register MSELR is an 8-bit register, and specifies DTC permission / prohibition, timer channel count, SCI channel count, package (number of input / output ports), ROM capacity, RAM capacity. I do.

【0044】ブレークモードでのみリード/ライト可能
である。かかる指定方法や制御方法は、前記特開平3−
271834号公報あるいは特願平4−316068号
に記載されているので、詳細な説明は省略する。
Read / write is possible only in break mode. Such designation method and control method are described in the above-mentioned Japanese Patent Laid-Open No.
Since it is described in Japanese Patent No. 271834 or Japanese Patent Application No. 4-316068, detailed description will be omitted.

【0045】モジュール選択レジスタはBRES信号に
よって初期化される。ユーザリセットでは保持されるの
で、エミュレータの動作開始後に一度設定すれば、対象
とするマイクロコンピュータを変更しない限り再設定の
必要がない。
The module selection register is initialized by the BRES signal. Since it is retained by the user reset, once the emulator is started to operate, once it is set, it is not necessary to reset it unless the target microcomputer is changed.

【0046】(2).メモリ選択レジスタMEMCRは16
ビット構成のレジスタで、アドレス空間を16分割した
ものに対応し、それぞれの領域にユーザメモリを割り当
てるか、エミュレーションメモリ(貸し出しメモリ)を
割り当てるかを指定する。
(2). The memory selection register MEMCR is 16
A register having a bit configuration corresponds to a 16-divided address space, and specifies whether to allocate a user memory or an emulation memory (rental memory) to each area.

【0047】(3).ウェイト制御レジスタEWTCRは1
6ビット構成のレジスタで、前記同様にアドレス空間を
16分割したものに対応し、それぞれの領域にEMLW
AITを許可するか、禁止するかを指定する。一般的に
は、エミュレーションメモリ(貸し出しメモリ)を割り
当てた領域はEMLWAITを許可し、十分なアクセス
時間を確保できるようにする。
(3). Wait control register EWTCR is 1
This is a 6-bit register that corresponds to the address space divided into 16 in the same manner as above, and the EMLW is set in each area.
Specify whether to allow or prohibit AIT. Generally, the area to which the emulation memory (rental memory) is allocated permits EMLWAIT so that a sufficient access time can be secured.

【0048】バス制御レジスタ・ウェイト制御レジスタ
はBRES信号によって初期化される。ユーザリセット
では保持されるので、エミュレータの動作開始後に一度
設定すれば、対象とするメモリ配置を変更しない限り再
設定の必要がない。ブレークモードでのみリード/ライ
ト可能である。
The bus control register and wait control register are initialized by the BRES signal. Since it is retained at user reset, once it is set after the emulator starts operating, there is no need to reset it unless the target memory allocation is changed. Read / write is possible only in break mode.

【0049】(4).エミュレータ専用割込制御レジスタI
RQCRは8ビット構成のレジスタである。エミュレー
タ割込要求フラグIRQFは、エミュレータ専用割込E
IRQ端子に所定の入力が発生したとき、たとえば立ち
上がりエッジが発生したときに“1”にセットされる。
“1”の状態をリード後、“0”をライトすると“0”
にクリアされる。
(4). Emulator dedicated interrupt control register I
The RQCR is an 8-bit register. The emulator interrupt request flag IRQF is an emulator exclusive interrupt E.
It is set to "1" when a predetermined input occurs at the IRQ terminal, for example, when a rising edge occurs.
After reading the state of "1" and writing "0", "0"
Will be cleared.

【0050】エミュレータ割込許可ビットIRQEは、
エミュレータ専用割込を許可する。IRQFおよびIR
QEがいずれも“1”にセットされているとき、エミュ
レータ専用割込が要求される。エミュレータ専用割込は
ユーザ割込と相違され、受け付けられてもブレークモー
ドに遷移しない。ユーザ側の割込要求と同等に扱われ
る。かかるレジスタはユーザモードまたはブレークモー
ドに拘わらず、リード/ライト可能である。
The emulator interrupt permission bit IRQE is
Allow emulator-only interrupts. IRQF and IR
When both QEs are set to "1", an emulator dedicated interrupt is requested. Emulator-specific interrupts are different from user interrupts, and do not enter break mode even if they are accepted. It is treated the same as an interrupt request from the user side. Such a register can be read / written regardless of the user mode or the break mode.

【0051】かかるエミュレータ割込制御レジスタは、
ユーザモード/ブレークモードに拘わらずリード/ライ
ト可能とされる。エミュレータに搭載したOSのデバッ
ガがユーザプログラム実行中に、このエミュレータ専用
割込を入れることにより割り込みハンドラがタスクの状
態などを調べたりすることに好適である。OSはユーザ
モードでも動作するために、エミュレータ割込制御レジ
スタをユーザモードでリード/ライトすることは都合が
よい。このためにマイクロコンピュータの資源を利用す
ることがない。
The emulator interrupt control register is
Read / write is possible regardless of the user mode / break mode. It is suitable for the interrupt handler to check the task status and the like by inserting this emulator-dedicated interrupt while the OS debugger installed in the emulator is executing the user program. Since the OS operates in the user mode, it is convenient to read / write the emulator interrupt control register in the user mode. Therefore, the resources of the microcomputer are not used.

【0052】ユーザリセットによって、OSも初期化さ
れることに対応してエミュレータ割込制御レジスタもU
RESで初期化される。OSについては、平成3年8月
(株)日立製作所発行『HI8−3X』などに記載され
ている。
Corresponding to the fact that the OS is also initialized by the user reset, the emulator interrupt control register is also set to U.
Initialized by RES. The OS is described in "HI8-3X" issued by Hitachi, Ltd. in August 1991.

【0053】(5).ブレーク制御レジスタBRKCRは1
6ビット構成のレジスタである。ウィンドウ制御ビット
WD0,1は、ブレークモード中にユーザバスのアクセ
スを許可する。WD0ビットが“1”にセットされてい
る時はリードデータアクセス時、WD1ビットが“1”
にセットされている時はライトデータアクセス時にユー
ザバスのアクセスが行われる。ユーザモードのときは無
視される。
(5). Break control register BRKCR is 1
This is a 6-bit register. Window control bits WD0,1 allow access to the user bus during break mode. When the WD0 bit is set to "1", the WD1 bit is "1" during read data access.
When set to, the user bus is accessed during write data access. Ignored in user mode.

【0054】ブレークモードでは、ユーザの指定に関わ
らずアクセスステートは3ステートとされ、DRAMイ
ンタフェース用のアドレスマルチプレクスなどは行わな
い。このとき、WD0、WD1ビットを“1”にセット
するとユーザの指定通りのアクセスを行う。エミュレー
タのメモリコマンドなどで、ブレークモードにおいてユ
ーザメモリをリードして表示したり、指定された値をユ
ーザメモリにライトしたりすることに好適である。
In the break mode, the access state is set to 3 regardless of the user's designation, and address multiplexing for the DRAM interface is not performed. At this time, if the WD0 and WD1 bits are set to "1", the access is performed as specified by the user. It is suitable to read and display the user memory in the break mode by a memory command of the emulator or the like, or to write the specified value to the user memory.

【0055】DRAMアクセス用のアドレスマルチプレ
クスは、平成5年3月(株)日立製作所発行『H8/3
003 ハードウェアマニュアル』p155〜p194
などに記載されている。また、メモリコマンドについて
は、平成6年3月(株)日立製作所発行『H8/300
Hシリーズ エミュレータE7000ユーザーズマニュ
アル』p12−56〜p12−57に記載されている。
The address multiplex for accessing the DRAM is "H8 / 3" issued by Hitachi, Ltd. in March, 1993.
003 Hardware Manual ”p155-p194
Etc. For memory commands, please refer to “H8 / 300” issued by Hitachi, Ltd. in March 1994.
H series emulator E7000 user's manual ”p12-56 to p12-57.

【0056】ウィンドウ制御ビットは、URESで初期
化される。シングルステップビットSSTPは、ユーザ
プログラム1命令実行後にBRK割込を内部で要求す
る。すなわちSSTPビットを“1”にセットした状
態、かつBRKAKが非活性状態のときにシングルステ
ップBRK割込が要求される。ただし、RTB命令実行
後はかかるシングルステップBRK割込要求は無視され
る。
The window control bits are initialized with URES. The single step bit SSTP internally requests a BRK interrupt after executing one instruction of the user program. That is, a single step BRK interrupt is required when the SSTP bit is set to "1" and BRKAK is inactive. However, after executing the RTB instruction, the single step BRK interrupt request is ignored.

【0057】SSTPビットは、CPUの内部状態に影
響を与えず、エミュレータ専用の資源として扱われるか
らデバックに好適である。シングルステップについて
は、平成6年3月(株)日立製作所発行『H8/300
Hシリーズ エミュレータE7000ユーザーズマニュ
アル』p12−76〜p12−78に記載されている。
The SSTP bit is suitable for debugging because it does not affect the internal state of the CPU and is treated as a resource dedicated to the emulator. For single step, published by Hitachi, Ltd. in March 1994, “H8 / 300
H series emulator E7000 user's manual ”p12-76 to p12-78.

【0058】ブレーク割込許可ビットBMBEは、ユー
ザモードで常に禁止状態に初期化されている。これによ
って、ユーザモードからブレークモードへの遷移時のブ
レークの多重例外処理を禁止することができる。多重例
外処理は、たとえばBRK命令とBRK割込の競合があ
る。BRK命令は、たとえばユーザプログラムの最後の
命令の次に配置される。
The break interrupt enable bit BMBE is always initialized to the disabled state in the user mode. As a result, it is possible to prohibit the multiple exception handling of the break at the transition from the user mode to the break mode. In the multiple exception processing, there is a conflict between a BRK instruction and a BRK interrupt, for example. The BRK instruction is arranged, for example, next to the last instruction of the user program.

【0059】このユーザプログラム終了後のBRK命令
の実行とブレーク条件が成立し、BRK割込が要求され
たとき、BRK命令実行後、すなわちブレークモード遷
移後にBRK割込を実行してしまうと、エミュレータ専
用スタックメモリを内蔵している場合、一旦スタックし
た内容を2回めの例外処理で破壊してしまう可能性があ
る。これをブレーク割込許可ビットによってユーザモー
ドからブレークモードへの遷移時のブレークの多重例外
処理を禁止することによって回避することができる。
When the execution of the BRK instruction after the end of the user program and the break condition are satisfied and the BRK interrupt is requested, if the BRK interrupt is executed after the execution of the BRK instruction, that is, after the break mode transition, If the dedicated stack memory is built-in, the contents that were once stacked may be destroyed by the second exception handling. This can be avoided by disabling the multiple exception handling of the break at the transition from the user mode to the break mode by the break interrupt enable bit.

【0060】また、ブレークモード遷移後、BRK命令
は使用しないから、その後ブレーク割込許可ビットを許
可状態にすればブレークモード中であってもBRK割込
を使用することができる。
Since the BRK instruction is not used after the break mode transition, the BRK interrupt can be used even in the break mode by setting the break interrupt enable bit thereafter.

【0061】トリガ出力許可ビットTOEは、ブレーク
条件が成立したときに、トリガ出力端子BTOA、B端
子にトリガ出力を行うことを許可する。ブレーク条件A
が成立するとBTOA端子に、ブレーク条件Bが成立す
るとBTOB端子に、1ステートのハイレベルのパルス
出力を行う。
The trigger output permission bit TOE permits the trigger output to the trigger output terminals BTOA and B when the break condition is satisfied. Break condition A
When the break condition B is satisfied, a 1-state high-level pulse is output when the break condition B is satisfied.

【0062】かかる端子を観測することによって、プロ
グラムの第1の所望のステップから第2の所望のステッ
プまでの時間を容易に計測できる。プログラムの第1の
所望のステップのアドレスをBARAに、第2の所望の
ステップのアドレスをBARBに設定し、BIEA、B
IEBビットを“0”にクリアし、命令実行を選択して
TOEビットを“1”にセットした状態でプログラムを
実行させ、BTOA端子に1ステートのハイレベルが出
力されてからBTOB端子に1ステートのハイレベルが
出力されるまでの時間を計測することができる。あるい
は、プログラムの実行回数を計測することができる。こ
の結果に基づき、BRK端子によってブレークを要求す
ることができる。
By observing such a terminal, the time from the first desired step to the second desired step of the program can be easily measured. Set the address of the first desired step of the program to BARA and the address of the second desired step to BARB, and set BIEA, B
Clear the IEB bit to "0", select the instruction execution, execute the program with the TOE bit set to "1", and output one high level from the BTOA pin to the BTOB pin for one state. The time until the high level of is output can be measured. Alternatively, the number of times the program is executed can be measured. Based on this result, a break can be requested by the BRK terminal.

【0063】ブレーク割込A,B許可ビットBIEA,
Bは、ブレーク条件A,Bによるブレーク要求を許可す
る。禁止状態でもブレーク条件の判定を行い、BTO
A,B端子のパルス出力を行うことができる。
Break interrupt A, B enable bit BIEA,
B permits the break request according to break conditions A and B. The break condition is judged even in the disabled state, and the BTO
Pulse output from the A and B terminals can be performed.

【0064】条件選択ビットCSA1,0およびCSB
1,0は、ブレーク条件を設定する。命令の実行、リー
ドアクセス、ライトアクセス、リードまたはライトアク
セスから選択できる。たとえば、命令の実行を選択する
とCPUがBARおよびBAMRで指定したアドレスの
命令をフェッチし、実行したときにブレークが要求され
当該命令の実行後にブレークするようにされる。ブレー
クについては、平成6年3月(株)日立製作所発行『H
8/300Hシリーズ エミュレータE7000ユーザ
ーズマニュアル』p12−56〜p12−57に記載さ
れている。かかるレジスタは、ブレークモードでのみリ
ード/ライト可能である。
Condition selection bits CSA1,0 and CSB
1 and 0 set break conditions. You can select from instruction execution, read access, write access, read or write access. For example, when the execution of an instruction is selected, the CPU fetches the instruction at the address specified by BAR and BAMR, and when the instruction is executed, a break is requested and the break is made after the execution of the instruction. Regarding the break, published by Hitachi, Ltd. in March 1994, "H
8 / 300H series emulator E7000 user's manual "p12-56 to p12-57. Such a register can be read / written only in break mode.

【0065】(6).アドレスレジスタBAR・アドレスマ
スクレジスタBAMRは、CPUのアドレス空間に対応
して24ビットのレジスタとされる。A,Bの2チャネ
ル分が存在する。
(6). Address Register BAR / Address Mask Register BAMR is a 24-bit register corresponding to the address space of the CPU. There are two channels, A and B.

【0066】アドレスレジスタはアドレスを指定する。
この内、アドレスマスクレジスタの対応するビットが
“1”にセットされているビットは無視される。この指
定されたアドレスとCPUの出力するアドレスとを比較
し、一致しているかどうかの判定を行う。かかる判定
は、(CA23・AR23+¬CA23・¬AR23+
AMR23)・…・(CAn・ARn+¬CAn・¬A
Rn+AMRn)・…・(CA0・AR0+¬CA0・
¬AR0+AMR0)と表現される。¬は論理反転を示
す。なお、CA23−0はCPUの出力するビット23
−0である。
The address register specifies an address.
Of these bits, the bit whose corresponding bit in the address mask register is set to "1" is ignored. The designated address is compared with the address output by the CPU to determine whether or not they match. The determination is (CA23 · AR23 + ¬CA23 · ¬AR23 +
AMR23) ···· (CAn · ARn + ¬CAn · ¬A
Rn + AMRn) ... (CA0 ・ AR0 + ¬CA0 ・
AR0 + AMR0). ¬ indicates logical inversion. Note that CA23-0 is the bit 23 output by the CPU.
It is −0.

【0067】(7).エミュレータスタックメモリレジスタ
EMLSTKRは、ブレーク時のスタック領域とされ
る。CPUの1回分の例外処理スタックに対応する容
量、たとえば4バイトが設けられている。たとえば、C
PUのコンディションコードレジスタCCRの1バイ
ト、プログラムカウンタPCの3バイトである。かかる
スタックについては、平成5年3月(株)日立製作所発
行『H8/3003 ハードウェアマニュアル』p79
〜p88などに記載されている。
(7). The emulator stack memory register EMLSTKR is used as a stack area at break. A capacity corresponding to one exception processing stack of the CPU, for example, 4 bytes is provided. For example, C
One byte of the condition code register CCR of the PU and three bytes of the program counter PC. For such a stack, see "H8 / 3003 Hardware Manual" p79, published by Hitachi, Ltd. in March 1993.
~ P88 and the like.

【0068】ブレーク時には、CPUのスタックポイン
タSPは無視されて、必ずエミュレータスタックメモリ
にスタックが行われる。ブレーク割込許可ビットによっ
て、ブレークが多重に発生してエミュレーションスタッ
クメモリを破壊してしまうことは防止される。リセット
初期値は、特に制限はされないものの不定とされる。
At the time of a break, the stack pointer SP of the CPU is ignored and stacking is always performed in the emulator stack memory. The break interrupt enable bit prevents multiple breaks from destroying the emulation stack memory. The initial reset value is not specified, but is indefinite.

【0069】続いて、図10のアドレスマップによりア
ドレス空間を説明する。
Next, the address space will be described with reference to the address map of FIG.

【0070】CPUのアドレス空間は16Mバイトとさ
れ、これを128kバイト8エリア、1Mバイト1エリ
ア、2Mバイト7エリアに分割されており、それぞれの
エリアの属性をMEMCR、EWTCRの各ビットで指
定する。内蔵ROM、内蔵RAM、および内部I/Oレ
ジスタと重なっている領域は内蔵ROM、内蔵RAM、
および内部I/Oレジスタの指定が優先され、上記制御
ビットは無視される。
The address space of the CPU is 16 Mbytes, which is divided into 128 kbytes 8 areas, 1 Mbytes 1 area, and 2 Mbytes 7 areas, and the attribute of each area is designated by each bit of MEMCR and EWTCR. . The area that overlaps with the internal ROM, internal RAM, and internal I / O register is the internal ROM, internal RAM,
And the specification of the internal I / O register has priority, and the above control bits are ignored.

【0071】バス制御指定レジスタが、バスコントロー
ラの制御を行う。エミュレーションメモリの領域を指定
する。これはユーザモードで有効になる。内蔵ROMに
連続し、プログラム領域となることが多い領域を細分
し、プログラム用の貸し出しメモリを設定できるのは都
合が良い。
The bus control designation register controls the bus controller. Specify the area of emulation memory. This is valid in user mode. It is convenient to be able to subdivide an area that is continuous with the built-in ROM and often becomes a program area and set up a rental memory for the program.

【0072】そのほかの領域を2Mバイトずつとし、ユ
ーザ側のバス制御の設定と共通化できれば都合が良い。
かかるユーザ側のバス制御については、平成5年3月
(株)日立製作所発行『H8/3003 ハードウェア
マニュアル』p121〜p154に記載されている。
It is convenient if the other area is set to 2 Mbytes each and can be shared with the bus control setting on the user side.
Such bus control on the user side is described in "H8 / 3003 Hardware Manual" p121 to p154 issued by Hitachi, Ltd. in March 1993.

【0073】ブレークモードでは基本的にエミュレーシ
ョンバスを用いたアクセスを行う。エミュレータがユー
ザメモリのモニタや変更を行う場合には、ウィンドウビ
ットを用いてユーザメモリをアクセスすることができ
る。これはユーザメモリのモニタや変更を行う目的に則
してデータアクセスのみが対象になる。
In the break mode, access is basically made using the emulation bus. The window bits can be used to access the user memory when the emulator monitors or modifies the user memory. This applies only to data access for the purpose of monitoring or changing the user memory.

【0074】続いて、図11,12の状態図によりアク
セス方法を説明する。
Next, the access method will be described with reference to the state diagrams of FIGS.

【0075】ユーザモードで、対応するMEMCRが
“0”にクリアされた状態では、マイクロコンピュータ
の、たとえばバスコントローラで指定したバスサイクル
となる。外部メモリに対するアクセス時には、ユーザ側
のストローブ信号が有効になる。シーケンス出力は、マ
イクロコンピュータの指定に従ったストローブ信号が出
力されることを示す。ユーザ側WAIT端子もマイクロ
コンピュータの指定に従って有効になる。さらに、EW
TCRによってEMLWAITが許可されるか禁止され
るかが指定される。
In the user mode, when the corresponding MEMCR is cleared to "0", the bus cycle is designated by the bus controller of the microcomputer, for example. When accessing the external memory, the strobe signal on the user side becomes valid. The sequence output indicates that the strobe signal according to the designation of the microcomputer is output. The WAIT terminal on the user side is also enabled according to the designation of the microcomputer. Furthermore, EW
The TCR specifies whether EMLWAIT is allowed or prohibited.

【0076】ユーザモードで、外部メモリに対するアク
セス時には、対応するMEMCRが“1”にセットされ
た状態ではマイクロコンピュータの指定したバスサイク
ルは無効になり、エミュレーション用バスサイクルとな
る。エミュレーションバスを介してリード/ライトが行
われる。基本バスステート数は3ステートになる。ユー
ザ側のストローブ信号は非活性状態(ハイレベル固定)
とされ、またユーザ側WAIT端子は無視される。ユー
ザ側のストローブ信号はリード信号RD、ライト信号H
WR,LWR、カラムアドレスストローブCASなどが
含まれる。前記同様にEWTCRによってEMLWAI
Tが許可されるか禁止されるかが指定される。
When the external memory is accessed in the user mode, the bus cycle designated by the microcomputer is invalid and becomes the emulation bus cycle when the corresponding MEMCR is set to "1". Read / write is performed via the emulation bus. The number of basic bus states is three. Strobe signal on user side is inactive (fixed to high level)
And the WAIT terminal on the user side is ignored. The strobe signals on the user side are the read signal RD and the write signal H.
WR, LWR, column address strobe CAS, etc. are included. Same as above by EWTCR by EMLWAI
It is specified whether T is allowed or prohibited.

【0077】すなわち、ユーザモードであっても対応す
るMEMCRが“1”にセットされた領域については、
エミュレータ側のメモリをリード/ライトすることがで
きる。エミュレータ側のメモリの内、ユーザの使用を許
しているメモリ(貸し出しメモリ)の存在するアドレス
について、予め対応するMEMCRを“1”にセットす
るようにしておけばよい。ウェイトを挿入しなければア
クセスできない場合には、EWTCRによってEMLW
AITを許可しておく。
That is, even in the user mode, for the area in which the corresponding MEMCR is set to "1",
Memory on the emulator side can be read / written. Among the memories on the emulator side, the corresponding MEMCR may be set to “1” in advance for the address where the memory (rental memory) which the user is permitted to use exists. If access is not possible without inserting a weight, EWTCR will be used for EMLW.
Allow AIT.

【0078】ブレークモードでは、基本的にマイクロコ
ンピュータの指定したバスサイクルは無効になり、エミ
ュレーション用バスサイクルとなる。エミュレーション
バスを介してリード/ライトが行われる。基本バスステ
ート数は3ステートになる。EMLWAITが許可され
る。ユーザ側のストローブ信号は非活性状態とされ、ま
たユーザ側WAIT端子は無視される。
In the break mode, the bus cycle designated by the microcomputer is basically invalid and becomes a bus cycle for emulation. Read / write is performed via the emulation bus. The number of basic bus states is three. EMLWAIT is allowed. The strobe signal on the user side is deactivated, and the WAIT terminal on the user side is ignored.

【0079】ブレークモードで、WD1,0ビットで指
定したデータアクセスが発生すると、マイクロコンピュ
ータの指定したバスサイクルとなる。外部アドレスがア
クセスされていればユーザ側のストローブ信号が有効に
なる。ユーザ側WAIT端子もマイクロコンピュータの
指定に従って有効になる。
In the break mode, when the data access designated by the WD1,0 bits occurs, the bus cycle designated by the microcomputer is started. If the external address is accessed, the strobe signal on the user side becomes valid. The WAIT terminal on the user side is also enabled according to the designation of the microcomputer.

【0080】たとえば、エミュレーション用バスサイク
ルとする条件は、¬(ROM+RAM+IO)・(BR
KAK・(PF+DRD・¬WD0+DWR・¬WD
1)+・¬BRKAK・MCi)と表現される。MCi
は選択されたアドレスに対応するMEMCRのビットを
示す。PFは命令リード、DRDはデータリード、DW
Rはデータライトを示す。¬は論理反転を示す。
For example, the conditions for a bus cycle for emulation are: (ROM + RAM + IO). (BR
KAK ・ (PF + DRD ・ ¬WD0 + DWR ・ ¬WD
1) + ·· BRKAK · MCi). MCi
Indicates the bit of MEMCR corresponding to the selected address. PF for instruction read, DRD for data read, DW
R indicates a data write. ¬ indicates logical inversion.

【0081】続いて、図13のブロック図によりエミュ
レーション用プロセッサのバス構成を説明する。
Next, the bus configuration of the emulation processor will be described with reference to the block diagram of FIG.

【0082】バスコントローラは、PAB・PDBから
なるバスを制御するP−BUF、バス制御レジスタを含
む。バス制御レジスタは、たとえば特願平4−1379
56号に記載されている。エミュレーション用バスサイ
クルが選択されると、バス制御レジスタの内容などは無
視される。エミュレーションインタフェースは、エミュ
レーションバスを制御するEMLBUFを含む。
The bus controller includes a P-BUF for controlling the bus composed of PAB / PDB and a bus control register. The bus control register is, for example, Japanese Patent Application No. 4-1379.
56. When the emulation bus cycle is selected, the contents of the bus control register are ignored. The emulation interface includes EMLBUF that controls the emulation bus.

【0083】MSは、CPUまたはDTCが出力する起
動信号とIABを入力し、バス制御レジスタ、MEMC
R・EWTCRの各レジスタ、およびWD1,0ビット
によってアクセス先とアクセス方法を判定し、P−BU
F、ユーザBUF、EMLBUFの各バッファのいずれ
かを起動する。
The MS inputs the start signal and IAB output from the CPU or DTC, and the bus control register, MEMC
The access destination and access method are determined by the R / EWTCR registers and the WD1,0 bits, and the P-BU
One of the F, user BUF, and EMLBUF buffers is activated.

【0084】P−BUF、ユーザBUFが起動されてい
てもEMLBUFは出力用に起動を行う。P−BUF、
ユーザBUF、EMLBUFが起動されると、所定のタ
イミングでアドレスバス・各種ストローブ信号を出力し
データバスの入出力を行う。各バッファがバスサイクル
を終了するとMSに終了信号を出力する。MSはCPU
またはDTCに終了信号を出力する。CPUまたはDT
Cが次のバスサイクルを開始する。
Even if the P-BUF and the user BUF are activated, the EMLBUF is activated for output. P-BUF,
When the user BUF and EMLBUF are activated, the address bus and various strobe signals are output at a predetermined timing to input / output the data bus. When each buffer finishes the bus cycle, it outputs a termination signal to the MS. MS is CPU
Alternatively, an end signal is output to DTC. CPU or DT
C starts the next bus cycle.

【0085】なお、各バッファのバス制御およびバス制
御レジスタについては、たとえば特願平4−13795
6号に記載されている。
The bus control of each buffer and the bus control register are described in, for example, Japanese Patent Application No. 4-13795.
No. 6 is described.

【0086】続いて、図14のタイミング図によりバス
タイミングの一例を説明する。これは、バス制御レジス
タで2ステートアクセス空間に指定された外部アドレス
をユーザモードでリードする場合の例である。
Next, an example of bus timing will be described with reference to the timing chart of FIG. This is an example of reading an external address specified in the 2-state access space by the bus control register in the user mode.

【0087】MCビットが“0”にクリアされ、マイク
ロコンピュータの指定したバスサイクルが有効であれば
2ステートでアクセスし、ユーザ側のストローブ信号A
S、RDなどが所定の出力を行いユーザデータバスから
データをリードする。エミュレータ用ストローブ信号は
有効であり、エミュレーション用データバスにはユーザ
データバスのリードデータが出力される。
If the MC bit is cleared to "0" and the bus cycle specified by the microcomputer is valid, access is made in two states and the strobe signal A on the user side is accessed.
S, RD, etc. output predetermined data to read data from the user data bus. The emulator strobe signal is valid, and the read data of the user data bus is output to the emulation data bus.

【0088】MCビットが“1”にセットされ、エミュ
レーション用バスサイクルが行われると基本バスサイク
ルは3ステートとされる。WCビットを“1”にセット
しておけば、EMLWAITによりウェイトが要求さ
れ、たとえば1ステートのウェイトステートが挿入され
4ステートアクセスとされる。ユーザ側のストローブ信
号は非活性状態に固定され、ユーザデータバスはハイイ
ンピーダンス状態とされる。エミュレータ用ストローブ
信号は有効であり、エミュレーション用データバスから
データをリードする。
When the MC bit is set to "1" and the emulation bus cycle is performed, the basic bus cycle is set to 3 states. If the WC bit is set to "1", a wait is requested by EMLWAIT, and, for example, a 1-state wait state is inserted to make 4-state access. The strobe signal on the user side is fixed to the inactive state, and the user data bus is set to the high impedance state. The emulator strobe signal is valid and reads data from the emulation data bus.

【0089】続いて、図15のタイミング図によりブレ
ークリセットのタイミングを説明する。
Next, the break reset timing will be described with reference to the timing chart of FIG.

【0090】EMLWAIT信号が活性状態のとき、R
ES信号が活性状態になるとブレークリセットとされ、
CPUがリセット例外処理を実行するに先立ってBRK
AK信号が活性状態とされる。かかるBRKAK信号が
活性状態の状態で、CPUはベクタ(スタートアドレ
ス)のリードと、これに引き続いた命令フェッチを行
う。BRKAK信号が活性状態であるために、ベクタお
よび命令フェッチはエミュレーションメモリが選択され
る。従って、エミュレータ側の任意のプログラムを実行
させることができる。
When the EMLWAIT signal is active, R
When the ES signal becomes active, a break reset is performed,
BRK before the CPU executes the reset exception handling
The AK signal is activated. When the BRKAK signal is in the active state, the CPU reads the vector (start address) and then fetches the instruction. Since the BRKAK signal is active, the emulation memory is selected for vector and instruction fetch. Therefore, an arbitrary program on the emulator side can be executed.

【0091】メモリアクセスは全て3ステートアクセス
とされ、EMLWAITも含めたウェイトが許可され
る。BRKAK信号が活性状態とされ、ユーザ側ストロ
ーブ信号は非活性状態に固定される。
All memory accesses are 3-state accesses, and wait including EMLWAIT is permitted. The BRKAK signal is activated and the user side strobe signal is fixed to the inactive state.

【0092】続いて、図16のタイミング図によりユー
ザリセットのタイミングを説明する。
Next, the user reset timing will be described with reference to the timing chart of FIG.

【0093】EMLWAIT信号が非活性状態のとき、
RES信号が活性状態になるとユーザリセットとされ、
BRKAK信号が非活性状態のままCPUがリセット例
外処理を実行する。かかるBRKAK信号が非活性状態
の状態で、CPUはベクタ(スタートアドレス)のリー
ドと、これに引き続いた命令フェッチを行う。BRKA
K信号が非活性状態であるために、ベクタおよび命令フ
ェッチはユーザメモリが選択される。
When the EMLWAIT signal is inactive,
When the RES signal becomes active, the user is reset,
The CPU executes the reset exception processing while the BRKAK signal is in the inactive state. When the BRKAK signal is inactive, the CPU reads a vector (start address) and then fetches an instruction. BRKA
Since the K signal is inactive, the user memory is selected for vector and instruction fetch.

【0094】メモリアクセスはユーザの指定に従ったア
クセス、特に制限はされないものの図16においては、
ベクタおよび最初の命令が内蔵ROMに存在するものと
し、1ステートでアクセスとされEMLWAITも含め
たウェイトが禁止される。ベクタまたは最初の命令が外
部メモリに存在する場合には、ユーザ側ストローブ信号
が所定の出力状態になる。
The memory access is an access according to the designation of the user, and although it is not particularly limited, in FIG.
It is assumed that the vector and the first instruction exist in the built-in ROM, and access is made in one state, and the wait including EMLWAIT is prohibited. When the vector or the first instruction exists in the external memory, the user side strobe signal becomes a predetermined output state.

【0095】リセットを2種類有するエミュレーション
用プロセッサは、特願平4−316068号に記載され
ている。これはエミュレーション専用レジスタの初期化
と、バスステート数の変更についてのみ検討されてい
る。この例では、エミュレーション用プロセッサのユー
ザバスとエミュレーションバスが共通である。また、エ
ミュレーション専用レジスタとしては、エミュレーショ
ン対象となるマイクロコンピュータを指定するレジスタ
のみが検討されている。
An emulation processor having two types of reset is described in Japanese Patent Application No. 4-316068. This is only considered for the initialization of the emulation dedicated register and the change of the number of bus states. In this example, the emulation processor has a common user bus and emulation bus. As the emulation dedicated register, only a register designating a microcomputer to be emulated is being studied.

【0096】本発明においては、2種類のリセットに対
応してBRKAK信号を活性状態にしたり、非活性状態
にしたりすることによってユーザバスとエミュレーショ
ンバスが独立であっても制御を容易にすることができ
る。リセット後にブレークモードに遷移する手間を省く
ことができる。
In the present invention, the BRKAK signal is activated or deactivated in response to two types of resets to facilitate control even if the user bus and the emulation bus are independent. it can. It is possible to save the trouble of transitioning to the break mode after reset.

【0097】また、マイクロコンピュータを指定するレ
ジスタのみに限らず、エミュレータシステム全体に関わ
るレジスタ、たとえばMEMCRやEWTCRなどもユ
ーザリセットで保持するようにすることによってソフト
ウェアによる再設定の手間を省くことができる。
Further, not only the register designating the microcomputer, but also the registers relating to the entire emulator system, such as MEMCR and EWTCR, are held by the user reset, so that the time and effort of re-setting by software can be omitted. .

【0098】続いて、図17のブロック図によりブレー
クリセット制御回路を説明する。
Next, the break reset control circuit will be described with reference to the block diagram of FIG.

【0099】EMLWAITは、ウェイト要求信号とし
てバスコントローラに要求されるほか、クロックトバッ
ファまたはフリップフロップ3段を介してリセット制御
に用いられる。
EMLWAIT is requested by the bus controller as a wait request signal and used for reset control via three stages of clocked buffers or flip-flops.

【0100】また、リセット信号RESは、クロックト
バッファまたはフリップフロップ3段を介して内部リセ
ット信号RSTを生成する。また、内部リセット信号R
STと、クロックトバッファまたはフリップフロップ3
段を介したEMLWAIT信号とが論理積回路に入力さ
れ、さらにこの出力の反転と、前記出力をクロックトバ
ッファまたはフリップフロップ2段を介した信号とが論
理積回路に入力され、かかる出力がBRST信号とされ
る。
Further, the reset signal RES generates an internal reset signal RST via a clocked buffer or three stages of flip-flops. In addition, the internal reset signal R
ST and clocked buffer or flip-flop 3
The EMLWAIT signal through the stage is input to the AND circuit, and the inversion of this output and the signal through the clocked buffer or two stages of flip-flops are input to the AND circuit, and the output is BRST. Signaled.

【0101】従って、RES#端子が非活性状態に遷移
するときのEMLWAIT#信号の状態によってBRS
T信号が活性状態になるかならないかが設定される。B
RST信号はブレークアクノリッジ信号BRKAKの遷
移信号としても用いられる。前記ユーザリセットで初期
化される部分はRST信号によって初期化される。ま
た、ブレークリセットで初期化される部分はBRST信
号によって初期化される。
Therefore, depending on the state of the EMLWAIT # signal when the RES # terminal transits to the inactive state, the BRS
It is set whether or not the T signal is activated. B
The RST signal is also used as a transition signal of the break acknowledge signal BRKAK. The portion initialized by the user reset is initialized by the RST signal. The portion initialized by the break reset is initialized by the BRST signal.

【0102】RES#端子が非活性状態に遷移するとき
のEMLWAIT#信号の状態を参照することによっ
て、任意の状態でRES#が活性状態になっても誤って
ブレークリセットとされることがない。エミュレータは
RES 信号が活性状態になった時点で、EMLWAI
T#信号を非活性状態にすればユーザリセットとされ、
エミュレータ専用レジスタの相当部分は保持される。#
は負論理信号を示す。
By referring to the state of the EMLWAIT # signal when the RES # terminal transits to the inactive state, break reset will not be mistakenly performed even if RES # is activated in any state. When the RES signal becomes active, the emulator starts EMLWAI.
If the T # signal is deactivated, the user is reset.
Most of the emulator dedicated registers are retained. #
Indicates a negative logic signal.

【0103】続いて、図18のブロック図によりブレー
クアクノリッジBRKAK信号制御回路を説明する。
Next, the break acknowledge BRKAK signal control circuit will be described with reference to the block diagram of FIG.

【0104】BRKAK信号はフリップフロップ回路で
制御される。かかるフリップフロップ回路の出力がBR
KAK信号である。フリップフロップのセット信号とし
て、論理積回路の出力が与えられる。かかる論理積回路
の一方の入力はクロックφ2とされ、他方の入力は論理
和回路の出力であり、かかる論理和回路の入力は前記B
RST信号と、CPUがブレーク例外処理を実行したと
きに所定のタイミングで出力するSETBRKAK信号
とされる。
The BRKAK signal is controlled by the flip-flop circuit. The output of the flip-flop circuit is BR
It is a KAK signal. The output of the AND circuit is given as the set signal of the flip-flop. One input of the logical product circuit is the clock φ2, the other input is the output of the logical sum circuit, and the input of the logical sum circuit is B
The RST signal and the SETBRKAK signal output at a predetermined timing when the CPU executes the break exception processing.

【0105】なお、ブレーク例外処理は、ブレーク命令
BRKを実行したとき、BRK端子によるブレーク要求
によってブレーク割込を実行したとき、BRKCR・B
AR・BAMRによる条件が成立したことによるブレー
ク要求によってブレーク割込を実行したとき、およびシ
ングルステップブレークを実行したときに行われる。
The break exception handling is BRKCR.B when the break instruction BRK is executed, when a break interrupt is executed by a break request from the BRK terminal.
This is performed when a break interrupt is executed by a break request due to the condition being satisfied by AR / BAMR and when a single step break is executed.

【0106】また、フリップフロップのセット信号とし
て論理積回路の出力が与えられる。かかる論理積回路の
一方の入力はクロックφ2とされ、他方の入力はCPU
がブレークからのリターン命令RTBを実行したときに
所定のタイミングで出力するRESBRKAK信号とさ
れる。
Further, the output of the AND circuit is given as the set signal of the flip-flop. One input of the AND circuit is the clock φ2, and the other input is the CPU
Is a RESBRKAK signal to be output at a predetermined timing when the return instruction RTB from the break is executed.

【0107】従って、ブレークリセットのとき、または
CPUがブレーク例外処理を起動したときにBRKAK
信号は活性状態になる。CPUがブレーク例外処理を実
行したときにBRKAK信号は非活性状態になる。
Therefore, at the time of break reset or when the CPU starts break exception handling, BRKAK
The signal becomes active. The BRKAK signal becomes inactive when the CPU executes break exception handling.

【0108】続いて、図19のブロック図によりエミュ
レーション専用制御レジスタの一例を説明する。
Next, an example of the emulation dedicated control register will be described with reference to the block diagram of FIG.

【0109】制御レジスタはフリップフロップを中心に
構成される。かかるフリップフロップの出力Qが制御信
号として用いられる。また、かかる出力はクロックトバ
ッファを介してデータバスに接続される。かかるクロッ
クトバッファのクロックは、アドレスデコード信号およ
びブレークモード信号の論理積信号とリード信号との論
理積信号とされる。
The control register is mainly composed of flip-flops. The output Q of such a flip-flop is used as a control signal. The output is also connected to the data bus via the clocked buffer. The clock of the clocked buffer is a logical product signal of the logical product signal of the address decode signal and the break mode signal and the read signal.

【0110】フリップフロップの入力Dは前記データバ
スであり、クロックCは前記アドレスデコード信号およ
びブレークモード信号の論理積信号とライト信号との論
理積信号とされる。かかるアドレスデコード信号は、C
PUの出力するアドレスが制御レジスタの存在するアド
レスになったとき活性状態とされる。すなわち、ブレー
クモードでのみリード/ライト可能とされる。IRQC
Rについては、ユーザモードでもリード/ライト可能と
したことにより上記ブレークモード信号は除かれる。
The input D of the flip-flop is the data bus, and the clock C is the logical product signal of the logical product signal of the address decode signal and the break mode signal and the write signal. Such an address decode signal is C
It is activated when the address output from PU reaches the address where the control register exists. That is, the read / write is possible only in the break mode. IRQC
With respect to R, the break mode signal is excluded because the read / write is possible even in the user mode.

【0111】フリップフロップのリセット入力Rは、ブ
レークリセット信号とされる。ブレークリセット時に
“0”にクリアされる。ブレークリセット時に“1”に
セットすべき制御レジスタについては、フリップフロッ
プのセット入力にブレークリセット信号を入力するよう
にする。
The reset input R of the flip-flop is used as a break reset signal. Cleared to "0" at break reset. For the control register that should be set to "1" at break reset, the break reset signal is input to the set input of the flip-flop.

【0112】IRQCRについては、ユーザリセットで
初期化としたことにより、リセット入力Rはユーザリセ
ット信号とされる。また、EMLSTKRはリセット入
力は除かれ、ユーザリセットでもブレークリセットでも
初期化されない。
Since the IRQCR is initialized by the user reset, the reset input R becomes the user reset signal. In addition, the reset input is excluded from EMLSTKR, and it is not initialized by user reset or break reset.

【0113】続いて、図20のブロック図によりブレー
ク割込制御回路を説明する。
Next, the break interrupt control circuit will be described with reference to the block diagram of FIG.

【0114】CPUに対するブレーク要求は3要因が存
在する。第1はBRK端子による要求である。第2はア
ドレス比較Aによる要求であり、これはBRKCRのB
IEAビットによって許可される。第3はアドレス比較
Bによる要求であり、これはBRKCRのBIEBビッ
トによって許可される。
There are three factors for the break request to the CPU. The first is a request by the BRK terminal. The second is a request by the address comparison A, which is B in BRKCR.
Permitted by the IEA bit. The third is a request by address compare B, which is granted by the BIEB bit in BRKCR.

【0115】なお、かかるアドレス比較は前記の通り、
(CA23・AR23+¬CA23・¬AR23+AM
R23)・…・(CAn・ARn+¬CAn・¬ARn
+AMRn)・…・(CA0・AR0+¬CA0・¬A
R0+AMR0)と表現される。これらの論理和信号
が、ブレーク要求としてCPUに与えられる。
The address comparison is as described above.
(CA23 ・ AR23 + ¬CA23 ・ ¬AR23 + AM
R23) ···· (CAn · ARn + ¬CAn · ¬ARn
+ AMRn) ... (CA0 ・ AR0 + ¬CA0 ・ ¬A
It is expressed as R0 + AMR0). These OR signals are given to the CPU as a break request.

【0116】ブレークモードでは、BMBEビットの状
態によってBRK端子によるブレーク要求の許可禁止が
選択される。すなわち、ブレークモードでBMBEビッ
トが“0”にクリアされている場合はブレーク要求が抑
止される。アドレス比較によるブレーク要求はブレーク
モードで禁止される。
In the break mode, permission or prohibition of the break request by the BRK terminal is selected depending on the state of the BMBE bit. That is, the break request is suppressed when the BMBE bit is cleared to "0" in the break mode. Break requests due to address comparison are prohibited in break mode.

【0117】また、BMBEビットはフリップフロップ
で構成され、BMBEK信号の反転信号で“0”にクリ
アされる。かかるフリップフロップの入力は所定のデー
タバスのビットであって、クロックはブレークモード信
号とアドレスデコード信号とライト信号の論理積信号と
される。かかるアドレスデコード信号は、CPUの出力
するアドレスがBRKCRの存在するアドレスになった
とき活性状態とされる。すなわち、ブレークモードでの
みライト可能とされる。すなわち、ブレークモードに遷
移した直後は、ブレーク要求が禁止状態であって、不所
望のブレークの多重例外処理が禁止される。
The BMBE bit is composed of a flip-flop, which is cleared to "0" by an inverted signal of the BMBEK signal. The input of such a flip-flop is a bit of a predetermined data bus, and the clock is a logical product signal of a break mode signal, an address decode signal and a write signal. The address decode signal is activated when the address output by the CPU becomes the address where the BRKCR exists. That is, writing is possible only in break mode. That is, immediately after the transition to the break mode, the break request is in the disabled state, and the multiple exception handling of the undesired break is prohibited.

【0118】また、BRKCRのSSTPビットと、B
RKAK信号の反転信号との論理積がシングルステップ
ブレーク要求としてCPUに与えられる。シングルステ
ップブレーク要求と、RTB命令実行信号との論理積信
号と、ブレーク要求がCPU内部でCPUブレーク例外
処理要求として認識される。これらの例外処理の内容は
共通とされる。CPUはRTB命令実行時には、かかる
シングルステップブレーク要求を無視する。
Also, the SSTP bit of BRKCR and B
The logical product of the RKAK signal and the inverted signal is given to the CPU as a single step break request. The single-step break request, the logical product signal of the RTB instruction execution signal, and the break request are recognized inside the CPU as a CPU break exception handling request. The contents of these exception processes are common. The CPU ignores the single step break request when executing the RTB instruction.

【0119】続いて、図21のブロック図によりエミュ
レータの概略を説明する。
Next, the outline of the emulator will be described with reference to the block diagram of FIG.

【0120】コネクタ部が、シングルチップマイクロコ
ンピュータの代わりに応用システム(ユーザシステム)
に装着される。エミュレーション用プロセッサは上記コ
ネクタ部とインタフェースケーブルを介し、上記ターゲ
ットシステムインタフェースを用いて上記応用システム
と信号の入出力を行う。
The connector part is an application system (user system) instead of the single-chip microcomputer.
Be attached to. The emulation processor inputs and outputs signals to and from the application system using the target system interface via the connector section and the interface cable.

【0121】ユーザシステムには、特に制限はされない
ものの、ユーザバスが存在してユーザメモリが接続され
る。エミュレーション用プロセッサが出力し、インタフ
ェースケーブルを介して供給されるユーザストローブ信
号に従ってユーザメモリはリード/ライトされる。リセ
ット信号は、インタフェースケーブルを介して、ユーザ
システムから供給される。
Although not particularly limited, the user system has a user bus and a user memory is connected to the user system. The user memory is read / written according to the user strobe signal output from the emulation processor and supplied via the interface cable. The reset signal is supplied from the user system via the interface cable.

【0122】エミュレータリセット信号との論理和信号
とが、エミュレーション用プロセッサのRES端子に供
給される。また、エミュレータリセット信号は、遅延回
路とエミュレータメモリウェイト信号との論理和信号が
エミュレーション用プロセッサのEMLWAIT端子に
供給される。かかるエミュレータリセット信号はエミュ
レータの電源投入など、エミュレータ全体をリセットす
る場合に発生するようにする。また、エミュレータのコ
マンドとして、システム開発装置から入力される情報を
基にユーザリセットを与えることができる。
An OR signal with the emulator reset signal is supplied to the RES terminal of the emulation processor. As the emulator reset signal, a logical sum signal of the delay circuit and the emulator memory wait signal is supplied to the EMLWAIT terminal of the emulation processor. The emulator reset signal is generated when the entire emulator is reset, such as when the emulator is powered on. Further, as the command of the emulator, user reset can be given based on the information input from the system development device.

【0123】一方、エミュレーション用プロセッサは上
記エミュレーションインタフェースを用いてエミュレー
ションバスに接続される。エミュレーションバスには図
示はされない状態信号・制御信号などを含む。上記エミ
ュレーションバスを用いて、エミュレーション用プロセ
ッサから応用システムとエミュレーション用プロセッサ
の内部状態に応じた情報などが出力され、またエミュレ
ーション用プロセッサに対してエミュレーションのため
の各種制御信号が入力される。エミュレーション用プロ
セッサの図示はされないエミュレートモード端子が電源
レベルに固定され、エミュレーション用プロセッサ内部
ではエミュレートモードが設定される。
On the other hand, the emulation processor is connected to the emulation bus using the emulation interface. The emulation bus includes status signals, control signals, etc., which are not shown. Using the emulation bus, the emulation processor outputs information according to the internal states of the application system and the emulation processor, and various control signals for emulation are input to the emulation processor. An emulation mode terminal (not shown) of the emulation processor is fixed to the power supply level, and the emulation mode is set inside the emulation processor.

【0124】さらに、上記エミュレーションバスには、
特に制限はされないものの、応用システムまたはターゲ
ットマイクロコンピュータ内蔵のメモリを代行するため
のRAMでなるようなエミュレーションメモリがある。
エミュレーションメモリには、内蔵ROMの代行をなす
べき高速メモリとユーザに解放する貸し出しメモリとが
存在する。
Further, the emulation bus has
Although not particularly limited, there is an emulation memory such as a RAM for substituting the memory built into the application system or the target microcomputer.
As the emulation memory, there are a high-speed memory that should act as a substitute for the built-in ROM and a rental memory that is released to the user.

【0125】ユーザのプログラム作成時には、容量的に
余裕を持った設計をすることが多く、内蔵ROMなどに
収まらない場合がある。このような場合にも、ユーザは
エミュレータの貸し出しメモリを利用して実質的にプロ
グラムメモリを拡張してデバックを開始することができ
る。デバックの進行に伴って、プログラムを最適化して
所定の容量に収めるようにすることができる。貸し出し
メモリは、その特性上必ずしも高速性は必要ない。
When a user's program is created, it is often designed with a sufficient capacity, and it may not fit in the built-in ROM. Even in such a case, the user can use the rented memory of the emulator to substantially expand the program memory and start debugging. As the debugging progresses, the program can be optimized so that it fits in a predetermined capacity. The rental memory does not necessarily need high speed because of its characteristics.

【0126】また、エミュレーション用プロセッサは制
御状態やエミュレーションバスの状態を監視して、その
状態が予め設定された状態に達した時に上記エミュレー
タ専用割込みを入力してCPUによるユーザプログラム
の実行を停止させ、エミュレーション用プログラム実行
状態に遷移させる(ブレーク)ためのブレーク制御回路
と、上記CPUのリード動作またはライト動作を示す信
号、命令リード動作を示す信号などに基づきエミュレー
ションバスに与えられるアドレスやデータ、さらには制
御情報を逐次蓄えるリアルタイムトレース回路などが接
続される。上記エミュレーションバスがエミュレーショ
ンメモリ、ブレーク制御回路、リアルタイムトレース回
路などにそれぞれ接続される。
Further, the emulation processor monitors the control state and the state of the emulation bus, and when the state reaches a preset state, the emulator dedicated interrupt is input to stop the execution of the user program by the CPU. A break control circuit for making a transition (break) to a program execution state for emulation, a signal indicating a read operation or a write operation of the CPU, an address or data given to the emulation bus based on a signal indicating an instruction read operation, and Is connected to a real-time trace circuit for sequentially storing control information. The emulation bus is connected to an emulation memory, a break control circuit, a real-time trace circuit, etc., respectively.

【0127】ブレーク制御回路は、BRK信号をエミュ
レーション用プロセッサに供給する。
The break control circuit supplies the BRK signal to the emulation processor.

【0128】上記エミュレーションメモリ、ブレーク制
御回路、リアルタイムトレース回路はコントロールバス
に接続され、コントロールバスを介してコントロールプ
ロセッサの制御を受けるようになっている。上記コント
ロールバスは、エミュレーション用プロセッサ制御回路
に接続されるとともに、インタフェース回路を介して、
特に制限はされないもののパーソナルコンピュータなど
のシステム開発装置に接続される。
The emulation memory, break control circuit, and real-time trace circuit are connected to the control bus and are controlled by the control processor via the control bus. The control bus is connected to an emulation processor control circuit, and via an interface circuit,
Although not particularly limited, it is connected to a system development device such as a personal computer.

【0129】たとえば、システム開発装置から入力され
たプログラムをエミュレーションメモリに転送し、内蔵
ROM上に配置されるべきかかるプログラムをCPUが
リードするとエミュレーションメモリ上のプログラムが
リードされる。また、ブレーク条件やリアルタイムトレ
ース条件などもシステム開発装置から与えることができ
る。
For example, when the program input from the system development apparatus is transferred to the emulation memory and the CPU reads the program to be arranged on the built-in ROM, the program on the emulation memory is read. Also, break conditions and real-time trace conditions can be given from the system development device.

【0130】コントロールプロセッサは、EMLIRQ
信号をエミュレーション用プロセッサに供給する。所望
のタイミングでEMLIRQを要求して、エミュレーシ
ョン用プロセッサに所定のEMLIRQ割込処理ルーチ
ンを実行させることができる。
The control processor is EMLIRQ.
The signal is supplied to the emulation processor. The EMLIRQ can be requested at a desired timing to cause the emulation processor to execute a predetermined EMLIRQ interrupt processing routine.

【0131】続いて、図22の動作フローチャートによ
りエミュレータの動作を説明する。
Next, the operation of the emulator will be described with reference to the operation flowchart of FIG.

【0132】電源投入後、まずブレークリセットとさ
れ、直ちにブレークモードになり、エミュレーションプ
ログラムが実行される。いずれのマイクロコンピュータ
のエミュレーション用プロセッサとして動作するかがシ
ステム開発装置から入力され、ホストインタフェース、
コントロールプロセッサ、エミュレーションメモリを介
してモジュール制御レジスタに設定される(S1〜S
3)。
After the power is turned on, a break reset is first performed, the break mode is immediately entered, and the emulation program is executed. Which microcomputer to operate as an emulation processor is input from the system development device, the host interface,
It is set in the module control register via the control processor and emulation memory (S1 to S
3).

【0133】所望のエミュレータ用の処理が行われ、シ
ステム開発装置から入力されるコマンドなどに基づき、
ユーザプログラムの実行が要求されればエミュレーショ
ン用プロセッサはリターン命令RTB命令を実行してユ
ーザモードに遷移し、ユーザプログラムを実行する(S
4〜S6)。
A desired emulator process is performed, and based on a command input from the system development device,
If the execution of the user program is requested, the emulation processor executes the return instruction RTB instruction to transit to the user mode and execute the user program (S
4 to S6).

【0134】この状態で、ユーザシステムからリセット
が要求されれば、ユーザプログラムのリセット処理を行
う。このとき、エミュレーション専用レジスタは保持さ
れる。実行すべきユーザプログラムが終了したり、ユー
ザが設定した条件が成立したりするとユーザプログラム
の実行は中断(ブレーク)され、エミュレーションプロ
グラムを実行する(S7、S8、S6〜S9)。
In this state, if reset is requested from the user system, reset processing of the user program is performed. At this time, the emulation dedicated register is held. When the user program to be executed ends or the condition set by the user is satisfied, the execution of the user program is interrupted (break) and the emulation program is executed (S7, S8, S6 to S9).

【0135】図4に示すように、ブレークモード中はユ
ーザの指定によらず、ウィンドウを除き3ステートアク
セス、EMLWAIT許可とされる。エミュレーション
プログラムは全てウェイト許可とされるため、エミュレ
ーションメモリのアクセス速度やエミュレータ上の配置
に制限を与えない。これによりエミュレータの設計を容
易にする。
As shown in FIG. 4, during the break mode, 3-state access except for windows and EMLWAIT permission are permitted regardless of the user's designation. Since all emulation programs are allowed to wait, the access speed of the emulation memory and the location on the emulator are not restricted. This facilitates emulator design.

【0136】以上のように構成され、かつ動作されるエ
ミュレーション用プロセッサおよびエミュレータによれ
ば以下の作用効果を得ることができる。
According to the emulation processor and emulator configured and operated as described above, the following operational effects can be obtained.

【0137】(1).リセット後に、ブレークモードとする
かユーザモードとするかを制御端子で指定することによ
り、エミュレータの制御を必要とせず、リセット後に所
望のプログラムを実行させることができる。また、かか
る制御端子をEMLWAIT信号とすることにより、エ
ミュレーション用プロセッサの入出力端子数を増やさず
に済む。
(1) After the reset, by designating the break mode or the user mode with the control terminal, it is possible to execute a desired program after the reset without controlling the emulator. Further, by setting the control terminal to the EMLWAIT signal, it is not necessary to increase the number of input / output terminals of the emulation processor.

【0138】さらに、エミュレータ制御レジスタを、ブ
レークリセット時は初期化し、ユーザリセット時には初
期化しないことによって電源投入後の動作を確定し、初
期設定を行うソフトウェアの手間を省くことができる。
Further, the emulator control register is initialized at the time of break reset and not initialized at the time of user reset, so that the operation after power-on can be confirmed and the time and effort of software for initialization can be saved.

【0139】(2).アドレス空間を分割して、これに対応
するバス制御レジスタを設けて、このバス制御レジスタ
によってユーザバスを用いてアクセスするか、エミュレ
ーションバスを用いてアクセスするかを指定することに
より、エミュレータ側のアドレス判定回路やバス制御回
路を必要とせず、CPUのアドレス空間上にユーザメモ
リとエミュレーションメモリを混在させることができ
る。制御端子を省くことができる。
(2). Dividing the address space, providing a bus control register corresponding thereto, and designating whether to access using the user bus or the emulation bus by this bus control register As a result, a user memory and an emulation memory can be mixed in the address space of the CPU without the need for an address determination circuit or a bus control circuit on the emulator side. The control terminal can be omitted.

【0140】また、アドレス空間の分割を非対称にし、
最小エリアの大きさを128kBなどとすることによっ
て外部に接続できるメモリの容量と対応させることがで
き、貸し出しメモリ(エミュレーションメモリ)とユー
ザメモリの配置する場合の融通性を向上することができ
る。
Also, the division of the address space is made asymmetric,
By setting the size of the minimum area to 128 kB or the like, it is possible to correspond to the capacity of the memory that can be connected to the outside, and the flexibility in arranging the lending memory (emulation memory) and the user memory can be improved.

【0141】(3).PCブレーク機能を内蔵することによ
って、エミュレータ側のアドレス判定回路や命令実行判
定回路を必要とせず、ブレークを要求することができ
る。また、外部回路を必要としないから判定や制御に必
要な時間を短縮することができ、所望の命令実行状態で
ブレークさせることが容易になり、数命令余分に実行し
たりすることを防ぐことができる。
(3) By incorporating the PC break function, a break can be requested without the need for an address judgment circuit or instruction execution judgment circuit on the emulator side. Further, since an external circuit is not required, the time required for judgment and control can be shortened, it becomes easy to break in the desired instruction execution state, and it is possible to prevent the execution of several extra instructions. it can.

【0142】また、一致検出機能を出力することによっ
て、所定の実行状態から所定の実行状態までの時間を計
測したりすることが容易に実現できる。所定のプログラ
ムの実行回数などの計測を容易に行うことができる。か
かる計測結果に基づき、ブレーク割込を要求することに
よって所望の回数のユーザプログラムの実行時点でユー
ザプログラムを停止することを容易に実現できる。
Further, by outputting the coincidence detection function, it is possible to easily realize the time from the predetermined execution state to the predetermined execution state. It is possible to easily measure the number of executions of a predetermined program. By requesting the break interrupt based on the measurement result, the user program can be easily stopped when the user program is executed a desired number of times.

【0143】さらに、シングルステップ指定ビットを設
けることによって、エミュレータ側のアドレス判定回路
や命令実行判定回路を必要とせず、ブレークを要求する
ことができる。また、判定や制御に必要な時間を短縮す
ることができ、命令の実行毎にブレークさせることが容
易になる。
Further, by providing the single step designation bit, the break can be requested without the need for the address judging circuit and the instruction execution judging circuit on the emulator side. In addition, the time required for judgment and control can be shortened, and it becomes easy to break each time an instruction is executed.

【0144】(4).エミュレータ用スタック領域を設け、
ブレークの多重割込を禁止するか、許可するかを指定可
能にし、かかる初期値を禁止状態にすることによってリ
ターンすべきアドレスを失ってしまうことがない。
(4). Provide a stack area for the emulator,
It is possible to specify whether or not to allow break multiple interrupts, and by setting such an initial value in a disabled state, the address to be returned will not be lost.

【0145】また、かかる制御ビットでブレークの多重
割込を許可することによって、ブレークモード中でブレ
ーク割込を要求することができ、融通性が向上する。
Further, by allowing multiple interrupts for a break with such a control bit, a break interrupt can be requested in the break mode, and flexibility is improved.

【0146】(5).ブレーク割込の他に、エミュレータ側
から要求できる一般割込を設けることにより、ユーザ側
の資源を使用することなくモニタソフトを起動したりす
ることができる。
(5) By providing a general interrupt that can be requested from the emulator side in addition to the break interrupt, the monitor software can be activated without using the resources on the user side.

【0147】以上、本発明者によってなされた発明を実
施例に基づき具体的に説明したが、本発明は前記実施例
に限定されるものではなく、その要旨を逸脱しない範囲
で種々変更可能であることはいうまでもない。
Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited to the embodiments and various modifications can be made without departing from the scope of the invention. Needless to say.

【0148】たとえば、アドレス空間の大きさ、分割数
など、あるいは内蔵される機能ブロックまたはモジュー
ルの数・種類、ピン数などについては何等限定されな
い。また、制御レジスタの配置やエミュレーション用プ
ロセッサ専用ブロックの具体的構成、エミュレータの具
体的構成などは上記実施例に限定されず、その他、種々
変更可能である。
For example, the size of the address space, the number of divisions, the number / type of function blocks or modules incorporated, the number of pins, etc. are not limited. The arrangement of the control registers, the specific configuration of the emulation processor dedicated block, the specific configuration of the emulator, etc. are not limited to those in the above embodiment, and various changes can be made.

【0149】また、マイクロコンピュータが指定したバ
スサイクルは、バス幅、バスステート数、アドレスマル
チプレクスのほか、有効となるアドレスのビット数、ア
ドレスデコード信号の出力、データとアドレスのマルチ
プレクスなども含めることができる。これらの内、一部
はエミュレーション用バスサイクルでも共通にすること
ができる。バス幅などは共通にしてもよい。ユーザ側の
メモリの内容を破壊しないようにすればよい。アドレス
デコード信号などの出力は行うようにしてもよい。
The bus cycle designated by the microcomputer includes the bus width, the number of bus states, the address multiplex, the number of valid address bits, the output of the address decode signal, the multiplex of the data and the address, and the like. be able to. Some of these can be shared in the emulation bus cycle. The bus width may be common. It suffices not to destroy the contents of the memory on the user side. The address decode signal may be output.

【0150】さらに、基本的な外部バスサイクルや、内
蔵ROM・内蔵RAM・内部I/Oレジスタのバスサイ
クルも任意とすることができる。ブレークリセットでの
み初期化するレジスタも任意に変更することができる。
初期値も任意にすることができる。たとえば、外部ST
BY端子によるハードウェアスタンバイモードを有する
場合に、ハードウェアスタンバイモードでは全ての制御
レジスタを初期化するようにしてもよい。
Further, the basic external bus cycle and the bus cycle of the built-in ROM / built-in RAM / internal I / O register can be arbitrary. The registers initialized only by break reset can be changed arbitrarily.
The initial value can also be arbitrary. For example, external ST
When the hardware standby mode using the BY terminal is provided, all the control registers may be initialized in the hardware standby mode.

【0151】また、エミュレータ用も制御信号の数や種
類も任意に変更することができる。エミュレータ専用割
込の入力検出も変更可能である。入力検出を選択するビ
ットを設けてもよい。
Also, the number and types of control signals for the emulator can be arbitrarily changed. Input detection of the emulator-only interrupt can also be changed. A bit for selecting input detection may be provided.

【0152】以上の説明では、主として本発明者によっ
てなされた発明をその利用分野であるエミュレーション
用プロセッサおよびそれを搭載したエミュレータに適用
した場合について説明したが、これに限定されるもので
はなく、その他の半導体集積回路装置にも適用可能であ
り、本発明は少なくとも2つの動作状態を有したり、ア
ドレス空間上に2重にメモリを配置したりする半導体集
積回路装置に広く適用可能である。
In the above description, the invention mainly made by the present inventor is applied to the emulation processor which is the field of use thereof and the emulator equipped with the emulation processor. However, the invention is not limited to this. The present invention is also widely applicable to the semiconductor integrated circuit device having at least two operating states and arranging the memory twice in the address space.

【0153】[0153]

【発明の効果】本願において開示される発明のうち、代
表的なものによって得られる効果を簡単に説明すれば、
以下のとおりである。
Advantageous effects obtained by typical ones of the inventions disclosed in the present application will be briefly described.
It is as follows.

【0154】(1).リセット後に直ちにブレークモードに
遷移するか、ユーザモードとするかを入力端子の状態で
選択可能にする手段、またブレークモード時に、エリア
毎にエミュレーションメモリをアクセスするか、ユーザ
メモリをアクセスするかを指定する手段、エミュレーシ
ョン内部にブレーク条件を設定するようにし、特にシン
グルステップ処理を要求するビットを有し、かかるビッ
トが所定の状態である場合にユーザプログラムの1命令
毎にブレーク割込を自動的に要求可能にする手段を設け
ることにより、エミュレーション用プロセッサ外部で制
御していたものをエミュレーション用プロセッサに取り
込むことができるので、エミュレーションにおいてエミ
ュレーション用プロセッサ内部の豊富な情報を用いるこ
とが可能となる。
(1). Means for making it possible to select whether to immediately enter the break mode after reset or to set the user mode in the state of the input terminal. In the break mode, access the emulation memory for each area or A means for designating whether to access the memory, a break condition is set in the emulation, and in particular, it has a bit for requesting single step processing. When such a bit is in a predetermined state, for each instruction of the user program By providing a means for automatically requesting a break interrupt, it is possible to take what was controlled outside the emulation processor into the emulation processor, so a wealth of information inside the emulation processor is used during emulation. It becomes possible.

【0155】(2).前記(1) により、外部で制御していた
ものがエミュレーション用プロセッサに取り込まれるの
で、エミュレーション用プロセッサからエミュレータへ
の信号の遅延や、エミュレータからエミュレーション用
プロセッサへの信号の遅延による影響を排除することが
可能となる。
(2) By the above (1), since the external control is taken into the emulation processor, the signal delay from the emulation processor to the emulator and the signal from the emulator to the emulation processor are delayed. It is possible to eliminate the effect of delay.

【0156】(3).前記(1) により、外部で制御していた
ものがエミュレーション用プロセッサに取り込まれるの
で、エミュレーション用プロセッサとエミュレータ間の
入出力信号を増加させずに、容易かつ高速にエミュレー
ション用プロセッサの制御を行うことが可能となる。
(3) According to the above (1), what is controlled externally is taken into the emulation processor, so that the emulation can be performed easily and at high speed without increasing the input / output signals between the emulation processor and the emulator. It becomes possible to control the processor for use.

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

【図1】本発明の一実施例であるエミュレーション用プ
ロセッサのエミュレーション対象となるマイクロコンピ
ュータの一例を示すブロック図である。
FIG. 1 is a block diagram showing an example of a microcomputer that is an emulation target of an emulation processor that is an embodiment of the present invention.

【図2】本実施例におけるエミュレーション用プロセッ
サを示すブロック図である。
FIG. 2 is a block diagram showing an emulation processor in the present embodiment.

【図3】本実施例において、エミュレータ専用レジスタ
の構成を示す説明図である。
FIG. 3 is an explanatory diagram showing a configuration of an emulator dedicated register in the present embodiment.

【図4】本実施例において、エミュレータ専用レジスタ
の構成(図3に続く)を示す説明図である。
FIG. 4 is an explanatory diagram showing the configuration of the emulator-dedicated register (continued from FIG. 3) in the present embodiment.

【図5】本実施例において、エミュレータ専用レジスタ
の構成(図4に続く)を示す説明図である。
FIG. 5 is an explanatory diagram showing a configuration of an emulator-dedicated register (continued from FIG. 4) in the present embodiment.

【図6】本実施例において、エミュレータ専用レジスタ
の構成(図5に続く)を示す説明図である。
FIG. 6 is an explanatory diagram showing the configuration of the emulator-dedicated register (continued from FIG. 5) in the present embodiment.

【図7】本実施例において、エミュレータ専用レジスタ
の構成(図6に続く)を示す説明図である。
FIG. 7 is an explanatory diagram showing a configuration of an emulator-dedicated register (continued from FIG. 6) in the present embodiment.

【図8】本実施例において、エミュレータ専用レジスタ
の構成(図7に続く)を示す説明図である。
FIG. 8 is an explanatory diagram showing a configuration of a register dedicated to an emulator (continued from FIG. 7) in the present embodiment.

【図9】本実施例において、エミュレータ専用レジスタ
の構成(図8に続く)を示す説明図である。
FIG. 9 is an explanatory diagram showing a configuration of a register dedicated to an emulator (continued from FIG. 8) in the present embodiment.

【図10】本実施例において、アドレス空間のアドレス
マップを示す説明図である。
FIG. 10 is an explanatory diagram showing an address map of an address space in the present embodiment.

【図11】本実施例において、MEMCR、EWTCR
によるアクセス状態を示す説明図である。
FIG. 11 shows the MEMCR and EWTCR in this embodiment.
FIG. 5 is an explanatory diagram showing an access state according to FIG.

【図12】本実施例において、MEMCR、EWTCR
によるアクセス状態(図11に続く)を示す説明図であ
る。
FIG. 12 shows the MEMCR and EWTCR in this embodiment.
12 is an explanatory diagram showing an access state (continued from FIG. 11) according to FIG.

【図13】本実施例において、エミュレーション用プロ
セッサのバス構成を示すブロック図である。
FIG. 13 is a block diagram showing a bus configuration of an emulation processor in the present embodiment.

【図14】本実施例において、バスタイミングの一例を
示すタイミング図である。
FIG. 14 is a timing chart showing an example of bus timing in the present embodiment.

【図15】本実施例において、ブレークリセットのタイ
ミング図である。
FIG. 15 is a timing diagram of break reset in the present embodiment.

【図16】本実施例において、ユーザリセットのタイミ
ング図である。
FIG. 16 is a timing diagram of user reset in the present embodiment.

【図17】本実施例において、ブレークリセット制御回
路のブロック図である。
FIG. 17 is a block diagram of a break reset control circuit in the present embodiment.

【図18】本実施例において、ブレークアクノリッジ信
号制御回路のブロック図である。
FIG. 18 is a block diagram of a break acknowledge signal control circuit in the present embodiment.

【図19】本実施例において、エミュレーション専用制
御レジスタの一例を示すブロック図である。
FIG. 19 is a block diagram showing an example of an emulation dedicated control register in the present embodiment.

【図20】本実施例において、ブレーク制御回路のブロ
ック図である。
FIG. 20 is a block diagram of a break control circuit in the present embodiment.

【図21】本実施例におけるエミュレーション用プロセ
ッサを搭載したエミュレータのブロック図である。
FIG. 21 is a block diagram of an emulator equipped with an emulation processor according to the present embodiment.

【図22】本実施例におけるエミュレーション用プロセ
ッサを搭載したエミュレータの動作フローチャートであ
る。
FIG. 22 is an operation flowchart of the emulator equipped with the emulation processor according to the present embodiment.

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

CPU 中央処理装置 DTC データトランスファコントローラ ROM リードオンリメモリ RAM ランダムアクセスメモリ SCI シリアルコミュニケーションインタフェース A/D A/D変換器 IOP1〜IOP11 入出力ポート BSC バスコントローラ CPG クロック発振器 MS モジュールセレクト部 IAB,PAB 内部アドレスバス IDB,PDB 内部データバス Vcc,Vss 電源端子 AVcc,AVss アナログ電源端子 RES リセット入力端子 STBY スタンバイ入力端子 NMI 割込入力端子 EXTAL,XTAL クロック入力端子 MD0,MD1,MD2 動作モード入力端子 MSELR モジュール選択レジスタ MEMCR メモリ制御レジスタ EWTCR ウェイト制御レジスタ BRKCR ブレーク制御レジスタ BAR ブレークアドレスレジスタ BAMR ブレークアドレスマスクレジスタ IRQCR エミュレータ専用割込制御レジスタ EMLSTKR エミュレータスタックメモリレジスタ CPU central processing unit DTC data transfer controller ROM read only memory RAM random access memory SCI serial communication interface A / D A / D converter IOP1 to IOP11 I / O port BSC bus controller CPG clock oscillator MS module select unit IAB, PAB internal address bus IDB, PDB Internal data bus Vcc, Vss power supply terminal AVcc, AVss analog power supply terminal RES reset input terminal STBY standby input terminal NMI interrupt input terminal EXTAL, XTAL clock input terminal MD0, MD1, MD2 operation mode input terminal MSELR module selection register MEMCR Memory control register EWTCR Wait control register BRKCR Break control Register BAR break address register BAMR break address mask register IRQCR emulator dedicated interrupt control register EMLSTKR emulator stack memory register

───────────────────────────────────────────────────── フロントページの続き (72)発明者 鈴木 達也 東京都小平市上水本町5丁目22番1号 株 式会社日立マイコンシステム内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Tatsuya Suzuki 5-22-1, Kamisuihonmachi, Kodaira-shi, Tokyo Inside Hitachi Microcomputer System Co., Ltd.

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 マイクロコンピュータをエミュレートで
きるエミュレーション用プロセッサであって、エミュレ
ーション用プログラムが動作する第1のモード、または
エミュレート対象となるユーザプログラムが動作する第
2のモードを選択する手段と、エミュレーション用プロ
セッサ全体をリセットする第1のリセット状態、または
エミュレート対象となるマイクロコンピュータ部分のみ
をリセットする第2のリセット状態を設定する手段とを
有し、第1のリセット状態では動作開始に先だって前記
第1のモードになり、第2のリセット状態では動作開始
に先だって前記第2のモードになることを特徴とするエ
ミュレーション用プロセッサ。
1. An emulation processor capable of emulating a microcomputer, which selects a first mode in which an emulation program operates or a second mode in which a user program to be emulated operates. And a means for setting a first reset state in which the entire emulation processor is reset or a second reset state in which only the microcomputer part to be emulated is reset. In the first reset state, prior to the start of operation. An emulation processor, which is in the first mode and is in the second mode prior to the start of operation in the second reset state.
【請求項2】 請求項1記載のエミュレーション用プロ
セッサであって、前記第1、第2のリセット状態は共通
のリセット信号と選択信号とによって選択され、前記選
択信号がリセット解除後に別の機能の制御信号として動
作することを特徴とするエミュレーション用プロセッ
サ。
2. The emulation processor according to claim 1, wherein the first and second reset states are selected by a common reset signal and a selection signal, and the selection signal has a different function after reset release. An emulation processor that operates as a control signal.
【請求項3】 請求項1または2記載のエミュレーショ
ン用プロセッサであって、前記第1、第2のリセット状
態の選択は前記共通のリセット信号の非活性状態への遷
移時の選択信号の状態によって選択されることを特徴と
するエミュレーション用プロセッサ。
3. The emulation processor according to claim 1, wherein the selection of the first reset state and the second reset state depends on a state of a selection signal at a transition of the common reset signal to an inactive state. An emulation processor characterized by being selected.
【請求項4】 請求項1、2または3記載のエミュレー
ション用プロセッサを搭載したエミュレータであって、
ユーザシステムのリセット信号とエミュレータのリセッ
ト信号との論理和信号とを前記共通のリセット信号に入
力し、ユーザシステムのリセット信号が活性状態のとき
は前記選択信号を第2のリセット状態が選択される状態
にし、エミュレータのリセット信号が活性状態のときは
前記選択信号を第1のリセット状態が選択される状態に
する手段を有することを特徴とするエミュレータ。
4. An emulator equipped with the emulation processor according to claim 1, 2, or 3.
A logical sum signal of a reset signal of the user system and a reset signal of the emulator is input to the common reset signal, and when the reset signal of the user system is active, the selection signal is selected to the second reset state. An emulator characterized by having means for setting the selection signal to a state in which the first reset state is selected when the reset signal of the emulator is in an active state.
【請求項5】 マイクロコンピュータをエミュレートで
きるエミュレーション用プロセッサであって、エミュレ
ーション用プログラムが動作する第1のモード、または
エミュレート対象となるユーザプログラムが動作する第
2のモードを選択する手段を有し、エミュレート対象と
なるマイクロコンピュータのアドレス空間を分割して、
分割した領域の少なくとも1つに対して、前記第2のモ
ードにおいて、マイクロコンピュータが指定したバスサ
イクルを行うか、エミュレーション用のバスサイクルを
行うかを指定する手段を有することを特徴とするエミュ
レーション用プロセッサ。
5. An emulation processor capable of emulating a microcomputer, having means for selecting a first mode in which an emulation program operates or a second mode in which a user program to be emulated operates. Then, divide the address space of the microcomputer to be emulated,
For at least one of the divided areas, in the second mode, there is provided means for designating whether to perform a bus cycle designated by the microcomputer or a bus cycle for emulation. Processor.
【請求項6】 請求項5記載のエミュレーション用プロ
セッサであって、前記分割したアドレス空間の少なくと
も1つに対応するメモリ制御ビットを有し、前記第2の
モードにおいて、前記メモリ制御ビットが第1の状態の
ときマイクロコンピュータが指定したバスサイクルを行
い、前記メモリ制御ビットが第2の状態のときエミュレ
ーション用のバスサイクルを行うことを特徴とするエミ
ュレーション用プロセッサ。
6. The emulation processor according to claim 5, further comprising a memory control bit corresponding to at least one of the divided address spaces, wherein in the second mode, the memory control bit is first. An emulation processor which performs a bus cycle designated by the microcomputer in the state 1) and performs a bus cycle for emulation when the memory control bit is in the second state.
【請求項7】 請求項5または6記載のエミュレーショ
ン用プロセッサであって、前記エミュレーション用のバ
スサイクルにおいては常にエミュレータウェイトが有効
であることを特徴とするエミュレーション用プロセッ
サ。
7. The emulation processor according to claim 5, wherein the emulator wait is always valid in the emulation bus cycle.
【請求項8】 請求項5、6または7記載のエミュレー
ション用プロセッサであって、前記アドレス空間の分割
が3以上とされ、少なくとも1つの分割された領域が他
の少なくとも2以上の分割された領域とアドレス空間の
広さが相違されることを特徴とするエミュレーション用
プロセッサ。
8. The emulation processor according to claim 5, 6 or 7, wherein the address space is divided into three or more areas, and at least one divided area is other at least two divided areas. And an emulation processor characterized in that the size of the address space is different.
【請求項9】 請求項5、6、7または8記載のエミュ
レーション用プロセッサを搭載したエミュレータであっ
て、前記エミュレーション用プロセッサ、ユーザシステ
ムのメモリのリードまたはライトと、エミュレータシス
テムのメモリのリードまたはライトとが可能であって、
前記マイクロコンピュータが指定したバスサイクルによ
ってユーザシステムのメモリのリードまたはライトを行
い、前記エミュレーション用のバスサイクルによってエ
ミュレータシステムのメモリのリードまたはライトを行
うことを特徴とするエミュレータ。
9. An emulator equipped with the emulation processor according to claim 5, 6, 7 or 8, wherein the emulation processor, the read / write of the memory of the user system, and the read / write of the memory of the emulator system. Is possible,
An emulator characterized by reading or writing the memory of a user system in a bus cycle designated by the microcomputer, and reading or writing the memory of an emulator system in a bus cycle for emulation.
【請求項10】 マイクロコンピュータをエミュレート
できるエミュレーション用プロセッサであって、エミュ
レーション用プログラムが動作する第1のモード、また
はエミュレート対象となるユーザプログラムが動作する
第2のモードを選択する手段と、シングルステップ制御
ビットとを有し、前記シングルステップ制御ビットが第
1の状態のときには前記第2のモードで、かつ前記第1
のモードからの復帰命令以外の命令実行終了時点におい
て常に前記第1のモードへの遷移処理が行われることを
特徴とするエミュレーション用プロセッサ。
10. An emulation processor capable of emulating a microcomputer, and means for selecting a first mode in which an emulation program operates or a second mode in which a user program to be emulated operates. A single step control bit, wherein the single step control bit is in the first state, in the second mode, and in the first mode.
In the emulation processor, the transition processing to the first mode is always performed at the time of completion of instruction execution other than the return instruction from the mode.
【請求項11】 請求項10記載のエミュレーション用
プロセッサであって、前記シングルステップ制御ビット
は前記第1のモードにおいてのみライト可能であること
を特徴とするエミュレーション用プロセッサ。
11. The emulation processor according to claim 10, wherein the single-step control bit is writable only in the first mode.
【請求項12】 マイクロコンピュータをエミュレート
できるエミュレーション用プロセッサであって、エミュ
レーション用プログラムが動作する第1のモード、また
はエミュレート対象となるユーザプログラムが動作する
第2のモードを選択する手段と、アドレスを指定するレ
ジスタと、アドレス比較回路と、第1、第2のブレーク
割込制御ビットと、トリガ出力端子とを有し、かつ前記
アドレス比較回路は前記マイクロコンピュータのCPU
の出力するアドレスと前記アドレスを指定するレジスタ
の出力とを入力して一致信号を出力するものであって、
前記第1のブレーク割込制御ビットが第1の状態のと
き、前記一致信号が活性状態のときに前記第1のモード
への遷移処理が行われるようにされ、前記一致信号を前
記トリガ出力端子から出力する手段を有することを特徴
とするエミュレーション用プロセッサ。
12. An emulation processor capable of emulating a microcomputer, which selects a first mode in which an emulation program operates or a second mode in which a user program to be emulated operates. It has a register designating an address, an address comparison circuit, first and second break interrupt control bits, and a trigger output terminal, and the address comparison circuit is a CPU of the microcomputer.
Which outputs the coincidence signal by inputting the address to be output by and the output of the register designating the address,
When the first break interrupt control bit is in the first state, the transition processing to the first mode is performed when the match signal is in the active state, and the match signal is sent to the trigger output terminal. An emulation processor having means for outputting from.
【請求項13】 マイクロコンピュータをエミュレート
できるエミュレーション用プロセッサであって、エミュ
レーション用プログラムが動作する第1のモード、また
はエミュレート対象となるユーザプログラムが動作する
第2のモードを選択する手段と、前記第1のモードへの
遷移処理を行う命令と、前記第1のモードへの遷移処理
を行わせるための制御端子と、多重ブレーク割込制御ビ
ットとを有し、前記多重ブレーク割込制御ビットが第1
の状態のときには前記第1のモードにおいても前記制御
端子による前記第1のモードへの遷移処理が可能とさ
れ、前記多重ブレーク割込制御ビットが第2の状態のと
きには前記第1のモードにおいては前記制御端子による
前記第1のモードへの遷移処理が禁止とされることを特
徴とするエミュレーション用プロセッサ。
13. An emulation processor capable of emulating a microcomputer, and means for selecting a first mode in which an emulation program operates or a second mode in which a user program to be emulated operates. An instruction for performing a transition process to the first mode, a control terminal for performing a transition process to the first mode, and a multiple break interrupt control bit, wherein the multiple break interrupt control bit Is the first
State, the transition processing to the first mode by the control terminal is possible even in the first mode, and when the multiple break interrupt control bit is in the second state, in the first mode. An emulation processor, wherein transition processing to the first mode by the control terminal is prohibited.
【請求項14】 請求項13記載のエミュレーション用
プロセッサであって、前記多重ブレーク割込制御ビット
は前記第2のモードにおいて第2の状態に初期化される
ことを特徴とするエミュレーション用プロセッサ。
14. The emulation processor according to claim 13, wherein the multiple break interrupt control bit is initialized to a second state in the second mode.
JP29823494A 1994-12-01 1994-12-01 Emulation processor and emulator equipped with it Expired - Fee Related JP3323341B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29823494A JP3323341B2 (en) 1994-12-01 1994-12-01 Emulation processor and emulator equipped with it

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29823494A JP3323341B2 (en) 1994-12-01 1994-12-01 Emulation processor and emulator equipped with it

Publications (2)

Publication Number Publication Date
JPH08161190A true JPH08161190A (en) 1996-06-21
JP3323341B2 JP3323341B2 (en) 2002-09-09

Family

ID=17856977

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29823494A Expired - Fee Related JP3323341B2 (en) 1994-12-01 1994-12-01 Emulation processor and emulator equipped with it

Country Status (1)

Country Link
JP (1) JP3323341B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426249C (en) * 2005-03-16 2008-10-15 富士通株式会社 Speed converting apparatus with load controlling function and information processing system
US11900135B1 (en) * 2018-12-06 2024-02-13 Cadence Design Systems, Inc. Emulation system supporting representation of four-state signals

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426249C (en) * 2005-03-16 2008-10-15 富士通株式会社 Speed converting apparatus with load controlling function and information processing system
US11900135B1 (en) * 2018-12-06 2024-02-13 Cadence Design Systems, Inc. Emulation system supporting representation of four-state signals

Also Published As

Publication number Publication date
JP3323341B2 (en) 2002-09-09

Similar Documents

Publication Publication Date Title
US5630052A (en) System development and debug tools for power management functions in a computer system
US5640542A (en) On-chip in-circuit-emulator memory mapping and breakpoint register modules
US6449709B1 (en) Fast stack save and restore system and method
EP0776504B1 (en) Integrated circuit with multiple functions sharing multiple internal signal buses for distributing bus access control and arbitration control
US5524268A (en) Flexible processor-driven control of SCSI buses utilizing tags appended to data bytes to determine SCSI-protocol phases
JP3364495B2 (en) Additional board
US6272582B1 (en) PCI-PCI bridge allowing controlling of a plurality of PCI agents including a VGA device
US5577230A (en) Apparatus and method for computer processing using an enhanced Harvard architecture utilizing dual memory buses and the arbitration for data/instruction fetch
JP4226085B2 (en) Microprocessor and multiprocessor system
JPH08202563A (en) Computer system
JPH08171500A (en) Computer system
US6678838B1 (en) Method to track master contribution information in a write buffer
WO2006069364A2 (en) System and method for control registers accessed via private operations
US20040123010A1 (en) Shared write buffer in a peripheral interface and method of operating
EP0575171B1 (en) Enhanced system management method and apparatus
US5212775A (en) Method and apparatus for observing internal memory-mapped registers
JP3323341B2 (en) Emulation processor and emulator equipped with it
KR100223096B1 (en) Method and apparatus for observing internal memory-mapped registers
JPH0855097A (en) Data processing system and its memory access method
JPH08255096A (en) Microprocessor and debugging system
JP2001109708A (en) Microcomputer
JP3839068B2 (en) Semiconductor integrated circuit device
JP2001056793A (en) Information processor
JPH09198272A (en) Processor for emulation and emulator
JP2002541582A (en) Method and system for updating user memory in an emulator system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20020212

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020521

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080628

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080628

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090628

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100628

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110628

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110628

Year of fee payment: 9

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110628

Year of fee payment: 9

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120628

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees