JP2001297012A - Processor and emulator - Google Patents

Processor and emulator

Info

Publication number
JP2001297012A
JP2001297012A JP2000115793A JP2000115793A JP2001297012A JP 2001297012 A JP2001297012 A JP 2001297012A JP 2000115793 A JP2000115793 A JP 2000115793A JP 2000115793 A JP2000115793 A JP 2000115793A JP 2001297012 A JP2001297012 A JP 2001297012A
Authority
JP
Japan
Prior art keywords
bus
emulation
cpu
register
address
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.)
Withdrawn
Application number
JP2000115793A
Other languages
Japanese (ja)
Inventor
Naomiki Mitsuishi
直幹 三ッ石
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 Ltd
Original Assignee
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 Ltd filed Critical Hitachi Ltd
Priority to JP2000115793A priority Critical patent/JP2001297012A/en
Publication of JP2001297012A publication Critical patent/JP2001297012A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide technology which performs emulation in a state as close to actual operation as possible. SOLUTION: A microprocessor (212) is formed including a 1st CPU (101) which can execute a user program, a 2nd CPU (119) which can execute a program for emulation independently of the 1st CPU, a 1st bus (I-BUS) which is connected to the 1st CPU, a 2nd bus (E-BUS) which is connected to the 2nd CPU, and a bus connecting means (111) which can connect the 1st and 2nd buses. Even if a break condition is met during the emulation, the execution of the user program by the 1st CPU is not stopped to put the emulation closer to the actual operation.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、エミュレーション
技術にかかり、例えば、マイクロプロセッサ、さらには
エミュレーション用プロセッサを搭載して成るエミュレ
ータに適用して有効な技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an emulation technology, and more particularly to a technology effective when applied to, for example, a microprocessor and an emulator equipped with an emulation processor.

【0002】[0002]

【従来の技術】シングルチップマイクロコンピュータを
用いた応用システムの開発を行うために、いわゆるイン
サーキットエミュレータと呼ばれるマイクロコンピュー
タ開発装置が用いられる。マイクロコンピュータ開発装
置は、いわゆるパーソナルコンピュータなどのシステム
開発装置と、開発中の応用システム(ユーザシステム)
との間に、ケーブル等を介して接続され、その応用シス
テムに装着されるべきシングルチップマイクロコンピュ
ータ(ターゲットマイクロコンピュータ)の機能を代行
しつつ、デバッガとしての機能を発揮し、ソフトウェア
あるいは応用システムの開発を支援する。このマイクロ
コンピュータ開発装置には上記シングルチップマイクロ
コンピュータに対応したエバリュエーションチップと呼
ばれる、評価用のエミュレーション用プロセッサが搭載
されている。エミュレーション用プロセッサはシングル
チップマイクロコンピュータを包含する機能に、マイク
ロコンピュータの内部状態を出力したり、マイクロコン
ピュータの動作を制御したりする専用の機能を追加する
ことにより、マイクロコンピュータ開発装置の開発が容
易にされる。
2. Description of the Related Art In order to develop an application system using a single-chip microcomputer, a microcomputer development apparatus called an in-circuit emulator is used. The microcomputer development device includes a system development device such as a personal computer and an application system (user system) under development.
Is connected via a cable or the like, and acts as a debugger while acting as a single-chip microcomputer (target microcomputer) to be mounted on the application system. Support development. This microcomputer development device is equipped with an evaluation emulation processor called an evaluation chip corresponding to the single-chip microcomputer. The emulation processor facilitates development of microcomputer development equipment by adding functions dedicated to outputting the internal state of the microcomputer and controlling the operation of the microcomputer to the functions including the single-chip microcomputer. To be.

【0003】インサーキットエミュレータについては、
例えば、昭和59年11月30日オーム社発行の「LS
Iハンドブック」P562及びP563などに記載さ
れ、また、エミュレーション用プロセッサについては、
例えば、特開昭63−106840号公報などに記載さ
れている。
[0003] As for the in-circuit emulator,
For example, "LS" issued by Ohmsha on November 30, 1984
I Handbook "P562 and P563, and the emulation processor
For example, it is described in JP-A-63-106840.

【0004】エミュレーション用プロセッサ専用の機能
としては、中央処理装置(「CPU」と略記する)が所
定のアドレスをアクセスした場合に、CPUを停止し、
エミュレータ側に制御を移したりするブレーク機能を持
ち、かかるブレーク時に、エミュレーション専用のプロ
グラムを実行し、このプログラムの下で所望のデバッグ
に必要な処理を行う。
A function dedicated to the emulation processor is that when a central processing unit (abbreviated as “CPU”) accesses a predetermined address, the CPU is stopped.
It has a break function for transferring control to the emulator side, and at the time of such a break, executes a program dedicated to emulation, and performs processing necessary for desired debugging under this program.

【0005】デバッグに必要な処理の例としては、一
旦、ブレークした上で、ユーザのメモリを表示したり、
変更したりする機能がある。これをメモリコマンドと称
する。
[0005] Examples of processing necessary for debugging include displaying a user's memory after a break once,
There is a function to change. This is called a memory command.

【0006】また、ユーザプログラム実行中に、ユーザ
システムのメモリの内容を間欠的にサンプリングして表
示する機能がある。これをウィンドウ機能と称する。こ
れらの機能は、実際には一定間隔でブレークが行われ、
所望のメモリのモニタを行うと、ユーザプログラムの実
行を継続する、といった手順で実現されている。
There is also a function of intermittently sampling and displaying the contents of the memory of the user system during execution of the user program. This is called a window function. These features actually break at regular intervals,
This is realized in such a procedure that, when a desired memory is monitored, execution of the user program is continued.

【0007】[0007]

【発明が解決しようとする課題】かかるエミュレータや
エミュレーション用プロセッサについて本発明者が検討
したところ、以下のような課題が見いだされた。
The present inventor has studied such an emulator and an emulation processor, and found the following problems.

【0008】第1に、ブレークについては以下のような
課題がある。
First, there are the following problems with the break.

【0009】ブレークすると、エミュレーション専用の
プログラムが実行され、ユーザプログラムの実行は停止
されてしまう。ブレークは、ユーザのコマンド入力を待
ったりするから、ユーザシステムの動作に比べて、長い
期間にわたる。ユーザプログラムには、種々のタスクな
どがあり、ユーザシステムのモータなどを駆動するよう
な機械的な制御を行うタスクなどもあり、割り込みなど
によって、タスクを切り替えている。これらが、ブレー
クによって、動作しなくなると、ユーザシステムの機械
的な部分などに不都合が生じてしまう場合がある。
When a break occurs, a program dedicated to emulation is executed, and execution of the user program is stopped. Since a break waits for a user to input a command, the break lasts longer than the operation of the user system. The user program has various tasks and the like, and there is also a task of performing mechanical control such as driving a motor of a user system. The task is switched by an interrupt or the like. If these do not operate due to a break, inconvenience may occur in the mechanical part of the user system.

【0010】このため、ブレークした場合も、ユーザプ
ログラムの実行を継続できるようにすることが望まし
い。換言すれば、ユーザプログラムの実行中に、所望の
デバッグ用処理を実行できることが望ましい。
For this reason, it is desirable that the execution of the user program can be continued even if a break occurs. In other words, it is desirable that a desired debugging process can be executed during the execution of the user program.

【0011】上記ウィンドウ機能のように、一旦、ブレ
ークし、所定のデバッグ用処理を実行した後、ユーザプ
ログラムの実行を再開する手順もあるが、この場合は次
のようなオーバヘッドが発生する。
As in the above window function, there is a procedure in which a break is performed once, a predetermined debugging process is executed, and then the execution of the user program is resumed. In this case, the following overhead occurs.

【0012】ブレークはCPU(中央処理装置)の例外
処理として実行されるから、スタックやベクタリード、
あるいはプリフェッチした命令のキャンセルが必要にな
る。ブレーク処理ルーチンでは、ユーザプログラムの実
行再開に備えて、汎用レジスタの待避を行う必要があ
る。デバッグ用処理の種類に応じたベクタを使用するこ
とは困難であるため、いずれのデバッグ用処理を行うべ
きか判定する処理が必要になる。デバッグ用処理は所定
の命令を実行して、実現されるから、所要のデータのリ
ード又はライト動作に比較して、多くの命令リード動作
が含まれる。デバッグ用処理の終了後には、上記待避し
た汎用レジスタを復帰する必要がある。ユーザプログラ
ムの実行を再開するために、リターン(復帰)命令を実
行して、アンスタックなどの処理が必要になる。かかる
ブレーク時のプログラムは、エミュレーション専用の比
較的低速のメモリ上で実行されることが多いが、これに
よって、ブレーク時の処理時間がさらに長くなる。
Since a break is executed as an exception process of a CPU (central processing unit), a stack or vector read,
Alternatively, it is necessary to cancel the prefetched instruction. In the break processing routine, it is necessary to save general-purpose registers in preparation for resuming execution of the user program. Since it is difficult to use a vector according to the type of the debugging process, it is necessary to perform a process of determining which debugging process is to be performed. Since the debugging process is implemented by executing a predetermined instruction, it involves a larger number of instruction read operations than required data read or write operations. After the end of the debugging process, it is necessary to restore the saved general-purpose register. In order to resume the execution of the user program, it is necessary to execute a return (return) instruction and perform processing such as unstacking. The program at the time of such a break is often executed on a relatively low-speed memory dedicated to emulation, but this further increases the processing time at the time of a break.

【0013】モータなどの機器制御の場合には、制御対
象の機器の制約から、所定のイベントに呼応した処理
を、所定の時間内に完了するように、制御する必要があ
る。また、システム全体の時間的制約の中で、所要の処
理を完了させる必要がある。さらに、イベントは同時に
発生する場合もあるから、このような場合にも、それぞ
れの制約を満足しなければならない。このため、それが
一時的であるにせよ、ブレークによるユーザプログラム
実行の中断は好ましくない。
In the case of controlling a device such as a motor, it is necessary to perform control so that a process corresponding to a predetermined event is completed within a predetermined time due to restrictions on a device to be controlled. Further, it is necessary to complete required processing within the time constraints of the entire system. Further, since events may occur simultaneously, in such a case, the respective constraints must be satisfied. For this reason, even if it is temporary, it is not preferable to interrupt the execution of the user program by a break.

【0014】このように上記オーバヘッド、及びデバッ
グ用処理の時間は最小限にする必要があるにもかかわら
ず、従来技術においては、そのことが十分に改善されて
いない。
As described above, although it is necessary to minimize the overhead and the time for the debugging process, the related art has not sufficiently improved the above.

【0015】第2に、CPUの動作を解析することにつ
いては以下のような課題がある。
Second, analyzing the operation of the CPU has the following problems.

【0016】エミュレーション用プロセッサの専用機能
として、CPUの動作を示す信号、命令リード/データ
アクセスを識別する信号、リードした命令をCPUに取
込んだことを示す信号、取込んだ命令の実行開始を示す
信号、例外処理の実行開始を示すCPUステータス信号
などを出力して、エミュレータ上での解析を可能にする
機能がある。これらのCPUステータス信号について
は、例えば、特開平9−198272号公報に記載され
ている。
The dedicated functions of the emulation processor include a signal indicating operation of the CPU, a signal for identifying instruction read / data access, a signal indicating that the read instruction has been loaded into the CPU, and the start of execution of the loaded instruction. And a function for outputting a signal indicating the start of execution of exception processing, a CPU status signal indicating the start of exception processing, and the like, to enable analysis on the emulator. These CPU status signals are described, for example, in Japanese Patent Application Laid-Open No. 9-198272.

【0017】デバックの主な対象であるCPUについて
は、多段のパイプラインなど、種々の方法で高速化が行
われることで、その動作が複雑になっている。CPUの
動作の複雑化によって、限られた本数のCPUステータ
ス信号では、動作の解析が困難になる。エミュレーショ
ンインタフェースから、CPU内部の状態を全て出力し
て、かかる動作解析に用いることは可能ではあるが、エ
ミュレーション用プロセッサの端子数を増大させること
になる。
The operation of a CPU, which is a main object of debugging, is complicated by speeding up by various methods such as a multi-stage pipeline. Due to the complicated operation of the CPU, it becomes difficult to analyze the operation with a limited number of CPU status signals. Although it is possible to output all the internal states of the CPU from the emulation interface and use it for such operation analysis, the number of terminals of the emulation processor is increased.

【0018】プログラミングモデルとして、ユーザプロ
グラム上で使用可能なCPUの内部のレジスタ、すなわ
ち、汎用レジスタやコンディションコードレジスタなど
の状態は、機能モジュールとしてのCPUの内部にのみ
存在しており、モニタしたり、ブレークの条件としたり
することはできない。かかる内容をモニタするために
は、ブレークして、エミュレーション用プログラムの実
行によって、汎用レジスタやコンディションコードレジ
スタの内容を出力する他はない。エミュレーションイン
タフェースから、CPUの内部のレジスタを全て出力し
て、モニタやブレークに用いることは可能ではあるが、
それはエミュレーション用プロセッサの端子数を増大さ
せることになる。特に汎用レジスタのビット数本数は多
く、例えば、32ビット×8本などであり、これを全て
出力することは現実的でない。
As a programming model, the internal registers of the CPU usable on the user program, that is, the states of the general-purpose registers and the condition code registers, exist only inside the CPU as a functional module and can be monitored or monitored. Cannot be the condition of a break. In order to monitor such contents, there is no alternative but to output the contents of the general-purpose register and the condition code register by executing a program for emulation by breaking. Although it is possible to output all registers inside the CPU from the emulation interface and use them for monitoring and breaks,
That would increase the number of terminals of the emulation processor. In particular, the number of bits of the general-purpose register is large, for example, 32 bits × 8, and it is not practical to output all of them.

【0019】第3に、エミュレータの形態については以
下のような課題がある。
Third, there are the following problems in the form of the emulator.

【0020】ケーブル等を介して、開発中の応用システ
ム(ユーザシステム)にエミュレータを接続し、その応
用システムに装着されるべきシングルチップマイクロコ
ンピュータ(ターゲットマイクロコンピュータ)の機能
を代行する場合、ケーブルを介することによって、アナ
ログ信号にノイズが生じたり、不所望の遅延が生じたり
する場合がある。特に、例えば、VTR(ビデオテープ
レコーダ)や光ディスクのサーボ制御などでは、アナロ
グ信号を検出して、これを処理して、アナログ出力を行
うから、ケーブルにノイズが生じることによって、実質
的に、サーボ制御ができなくなり、シングルチップマイ
クロコンピュータ(ターゲットマイクロコンピュータ)
の機能の代行ができなくなってしまう。サーボ制御がで
きないと、データの読出しができず、そのほかのタスク
などのデバックも困難になってしまう。
When an emulator is connected to an application system (user system) under development via a cable or the like, and the function of a single-chip microcomputer (target microcomputer) to be mounted on the application system is substituted, the cable must be connected. This may cause noise or an undesired delay in the analog signal. In particular, for example, in a servo control of a VTR (video tape recorder) or an optical disk, an analog signal is detected, processed, and analog output is performed. Loss of control, single-chip microcomputer (target microcomputer)
Function cannot be substituted. If servo control cannot be performed, data cannot be read, and debugging of other tasks becomes difficult.

【0021】このため、エミュレーション用プロセッサ
をユーザシステムに実装した状態などで使用し、アナロ
グ信号などを実使用状態と同等にする必要がある。ユー
ザシステムの基板を変更するのは好ましくないから、エ
ミュレーション用プロセッサのパッケージの形状や端子
数は、シングルチップマイクロコンピュータと同等とす
る必要がある。
For this reason, it is necessary to use the emulation processor in a state where it is mounted on the user system or the like, and to make analog signals and the like equivalent to the actual use state. Since it is not preferable to change the substrate of the user system, the package shape and the number of terminals of the emulation processor need to be equivalent to those of a single-chip microcomputer.

【0022】また、カメラやカメラ一体型VTRといっ
た携帯機器では、ユーザシステム自体が小型であるた
め、ケーブルを接続する余地が少ない。さらに、これら
を実使用状態、すなわち、屋外などでもデバックするた
めには、エミュレータの匡体を小さくする必要がある。
In a portable device such as a camera or a camera-integrated VTR, there is little room for connecting a cable because the user system itself is small. Furthermore, in order to debug them in the actual use state, that is, in the outdoors, it is necessary to reduce the size of the housing of the emulator.

【0023】本発明の目的は、可能な限り実動作に近い
状態でエミュレーションを行うための技術を提供するこ
とにある。
An object of the present invention is to provide a technique for performing emulation as close to actual operation as possible.

【0024】本発明の別の目的は、エミュレーションに
おいてCPUの解析を容易にすることにある。
Another object of the present invention is to facilitate CPU analysis in emulation.

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

【0026】[0026]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The following is a brief description of an outline of a typical invention among the inventions disclosed in the present application.

【0027】すなわち、ユーザプログラムを実行可能な
第1CPUと、上記第1CPUとは独立してエミュレー
ション用プログラムを実行可能な第2CPUと、上記第
1CPUに結合された第1バスと、上記第2CPUに結
合された第2バスと、上記第1バスと上記第2バスとを
結合可能なバス接続手段とを含んでマイクロプロセッサ
を形成する。
That is, a first CPU capable of executing a user program, a second CPU capable of executing an emulation program independently of the first CPU, a first bus coupled to the first CPU, and a second CPU. A microprocessor is formed including the coupled second bus and bus connecting means capable of coupling the first bus and the second bus.

【0028】上記の手段によれば、上記第2CPUは、
上記第1CPUとは独立してエミュレーション用プログ
ラムを実行する。このため、ブレーク条件が成立した場
合でも、上記第1CPUにおけるユーザプログラムの実
行を停止する必要が無く、上記第1CPUでのユーザプ
ログラム実行状態は、実動作に可能な限り近いものとな
り、このことが、可能な限り実動作に近い状態でのエミ
ュレーションを可能にする。
According to the above means, the second CPU is
The emulation program is executed independently of the first CPU. Therefore, even when the break condition is satisfied, there is no need to stop the execution of the user program in the first CPU, and the execution state of the user program in the first CPU is as close to the actual operation as possible. And emulation in a state as close to actual operation as possible.

【0029】このとき、上記第1CPUの動作停止時間
を最小限に抑えながら、上記第1CPUによって管理さ
れるアドレス空間に配置された資源のリード又はライト
を可能にするには、第1バスに結合され、上記第1CP
Uによって管理されるアドレス空間に配置されることに
より、上記第1CPUからのアクセスが可能にされると
ともに、上記第2CPUによって管理されるアドレス空
間に配置されることで、上記第2CPUからのアクセス
をも可能にされた資源を設けるとよい。
At this time, in order to make it possible to read or write the resources arranged in the address space managed by the first CPU while minimizing the operation stop time of the first CPU, it is necessary to connect to the first bus. And the first CP
U enables access from the first CPU by being arranged in an address space managed by U, and allows access from the second CPU by being arranged in an address space managed by the second CPU. It is also advisable to provide enabled resources.

【0030】上記のようなエミュレーション機能を有す
るマイクロプロセッサにおいて端子数の増大を抑えるた
めには、上記第2バスに結合され、上記第2CPUと外
部の間でエミュレーションのためのデータのやり取りを
シリアル形式によって行うためのデバッグインタフェー
スを設けると良い。
In order to suppress the increase in the number of terminals in the microprocessor having the emulation function as described above, the microprocessor is connected to the second bus and exchanges data for emulation between the second CPU and the outside in a serial format. It is good to provide a debug interface for performing this.

【0031】上記第1CPUにおける汎用レジスタや命
令レジスタなどのように、当該第1CPUによって管理
されるアドレス空間に存在しない資源を、上記第2CP
Uによって管理されるアドレス空間に配置することによ
り、マイクロプロセッサの端子数を増やすことなく、上
記第1CPUにおける汎用レジスタや命令レジスタなど
のモニタやトレースを可能にし、システム開発装置上に
表示したりして、また、ブレークやトレース条件に設定
可能にすることによって、第1CPUの解析の容易化を
達成する。
Resources that do not exist in the address space managed by the first CPU, such as general-purpose registers and instruction registers in the first CPU, are transferred to the second CP.
By arranging in the address space managed by U, it is possible to monitor and trace general-purpose registers and instruction registers in the first CPU without increasing the number of terminals of the microprocessor, and to display them on a system development device. Further, by enabling setting of break and trace conditions, analysis of the first CPU is facilitated.

【0032】そして、上記構成のマイクロプロセッサ
と、上記マイクロプロセッサとシステム開発装置との間
での信号のやり取りを可能とするためのホストインタフ
ェースとを含んでエミュレータを構成することができ
る。
An emulator including the microprocessor having the above-described configuration and a host interface for enabling signal exchange between the microprocessor and the system development device can be configured.

【0033】[0033]

【発明の実施の形態】図2には、本発明にかかるエミュ
レータの構成例が示される。
FIG. 2 shows an example of the configuration of an emulator according to the present invention.

【0034】図2に示されるマイクロコンピュータ開発
装置(エミュレータ)は、マイクロコンピュータ開発装
置本体(エミュレータ本体)204と、インタフェース
ケーブル203とを含む。マイクロコンピュータ開発装
置本体204は、パーソナルコンピュータなどのシステ
ム開発装置213と、開発中のマイクロコンピュータ応
用システム(ユーザシステム)200との間に、インタ
フェースケーブル203を介して接続され、そのマイク
ロコンピュータ応用システム200に装着されるべきタ
ーゲットマイクロコンピュータの機能を代行しつつ、デ
バッガとしての機能を発揮し、ターゲットマイクロコン
ピュータで実行されるソフトウェアや、マイクロコンピ
ュータ応用システム200の開発を支援する。
The microcomputer development device (emulator) shown in FIG. 2 includes a microcomputer development device main body (emulator main body) 204 and an interface cable 203. The microcomputer development device main body 204 is connected via an interface cable 203 between a system development device 213 such as a personal computer and a microcomputer application system (user system) 200 under development, and the microcomputer application system 200 It acts as a debugger while acting on behalf of the function of the target microcomputer to be mounted on the microcomputer, and supports the development of software executed by the target microcomputer and the microcomputer application system 200.

【0035】マイクロコンピュータ開発装置本体204
から引き出されたインターフェースケーブル203の先
端には、マイクロコンピュータ応用システム200にお
けるターゲットマイクロコンピュータ搭載領域201に
結合可能なコネクタ部202が取り付けられ、このコネ
クタ部202が上記ターゲットマイクロコンピュータ搭
載領域201に結合されることによって、マイクロコン
ピュータ応用システム200と、マイクロコンピュータ
開発装置本体204との間で各種信号のやり取りが可能
にされる。
Microcomputer development device main body 204
A connector 202 that can be connected to the target microcomputer mounting area 201 in the microcomputer application system 200 is attached to the end of the interface cable 203 pulled out from the connector cable 202. The connector 202 is connected to the target microcomputer mounting area 201. Thus, various signals can be exchanged between the microcomputer application system 200 and the microcomputer development device main body 204.

【0036】マイクロコンピュータ開発装置本体204
は、特に制限されないが、エミュレーション用マイクロ
コンピュータ212、エミュレーションメモリ206、
リアルタイムトレース回路207、ブレーク制御回路2
08、ホストインタフェース210、及びコントロール
プロセッサ211を含んで成る。
Microcomputer development apparatus main body 204
Although not particularly limited, the emulation microcomputer 212, the emulation memory 206,
Real-time trace circuit 207, break control circuit 2
08, a host interface 210, and a control processor 211.

【0037】エミュレーション用プロセッサ212は、
エミュレーションバス205に接続される。エミュレー
ションバス205では、図示されないステータス信号や
制御信号などが伝達される。エミュレーション用プロセ
ッサ212から上記エミュレーションバス205へは、
マイクロコンピュータ応用システム200とエミュレー
ション用プロセッサ212の内部状態に応じた情報など
が出力される。また、エミュレーションバス205から
エミュレーション用プロセッサ212へは、エミュレー
ションのための各種制御信号が取り込まれる。エミュレ
ーション用プロセッサ212のエミュレートモード端子
(図示せず)が電源レベルに固定されることで、エミュ
レーション用プロセッサ212の内部ではエミュレート
モードが設定される。
The emulation processor 212 includes:
Connected to emulation bus 205. The emulation bus 205 transmits a status signal, a control signal, and the like (not shown). From the emulation processor 212 to the emulation bus 205,
Information and the like according to the internal states of the microcomputer application system 200 and the emulation processor 212 are output. Further, various control signals for emulation are taken into the emulation processor 212 from the emulation bus 205. When the emulation mode terminal (not shown) of the emulation processor 212 is fixed at the power supply level, the emulation mode is set inside the emulation processor 212.

【0038】さらに、上記エミュレーションバス205
には、特に制限されないが、マイクロコンピュータ応用
システム200又はターゲットマイクロコンピュータ内
蔵のメモリを代行するためのRAMでなるようなエミュ
レーションメモリ206が設けられている。このエミュ
レーションメモリ206は、内蔵ROMの代行をなすべ
き、高速メモリ部と、ユーザに解放する貸し出しメモリ
部とを含む。
Further, the emulation bus 205
Although not particularly limited, an emulation memory 206 such as a RAM serving as a substitute for the built-in memory of the microcomputer application system 200 or the target microcomputer is provided. The emulation memory 206 includes a high-speed memory unit to act as a substitute for the built-in ROM, and a lending memory unit to be released to the user.

【0039】ユーザのプログラム作成時には、容量的に
余裕を持った設計をすることが多く、プログラム自体が
内蔵ROMなどに収まらない場合がある。そのような場
合にも、ユーザはエミュレーションメモリ206内の貸
し出しメモリ部を利用して、実質的にプログラムメモリ
を拡張して、デバックを行うことができる。デバックの
進行に伴って、プログラムを最適化し、所定の容量に収
めるようにすることができる。貸し出しメモリ部は、そ
の特性上、必ずしも高速性は必要ない。
When a user's program is created, a design is often made with sufficient capacity, and the program itself may not fit in a built-in ROM or the like. In such a case, the user can use the lending memory unit in the emulation memory 206 to substantially expand the program memory and perform debugging. As the debugging progresses, the program can be optimized so as to fit in a predetermined capacity. The rental memory unit does not necessarily require high speed due to its characteristics.

【0040】ブレーク制御回路208は、エミュレーシ
ョン用プロセッサ212の制御状態やエミュレーション
バスの状態を監視して、その状態が予め設定された状態
に達したときに、エミュレータ専用割り込みをアサート
して、CPUによるユーザプログラムの実行を停止さ
せ、エミュレーション用プログラム実行状態に遷移させ
る。
The break control circuit 208 monitors the control state of the emulation processor 212 and the state of the emulation bus, and when the state reaches a preset state, asserts an emulator-dedicated interrupt and causes the CPU to execute the interrupt. The execution of the user program is stopped, and a transition is made to the emulation program execution state.

【0041】ブレーク制御回路208は、ブレーク(B
RK)信号をエミュレーション用プロセッサに供給す
る。ブレークは、BRK信号によるほか、エミュレーシ
ョン用プロセッサ212内部のブレーク制御回路によっ
て要求される場合もある。エミュレーション用プロセッ
サ212内蔵のブレーク機能は、マイクロコンピュータ
内部の信号を利用できるため高速であるが、エミュレー
ション用プロセッサ212毎に固定的である。これに対
してブレーク制御回路208は、汎用的に種々の機能を
実現可能である。また、チャネル数なども任意に設定す
ることができる。
The break control circuit 208 outputs a break (B
RK) signal to an emulation processor. The break may be requested by a break control circuit inside the emulation processor 212 in addition to the BRK signal. The break function built into the emulation processor 212 is high-speed because a signal inside the microcomputer can be used, but is fixed for each emulation processor 212. On the other hand, the break control circuit 208 can generally realize various functions. Also, the number of channels and the like can be arbitrarily set.

【0042】リアルタイムトレース回路207は、CP
Uのリード動作又はライト動作を示す信号、命令リード
動作を示す信号などに基づき、エミュレーションバス2
05に与えられるアドレスやデータさらには制御情報を
逐次蓄えるリアルタイムトレースを可能にする。
The real-time trace circuit 207 has a CP
U based on a signal indicating a read or write operation of U, a signal indicating an instruction read operation, etc.
Real-time tracing that sequentially stores addresses, data, and control information given to 05 is enabled.

【0043】上記エミュレーションメモリ206、ブレ
ーク制御回路208、リアルタイムトレース回路207
は、コントロールバス209に接続され、コントロール
バス209を介してコントロールプロセッサ211の制
御を受けるようになっている。上記コントロールバス2
09は、エミュレーションメモリ206、リアルタイム
トレース回路207、ブレーク制御回路208、及びコ
ントロールプロセッサ211、ホストインタフェース2
10に結合される。このホストインタフェース210
は、システム開発装置213に結合されており、マイク
ロコンピュータ開発装置本体204とシステム開発装置
213との間で、各種信号のやり取りが可能とされる。
例えば、システム開発装置213から入力されたプログ
ラムをエミュレーションメモリ206に転送される。こ
のプログラムは、本来なら内蔵ROM上に配置されるべ
きものであるが、エミュレーションメモリ206から順
次読み出されてエミュレーション用プロセッサ212で
実行される。また、このプログラム実行におけるブレー
ク条件や、リアルタイムトレース条件などもシステム開
発装置213からホストインタフェース210を介して
与えられる。
The emulation memory 206, break control circuit 208, real-time trace circuit 207
Are connected to a control bus 209 and are controlled by the control processor 211 via the control bus 209. Control bus 2
09 denotes an emulation memory 206, a real-time trace circuit 207, a break control circuit 208, a control processor 211, and a host interface 2
10 This host interface 210
Is connected to the system development device 213, and various signals can be exchanged between the microcomputer development device main body 204 and the system development device 213.
For example, a program input from the system development device 213 is transferred to the emulation memory 206. This program, which should normally be located on the built-in ROM, is sequentially read from the emulation memory 206 and executed by the emulation processor 212. In addition, a break condition and a real-time trace condition in the execution of the program are also provided from the system development device 213 via the host interface 210.

【0044】コントロールプロセッサ211は、専用の
デバッギングインタフェース(DBGIF)を用いて、
エミュレーション用プロセッサ212との間で通信を行
うことができる。
The control processor 211 uses a dedicated debugging interface (DBGIF) to
Communication can be performed with the emulation processor 212.

【0045】システム開発装置213は、例えばパーソ
ナルコンピュータであり、キーボードやマウスなどの適
宜の入力装置215と、各種情報表示のための表示装置
214を含む。
The system development device 213 is, for example, a personal computer, and includes an appropriate input device 215 such as a keyboard and a mouse, and a display device 214 for displaying various information.

【0046】図1には上記エミュレーション用プロセッ
サ212の構成例が示される。
FIG. 1 shows a configuration example of the emulation processor 212.

【0047】図1に示されるエミュレーション用プロセ
ッサ212は、特に制限されないが、マイクロコンピュ
ータ部100、エミュレーション用バッファ122、ブ
レークインタフェース(BRK)116、トレースイン
タフェース(TRC)115、モニタインタフェース
(MON)114、データ代替回路(CHM)113、
エミュレータ専用割り込み制御回路(IRQCR)11
7、デバッギングインタフェース(デバック用シリアル
コミュニケーションインタフェース:DBGIF)、エ
ミュレーション用CPU(EMLCPU)119、エミ
ュレーションプログラムメモリ(EMLROM)12
0、エミュレーションデータメモリ(EMLRAM)1
21を含み、公知の半導体集積回路製造技術により、単
結晶シリコン基板などの一つの半導体基板に形成され
る。
The emulation processor 212 shown in FIG. 1 is not particularly limited, but includes a microcomputer unit 100, an emulation buffer 122, a break interface (BRK) 116, a trace interface (TRC) 115, a monitor interface (MON) 114, Data replacement circuit (CHM) 113,
Emulator dedicated interrupt control circuit (IRQCR) 11
7. Debugging interface (serial communication interface for debugging: DBGIF), emulation CPU (EMLCPU) 119, emulation program memory (EMLROM) 12
0, emulation data memory (EMLRAM) 1
21 and is formed on one semiconductor substrate such as a single crystal silicon substrate by a known semiconductor integrated circuit manufacturing technique.

【0048】マイクロコンピュータ部100は、CPU
101、ダイレクトメモリアクセスコントローラ(DM
AC)102、ROM103、RAM104、割り込み
コントローラ(INT)105、バスアービタ(BAR
B)112、I−BUSコントローラ(I−BSC)1
11、P−BUSコントローラ(P−BSC)109、
外部バスコントローラ(EX−BSC)110、入出力
部106を含む。
The microcomputer unit 100 has a CPU
101, direct memory access controller (DM
AC) 102, ROM 103, RAM 104, interrupt controller (INT) 105, bus arbiter (BAR)
B) 112, I-BUS controller (I-BSC) 1
11, P-BUS controller (P-BSC) 109,
An external bus controller (EX-BSC) 110 and an input / output unit 106 are included.

【0049】図示はされないが、単一のクロック発振器
で生成されたクロック信号は、エミュレーション用プロ
セッサ212で広く利用される。例えば、CPU101
とEMLCPU119は、共通のクロックで動作する。
ROM103及びRAM104は、エミュレーション時
には使用されず、エミュレーションインタフェースを介
して、マイクロコンピュータ開発装置本体204におけ
るエミュレーションメモリ206によって、その機能を
代替される。入出力部106は、I/O(入出力回路)
107と、バッファ(BUF)108とを含む。I/O
(入出力回路)107は、タイマ、SCI(シリアル・
コミュニケーション・インタフェース)、A/D(アナ
ログ/ディジタル)回路、及び入出力ポートなどを含
む。バッファ(BUF)108は、アドレスバス・デー
タバス・バス制御信号のバッファリングを行う。
Although not shown, a clock signal generated by a single clock oscillator is widely used by the emulation processor 212. For example, CPU 101
And the EMLCPU 119 operate on a common clock.
The ROM 103 and the RAM 104 are not used during emulation, and their functions are replaced by an emulation memory 206 in the microcomputer development device main body 204 via an emulation interface. The input / output unit 106 is an I / O (input / output circuit)
107 and a buffer (BUF) 108. I / O
(I / O circuit) 107 is a timer, SCI (serial
Communication interface), A / D (analog / digital) circuits, and input / output ports. The buffer (BUF) 108 buffers an address bus, a data bus, and a bus control signal.

【0050】特に制限されないが、CPU101、EM
LCPU119の命令は16ビット単位とし、データア
クセスも8/16ビット単位で行われる。
Although not particularly limited, the CPU 101, the EM
The instruction of the LCPU 119 is performed in units of 16 bits, and data access is also performed in units of 8/16 bits.

【0051】バスをコントロールするための回路とし
て、バスアービタ(BARB)112、I−BUSコン
トローラ(I−BSC)111、P−BUSコントロー
ラ(P−BSC)109、外部バスコントローラ(EX
−BSC)110などが配置され、それらはバスコント
ローラと総称される。尚、図示はされないが、バスコン
トローラ17には、モジュールセレクト(MS)及びバ
ス制御レジスタなどを含まれる。
As circuits for controlling the bus, a bus arbiter (BARB) 112, an I-BUS controller (I-BSC) 111, a P-BUS controller (P-BSC) 109, an external bus controller (EX)
-BSC) 110 and the like, which are collectively referred to as a bus controller. Although not shown, the bus controller 17 includes a module select (MS) and a bus control register.

【0052】割り込みコントローラ(INT)105
は、I/O(タイマ、SCI、入出力ポート)107か
ら出力される割り込み信号を取り込み、CPU101へ
は割り込み要求信号とベクタ番号を出力し、DMAC1
02へは起動要求を出力する。
The interrupt controller (INT) 105
Receives an interrupt signal output from an I / O (timer, SCI, input / output port) 107, outputs an interrupt request signal and a vector number to the CPU 101,
02 is output as a start request.

【0053】内部バスとして、I−BUS(IAB、I
DB)、P−BUS(PAB、PDB)、E−BUS
(EIAB、EIDB)が設けられ、各機能モジュール
間で各種信号のやり取りが可能とされる。内部データバ
スIDB、EIDB、PDBは、それぞれ16ビット構
成である。
As an internal bus, I-BUS (IAB, I-BUS
DB), P-BUS (PAB, PDB), E-BUS
(EIAB, EIDB) are provided, and various signals can be exchanged between the functional modules. Each of the internal data buses IDB, EIDB, and PDB has a 16-bit configuration.

【0054】CPU101、及びROM103、RAM
100は、I−BUS(IAB、IDB)に接続され、
EMLCPU119、及びEMLROM120、EML
RAM1021は、E−BUS(EIAB、EIDB)
に接続されている。
CPU 101, ROM 103, RAM
100 is connected to I-BUS (IAB, IDB),
EMLCPU119, EMLROM120, EML
The RAM 1021 is an E-BUS (EIAB, EIDB)
It is connected to the.

【0055】E−BUSは、バスコントローラ(I−B
SC)を介して、I−BUSへの接続が可能とされ、I
−BUSは、バスコントローラ(P−BSC)を介し
て、P−BUSへの接続が可能とされている。P−BS
CはPAB・PDBからなる周辺バス(P−BUS)を
制御する。
E-BUS is a bus controller (IB)
SC), connection to the I-BUS is enabled and
-BUS can be connected to P-BUS via a bus controller (P-BSC). P-BS
C controls a peripheral bus (P-BUS) composed of PAB and PDB.

【0056】エミュレーション用CPU(EMLCP
U)119、エミュレーションプログラムメモリ(EM
LROM)120、エミュレーションデータメモリ(E
MLRAM)121、及びデバッギングインタフェース
118は、エミュレーション専用ブロックとして設けら
れ、さらに、マイクロコンピュータ部100とのインタ
フェースのために、ブレークインタフェース(BRK)
116、トレースインタフェース(TRC)115、モ
ニタインタフェース(MON)114、データ代替回路
(CHM)113が設けられる。ブレークインタフェー
ス(BRK)116、トレースインタフェース(TR
C)115、モニタインタフェース(MON)114に
は、汎用レジスタの内容などのCPUの内部情報が供給
される。特に、モニタインタフェース(MON)114
は、汎用レジスタ、プログラムカウンタ(PC)、コン
ディションコードレジスタ(CCR)あるいは命令レジ
スタ(IR)などの内容を、EMLCPU119によっ
て管理されるアドレス空間に表示し、EMLCPU11
9によるリードを可能にする。そのほかに、図示はされ
ないエミュレーション専用制御レジスタを有し、ブレー
ク制御、バス制御、モジュール選択制御などが行われ
る。
CPU for emulation (EMLCP
U) 119, emulation program memory (EM
LROM) 120, emulation data memory (E
An MLRAM 121 and a debugging interface 118 are provided as dedicated blocks for emulation. Further, a break interface (BRK) is provided for interfacing with the microcomputer unit 100.
116, a trace interface (TRC) 115, a monitor interface (MON) 114, and a data replacement circuit (CHM) 113 are provided. Break interface (BRK) 116, trace interface (TR)
C) 115 and the monitor interface (MON) 114 are supplied with CPU internal information such as the contents of general-purpose registers. In particular, the monitor interface (MON) 114
Displays the contents of a general-purpose register, a program counter (PC), a condition code register (CCR) or an instruction register (IR) in an address space managed by the EMLCPU 119, and
9 is possible. In addition, an emulation-dedicated control register (not shown) is provided to perform break control, bus control, module selection control, and the like.

【0057】エミュレーション用CPU(EMLCP
U)119は、エミュレーションプログラムメモリ(E
MLROM)120に格納されているプログラムを実行
することによって、エミュレーションの制御を行う。こ
のとき、作業領域としてエミュレーションデータメモリ
(EMLRAM)121が使用され、デバッギングイン
タフェース(DBGIF)118によって、コマンドの
入力やステータスの表示などが行われる。デバッギング
インタフェース118は、データ線(送信及び受信、又
は送受信)を含み、必要に応じて、同期クロックや送信
要求など、数本の信号をインタフェースとして使用す
る。
An emulation CPU (EMLCP
U) 119 is an emulation program memory (E)
The emulation is controlled by executing a program stored in the MLROM (120). At this time, an emulation data memory (EMLRAM) 121 is used as a work area, and commands are input and status is displayed by a debugging interface (DBGIF) 118. The debugging interface 118 includes a data line (transmission and reception, or transmission / reception), and uses several signals as an interface, such as a synchronous clock and a transmission request, as necessary.

【0058】また、必要に応じて、バスコントローラ
(I−BSC)111を介して、エミュレーション対象
のCPU101の内部I/Oレジスタなどの資源をリー
ド又はライトする。このときのバス権(BAK)はエミ
ュレーションインタフェースに出力される。
Further, as necessary, resources such as an internal I / O register of the CPU 101 to be emulated are read or written via the bus controller (I-BSC) 111. The bus right (BAK) at this time is output to the emulation interface.

【0059】また、図示されないブレーク/モニタイン
タフェースによって、CPU101によって管理される
アドレス空間に存在しない資源(CPU101の汎用レ
ジスタなど)の表示を行ったり、所望アドレスのデータ
変更を行ったりすることなどができる。
A break / monitor interface (not shown) can display resources (such as general-purpose registers of the CPU 101) that do not exist in the address space managed by the CPU 101, change data at a desired address, and the like. .

【0060】エミュレータ専用割り込みEMLIRQが
入力され、EMLCPU119に割り込みが要求され
る。かかるエミュレータ専用割り込みEMLIRQの許
可又は禁止は、エミュレータ専用割り込み制御回路(I
RQCR)117によって制御される。
An emulator-specific interrupt EMLIRQ is input, and an interrupt is requested to the EMLCPU 119. Enabling or disabling of the emulator dedicated interrupt EMLIRQ is performed by the emulator dedicated interrupt control circuit (I
RQCR) 117.

【0061】通常、ターゲットとなるCPU101のバ
ス状態がエミュレーションバスに出力されている。
Normally, the bus state of the target CPU 101 is output to the emulation bus.

【0062】エミュレーションインタフェースの一部と
して、エミュレーションバスを制御するEMLBUF1
22が設けられる。
As a part of the emulation interface, EMLBUF1 for controlling the emulation bus
22 are provided.

【0063】EX−BSCは、外部バスの制御を行い、
このとき、バス制御レジスタの内容に従って、バス幅や
アクセスステート数を適宜選択する。
The EX-BSC controls an external bus,
At this time, the bus width and the number of access states are appropriately selected according to the contents of the bus control register.

【0064】EMLBUF122は、エミュレーション
用インタフェースに含まれるエミュレーションバスの制
御を行う。このとき、エミュレーションバスサイクルが
選択されると、バス制御レジスタの内容などは無視さ
れ、エミュレーションバスのバス仕様でアクセスが行わ
れる。エミュレーションバスサイクルは、CPU101
がブレークしたとき、又は、所定の制御ビットを設定し
て、外部アドレスに相当するアドレスをリード又はライ
トするときに行われる。これらは、所定のエミュレーシ
ョン制御レジスタの設定と、ブレークアクノリッジ信号
(BRKAK)とによって指定され、ユーザバスとエミ
ュレーションバスの制御や、エミュレーション側からの
ウェイト要求の許可又は禁止などの制御を行う。
The EMLBUF 122 controls an emulation bus included in the emulation interface. At this time, if an emulation bus cycle is selected, the contents of the bus control register and the like are ignored, and access is performed according to the bus specifications of the emulation bus. The emulation bus cycle is executed by the CPU 101
Is performed when a break occurs or when an address corresponding to an external address is read or written by setting a predetermined control bit. These are specified by a predetermined emulation control register setting and a break acknowledge signal (BRKAK), and control the user bus and the emulation bus, and permit or prohibit a wait request from the emulation side.

【0065】P−BSC109、EX−BSC110、
EMLBUF122が起動されると、所定のタイミング
で、アドレスバスや、各種ストローブ信号が出力され、
データバスの入出力が行われる。
P-BSC109, EX-BSC110,
When the EMLBUF 122 is activated, an address bus and various strobe signals are output at a predetermined timing,
Data bus input / output is performed.

【0066】バスアービタ112は、CPU101、D
MAC102、EMLCPU119のバス権要求信号を
入力し、バス権の調停を行うことで、いずれかのバスマ
スタ(CPU101、DMAC102、EMLCPU1
19)にバス権を与える。
The bus arbiter 112 includes the CPU 101 and D
By inputting a bus right request signal of the MAC 102 and the EMLCPU 119 and performing arbitration of the bus right, any one of the bus masters (the CPU 101, the DMAC 102, the EMLCPU 1
19) The bus right is given.

【0067】バス権が与えられたバスマスタのバスコマ
ンドと、バスIABに基づいてアドレスの判定が行わ
れ、バス制御レジスタ、エミュレーション制御レジスタ
(MEMCR・EWTCRの各レジスタ、及びWD1、
0ビット)によって、アクセス先とアクセス方法が判定
され、I−BSC111、P−BSC109、EX−B
SC110、EMLBUF122が起動される。P−B
SC109、EX−BSC110が起動されていても、
EMLBUF122は、信号出力のために起動される。
The address is determined based on the bus command of the bus master to which the bus right has been given and the bus IAB, and the bus control register, the emulation control register (MEMC / EWTCR registers, WD1,
0 bit), the access destination and the access method are determined, and the I-BSC 111, P-BSC 109, EX-B
The SC 110 and the EMLBUF 122 are activated. P-B
Even if SC109 and EX-BSC110 are activated,
EMLBUF 122 is activated for signal output.

【0068】すなわち、CPU101がROM103か
らプログラムをリードする場合、又はRAMとのデータ
のリード又はライトする場合、I−BUSを使用して動
作が行われる。I/Oを介してデータをリード又はライ
トする場合は、I−BUS及びバスコントローラを介し
て、P−BUSを使用する。EMLCPU119がEM
LROM120からプログラムをリードする場合、又は
EMLRAM1021やデバックインタフェースとのデ
ータのリード又はライトする場合、E−BUSが使用さ
れる。
That is, when the CPU 101 reads a program from the ROM 103 or reads or writes data from / to the RAM, the operation is performed using the I-BUS. When data is read or written via I / O, P-BUS is used via I-BUS and bus controller. EMLCPU 119 is EM
When reading a program from the LROM 120, or when reading or writing data from / to the EMLRAM 1021 or the debug interface, the E-BUS is used.

【0069】このとき、EMLCPU119がE−BU
Sを用いて動作している限り、CPU101と並列に動
作することができ、CPU101のユーザプログラムの
動作に影響を与えない。
At this time, the EMLCPU 119 sets the E-BU
As long as the operation is performed using S, the operation can be performed in parallel with the CPU 101, and the operation of the user program of the CPU 101 is not affected.

【0070】EMLCPU119は、バス権を獲得する
ことにより、IAB及びIDB、さらには、エミュレー
ションバスを使用することができる。バスアービタ11
2は、エミュレーションインタフェースを介して、CP
U101又はEMLCPU119のいずれが使用してい
るかを示すバス権表示信号を出力している。
The EML CPU 119 can use the IAB and IDB, and further, the emulation bus by acquiring the bus right. Bus arbiter 11
2 is a CP via the emulation interface.
A bus right indication signal indicating which of the U101 and the EMLCPU 119 is in use is output.

【0071】EMLCPU119が、CPU101によ
って管理されるアドレス空間に相当するアドレスをリー
ド又はライトしようとすると、バスコントローラに対し
てバス権が要求される。バスコントローラは、CPU1
01又はDMAC102のバス使用の切れ目で、バス権
を調停し、EMLCPU119にバス権を与え、IA
B、IDBを使用して、CPU101によって管理され
るアドレス空間のリード又はライトを許可する。EML
CPU119が、かかるCPU101によって管理され
るアドレス空間のうち、内部I/Oレジスタや、外部ア
ドレスに相当するアドレスをリード又はライトする場合
には、CPU101と同様に、P−BUS(PAB、P
DB)又はEX−BUS(外部アドレスバス、外部デー
タバス)を使用する。
When the EML CPU 119 attempts to read or write an address corresponding to the address space managed by the CPU 101, a bus right is requested to the bus controller. The bus controller is a CPU 1
01 or DMAC 102, the bus right is arbitrated and the EML CPU 119 is given a bus right,
Using B and IDB, read or write of the address space managed by the CPU 101 is permitted. EML
When the CPU 119 reads or writes an address corresponding to an internal I / O register or an external address in the address space managed by the CPU 101, similarly to the CPU 101, the P-BUS (PAB, PB
DB) or EX-BUS (external address bus, external data bus).

【0072】CPU101の動作中に、EMLCPU1
19は、独立したバスEIAB,EIDBを用いて、エ
ミュレーション動作が可能である。これにより、CPU
101は、ブレークすることなく、ユーザの処理を実行
することができるので、例えばSCIの受信処理を行っ
ている場合に、当該SCIの受信を不所望に中断される
ことがないので、所謂オーバランエラーの発生を回避で
きる。また、同様の理由により、パルス出力処理を行っ
ている場合に、不所望にパルス出力を中断されることが
ないので、例えばエミュレーション中にユーザシステム
のモータ駆動ができなくなってしまうような不都合を回
避できる。
During the operation of CPU 101, EMLCPU 1
Emulation operation 19 can be performed using independent buses EIAB and EIDB. This allows the CPU
101 is capable of executing a user process without a break. For example, when the SCI reception process is being performed, the reception of the SCI is not undesirably interrupted. Can be avoided. Further, for the same reason, when the pulse output processing is being performed, the pulse output is not undesirably interrupted, so that, for example, the inconvenience that the motor drive of the user system cannot be performed during the emulation can be avoided. it can.

【0073】エミュレーションインタフェースには、さ
らに、CPU101に対するインタフェースに、入力信
号として、ブレーク割り込み信号BRKや、図示はされ
ないエミュレータウェイト信号EMLWAITが存在
し、出力信号として、ブレークアクノリッジ信号BRK
AK、CPUステータス信号などが存在する。
The emulation interface further includes a break interrupt signal BRK and an emulator wait signal EMLWAIT (not shown) as input signals at the interface to the CPU 101, and a break acknowledge signal BRK as an output signal.
AK, CPU status signal, etc. exist.

【0074】ブレーク要求には、BRK割り込み信号
と、バスサイクル指定レジスタ、ブレークアドレスレジ
スタ(BAR)、ブレークアドレスマスクレジスタ(B
AMR)によるアドレスブレーク要求、さらに、汎用レ
ジスタ指定レジスタとデータレジスタとデータマスクレ
ジスタによるレジスタブレーク要求がある。このアドレ
スブレーク要求とレジスタブレーク要求は、ブレーク制
御レジスタ(BRKCR)を介してCPUに伝達され
る。
The break request includes a BRK interrupt signal, a bus cycle designation register, a break address register (BAR), and a break address mask register (B
AMR), and a register break request by a general-purpose register designation register, a data register, and a data mask register. The address break request and the register break request are transmitted to the CPU via a break control register (BRKCR).

【0075】エミュレーション用プロセッサ専用ブロッ
クには、例えば、特開平3−271834号公報などに
記載されているように、エミュレーション用プロセッサ
に内蔵の機能の禁止や動作の変更を指定して、1個のエ
ミュレーション用プロセッサによって、複数のマイクロ
コンピュータのエミュレーションを行わせることができ
る。モジュール選択制御は、図示はされないモジュール
選択レジスタによって指定され、かかるモジュール選択
レジスタの設定によって、かかるエミュレーション対象
となるマイクロコンピュータの選択を行い、エミュレー
ション用プロセッサに内蔵の機能の禁止や動作の変更を
指定する。例えば、タイマやSCIの使用可能なチャネ
ル数を指定したり、有効なIOPを指定したりする。ま
た、内蔵ROM、RAMの容量を指定したりする。
As described in, for example, Japanese Patent Application Laid-Open No. 3-271834, a block dedicated to the emulation processor designates the prohibition of functions built into the emulation processor or the change of operation, and specifies one block. Emulation of a plurality of microcomputers can be performed by the emulation processor. The module selection control is specified by a module selection register (not shown). By setting the module selection register, the microcomputer to be emulated is selected, and the function built in the emulation processor is prohibited or the operation is changed. I do. For example, the number of usable channels of the timer or the SCI is specified, or a valid IOP is specified. Also, the capacity of the built-in ROM and RAM is specified.

【0076】図14には、上記マイクロコンピュータ部
100における主要部の具体的な構成例が示される。
FIG. 14 shows a specific configuration example of a main part of the microcomputer unit 100.

【0077】DMAC102はCPU15とバスを共有
し、このCPU15に代ってデータ転送を行う。DMA
C102は、それに含まれる内部I/Oレジスタに保持
されたソース/デスティネーションアドレスや転送カウ
ンタなどの転送情報に基づいてデータ転送を行い、それ
を転送先に書き込む。本例においてDMAC102は、
I−BUS(IAB、IDB)のみに接続されている
が、DMAC102によってデータ転送が行われている
場合(バスマスタとして機能)と、DMAC102内部
の内部I/Oレジスタを設定する期間(バススレーブと
して機能)とで、バス接続状態を切り換えるようにして
もよい。例えば、DMAC102によってデータ転送が
行われている場合にはI−BUS(IAB、IDB)を
使用し、DMAC102内部の内部I/Oレジスタを設
定する場合にはP−BUS(PAB、PDB)を使用す
るようにバス接続状態を切り換えることができる。
The DMAC 102 shares a bus with the CPU 15, and performs data transfer in place of the CPU 15. DMA
The C102 performs data transfer based on transfer information such as a source / destination address and a transfer counter held in an internal I / O register included therein, and writes the data to a transfer destination. In this example, the DMAC 102
Although connected only to the I-BUS (IAB, IDB), when data transfer is being performed by the DMAC 102 (functioning as a bus master), a period during which an internal I / O register inside the DMAC 102 is set (functioning as a bus slave) ), The bus connection state may be switched. For example, when data transfer is performed by the DMAC 102, I-BUS (IAB, IDB) is used, and when setting an internal I / O register inside the DMAC 102, P-BUS (PAB, PDB) is used. The connection state of the bus can be switched in such a manner as to make the connection.

【0078】内部バスはアドレスバス・データバスの
他、図示はされない、バス権要求信号、バスアクノレッ
ジ信号、バスコマンド、レディ信号、リード・ライト信
号、さらにバスサイズ信号などを含む。内部アドレスバ
スには、IAB、PABが含まれる。内部データバスに
はIDB、PDBが含まれる。
The internal bus includes, in addition to the address bus and the data bus, a bus right request signal, a bus acknowledge signal, a bus command, a ready signal, a read / write signal, and a bus size signal, not shown. The internal address bus includes IAB and PAB. The internal data bus includes IDB and PDB.

【0079】これらのバスは、バスコントローラ17に
よってインタフェースされている。バスコントローラ1
7は、上記I−BSC111、P−BSC109、EX
−BSC110に対応する。
These buses are interfaced by a bus controller 17. Bus controller 1
7 is I-BSC111, P-BSC109, EX
-Corresponds to BSC110.

【0080】I−BUS(IAB、IDB)は、CPU
15、DMAC102、ROM103、RAM102、
バスコントローラ17に接続され、さらに、IABは外
部バスのアドレスバスとするために、IOPA〜Cに接
続され、IDBは外部バスのデータバスとするために、
IOPD、Eに接続される。
The I-BUS (IAB, IDB) is a CPU
15, DMAC102, ROM103, RAM102,
The IAB is connected to a bus controller 17, and furthermore, IAB is connected to IOPA-C to make it an address bus of an external bus, and IDB is made to a data bus of an external bus
Connected to IOPD, E.

【0081】P−BUS(PAB、PDB)はバスコン
トローラ17、タイマ20、パルス出力回路21、SC
I18、A/D変換器19、割り込みコントローラ1
6、入出力ポートIOPA〜IOPF及びIOP1〜I
OP5に接続される。
The P-BUS (PAB, PDB) includes a bus controller 17, a timer 20, a pulse output circuit 21,
I18, A / D converter 19, interrupt controller 1
6. Input / output ports IOPA to IOPF and IOP1 to IOP
Connected to OP5.

【0082】尚、バスコントローラ17は、バスアービ
タとしての機能と、I−BUSやP−BUS、さらには
外部バス(EX−BUS)のコントロール機能を持つ。
さらにリフレッシュタイマなどを持ってもよい。
The bus controller 17 has a function as a bus arbiter and a control function for an I-BUS, a P-BUS, and an external bus (EX-BUS).
Further, a refresh timer or the like may be provided.

【0083】CPU101とDMAC102が、内部バ
スマスタとして内部バスを使用することができ、それぞ
れのバス権要求信号に従って、上記バスコントローラ1
7(バスアービタ)が調停する。
The CPU 101 and the DMAC 102 can use the internal bus as an internal bus master.
7 (bus arbiter) arbitrates.

【0084】ROM103、RAM102、タイマ2
0、パルス出力回路21、SCI18、A/D変換器1
9、入出力ポートIOPA〜IOPF及びIOP1〜I
OP5、割り込みコントローラ16の各機能ブロック及
びDMAC102の内部I/Oレジスタは、内部バスス
レーブとして、CPU15又はDMAC102によって
リード又はライトされる。
ROM 103, RAM 102, timer 2
0, pulse output circuit 21, SCI 18, A / D converter 1
9. Input / output ports IOPA to IOPF and IOP1 to IOP
The OP5, each functional block of the interrupt controller 16, and the internal I / O register of the DMAC 102 are read or written by the CPU 15 or the DMAC 102 as an internal bus slave.

【0085】割り込みコントローラ16は、タイマ2
0、SCI18、A/D変換器19、入出力ポートから
の割り込み信号を取り込んで、CPU15に対して割り
込み要求信号を出力し、DMAC102に対して起動要
求信号を出力する。また、割り込みコントローラ16
は、DMAC102の出力するクリア信号を取り込ん
で、割り込みクリア信号を出力する。
The interrupt controller 16 controls the timer 2
0, an interrupt signal from the SCI 18, the A / D converter 19, and the input / output port, and outputs an interrupt request signal to the CPU 15 and a start request signal to the DMAC 102. The interrupt controller 16
Captures a clear signal output from the DMAC 102 and outputs an interrupt clear signal.

【0086】入出力ポートIOPA〜IOPF及びIO
P1〜IOP5は、異なる信号の入出力にも使用され
る。例えば、入出力ポートIOPA〜IOPCはアドレ
ス出力にも使用され、入出力ポートIOPD、IOPE
はデータ入出力にも使用され、入出力ポートIOPFは
バス制御信号入出力にも使用される。外部アドレスバ
ス、外部データバスは、それぞれ入出力ポートに含まれ
るバッファ回路を介してI−BUS(IAB,IDB)
に接続されている。
Input / output ports IOPA to IOPF and IO
P1 to IOP5 are also used for input and output of different signals. For example, the input / output ports IOPA to IOPC are also used for address output, and the input / output ports IOPD, IOPE
Is also used for data input / output, and the input / output port IOPF is also used for bus control signal input / output. The external address bus and the external data bus are respectively I-BUS (IAB, IDB) via buffer circuits included in the input / output ports.
It is connected to the.

【0087】P−BUS(PAB、PDB)は、入出力
ポート107に含まれるレジスタをリード又はライトす
るために使用され、外部バスとは直接の関係はない。バ
ス制御信号出力には、アドレスストローブ、ハイ/ロー
データストローブ、リードストローブ、ライトストロー
ブ、バスアクノリッジ信号などが含まれる。バス制御入
力信号には、ウェイト信号、外部バスリクエスト信号な
どが含まれる。これらの入出力信号は図面上省略されて
いる。
The P-BUS (PAB, PDB) is used to read or write a register included in the input / output port 107, and has no direct relationship with an external bus. The bus control signal output includes an address strobe, a high / low data strobe, a read strobe, a write strobe, a bus acknowledge signal, and the like. The bus control input signal includes a wait signal, an external bus request signal, and the like. These input / output signals are omitted in the drawing.

【0088】また、IOP1はタイマ入出力、IOP2
はパルス出力、IOP3はSCI入出力、IOP4はア
ナログ入力、IOP5はDMAC入出力及び外部割り込
み要求(IRQ)入力と兼用されている。DMAC10
2、タイマ20、SCI18、パルス出力回路21、A
/D変換器19と、入出力ポートIOP1〜IOP5と
の入出力信号や内部割り込み要求信号などは図面上省略
されている。
IOP1 is a timer input / output, IOP2
Is a pulse output, IOP3 is an SCI input / output, IOP4 is an analog input, and IOP5 is also used as a DMAC input / output and an external interrupt request (IRQ) input. DMAC10
2. Timer 20, SCI 18, pulse output circuit 21, A
Input / output signals between the / D converter 19 and the input / output ports IOP1 to IOP5 and internal interrupt request signals are omitted in the drawing.

【0089】その他、電源端子Vcc、Vss、アナロ
グ電源端子AVcc、AVss、リセット入力RES、
スタンバイ入力STBY、割り込み入力NMI、クロッ
ク入力EXTAL、XTAL、動作モード入力MD0、
MD1、MD2などの入力端子が設けられている。
In addition, power supply terminals Vcc and Vss, analog power supply terminals AVcc and AVss, reset input RES,
Standby input STBY, interrupt input NMI, clock inputs EXTAL, XTAL, operation mode input MD0,
Input terminals such as MD1 and MD2 are provided.

【0090】図7には、上記エミュレーション用プロセ
ッサ212におけるアドレスマップが示される。アドレ
スは16進数で示される。
FIG. 7 shows an address map in the emulation processor 212. The address is shown in hexadecimal.

【0091】CPU101は16Mバイトのアドレス空
間、EMLCPU119は4Gバイトのアドレス空間を
持つ。EMLROM120、EMLRAM1021、E
MLI/OはEMLCPU119によって管理されるア
ドレス空間にのみ存在する。このEMLI/Oは、ブレ
ークインタフェース、トレースインタフェース、モニタ
インタフェース、データ代替回路などに含まれる制御レ
ジスタやデータレジスタ、DBGIFの制御レジスタや
データレジスタを含む。CPU101によって管理され
るアドレス空間に存在するROM、RAM、I/Oは、
EMLCPU119によって管理されるアドレス空間
(H’01000000〜H’01FFFFFF)にも
存在し、EMLCPU119がCPU101のバス権を
獲得した場合にアクセスできる。すなわち、これらは、
一つの物理的アドレスに対し、それぞれのCPUによっ
て管理されるアドレス空間で、固有の論理的アドレスを
有する。このアドレスは、それぞれアドレスで対応付け
られており、具体的には、CPU101のアドレスの上
位にH’01を付加したアドレスがEMLCPU119
のアドレスになる。例えば、ターゲットマイクロコンピ
ュータのROMの先頭アドレスは、CPU101では
H’000000、EMLCPU119ではH’010
00000である。
The CPU 101 has a 16 Mbyte address space, and the EMLCPU 119 has a 4 Gbyte address space. EMLROM 120, EMLRAM 1021, E
The MLI / O exists only in the address space managed by the EML CPU 119. The EMLI / O includes a control register and a data register included in a break interface, a trace interface, a monitor interface, a data replacement circuit, and the like, and a DBGIF control register and a data register. ROM, RAM, and I / O existing in the address space managed by the CPU 101 are:
It also exists in the address space (H'01000000 to H'01FFFFFF) managed by the EMLCPU 119, and can be accessed when the EMLCPU 119 acquires the bus right of the CPU 101. That is, these are:
Each physical address has a unique logical address in an address space managed by each CPU. These addresses are associated with each other by an address. Specifically, an address obtained by adding H′01 to the upper address of the address of the CPU 101 is the EMLCPU 119.
Address. For example, the start address of the ROM of the target microcomputer is H'000000 in the CPU 101 and H'010 in the EMLCPU 119.
00000.

【0092】EMLCPU119が、アドレスH’01
000000〜H’01FFFFFFのデータをアクセ
スしようとすると、バスアービタ(BARB)112に
バス権要求が与えられる。そしてこのバス権が獲得でき
るまでEMLCPU119はウェイト状態にされる。E
MLCPU119はこのバス権を獲得することによっ
て、アドレスH’01000000〜H’01FFFF
FFのデータアクセスが可能となる。
The EMLCPU 119 receives the address H'01
When an attempt is made to access data from 000000 to H'01FFFFFF, a bus right request is given to the bus arbiter (BARB) 112. The EML CPU 119 is kept in a wait state until the bus right can be acquired. E
By acquiring this bus right, the MLCPU 119 obtains addresses H'01000000 to H'01FFFF.
FF data access becomes possible.

【0093】図13には、上記CPU101のレジスタ
構成が示される。
FIG. 13 shows a register configuration of the CPU 101.

【0094】CPU101は、32ビット長の汎用レジ
スタを32本持っている。汎用レジスタは、すべて同機
能を持っており、アドレスレジスタとしてもデータレジ
スタとしても使用することができる。
The CPU 101 has 32 general-purpose registers having a 32-bit length. All general-purpose registers have the same function, and can be used as both an address register and a data register.

【0095】データレジスタとしてしては32ビット、
16ビット及び8ビットレジスタとして使用きる。アド
レスレジスタ及び32ビットレジスタとしては、一括し
て汎用レジスタER(ER0〜ER7)として使用す
る。16ビットレジスタとしては、汎用レジスタERを
分割して汎用レジスタE(E0〜E7)、汎用レジスタ
R(R0〜R7)として使用する。これらは同等の機能
を持っており、16ビットジスタを最大16本まで使用
することができる。8ビットレジスタとしては、汎用レ
ジスタRを分割して汎用レジスタRH(R0H〜R7
H)、汎用レジスタRL(R0L〜R7L)として使用
する。これらは同等の機能を持っており、8ビットレジ
スタを最大16本まで使用することができる。各レジス
タ独立に使用方法を選択することができる。
As a data register, 32 bits,
Can be used as 16-bit and 8-bit registers. The address register and the 32-bit register are collectively used as general-purpose registers ER (ER0 to ER7). As the 16-bit register, the general-purpose register ER is divided and used as general-purpose registers E (E0 to E7) and general-purpose registers R (R0 to R7). These have the same function, and up to 16 16-bit registers can be used. As an 8-bit register, the general-purpose register R is divided into general-purpose registers RH (R0H to R7
H), used as general-purpose registers RL (R0L to R7L). These have equivalent functions and can use up to 16 8-bit registers. The method of use can be selected independently for each register.

【0096】汎用レジスタER7には、汎用レジスタと
しての機能に加えて、スタックポインタ(SP)として
の機能が割り当てられており、例外処理やサブルーチン
分岐などで暗黙的に使用される。例外処理は上記割り込
み処理を含む。
The general-purpose register ER7 is assigned a function as a stack pointer (SP) in addition to the function as a general-purpose register, and is used implicitly in exception processing and subroutine branching. Exception processing includes the above-described interrupt processing.

【0097】PCは24ビットのカウンタで、CPUが
次に実行する命令のアドレスを示す。
PC is a 24-bit counter that indicates the address of an instruction to be executed next by the CPU.

【0098】CCRは8ビットのレジスタで、CPUの
内部状態を示している。割り込みマスクビット(I)と
ハーフキャリ(H)、ネガティブ(N)、ゼロ(Z)、
オーバフロー(V)、キャリ(C)の各フラグを含む8
ビットで構成されている。
CCR is an 8-bit register that indicates the internal state of the CPU. Interrupt mask bit (I), half carry (H), negative (N), zero (Z),
8 including each flag of overflow (V) and carry (C)
Consists of bits.

【0099】EXRは8ビットのレジスタで、割り込み
などの例外処理の制御を行う。割り込みマスクビット
(I2〜I0)とトレース(T)の各ビットを含んでい
る。
EXR is an 8-bit register that controls exception processing such as interrupts. It includes interrupt mask bits (I2 to I0) and trace (T) bits.

【0100】図12に、上記エミュレーション用プロセ
ッサ212におけるCPU101の構成例が示される。
FIG. 12 shows a configuration example of the CPU 101 in the emulation processor 212.

【0101】CPU101は、基本的に制御部1201
と実行部1202とから構成される。
The CPU 101 basically includes a control unit 1201
And an execution unit 1202.

【0102】制御部1201は、命令レジスタIR、命
令デコーダCONTを含む。命令デコーダCONTは、
命令レジスタIRの内容を解読して、実行部の制御信号
や、バスコマンドの出力及びエミュレーション用のCP
Uステータス信号の出力などを行う。また、その他のリ
セットや割り込みなどの制御信号を取り込んで、それに
応じた動作に変更される。
Control unit 1201 includes an instruction register IR and an instruction decoder CONT. The instruction decoder CONT
The contents of the instruction register IR are decoded, and a control signal for the execution unit, a bus command output and a CP for emulation are output.
Outputs a U status signal and the like. In addition, other control signals such as reset and interrupt are taken in, and the operation is changed according to the control signal.

【0103】実行部1202は、図13に示されるよう
に汎用レジスタ31として、ER0〜ER7を含み、コ
ントロールレジスタ32として、プログラムカウンタP
C、コンディションコードレジスタCCR、エクステン
ドレジスタEXRを含む。さらに、実行部1202は、
算術論理演算器ALU、インクリメンタINC、リード
データバッファRDB、ライトデータバッファWDB、
アドレスバッファAB等が設けられる。これらのブロッ
クはGBバス、DBバス、WBバスによって相互に接続
されている。
The execution unit 1202 includes ER0 to ER7 as general-purpose registers 31 as shown in FIG.
C, a condition code register CCR, and an extended register EXR. Further, the execution unit 1202
Arithmetic logic unit ALU, incrementer INC, read data buffer RDB, write data buffer WDB,
An address buffer AB and the like are provided. These blocks are interconnected by a GB bus, a DB bus, and a WB bus.

【0104】また、図示されないが、実行部1202の
各部は32ビット構成であり、汎用レジスタのE(16
ビット)、H(8ビット)、L(8ビット)に分割され
ている。
Although not shown, each section of the execution section 1202 has a 32-bit configuration, and has a general register E (16).
Bit), H (8 bits), and L (8 bits).

【0105】上記汎用レジスタ、プログラムカウンタ、
コンディションコードレジスタ以外は、CPUのプログ
ラミング上は参照できず、マイクロコンピュータ内部の
動作にのみ用いられる。すなわち、リードデータバッフ
ァRDB、ライトデータバッファWDB、アドレスバッ
ファABなどは、内部バスIAB、IDBとのインタフ
ェースをとるために、一時的にデータをラッチする。
The general-purpose register, program counter,
Other than the condition code register, it cannot be referred to in programming the CPU, and is used only for the operation inside the microcomputer. That is, the read data buffer RDB, write data buffer WDB, address buffer AB, and the like temporarily latch data in order to interface with the internal buses IAB, IDB.

【0106】リードデータバッファRDBは、ROM、
RAM、内部I/Oレジスタ、あるいは図示はされない
外部メモリから、リードした命令コードやデータを一時
的に格納する。ライトデータバッファWDBはROM、
RAM、内部I/Oレジスタ、あるいは外部メモリへの
ライトデータを一時的に格納する。
The read data buffer RDB is a ROM,
Instruction codes and data read from a RAM, an internal I / O register, or an external memory (not shown) are temporarily stored. The write data buffer WDB is a ROM,
It temporarily stores write data to a RAM, an internal I / O register, or an external memory.

【0107】アドレスバッファABは、CPUがリード
又はライトするアドレスを一時的に格納する。
The address buffer AB temporarily stores an address to be read or written by the CPU.

【0108】算術論理演算器ALUは、命令によって指
定される各種の演算や実効アドレスの計算など用いる。
演算結果のフラグが、上記コンディションコードレジス
タに反映される。
The arithmetic and logic unit ALU uses various operations specified by instructions and calculation of effective addresses.
The operation result flag is reflected in the condition code register.

【0109】インクリメンタINCは、主にプログラム
カウンタPCの加算に用いられる。
The incrementer INC is mainly used for adding the program counter PC.

【0110】エミュレーション用プロセッサ212のタ
ーゲットCPU101では、汎用レジスタ、プログラム
カウンタ、コンディションコードレジスタと命令レジス
タの内容をそれぞれ独立の信号線を介して出力してい
る。これらは、CPU内部情報として、ブレークインタ
フェース、トレースインタフェース、モニタインタフェ
ースなどに供給される。
The target CPU 101 of the emulation processor 212 outputs the contents of a general-purpose register, a program counter, a condition code register, and an instruction register via independent signal lines. These are supplied to the break interface, trace interface, monitor interface, and the like as CPU internal information.

【0111】尚、WBバスの内容と、汎用レジスタなど
の選択信号を出力するようにし、汎用レジスタなどの変
化時の内容を検出するようにしてもよい。
The contents of the WB bus and a selection signal for a general-purpose register may be output to detect the contents of the general-purpose register when it changes.

【0112】図8には、エミュレーション用プロセッサ
212に内蔵されたトレースインタフェース(TRC)
115の構成例が示される。
FIG. 8 shows a trace interface (TRC) built in the emulation processor 212.
A configuration example of 115 is shown.

【0113】図8に示されるようにトレースインタフェ
ース115は、特に制限されないが、SRAMなどのR
AM部804と、トレース制御回路801、アドレス選
択回路807、及びカウンタ808を含んで成る。
As shown in FIG. 8, the trace interface 115 is not particularly limited, but may be an R or R such as an SRAM.
It comprises an AM unit 804, a trace control circuit 801, an address selection circuit 807, and a counter 808.

【0114】トレース制御回路801は、CPU内部情
報のうち、所定の信号を監視し、指定された汎用レジス
タのライト信号などが発生すると、トレースイネーブル
信号(TRCE)をアサートして、RAM部804への
ライトを行わせる。また、カウンタ808がインクリメ
ントされることによって、RAM部804のアドレスを
更新することができる。カウンタ808は、EMLCP
U119の制御によって所定の初期値が設定される。
The trace control circuit 801 monitors a predetermined signal in the CPU internal information, and when a write signal of a designated general-purpose register is generated, asserts a trace enable signal (TRCE) to the RAM unit 804. Of the light. Further, the address of the RAM unit 804 can be updated by incrementing the counter 808. The counter 808 is an EMLCP
A predetermined initial value is set by the control of U119.

【0115】トレース時は、汎用レジスタ(32ビット
×8)、プログラムカウンタ(24ビット)、コンディ
ションコードレジスタ(8ビット)、命令レジスタ(1
6ビット)を含んだビット幅(例えば、304ビット)
でライト可能にされる。かかるライトは、例えば、ロー
アドレス単位で行われる。ローアドレスはカウンタ80
8で指定される。
At the time of tracing, a general-purpose register (32 bits × 8), a program counter (24 bits), a condition code register (8 bits), and an instruction register (1 bit)
6 bits) (including 304 bits)
To be writable. Such writing is performed, for example, in row address units. The row address is a counter 80
8 is specified.

【0116】ブレークモード(BRKAK=1)時には
トレースは禁止される。このとき、トレース制御回路8
01によってアドレス選択回路807の動作が制御され
ることで、アドレスの取り込みが行われない。
In the break mode (BRKAK = 1), tracing is prohibited. At this time, the trace control circuit 8
Since the operation of the address selection circuit 807 is controlled by 01, the address is not fetched.

【0117】RAM部804は、特に制限されないが、
複数のスタティック型メモリセルがアレイ状に配列され
て成るメモリセルアレイ804と、上記アドレス選択回
路807を介して取り込まれたアドレス信号(ローアド
レス、及びカラムアドレス)をデコードするためのアド
レスデコーダ806と、カラムアドレスのデコード結果
に基づいて上記メモリセルアレイ804のデータ線選択
を行うための入出力回路803とを含む。RAM部80
4のバス幅は、特に制限されないが、EMLCPU11
9によるリード時には、EMLCPU119のデータバ
ス幅に合わせて、16ビット幅とされる。E−BUSア
ドレス(EAB)とリード信号(E−RD)に従ってリ
ードが行われる。アドレスデコーダ806から、カラム
アドレスが指定され、入出力回路803によってデータ
の選択が行われる。リードされたトレースの内容は、コ
ントロールプロセッサ211を介して、システム開発装
置213に出力され、その表示装置214に表示され
る。
Although the RAM section 804 is not particularly limited,
A memory cell array 804 in which a plurality of static memory cells are arranged in an array, an address decoder 806 for decoding an address signal (row address and column address) captured via the address selection circuit 807, An input / output circuit 803 for selecting a data line of the memory cell array 804 based on a decoding result of the column address. RAM section 80
The bus width of the EMLCPU 11 is not particularly limited.
At the time of reading by No. 9, the width is 16 bits in accordance with the data bus width of the EMLCPU 119. Reading is performed according to an E-BUS address (EAB) and a read signal (E-RD). A column address is designated by the address decoder 806, and data is selected by the input / output circuit 803. The contents of the read trace are output to the system development device 213 via the control processor 211 and displayed on the display device 214.

【0118】トレースを行った際のステートで、トレー
ス取得信号(TRCE)が、エミュレーションインタフ
ェースから出力される。リアルタイムトレース回路20
7は、このトレース取得信号のみを蓄積する。EMLC
PU119から内蔵トレースメモリの内容を読み出し、
対応するバスサイクルとともにそれを表示することで、
トレースリストの表示が可能となる。
In the state at the time of tracing, a trace acquisition signal (TRCE) is output from the emulation interface. Real-time trace circuit 20
7 stores only this trace acquisition signal. EMLC
Read the contents of the internal trace memory from PU 119,
By displaying it along with the corresponding bus cycle,
The trace list can be displayed.

【0119】図9には、ブレーク制御回路208の構成
例が示される。
FIG. 9 shows a configuration example of the break control circuit 208.

【0120】CPU101に対するブレーク要求とし
て、以下の3要因を挙げることができる。
The following three factors can be given as break requests to the CPU 101.

【0121】第1はBRK端子からのブレーク要求であ
り、第2はアドレスブレークであり、第3はレジスタブ
レークである。
The first is a break request from the BRK terminal, the second is an address break, and the third is a register break.

【0122】アドレスブレークはA、Bの2チャネルが
あり、それぞれ、バスサイクル指定レジスタ910、ア
ドレス指定レジスタ911、アドレスマスクビットレジ
スタ912の出力値に基づいて、比較器913でアドレ
ス比較が行われる。バスサイクル指定レジスタ910に
よって、命令リードやデータリード又はライト、バスマ
スタの指定が行われ、バス制御情報が比較対象となる。
アドレス指定レジスタ911の出力値は、比較器913
においてアドレス(IAB)と比較される。アドレスマ
スクビットレジスタ912は所望のビットの比較を行わ
ない(常に一致とみなす)ようにする。図9ではチャネ
ルAのみ図示される。チャネルBについても同様に構成
され、それらのアドレス比較A,Bと、図示はされない
ブレーク制御レジスタのABIEA、ABIEBビット
との論理が、アンドゲート914,915、及びオアゲ
ート916によってとられるようになっている。
The address break has two channels A and B, and the comparator 913 compares the addresses based on the output values of the bus cycle designation register 910, the address designation register 911, and the address mask bit register 912, respectively. Instruction reading, data reading or writing, and designation of a bus master are performed by the bus cycle designation register 910, and bus control information is to be compared.
The output value of the address designation register 911 is
Is compared with the address (IAB). The address mask bit register 912 does not compare a desired bit (it always regards it as a match). FIG. 9 shows only the channel A. The channel B is similarly configured, and the logic of the address comparisons A and B and the ABIEA and ABIEB bits of a break control register (not shown) is determined by AND gates 914, 915 and OR gate 916. I have.

【0123】レジスタブレークを可能とするため、レジ
スタ選択レジスタ901、データ指定レジスタ902
と、マスクビットレジスタ903を保持するレジスタに
基づいて、レジスタ比較が行われる。レジスタ選択レジ
スタ901によって、レジスタ番号とサイズ(汎用レジ
スタER/E/R/RH/RLの選択)が指定され、セ
レクタ905によって、CPU内部情報の選択が行われ
る。汎用レジスタの他、プログラムカウンタ(PC)、
コンディションコードレジスタ(CCR)、命令レジス
タ(IR)も指定可能とする。上記選択されたCPU内
部情報とデータ指定及びデータマスクビットレジスタ9
12の出力値とが比較器904で比較される。ここでも
チャネルAのみ図示される。チャネルBについても同様
に構成され、それらのレジスタ比較A,Bと、図示はさ
れないブレーク制御レジスタのRBIEA、RBIEB
ビットとの論理が、アンドゲート906,907、及び
オアゲート908によってとられるようになっている。
To enable a register break, a register selection register 901 and a data designation register 902
Then, register comparison is performed based on the register holding the mask bit register 903. A register number and a size (selection of general-purpose registers ER / E / R / RH / RL) are designated by a register selection register 901, and CPU internal information is selected by a selector 905. In addition to general-purpose registers, a program counter (PC),
The condition code register (CCR) and instruction register (IR) can also be specified. The selected CPU internal information, data designation and data mask bit register 9
Twelve output values are compared by a comparator 904. Again, only channel A is shown. The channel B is similarly configured. The register comparisons A and B and break control registers RBIEA and RBIEB (not shown) are performed.
Logic with bits is taken by AND gates 906 and 907 and OR gate 908.

【0124】そして、オアゲート917において、上記
ノアゲート908,916の出力論理と、ブレーク信号
BRKとのオア論理がとられることで、ブレーク要求信
号(BRK要求信号)が形成される。
Then, in the OR gate 917, the output logic of the NOR gates 908 and 916 and the OR logic of the break signal BRK are taken to form a break request signal (BRK request signal).

【0125】上記アドレス指定レジスタ911などの制
御レジスタは、E−BUSを介してEMLCPU119
から設定される。
A control register such as the address designation register 911 is connected to the EMLCPU 119 via the E-BUS.
Is set from

【0126】図10には、データ代替回路(CHM)1
13の構成例が示される。
FIG. 10 shows a data replacement circuit (CHM) 1
13 shows a configuration example.

【0127】図10に示されるようにこのデータ代替回
路(CHM)113は、特に制限されないが、アドレス
指定レジスタ1131、代替データ指定レジスタ113
3、及び比較器1132を含んで成る。アドレス指定レ
ジスタ1131、代替データ指定レジスタ1133は、
EMLCPU119からのライトが可能とされる。EM
LCPU119が上記アドレスレジスタで指定したアド
レスを、ターゲットCPU101がリードした場合、実
際のアドレスの代わりに、データレジスタが選択されて
出力される。
As shown in FIG. 10, although this data replacement circuit (CHM) 113 is not particularly limited, it has an address designation register 1131 and an alternative data designation register 113.
3 and a comparator 1132. The address designation register 1131 and the substitute data designation register 1133 are
Writing from the EMLCPU 119 is enabled. EM
When the target CPU 101 reads the address specified by the address register by the LCPU 119, the data register is selected and output instead of the actual address.

【0128】アドレス指定レジスタ1131の保持値
は、比較器1132においてアドレスバス(IAB)と
比較される。この比較において両者が一致すると、その
ことがバスコントローラ(I−BSC)111に通知さ
れる。バスコントローラ111は、バス制御情報を参照
して、代替データ指定レジスタのデータバス(IDB)
への出力を指示し、かつ、本来のリードを禁止するよう
に、I−BUSを制御したり、P−BSC109やEX
−BSC110を制御したりする。
The value held in address designation register 1131 is compared with address bus (IAB) in comparator 1132. If the two match in this comparison, the fact is notified to the bus controller (I-BSC) 111. The bus controller 111 refers to the bus control information and refers to the data bus (IDB) of the substitute data designation register.
To control the I-BUS so as to instruct output to the P-BSC 109 and EX
And controlling the BSC 110.

【0129】上記アドレス指定レジスタ1131は、例
えば、16組を持つようにする。I−BUS及びP−B
USに所定組み数を持つようにしてもよい。
The address designation register 1131 has, for example, 16 sets. I-BUS and P-B
The US may have a predetermined number of sets.

【0130】エミュレーション用プロセッサ及びエミュ
レータの例のいずれにおいても、エミュレーション用プ
ロセッサ(ターゲットCPU)の動作を停止することな
く、プログラムなどの変更やチューニングが可能にな
る。例えば、ROM上のパラメータを、ROMを変更す
ることなく、データ代替回路を用いて、随時変更しなが
ら、デバッグを行うことができ、デバッグ効率を向上で
きる。
In any of the examples of the emulation processor and the emulator, the program and the like can be changed and tuned without stopping the operation of the emulation processor (target CPU). For example, debugging can be performed while changing parameters on the ROM as needed using a data replacement circuit without changing the ROM, and the debugging efficiency can be improved.

【0131】図11には、エミュレータの動作の流れが
示される。
FIG. 11 shows a flow of the operation of the emulator.

【0132】電源投入後、EMLCPU119により、
エミュレーションプログラムが実行され(S11)、い
ずれのマイクロコンピュータのエミュレーション用プロ
セッサとして動作するかの設定(S12)や、貸し出し
メモリの構成などがシステム開発装置から入力され(S
13)、ホストインタフェース210、コントロールプ
ロセッサ211を介して、それぞれのエミュレーション
用制御レジスタに設定される。
After the power is turned on, the EMLCPU 119
The emulation program is executed (S11), and the setting of which microcomputer to operate as the emulation processor (S12), the configuration of the lending memory, and the like are input from the system development device (S11).
13), are set in the respective emulation control registers via the host interface 210 and the control processor 211.

【0133】所望のエミュレータ用の処理が行われ、シ
ステム開発装置213から入力されるコマンドなどに基
づき、ユーザプログラムの実行が要求されると、EML
CPU119は、ターゲットCPU101の動作を許可
する(S14)。CPU101は、リセットから動作を
開始し(S21)、ユーザプログラムを実行する(S2
2)。
When processing for a desired emulator is performed and execution of a user program is requested based on a command or the like input from the system development device 213, EML is executed.
The CPU 119 permits the operation of the target CPU 101 (S14). The CPU 101 starts the operation from the reset (S21) and executes the user program (S2).
2).

【0134】所定のユーザプログラム実行中も、EML
CPU119がエミュレーション制御動作(エミュレー
ションコマンドの入力や、ターゲットマイクロコンピュ
ータの内部状態の表示など)を行うので、CPU101
がブレークする必要はない。
Even when a predetermined user program is being executed, the EML
Since the CPU 119 performs an emulation control operation (input of an emulation command, display of an internal state of the target microcomputer, and the like), the CPU 101
There is no need to break.

【0135】CPU101が、実行すべきユーザプログ
ラムが終了したり、ユーザが設定した条件が成立したり
すると、ユーザプログラムの実行は中断(ブレーク)さ
れ、エミュレーションプログラムを実行し、待機状態に
なる(S23,S24)。
When the CPU 101 terminates the user program to be executed or satisfies the condition set by the user, the execution of the user program is interrupted (break), the emulation program is executed, and the CPU 101 enters a standby state (S23). , S24).

【0136】ユーザプログラムを再開する場合には、プ
ログラムの開始アドレスを、リターンするプログラムカ
ウンタの保持アドレスに設定し、リターン命令(RT
B)を実行するようにする(S25)。
When the user program is restarted, the start address of the program is set to the holding address of the returning program counter, and the return instruction (RT
B) is executed (S25).

【0137】ターゲットとなるCPU101は、その制
御するシステムの動作状態に応じて、低消費電力状態に
遷移する場合がある。低消費電力状態には、例えば、C
PU101のみ停止するスリープモード、マイクロコン
ピュータ全体が停止するスタンバイモードがある。
The target CPU 101 may transition to a low power consumption state depending on the operation state of the system to be controlled. In the low power consumption state, for example, C
There is a sleep mode in which only the PU 101 stops, and a standby mode in which the entire microcomputer stops.

【0138】専用の低消費電力(スリープ)命令の実行
によりスリープモードに遷移する。このとき、CPU1
01へのクロック供給が停止される。割り込みが要求さ
れると、スリープモードは解除される。
The mode shifts to the sleep mode by execution of the dedicated low power consumption (sleep) instruction. At this time, CPU1
01 is stopped. When an interrupt is requested, the sleep mode is released.

【0139】また、所定の制御ビットを1にセットした
状態で、低消費電力(スリープ)命令が実行されると、
ソフトウェアスタンバイモードに遷移する。このとき、
マイクロコンピュータ部100全体に供給されるクロッ
クが停止される。所定の外部割り込みが要求されると、
ソフトウェアスタンバイモードは解除される。
When a low power consumption (sleep) instruction is executed while a predetermined control bit is set to 1,
Transition to software standby mode. At this time,
The clock supplied to the entire microcomputer unit 100 is stopped. When a given external interrupt is requested,
The software standby mode is released.

【0140】このとき、マイクロコンピュータが停止状
態になった場合も、エミュレータ自体は動作を継続す
る。
At this time, even when the microcomputer is stopped, the emulator itself continues to operate.

【0141】図15には、ターゲットCPU101にお
ける低消費電力状態制御回路の構成例が示される。
FIG. 15 shows a configuration example of the low power consumption state control circuit in the target CPU 101.

【0142】特に制限されないが、ターゲットCPU1
01における低消費電力状態制御回路151は、3個の
フリップフロップSLPF1、SLPF2、SSBY
F、及び3個の論理ゲート51〜53によって構成され
る。フリップフロップSLPF1は、SLEEP命令1
によってセットされ、CPU割り込み要求によってリセ
ットされる。フリップフロップSSBYFは、SLEE
P命令1と制御ビットSSBYとのアンド論理によって
セットされ、外部割り込み要求によってリセットされ
る。フリップフロップSLPF2は、SLEEP命令2
によってセットされ、EMLCPU割り込み要求によっ
てリセットされる。EMLMODが論理値“0”のと
き、EMLCPU停止信号がアサートされるため、EM
LCPU119の動作が停止される。EMLMODが論
理値“1”のとき、CPU101、EMLCPU119
は動作される。
Although not particularly limited, the target CPU 1
01, the low power consumption state control circuit 151 includes three flip-flops SLPF1, SLPF2, SSBY
F, and three logic gates 51 to 53. The flip-flop SLPF1 has a SLEEP instruction 1
And reset by a CPU interrupt request. The flip-flop SSBYF is SLEE
It is set by the AND logic of the P instruction 1 and the control bit SSBY, and is reset by an external interrupt request. The flip-flop SLPF2 has a SLEEP instruction 2
And reset by an EMLCPU interrupt request. When EMLMOD is a logical value “0”, the EMLCPU stop signal is asserted.
The operation of the LCPU 119 is stopped. When EMLMOD is a logical value “1”, the CPU 101 and the EMLCPU 119
Is operated.

【0143】フリップフロップSLPF1はターゲット
となるCPUがSLEEP命令を実行すると、セット状
態となる。このとき、CPU停止信号がアサートされる
と、CPU101はスリープ状態となる。CPU101
に対する割り込み要求が発生すると、クリア状態とな
る。
The flip-flop SLPF1 is set when the target CPU executes the SLEEP instruction. At this time, when the CPU stop signal is asserted, the CPU 101 enters a sleep state. CPU101
Is cleared when an interrupt request is issued.

【0144】フリップフロップSSBYFは、図示はさ
れない制御ビットSSBYを論理値“1”にセットした
状態で、ターゲットなるCPUがSLEEP命令を実行
すると、セット状態となる。
The flip-flop SSBYF is set when the target CPU executes the SLEEP instruction while the control bit SSBY (not shown) is set to the logical value “1”.

【0145】マイクロコンピュータにおいて、かかるソ
フトウェアスタンバイモードに遷移すると、クロック発
振器を始め、全ての機能の動作が停止される。ただし、
規定の電圧が与えられている限り、RAMの内容は保持
される。また、入出力ポートの状態も保持される。外部
割り込み要求が発生すると、クリア状態となる。
When the microcomputer transits to the software standby mode, the operation of all functions including the clock oscillator is stopped. However,
As long as the specified voltage is applied, the contents of the RAM are retained. The state of the input / output port is also maintained. When an external interrupt request occurs, the state is cleared.

【0146】エミュレーション用プロセッサ212で、
エミュレートモード時(EMLMOD=1)は、ソフト
ウェアスタンバイモードに遷移しようとすると、少なく
とも、クロック発振器やバスコントローラ及びEMLC
PU119は動作を継続する。その他の機能ブロックに
は、モジュール停止信号が供給され、実際のソフトウェ
アスタンバイモードと同様に停止状態になる。
In the emulation processor 212,
In the emulation mode (EMLMOD = 1), when trying to transition to the software standby mode, at least the clock oscillator, the bus controller, and the EMLC
PU 119 continues to operate. The other function blocks are supplied with a module stop signal, and are stopped as in the actual software standby mode.

【0147】従って、ソフトウェアスタンバイモードで
も、EMLCPUの動作は可能であり、エミュレータと
しても、コマンドの入力や、プログラムやデータの変更
などは可能である。
Therefore, the EMLCPU can operate even in the software standby mode, and the emulator can input commands, change programs and data, and the like.

【0148】図4には、マイクロコンピュータ開発装置
本体204の別の構成例が示される。
FIG. 4 shows another configuration example of the microcomputer development device main body 204.

【0149】図4に示されるマイクロコンピュータ開発
装置本体204が図2に示されるのと大きく相違するの
は、第1エミュレーションバス1と、第2エミュレーシ
ョンバス2とを有する点である。エミュレーションメモ
リ206は、上記第1エミュレーションバス1に対応す
る第1記憶部と、上記第2エミュレーションバス2に対
応する第2記憶部を有する。この第1記憶部及び第2記
憶部は互いに独立してリード又はライト可能にされてい
る。
The microcomputer development apparatus main body 204 shown in FIG. 4 is largely different from that shown in FIG. 2 in that it has a first emulation bus 1 and a second emulation bus 2. The emulation memory 206 has a first storage unit corresponding to the first emulation bus 1 and a second storage unit corresponding to the second emulation bus 2. The first storage unit and the second storage unit are readable or writable independently of each other.

【0150】第1エミュレーションバス1によって、ト
レースやブレークのためのステータス信号や制御信号な
どが伝達される。この第1エミュレーションバス1を介
して、エミュレーション用プロセッサから、応用システ
ムとエミュレーション用プロセッサの内部状態に応じた
情報などを得ることができる。
The first emulation bus 1 transmits status signals and control signals for tracing and breaking. Through the first emulation bus 1, information corresponding to the application system and the internal state of the emulation processor can be obtained from the emulation processor.

【0151】また、第2エミュレーションバス2によっ
て、リード又はライトを行うための所要の制御信号が伝
達される。エミュレーション用プロセッサ212は、第
2エミュレーションバス2を用いて、エミュレーション
のための各種制御プログラムをリードすることが可能と
される。
The second emulation bus 2 transmits a required control signal for reading or writing. The emulation processor 212 can read various control programs for emulation using the second emulation bus 2.

【0152】尚、ブレーク制御回路208や、リアルタ
イムトレース回路207については、図2に示される場
合と同様であり、第1エミュレーションバス1に接続さ
れ、コントロールプロセッサ211の制御下で、ターゲ
ットCPU101のブレークやトレースを行う。
The break control circuit 208 and the real-time trace circuit 207 are the same as those shown in FIG. 2, and are connected to the first emulation bus 1 and controlled by the control processor 211 to break the target CPU 101. And do a trace.

【0153】図3には、図4に示される構成を採用する
場合のエミュレーション用プロセッサ212の構成例が
示される。
FIG. 3 shows an example of the configuration of the emulation processor 212 when the configuration shown in FIG. 4 is adopted.

【0154】図3に示されるエミュレーション用プロセ
ッサ212が図1に示されるのと大きく相違するのは、
エミュレーションインタフェースとして、第1エミュレ
ーションバス1に対応するエミュレーション用バッファ
(EMLBUF)122とは別に、第2エミュレーショ
ンバス2に対応するエミュレーション用バッファ(EM
LBUF)123を設けた点である。
The emulation processor 212 shown in FIG. 3 is significantly different from that shown in FIG.
As an emulation interface, an emulation buffer (EML) corresponding to the second emulation bus 2 is provided separately from the emulation buffer (EMLBUF) 122 corresponding to the first emulation bus 1.
(LBUF) 123 is provided.

【0155】第1エミュレーションバス1は、エミュレ
ーション用バッファ(EMLBUF)122を介してタ
ーゲットCPU101に結合され、他方、第2エミュレ
ーションバス2は、エミュレーション用バッファ(EM
LBUF)123を介してEMLCPU119に結合さ
れる。すなわち、第1エミュレーションバス1がI−B
US(IAB、IDB)に対応し、第2エミュレーショ
ンバス2がE−BUS(EIAB、EIDB)に対応す
る。
The first emulation bus 1 is connected to the target CPU 101 via an emulation buffer (EMLBUF) 122, while the second emulation bus 2 is connected to an emulation buffer (EML buffer).
(LBUF) 123 to the EML CPU 119. That is, the first emulation bus 1
US (IAB, IDB), and the second emulation bus 2 corresponds to E-BUS (EIAB, EIDB).

【0156】EMLCPU119のプログラムを、エミ
ュレーションメモリ206に格納できるので、エミュレ
ーションの機能が多く、プログラム容量が大きい場合で
も、それに容易に対応することができる。EMLCPU
119によるエミュレーションメモリ2のリード又はラ
イトは、上記EMLROM120又はEMLRAM10
21をアクセスする場合と同様に、CPU101におけ
るユーザプログラムの実行を制約することはない。
Since the program of the EMLCPU 119 can be stored in the emulation memory 206, even if the emulation function is large and the program capacity is large, it can be easily handled. EMLCPU
The reading or writing of the emulation memory 2 by 119 is performed by the EMLROM 120 or the EMLRAM 10.
As in the case of accessing the program 21, execution of the user program in the CPU 101 is not restricted.

【0157】図6には、本発明にかかるエミュレータの
別の構成例が示される。
FIG. 6 shows another example of the configuration of the emulator according to the present invention.

【0158】図6において、エミュレータは、エミュレ
ーション用プロセッサ212、デバッギングインタフェ
ースケーブル602、マイクロコンピュータ開発装置本
体204を含む。
In FIG. 6, the emulator includes an emulation processor 212, a debugging interface cable 602, and a microcomputer development device main body 204.

【0159】エミュレーション用プロセッサ212が、
マイクロコンピュータ応用システム200に装着され
る。
The emulation processor 212
It is mounted on the microcomputer application system 200.

【0160】マイクロコンピュータ開発装置本体204
は、特に制限されないが、PCMCIAによるカード形
態とされ、システム開発装置213に設けられたカード
スロット604に、着脱自在に装着される。ホストイン
タフェース603からデバッグインタフェースケーブル
602が引き出され、このバッグインタフェースケーブ
ル602の先端にはコネクタが設けられ、デバッギング
インタフェース(デバック用SCI)コネクタ領域60
1に取り付けられたコネクタに結合可能になっている。
Microcomputer development apparatus main body 204
Although not particularly limited, is a card form by PCMCIA, and is detachably mounted in a card slot 604 provided in the system development device 213. A debug interface cable 602 is pulled out from the host interface 603, and a connector is provided at the tip of the bag interface cable 602, and a debugging interface (SCI for debugging) connector area 60 is provided.
1 can be connected to the connector attached thereto.

【0161】マイクロコンピュータ開発装置本体204
にはホストインタフェース603が設けられているが、
コントロールプロセッサや、エミュレーションメモリ、
リアルタイムトレース回路、ブレーク制御回路などは存
在しない。エミュレーションメモリは、エミュレーショ
ン用プロセッサ212に内蔵されたROMやRAMを使
用する。ブレークやトレースの対象は、エミュレーショ
ン用プロセッサ212に内蔵されたもののみとされる。
Microcomputer development apparatus main body 204
Is provided with a host interface 603,
Control processor, emulation memory,
There is no real-time trace circuit or break control circuit. As the emulation memory, a ROM or a RAM built in the emulation processor 212 is used. Breaks and traces are limited to those built in the emulation processor 212.

【0162】エミュレーション用プロセッサ212は、
専用のデバッギングインタフェースコネクタ領域601
に取り付けられたコネクタを介して、システム開発装置
213との間で信号のやり取りが可能とされる。
The emulation processor 212
Dedicated debugging interface connector area 601
Signals can be exchanged with the system development device 213 via the connector attached to the.

【0163】専用のデバッグインタフェース(デバック
用SCI)は、ターゲットCPU101の汎用SCIと
兼用の端子にするとよい。エミュレーション実行時に
は、SCIとして使用できなくなってしまうが、汎用S
CIの使用方法は幅広く、例えば、テスト治具とのイン
タフェースなど、ソフトウェアデバッグ時には必ずしも
必要のない使用方法もある。兼用とすることにより、端
子を有効に利用することができる。
The dedicated debug interface (debug SCI) may be a terminal shared with the general-purpose SCI of the target CPU 101. When emulation is executed, it cannot be used as SCI.
The CI can be used in a wide variety of ways, such as an interface with a test jig, which is not always necessary for software debugging. The terminal can be used effectively by making the terminal double.

【0164】図5には、図6に示される構成を採用する
場合のエミュレーション用プロセッサ212の構成例が
示される。
FIG. 5 shows an example of the configuration of the emulation processor 212 when the configuration shown in FIG. 6 is employed.

【0165】図5に示されるエミュレーション用プロセ
ッサ212が、図1に示されるのと大きく相違するの
は、エミュレーションインタフェースが、デバッギング
インタフェースのみとされている点である。
The emulation processor 212 shown in FIG. 5 is largely different from that shown in FIG. 1 in that the emulation interface is a debugging interface only.

【0166】ROM103及びRAM104は、エミュ
レーション用プロセッサ212内蔵のものが使用され
る。ROM103としては、フラッシュメモリなどの、
電気的に書換え可能なものを使用する。EMLCPU1
19の制御で、フラッシュメモリの書換えを可能にする
ことができる。このとき、デバッギングインタフェース
からプログラムをロードする。さらに、RAM104を
オーバラップ動作可能にするとよい。
As the ROM 103 and the RAM 104, those having a built-in emulation processor 212 are used. As the ROM 103, such as a flash memory,
Use an electrically rewritable one. EMLCPU1
With the control of 19, rewriting of the flash memory can be enabled. At this time, the program is loaded from the debugging interface. Further, the RAM 104 may be enabled to perform an overlap operation.

【0167】図16には、マイクロコンピュータ応用シ
ステム200の一例とされるスチルカメラが示される。
FIG. 16 shows a still camera as an example of the microcomputer application system 200.

【0168】MCU(マイクロコンピュータ)160が
設けられ、このMCU160によって、スチルカメラ全
体の動作制御が行われる。スイッチやキー161、ダイ
ヤル162、EEPROM(エレクトリカリ・イレーザ
ブル・アンド・プログラマブル・リード・オンリ・メモ
リ)163、LED(発光ダイオード)164、LCD
(液晶表示パネル)165が設けられ、それらは上記M
CU160に結合される。また、別のマイクロコンピュ
ータ166やデバッグテスト回路167が上記MCU1
60に結合される。レンズ171、及び絞り170、C
CD169、フィルタ168が設けられる。また、フォ
ーカス調整のため、モータ173やドライバ172、及
びエンコーダ174が設けられる。
An MCU (microcomputer) 160 is provided, and the MCU 160 controls the operation of the whole still camera. Switches and keys 161, dial 162, EEPROM (electrically erasable and programmable read only memory) 163, LED (light emitting diode) 164, LCD
(Liquid crystal display panel) 165 are provided,
Coupled to CU 160. Further, another microcomputer 166 and a debug test circuit 167 are connected to the MCU 1
60. Lens 171, aperture 170, C
A CD 169 and a filter 168 are provided. Further, a motor 173, a driver 172, and an encoder 174 are provided for focus adjustment.

【0169】スイッチやキー161は、入出力ポート
(IOP)に入力され、スイッチやキーの押下などを検
出する。また、ダイヤル162などからの入力は、2相
エンコーダパルスとして、タイマでカウントされる。こ
れらの入力が、MCU160で解析されて所定の制御が
行われる。入出力ポートの出力によって、LED164
やLCD165の制御が行われる。SCIを介してEE
PROM(エレクトリカリイレーザブルプログラマブル
ROM)163が接続され、MCU160は、上記SC
Iを介して、所望のデータを書込んだり、読み出したり
することができる。
The switches and keys 161 are input to an input / output port (IOP), and detect depression of the switches and keys. The input from the dial 162 or the like is counted by a timer as a two-phase encoder pulse. These inputs are analyzed by the MCU 160 and predetermined control is performed. Depending on the output of the input / output port, the LED 164
And the LCD 165 are controlled. EE via SCI
A PROM (Electrically Releasable Programmable ROM) 163 is connected, and the MCU 160
Via I, desired data can be written or read.

【0170】また、SCIは、図示はされない別のマイ
クロコンピュータ(オプションなど)のインタフェース
も行う。
The SCI also provides an interface for another microcomputer (not shown) (not shown).

【0171】レンズ171から入射した光は、絞り(A
PT)170を介して、CCD171に入力され、光電
変換される。CCD169出力信号はフィルタ168で
不要周波数成分が除去された後に、図示されないA/D
変換器でディジタル信号に変換される。画面を分割した
領域毎に積算され、この結果を元に、オートフォーカ
ス、絞り制御の制御が行われる。フォーカスを制御する
ため、モータ173を駆動するためドライバ172が、
タイマ出力に基づいて制御される。これらは、PWM
(パルス幅変調)出力であってもよいし、パルス出力回
路による、ステッピングモータの駆動可能な複数の波形
出力を組合せたものであってもよい。また、レンズの移
動量は、エンコーダ174により2相エンコーダパルス
としてとり込まれ、タイマでカウントされる。絞り17
0の制御は、入出力ポート(IOP)の出力によって行
われる。
The light incident from the lens 171 passes through the stop (A
The signal is input to the CCD 171 via the (PT) 170 and is photoelectrically converted. After the unnecessary frequency components are removed by the filter 168 from the CCD 169 output signal, the A / D
It is converted to a digital signal by the converter. Integration is performed for each of the divided areas of the screen, and based on this result, control of autofocus and aperture control is performed. To control the focus, the driver 172 for driving the motor 173
It is controlled based on the timer output. These are PWM
The output may be (pulse width modulation) output, or a combination of a plurality of waveform outputs that can drive a stepping motor by a pulse output circuit. Further, the movement amount of the lens is captured as a two-phase encoder pulse by the encoder 174, and is counted by a timer. Aperture 17
Control of 0 is performed by the output of the input / output port (IOP).

【0172】この他、カメラ一体型VTRは、上記シス
テムに、映像データを入力し、ディスプレイ機能、記録
再生機能などを付加すればよい。
In addition, the camera-integrated VTR only needs to input video data to the above system and add a display function, a recording / reproducing function, and the like.

【0173】周知の通り、スチルカメラやカメラ一体型
VTRは小型化が進み、そこに適用される半導体集積回
路には、チップサイズパッケージ(CSP)といったパ
ッケージが使用されることもある。このような場合、ユ
ーザケーブルを装着したり、配線を引き出したりするこ
とが困難である。本発明では、SCIを用いてデバック
用のインタフェースを行えばよいから、ターゲットとな
るマイクロコンピュータと同等のピン機能で、同等のパ
ッケージにすることが容易であり、CSPのようなパッ
ケージであっても、ターゲットと同じく実装して、評価
することができる。
As is well known, the size of a still camera or a camera-integrated VTR has been reduced, and a package such as a chip size package (CSP) may be used for a semiconductor integrated circuit applied thereto. In such a case, it is difficult to attach a user cable or draw out a wiring. In the present invention, since the debugging interface may be performed using the SCI, it is easy to make the same package with the same pin function as the target microcomputer, and it is easy to use the same package as the CSP. , Can be implemented and evaluated in the same way as the target.

【0174】図6に示されるように、マイクロコンピュ
ータ応用システム200からは、SCI用の配線を引き
出すだけでよいから、屋外などの実使用環境で、動作さ
せて、デバックあるいはチューニングすることが容易に
できる。例えば、データ代替回路によって、フォーカス
やズーム移動量の制御パラメータを変更し、実動作で確
認することができる。カメラ一体型VTRであれば、映
像データのゲイン調整などを、実動作で確認することが
できる。
As shown in FIG. 6, since it is only necessary to pull out the SCI wiring from the microcomputer application system 200, it is easy to operate and debug or tune it in an actual use environment such as outdoors. it can. For example, the data substitution circuit can change the control parameters of the focus and zoom movement amounts, and confirm them by actual operation. With a camera-integrated VTR, it is possible to confirm the gain adjustment of video data and the like in actual operation.

【0175】スチルカメラやカメラ一体型VTRなどの
携帯機器では、低消費電力化を図るために、マイクロコ
ンピュータの低消費電力状態への遷移やその状態からの
復帰が頻繁に行われるが、本発明においては、エミュレ
ーション用にEMLCPU119を持つことにより、タ
ーゲットCPU101の上記低消費電力状態の遷移やそ
の状態からの復帰も、実際のマイクロコンピュータと同
様にでき、デバッグ効率を向上できる。
In portable equipment such as a still camera and a camera-integrated VTR, the microcomputer frequently transitions to and returns from a low power consumption state in order to reduce power consumption. In the above, by having the EMLCPU 119 for emulation, the transition of the low power consumption state of the target CPU 101 and the return from the state can be performed similarly to the actual microcomputer, and the debugging efficiency can be improved.

【0176】尚、複数のCPUを内蔵して、エミュレー
ションを行う例としては、特開平10−222395号
公報などに記載があるが、これら複数のCPUはデバッ
グ対象となるものであって、デバッグ対象のプログラム
の実行を中断せずには、エミュレーションの制御を行う
ことはできない。また、この例には、デバッグポートを
設けて、パケットコマンドなどの指示に対応して、所望
のデータのモニタや変更を行うことが記載されている
が、かかるハードウェアによる方法では、限定された機
能のみしか実現できず、結局は、デバッグ対象の処理を
中断して、エミュレーション用の処理を行う必要があ
る。
An example in which emulation is performed by incorporating a plurality of CPUs is described in Japanese Patent Application Laid-Open No. H10-222395. However, these plurality of CPUs are to be debugged. Emulation cannot be controlled without interrupting the execution of the program. Further, this example describes that a debug port is provided to monitor or change desired data in response to an instruction such as a packet command. Only the functions can be realized, and after all, it is necessary to interrupt the processing to be debugged and perform processing for emulation.

【0177】上記の例によれば以下の作用効果を得るも
のである。
According to the above example, the following operation and effect can be obtained.

【0178】(1)エミュレーション用プロセッサ21
2に、エミュレーション用CPU119を内蔵して、エ
ミュレーション制御をエミュレーション用CPU119
で行い、マイクロコンピュータの高速化に対応可能で
き、使い勝手の向上を図ることができる。また、ターゲ
ットCPUの動作を停止することを最小限にして、実動
作でのエミュレーション動作を容易にして、デバッグ効
率の向上を図ることができる。
(1) Emulation processor 21
2, emulation CPU 119 is built in, and emulation control is performed by emulation CPU 119.
In this case, it is possible to cope with an increase in the speed of the microcomputer and to improve the usability. In addition, the halt of the operation of the target CPU can be minimized, the emulation operation in actual operation can be facilitated, and the debugging efficiency can be improved.

【0179】(2)エミュレーション用プロセッサ21
2において、ターゲットCPU101とは独立して動作
可能なエミュレーション用CPU119を内蔵し、エミ
ュレーション用CPU119が専用のデバッギングイン
タフェースを持って、システム開発装置213などとの
インタフェースを行うことにより、ターゲットCPU1
01でのプログラム実行を停止させずに済む。
(2) Emulation processor 21
2, the emulation CPU 119, which can operate independently of the target CPU 101, is built in. The emulation CPU 119 has a dedicated debugging interface, and interfaces with the system development device 213, etc.
It is not necessary to stop the program execution at 01.

【0180】上記エミュレーション用CPU119が、
ターゲットCPU101のバス権を獲得して、ターゲッ
トCPU101で管理されるアドレス空間の資源をリー
ド又はライト可能にすることによって、ターゲットCP
U101の動作を停止する時間を最小限にして、上記ア
ドレス空間に配置された資源を、デバッグ用に表示した
り、変更したりすることができ、いわゆるメモリコマン
ドやウィンドウ機能を実現できる。ターゲットCPUの
動作を中断することを最小限にすることができるから、
より実動作に近く、リアルタイム性を損なうことなく、
デバックを行うことができる。
The emulation CPU 119
By acquiring the bus right of the target CPU 101 and enabling the resources in the address space managed by the target CPU 101 to be readable or writable,
The resources arranged in the address space can be displayed or changed for debugging while minimizing the time during which the operation of the U101 is stopped, and so-called memory commands and window functions can be realized. Since the interruption of the operation of the target CPU can be minimized,
It is closer to actual operation, without impairing real-time performance,
Debugging can be performed.

【0181】(3)CPU101における汎用レジスタ
などのように、当該CPU101によって管理されるア
ドレス空間に存在しない資源をエミュレーション用CP
Uのアドレス空間に配置して、エミュレーション用プロ
セッサの端子数を増やすことなく、モニタやトレースを
可能にし、システム開発装置上に表示したりして、ま
た、ブレークやトレース条件を設定可能にすることによ
って、ソフトウェアのデバッグ効率を向上することがで
きる。これらを外部に出力しなくてよいから、エミュレ
ーション用プロセッサの端子を不所望に増加させること
がない。
(3) Resources that do not exist in the address space managed by the CPU 101, such as general-purpose registers in the CPU 101, are transferred to the emulation CP.
To enable monitoring and tracing without increasing the number of terminals of the emulation processor, to display them on the system development device, and to set break and trace conditions without increasing the number of emulation processor terminals As a result, software debugging efficiency can be improved. Since these need not be output to the outside, the number of terminals of the emulation processor does not increase undesirably.

【0182】(4)トレースメモリ115をエミュレー
ション用プロセッサ212に内蔵し、汎用レジスタや命
令レジスタなどのように、CPU101で管理されるア
ドレス空間に存在しない資源の動作をトレースメモリに
蓄積可能にすることによって、ターゲットCPU101
の動作の解析を容易にして、エミュレータの開発効率を
向上するとともに、ソフトウェアのデバッグ効率をさら
に向上できる。
(4) The trace memory 115 is incorporated in the emulation processor 212 so that the operation of resources that do not exist in the address space managed by the CPU 101, such as general-purpose registers and instruction registers, can be stored in the trace memory. The target CPU 101
In addition to improving the efficiency of emulator development, it is possible to further improve the software debugging efficiency.

【0183】(5)エミュレーション用プロセッサ21
2の外部で制御していたものを、エミュレーション用プ
ロセッサ212に取り込むことによって、エミュレーシ
ョン用プロセッサ212内部の適切な情報を用いること
ができ、また、エミュレーション用プロセッサ212か
らエミュレータへの信号の遅延やエミュレータからエミ
ュレーション用プロセッサへの信号の遅延に影響される
ことがなくなる。そして、エミュレーション用プロセッ
サ212と外部との間の入出力信号を増加させずに、容
易かつ高速にエミュレーション用プロセッサ212の制
御を行うことができる。判定や制御に必要な時間を短縮
することができ、例えば、ブレーク制御については、所
望の命令実行状態でブレークさせることが容易になり、
数命令余分に実行したりすることを防ぐことができる。
(5) Emulation processor 21
2 is controlled by the emulation processor 212 so that appropriate information in the emulation processor 212 can be used. In addition, signal delay from the emulation processor 212 to the emulator and emulation can be performed. From the delay to the emulation processor. Then, the emulation processor 212 can be controlled easily and at high speed without increasing the number of input / output signals between the emulation processor 212 and the outside. The time required for determination and control can be shortened. For example, for break control, it is easy to break in a desired instruction execution state,
It is possible to prevent the execution of a few extra instructions.

【0184】(6)ターゲットCPU101が低消費電
力状態に遷移し、マイクロコンピュータが停止状態にな
った場合も、エミュレーションCPU119の動作を可
能に、エミュレータ自体は動作を継続するようにして、
エミュレータ側からブレーク割り込みを要求することな
く、デバックを継続して、低消費電力状態の遷移又は解
除についても、実際のマイクロコンピュータの動作と同
様にエミュレーションできる。
(6) Even when the target CPU 101 transitions to the low power consumption state and the microcomputer stops, the emulation CPU 119 can operate and the emulator itself continues to operate.
Debugging is continued without requesting a break interrupt from the emulator, and the transition or release of the low power consumption state can be emulated in the same manner as the actual operation of the microcomputer.

【0185】(7)従来、コントロールプロセッサやブ
レーク制御回路などを含んだ、エミュレーションシステ
ムとして構成したものを、1個のエミュレーション用プ
ロセッサ212で実現することで、システムの小型化を
図ることができる。
(7) Conventionally, an emulation system including a control processor and a break control circuit is realized by one emulation processor 212, so that the system can be downsized.

【0186】(8)SCIでなるようなデバッギングイ
ンタフェース118を持つことにより、エミュレーショ
ン用プロセッサの端子構成を、上記インタフェースのた
めの少数の端子を、ターゲットマイクロコンピュータに
加えたもの、あるいは兼用にしたものにし、さらに、エ
ミュレーション用プロセッサとターゲットマイクロコン
ピュータのパッケージなどの外形を共通にし、同じ基板
に実装可能にすることによって、実装状態でのデバッグ
が可能になる。少数の端子でなるデバッギングインタフ
ェースを、応用システム上に用意すればよいから、いわ
ゆるインタフェースケーブル(ユーザケーブル)などを
使用しないでよく、より実動作に近く、アナログ的な信
号へのノイズなどを最小限にして、デバッグを行うこと
ができる。また、スチルカメラやカメラ一体型VTRな
どの小型の機器などであっても、実動作環境で、すなわ
ち、ターゲットマイクロコンピュータによる応用システ
ムの制御を行いつつ、デバックを行い、さらに、所望の
パラメータの変更を行うことができる。使用者の開発効
率の向上に寄与できる。
(8) By having a debugging interface 118 such as an SCI, the terminal configuration of the emulation processor is such that a small number of terminals for the interface are added to the target microcomputer or are used alternately. In addition, the emulation processor and the target microcomputer have the same external shape such as a package, and can be mounted on the same board, thereby enabling debugging in a mounted state. Since a debugging interface consisting of a small number of pins only needs to be prepared on the application system, there is no need to use a so-called interface cable (user cable), which is closer to actual operation and minimizes noise to analog signals. Then, debugging can be performed. Even small devices such as a still camera and a camera-integrated VTR perform debugging in the actual operating environment, that is, while controlling the application system by the target microcomputer, and further change desired parameters. It can be performed. This can contribute to improving the development efficiency of users.

【0187】エミュレーションCPUから制御可能な、
ターゲットCPUの所望のアドレスのデータを代替する
回路を持つことによって、上記チューニングを、さらに
容易にすることができる。
Controllable from the emulation CPU,
By having a circuit that substitutes data at a desired address of the target CPU, the tuning can be further facilitated.

【0188】デバッギングインタフェースを汎用のSC
Iと兼用とすることにより、テスト用などの、機器制御
などの実使用に必ずしも影響の少ない、汎用のSCIと
切り替えて使用可能にして、使い勝手、デバック効率を
さほど低下させずに、端子を有効に利用することができ
る。
The debugging interface can be changed to a general-purpose SC.
It can be used by switching to a general-purpose SCI, which does not necessarily affect actual use such as equipment control for testing, etc. by using it also as I, and the terminal is effective without greatly reducing usability and debugging efficiency Can be used for

【0189】ホストインタフェースをPCMCIAカー
ドなどの形態として、パーソナルコンピュータなどのシ
ステム開発装置と直接接続可能にして、応用システムと
システム開発装置を接続すればよく、エミュレーション
システムの小型を図ることができる。応用システムを、
屋外などの実動作環境で動作させつつ、デバッグやチュ
ーニングを行うことを容易にできる。
The host interface may be in the form of a PCMCIA card or the like so that it can be directly connected to a system development device such as a personal computer, and the application system and the system development device can be connected. Thus, the emulation system can be reduced in size. Application system,
Debugging and tuning can be easily performed while operating in an actual operating environment such as outdoors.

【0190】以上本発明者によってなされた発明を具体
的に説明したが、本発明はそれに限定されるものではな
く、その要旨を逸脱しない範囲で種々変更可能であるこ
とはいうまでもない。
Although the invention made by the present inventor has been specifically described above, the present invention is not limited to this, and it goes without saying that various modifications can be made without departing from the gist of the invention.

【0191】例えば、専用のデバッギングインタフェー
ス(デバック用SCI)は、デュアルポートRAMのよ
うなものでもよい。あるいは、入出力ポートなどを持っ
て、EMLCPUが任意のプロトコルを実現するように
してもよい。
For example, the dedicated debugging interface (SCI for debugging) may be a dual-port RAM. Alternatively, the EML CPU may have an input / output port or the like to realize an arbitrary protocol.

【0192】エミュレーション用CPUはターゲットと
なるCPUを互換にして、エミュレーション用プログラ
ムを共通にするとよい。エミュレーション用プロセッサ
やエミュレータの開発効率を向上することができる。
The emulation CPU may make the target CPU compatible and use a common emulation program. The development efficiency of emulation processors and emulators can be improved.

【0193】CPU101及びEMLCPU119の具
体的な構成は、種々変更可能である。汎用レジスタのビ
ット数や本数、コンディションコードレジスタの構成な
どは任意にできる。ブレークの条件も種々変更可能であ
る。半導体集積回路内部に持つことにより、所望の信号
や状態を検出することができる。例えば、ハーバードア
ーキテクチャといった、プログラム用のバスとデータ用
のバスを独立にもつ場合、データ用のバスを内蔵トレー
スメモリに蓄積すれば、エミュレーションインタフェー
スの端子を増やすことなく、データのリード又はライト
値をトレースリストに表示でき、デバック効率を向上で
きる。あるいは、命令レジスタやプログラムカウンタの
内容を内蔵トレースメモリに蓄積すれば、スーパースカ
ラーといった、複数命令を同時に実行する場合も、その
動作を容易に解析できる。
The specific configurations of the CPU 101 and the EML CPU 119 can be variously changed. The number of bits and number of general-purpose registers, the configuration of the condition code register, and the like can be arbitrarily set. Break conditions can also be variously changed. A desired signal or state can be detected by being provided inside the semiconductor integrated circuit. For example, if the program bus and the data bus are independent, such as in the Harvard architecture, storing the data bus in the built-in trace memory allows the data read or write value to be stored without increasing the number of emulation interface terminals. It can be displayed on the trace list, and the debugging efficiency can be improved. Alternatively, if the contents of the instruction register and the program counter are stored in the built-in trace memory, the operation can be easily analyzed even when a plurality of instructions such as superscalar are executed simultaneously.

【0194】アドレス空間の大きさや、バスの具体的な
回路構成についても種々変更可能である。EMLCPU
119が、CPU101によって管理されるアドレス空
間をアクセスする方法は、アドレスによらず、ウィンド
ウビットのような制御ビットで指定してもよい。CPU
101によって管理されるアドレス空間の上位アドレス
あるいは全部のアドレスを所定のエミュレーション制御
レジスタに設定した後、別の所定のエミュレーション制
御レジスタをリード又はライトすると、CPU101に
よって管理されるアドレス空間の所望のアドレスをリー
ド又はライトできるようにしてもよい。この場合は、E
MLCPU119によって管理されるアドレス空間が、
CPU101によって管理されるアドレス空間より広い
必要はない。EMLCPUの論理的・物理的規模を小さ
くすれば、エミュレーション用プロセッサを、マイクロ
コンピュータとして利用することも可能になる。マイク
ロコンピュータとしては不必要なEMLCPUの機能
も、相対的に小さくすることで、エミュレーション用プ
ロセッサとマイクロコンピュータを別個の半導体集積回
路として開発する開発費用の増加に比較して許容できる
場合も考えられる。いわゆるシステムLSIといった、
個別のシステムの多くの機能を取り込み、そのため、少
量多品種となるような場合いは、エミュレーション用プ
ロセッサとマイクロコンピュータを別個に開発すること
は、開発費用及び開発期間の面で望ましくないと考えら
れる。
The size of the address space and the specific circuit configuration of the bus can be variously changed. EMLCPU
The method by which the 119 accesses the address space managed by the CPU 101 may be specified by a control bit such as a window bit without depending on the address. CPU
After setting the upper address or all the addresses of the address space managed by the CPU 101 in a predetermined emulation control register, and reading or writing another predetermined emulation control register, a desired address in the address space managed by the CPU 101 is set. It may be possible to read or write. In this case, E
The address space managed by the MLCPU 119 is
The address space does not need to be wider than the address space managed by the CPU 101. If the logical and physical scale of the EMLCPU is reduced, the emulation processor can be used as a microcomputer. By making the functions of the EMLCPU unnecessary for the microcomputer relatively small, it may be acceptable in comparison with an increase in development costs for developing the emulation processor and the microcomputer as separate semiconductor integrated circuits. So-called system LSI
In cases where many functions of individual systems are incorporated, and therefore the number of products is small and large, developing a separate emulation processor and microcomputer is considered undesirable in terms of development cost and development period. .

【0195】エミュレーションインタフェースの制御信
号の数や種類も任意に変更することができる。エミュレ
ータ専用割り込みの入力検出も変更可能である。入力検
出を選択するビットを設けてもよい。
The number and types of control signals of the emulation interface can be arbitrarily changed. The input detection of the emulator dedicated interrupt can also be changed. A bit for selecting input detection may be provided.

【0196】エミュレーション対象のCPUを複数にす
ることができる。エミュレーション対象のCPUが複数
同時に動作するようなマイクロコンピュータであっても
よいし、エミュレーション対象の複数のCPUの内1個
が排他的に動作するようなエミュレーション用プロセッ
サであってもよい。これらを組合わせたものであっても
よい。エミュレーション対象のCPUとは独立して、E
MLCPUを動作可能にすればよい。
A plurality of CPUs can be emulated. A microcomputer in which a plurality of CPUs to be emulated simultaneously operate may be used, or an emulation processor in which one of a plurality of CPUs to be emulated exclusively operates. These may be combined. E independently of the CPU to be emulated
What is necessary is just to enable the MLCPU.

【0197】また、EMLROM120は、マスクRO
M、PROM、EEPROM、フラッシュメモリなど、
あるいはRAMでなるようなものであっても、EMLC
PU119が実行すべきプログラムを格納するメモリで
あればよい。
The EMLROM 120 has a mask RO
M, PROM, EEPROM, flash memory, etc.
Or even if it is something like a RAM, EMLC
Any memory that stores the program to be executed by the PU 119 may be used.

【0198】内蔵される機能ブロック乃至モジュールの
数・種類、ピン数などについては何等限定されない。タ
イマ、SCIなどの割り込みを要求する機能ブロック、
あるいは、パルス出力回路などの割り込み処理の対象と
なる機能ブロックの種類、機能、数など、これらの選択
方法などには何等制約されない。
The number and type of the built-in functional blocks and modules, the number of pins, and the like are not limited at all. A functional block for requesting an interrupt such as a timer and SCI;
Alternatively, there is no restriction on the method of selecting these, such as the type, function, and number of functional blocks to be subjected to interrupt processing such as a pulse output circuit.

【0199】インタフェースケーブル203は、マイク
ロコンピュータ応用システム200とエミュレーション
用プロセッサ212とを接続するものであればよく、そ
の形態や接続方法は任意にできる。
The interface cable 203 only needs to connect the microcomputer application system 200 and the emulation processor 212, and any form and connection method can be used.

【0200】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野であるエミュ
レーション用プロセッサに適用した場合について説明し
たが、本発明はそれに限定されるものではなく、実チッ
プに適用することもできる。
In the above description, the case where the invention made by the present inventor is mainly applied to an emulation processor, which is a field of application as the background, has been described. However, the present invention is not limited to this. It can also be applied to

【0201】本発明は、少なくともユーザプログラムを
実行させるためのターゲットCPUを含むことを条件に
適用することができる。
The present invention can be applied on condition that at least a target CPU for executing a user program is included.

【0202】[0202]

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

【0203】すなわち、第2CPUは、第1CPUとは
独立してエミュレーション用プログラムを実行するた
め、ブレーク条件が成立した場合でも、第1CPUにお
けるユーザプログラムの実行を停止する必要が無く、第
1CPUでのユーザプログラム実行状態は、実動作に可
能な限り近いものとなる。
That is, since the second CPU executes the emulation program independently of the first CPU, there is no need to stop the execution of the user program in the first CPU even when the break condition is satisfied. The execution state of the user program is as close as possible to the actual operation.

【0204】また、第1バスに結合され、上記第1CP
Uによって管理されるアドレス空間に配置されることに
より、第1CPUからのアクセスが可能にされるととも
に、第2CPUによって管理されるアドレス空間に配置
されることで、第2CPUからのアクセスをも可能にさ
れた資源を設けることにより、第1CPUの動作停止時
間を最小限に抑えながら、第1CPUによって管理され
るアドレス空間に配置された資源のリード又はライトを
行うことができる。
Also, the first CP is connected to the first bus.
By arranging in the address space managed by U, access from the first CPU is enabled, and by arranging in the address space managed by the second CPU, access from the second CPU is also enabled. By providing such resources, the resources arranged in the address space managed by the first CPU can be read or written while the operation stop time of the first CPU is minimized.

【0205】第2バスに結合され、この第2CPUと外
部の間でエミュレーションのためのデータのやり取りを
シリアル形式によって行うためのデバッグインタフェー
スを設けることにより、マイクロプロセッサにおける端
子数の増大を抑えることができる。
By providing a debug interface coupled to the second bus for exchanging data for emulation between the second CPU and the outside in a serial format, an increase in the number of terminals in the microprocessor can be suppressed. it can.

【0206】第1CPUにおける汎用レジスタや命令レ
ジスタなどのように、当該第1CPUによって管理され
るアドレス空間に存在しない資源を、第2CPUによっ
て管理されるアドレス空間に配置することにより、マイ
クロプロセッサの端子数を増やすことなく、第1CPU
における汎用レジスタや命令レジスタなどのモニタやト
レースを可能にし、システム開発装置上に表示したりし
て、また、ブレークやトレース条件に設定可能にするこ
とによって、第1CPUの解析の容易化を図ることがで
きる。
By allocating resources that do not exist in the address space managed by the first CPU, such as general-purpose registers and instruction registers in the first CPU, to the address space managed by the second CPU, the number of terminals of the microprocessor can be reduced. Without increasing the CPU
Simplifies the analysis of the first CPU by enabling monitoring and tracing of general-purpose registers and instruction registers, and displaying them on a system development device and setting break and trace conditions. Can be.

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

【図1】本発明にかかるエミュレータで使用されるエミ
ュレーション用プロセッサの構成例ブロック図である。
FIG. 1 is a block diagram illustrating a configuration example of an emulation processor used in an emulator according to the present invention.

【図2】上記エミュレータの構成例ブロック図である。FIG. 2 is a block diagram showing a configuration example of the emulator.

【図3】上記エミュレーション用プロセッサの別の構成
例ブロック図である。
FIG. 3 is a block diagram illustrating another configuration example of the emulation processor.

【図4】上記エミュレータの別の構成例ブロック図であ
る。
FIG. 4 is a block diagram illustrating another configuration example of the emulator.

【図5】上記エミュレーション用プロセッサの別の構成
例ブロック図である。
FIG. 5 is a block diagram illustrating another configuration example of the emulation processor.

【図6】上記エミュレータの別の構成例ブロック図であ
る。
FIG. 6 is a block diagram illustrating another configuration example of the emulator.

【図7】上記エミュレーション用プロセッサにおけるア
ドレスマップの説明図である。
FIG. 7 is an explanatory diagram of an address map in the emulation processor.

【図8】上記エミュレーション用プロセッサに内蔵され
たトレースインタフェースの構成例ブロック図である。
FIG. 8 is a block diagram showing a configuration example of a trace interface built in the emulation processor.

【図9】上記エミュレータにおけるブレーク制御回路の
構成例ブロック図である。
FIG. 9 is a block diagram illustrating a configuration example of a break control circuit in the emulator.

【図10】上記エミュレーション用プロセッサに内蔵さ
れたデータ代替回路の構成例ブロック図である。
FIG. 10 is a block diagram showing a configuration example of a data replacement circuit built in the emulation processor.

【図11】上記エミュレータの基本的な動作のフローチ
ャートである。
FIG. 11 is a flowchart of a basic operation of the emulator.

【図12】上記エミュレーション用プロセッサにおける
ターゲットCPUの構成例ブロック図である。
FIG. 12 is a block diagram illustrating a configuration example of a target CPU in the emulation processor.

【図13】上記エミュレーション用プロセッサにおける
ターゲットCPUに含まれるレジスタの構成例説明図で
ある。
FIG. 13 is an explanatory diagram of a configuration example of a register included in a target CPU in the emulation processor.

【図14】上記エミュレーション用プロセッサにおける
マイクロコンピュータ部の詳細な構成例ブロック図であ
る。
FIG. 14 is a detailed configuration example block diagram of a microcomputer unit in the emulation processor.

【図15】上記ターゲットCPUにおける低消費電力状
態制御回路の構成例ブロック図である。
FIG. 15 is a block diagram illustrating a configuration example of a low power consumption state control circuit in the target CPU.

【図16】マイクロコンピュータ応用システムの一例と
されるスチルカメラの構成例ブロック図である。
FIG. 16 is a block diagram illustrating a configuration example of a still camera as an example of a microcomputer application system.

【符号の説明】 101 CPU 118 DBGIF 119 EMLCPU 111 I−BSC 200 マイクロコンピュータ応用システム 204 マイクロコンピュータ開発装置本体 212 エミュレーション用プロセッサ 213 システム開発装置 214 表示装置 215 入力装置 IAB,IDB,EAB,EIDB,PAB,PDB
内部バス
DESCRIPTION OF SYMBOLS 101 CPU 118 DBGIF 119 EMLCPU 111 I-BSC 200 Microcomputer application system 204 Microcomputer development device main body 212 Emulation processor 213 System development device 214 Display device 215 Input device IAB, IDB, EAB, EIDB, PAB, PDB
Internal bus

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ユーザプログラムを実行可能な第1中央
処理装置と、 上記第1中央処理装置とは独立してエミュレーション用
プログラムを実行可能な第2中央処理装置と、 上記第1中央処理装置に結合された第1バスと、 上記第2中央処理装置に結合された第2バスと、 上記第1バスと上記第2バスとを結合可能なバス接続手
段と、を含んで一つの半導体基板に形成されたことを特
徴とするマイクロプロセッサ。
A first central processing unit capable of executing a user program; a second central processing unit capable of executing an emulation program independently of the first central processing unit; and a first central processing unit. A first bus coupled to the second central processing unit; a bus connection unit capable of coupling the first bus and the second bus; A microprocessor characterized in that it is formed.
【請求項2】 第1バスに結合され、上記第1中央処理
装置によって管理されるアドレス空間に配置されること
により、上記第1中央処理装置からのアクセスが可能に
されるとともに、上記第2中央処理装置によって管理さ
れるアドレス空間に配置されることで、上記第2中央処
理装置からのアクセスをも可能にされた資源を含む請求
項1記載のマイクロプロセッサ。
2. The communication device according to claim 1, further comprising an address space connected to the first bus and arranged in an address space managed by the first central processing unit. 2. The microprocessor according to claim 1, further comprising resources arranged in an address space managed by the central processing unit so as to enable access from the second central processing unit.
【請求項3】 上記第2バスに結合され、上記第2中央
処理装置と外部との間でエミュレーションのためのデー
タのやり取りをシリアル形式で行うためのデバッグイン
タフェースを含む請求項1又は2記載のマイクロプロセ
ッサ。
3. A debug interface according to claim 1, further comprising a debug interface coupled to said second bus, for exchanging data for emulation between said second central processing unit and an external device in a serial format. Microprocessor.
【請求項4】 上記第1中央処理装置によって管理され
るアドレス空間には存在しない資源が、上記第2中央処
理装置によって管理されるアドレス空間に配置されて成
る請求項1乃至3の何れか1項記載のマイクロプロセッ
サ。
4. A resource according to claim 1, wherein resources not existing in the address space managed by said first central processing unit are arranged in an address space managed by said second central processing unit. The microprocessor according to the item.
【請求項5】 請求項1乃至4の何れか1項記載のマイ
クロプロセッサと、上記マイクロプロセッサとシステム
開発装置との間での信号のやり取りを可能とするための
ホストインタフェースとを含んで成るエミュレータ。
5. An emulator comprising: the microprocessor according to claim 1; and a host interface for enabling signal exchange between the microprocessor and a system development device. .
JP2000115793A 2000-04-11 2000-04-11 Processor and emulator Withdrawn JP2001297012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000115793A JP2001297012A (en) 2000-04-11 2000-04-11 Processor and emulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000115793A JP2001297012A (en) 2000-04-11 2000-04-11 Processor and emulator

Publications (1)

Publication Number Publication Date
JP2001297012A true JP2001297012A (en) 2001-10-26

Family

ID=18627355

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000115793A Withdrawn JP2001297012A (en) 2000-04-11 2000-04-11 Processor and emulator

Country Status (1)

Country Link
JP (1) JP2001297012A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006031496A (en) * 2004-07-20 2006-02-02 Ricoh Co Ltd Interface circuit, asic, and electronic equipment
JP2012133752A (en) * 2010-11-29 2012-07-12 Denso Corp Microcomputer

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006031496A (en) * 2004-07-20 2006-02-02 Ricoh Co Ltd Interface circuit, asic, and electronic equipment
JP4671636B2 (en) * 2004-07-20 2011-04-20 株式会社リコー Interface circuit, ASIC and electronic device
JP2012133752A (en) * 2010-11-29 2012-07-12 Denso Corp Microcomputer
US8700956B2 (en) 2010-11-29 2014-04-15 Denso Corporation Microcomputer

Similar Documents

Publication Publication Date Title
US6449709B1 (en) Fast stack save and restore system and method
US5325512A (en) Circuit emulator
JP3105223B2 (en) Debug peripherals for microcomputers, microprocessors and core processor integrated circuits
US5642489A (en) Bridge between two buses of a computer system with a direct memory access controller with accessible registers to support power management
US6085278A (en) Communications interface adapter for a computer system including posting of system interrupt status
US7131114B2 (en) Debugger breakpoint management in a multicore DSP device having shared program memory
US6301657B1 (en) System and method for booting a computer
US6378064B1 (en) Microcomputer
JP3136257B2 (en) Computer memory interface device
JPH06250871A (en) Cpu core, asic having the cpu core and emulation system provided with the asic
JP4226085B2 (en) Microprocessor and multiprocessor system
JP2001195384A (en) Processor and method for controlling input and output pin of the processor
JPH0696008A (en) Information processor
KR20010006839A (en) Microcomputer, electronic equipment and emulation method
JP3380827B2 (en) Emulator device
JP2001297012A (en) Processor and emulator
CN112181879B (en) APB interface module for DMA controller, DMA controller and chip
JP2010003151A (en) Data processing apparatus
US7689864B2 (en) Processor comprising an integrated debugging interface controlled by the processing unit of the processor
JP2001109708A (en) Microcomputer
JP3839068B2 (en) Semiconductor integrated circuit device
JP3323341B2 (en) Emulation processor and emulator equipped with it
JP2001092686A (en) Semiconductor device
JP2001084161A (en) Data processor
US6282600B1 (en) Method and apparatus of resolving conflicting register access requests from a service processor and system processor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070703