JPH1069401A - Emulator device - Google Patents

Emulator device

Info

Publication number
JPH1069401A
JPH1069401A JP8226639A JP22663996A JPH1069401A JP H1069401 A JPH1069401 A JP H1069401A JP 8226639 A JP8226639 A JP 8226639A JP 22663996 A JP22663996 A JP 22663996A JP H1069401 A JPH1069401 A JP H1069401A
Authority
JP
Japan
Prior art keywords
execution
branch
instruction
memory
stored
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8226639A
Other languages
Japanese (ja)
Inventor
Eisuke Shimomura
英介 下村
Masahiro Okano
正浩 岡野
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.)
Renesas Design Corp
Mitsubishi Electric Corp
Original Assignee
Renesas Design Corp
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Design Corp, Mitsubishi Electric Corp filed Critical Renesas Design Corp
Priority to JP8226639A priority Critical patent/JPH1069401A/en
Publication of JPH1069401A publication Critical patent/JPH1069401A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【課題】 プログラムの実行をブレークさせたときのプ
ログラムカウンタが示す現在のアドレスまでのプログラ
ム実行経路の把握が容易でない課題があった。 【解決手段】 分岐命令が実行されたときの各種情報を
格納するトレース情報格納手段と、前記分岐命令の実行
および復帰命令の実行を検出し、前記復帰命令の実行を
検出したときの前記トレース情報格納手段へ格納されて
いる最新の前記各種情報を前記トレース情報格納手段か
ら削除する分岐・復帰命令実行検出回路と、前記トレー
ス情報格納手段へ格納されている前記各種情報を前記ホ
ストコンピュータからの要求をもとに参照可能にするト
レース情報参照回路とを備えるものである。
(57) [Summary] [Problem] There is a problem that it is not easy to grasp a program execution path to a current address indicated by a program counter when a program execution is broken. SOLUTION: Trace information storing means for storing various kinds of information when a branch instruction is executed, detecting the execution of the branch instruction and execution of a return instruction, and detecting the trace information when the execution of the return instruction is detected A branch / return instruction execution detection circuit for deleting the latest various information stored in the storage means from the trace information storage means, and a request from the host computer for the various information stored in the trace information storage means And a trace information reference circuit that makes it possible to refer to the information based on the trace information.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、マイクロコンピ
ュータシステムの開発を効率良く行うことの出来るエミ
ュレータ装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an emulator device capable of efficiently developing a microcomputer system.

【0002】[0002]

【従来の技術】マイクロコンピュータシステムのプログ
ラム開発では、プログラム上の誤りを発見、修正するた
めの支援システムとしてエミュレータ装置が用いられ
る。図4は、従来のエミュレータ装置の構成を示すシス
テム構成図であり、図において、1はエミュレータ装置
3を制御するためのホストコンピュータ、2はホストコ
ンピュータ1との間でコマンドやデータを送受信する通
信ケーブル、3はターゲットシステム4で動作するプロ
グラムを実行することでデバッグを行うエミュレータ装
置、4はマイクロコンピュータを構成するターゲットシ
ステム、5はターゲットシステム4とエミュレータ装置
3との間を接続したプローブ装置である。このプローブ
装置5の先端は、ターゲットシステム4上のCPU(マ
イクロコンピュータ)パッケージと同一の形状をしてお
り、前記CPUのソケットへ接続される。
2. Description of the Related Art In microcomputer system program development, an emulator device is used as a support system for finding and correcting errors in a program. FIG. 4 is a system configuration diagram showing the configuration of a conventional emulator device. In the figure, reference numeral 1 denotes a host computer for controlling the emulator device 3; and 2, a communication for transmitting and receiving commands and data to and from the host computer 1. A cable 3, an emulator device for debugging by executing a program operating on the target system 4, a target system 4, which constitutes a microcomputer, and a probe device 5, connected between the target system 4 and the emulator device 3. is there. The tip of the probe device 5 has the same shape as a CPU (microcomputer) package on the target system 4 and is connected to a socket of the CPU.

【0003】図5は、エミュレータ装置3の内部構成を
示すブロック図であり、図において、11はエミュレー
ション用マイクロコンピュータ、12はホストコンピュ
ータ1でソースプログラムから変換した機械語によるオ
ブジェクトプログラムを格納するエミュレーションメモ
リである。13はシステムバス、14はホストコンピュ
ータ1から発行されたコマンドを解釈してその解釈に応
じた処理を行い、エミュレータ装置3の各部の制御を行
うモニタ回路、15はシステムバス13を制御するため
のバス制御回路である。
FIG. 5 is a block diagram showing the internal configuration of the emulator device 3. In the figure, reference numeral 11 denotes an emulation microcomputer, and 12 denotes an emulation for storing an object program in a machine language converted from a source program by a host computer 1. Memory. 13 is a system bus, 14 is a monitor circuit that interprets commands issued from the host computer 1 and performs processing according to the interpretation, and controls each unit of the emulator device 3, and 15 is a monitor circuit for controlling the system bus 13. It is a bus control circuit.

【0004】このエミュレータ装置は、プログラムの実
行機能とターゲットシステムの状態やマイクロコンピュ
ータの内部状態を参照する機能を備えている。プログラ
ムの実行機能は、ターゲットシステムを動作させるため
のプログラムをROMに格納することなく、ホストコン
ピュータで作成したプログラムを前記ターゲットシステ
ム上で実行できる機能である。また、ターゲットシステ
ムの状態やマイクロコンピュータの内部状態を参照する
機能は、プログラムの実行を途中で停止させるブレーク
機能を用いてプログラムを断続的に実行させ、前記ター
ゲットシステムの状態や前記マイクロコンピュータのレ
ジスタなどの内部状態を監視する機能である。
This emulator has a function of executing a program and a function of referring to a state of a target system and an internal state of a microcomputer. The program execution function is a function capable of executing a program created by the host computer on the target system without storing a program for operating the target system in the ROM. Further, the function of referring to the state of the target system or the internal state of the microcomputer allows the program to be executed intermittently by using a break function that stops the execution of the program halfway, and the state of the target system or the register of the microcomputer to be executed. It is a function to monitor the internal state such as.

【0005】次に動作について説明する。先ず、ホスト
コンピュータ1上で動作するデバッグソフトウェアを起
動させ、そのデバッグソフトウェアによる操作を行うこ
とでエミュレータ装置3を制御する。このとき、コンパ
イラを使用して作成されたソースプログラムから機械語
に変換されたオブジェクトプログラムがホストコンピュ
ータ1に格納されている。前記デバッグソフトウェアに
よる操作によりホストコンピュータ1からコマンドが発
行されると、そのコマンドをモニタ回路14が解釈し、
その解釈に応じた処理を実行する。この処理では、ホス
トコンピュータ1から送られてくる機械語に変換された
オブジェクトプログラムを受け取り、エミュレーション
メモリ12へ格納する。そして、予めユーザがホストコ
ンピュータ1で設定した条件をそれぞれの回路へ設定す
る。その後、エミュレーションメモリ12へ格納したプ
ログラムをエミュレーション用マイクロコンピュータ1
1に実行させ、必要に応じてプログラム実行をブレーク
させながらユーザはデバッグ作業を進める。このときモ
ニタ回路14はバス制御回路15によりシステムバス1
3を制御する。
Next, the operation will be described. First, debug software operating on the host computer 1 is started, and the emulator device 3 is controlled by performing an operation using the debug software. At this time, an object program converted from a source program created using a compiler into a machine language is stored in the host computer 1. When a command is issued from the host computer 1 by an operation of the debug software, the monitor circuit 14 interprets the command,
The processing according to the interpretation is executed. In this process, an object program converted into a machine language sent from the host computer 1 is received and stored in the emulation memory 12. Then, the conditions set in advance by the user in the host computer 1 are set in the respective circuits. Thereafter, the program stored in the emulation memory 12 is transferred to the emulation microcomputer 1.
1 and the user proceeds with debugging while breaking the program execution as necessary. At this time, the monitor circuit 14 controls the system bus 1 by the bus control circuit 15.
3 is controlled.

【0006】[0006]

【発明が解決しようとする課題】従来のエミュレータ装
置は以上のように構成されているので、プログラムの実
行をブレークさせたときのプログラムカウンタが示す現
在のアドレスまで、どのような経路を経てプログラム動
作が進んできたかを確認するのが容易でない課題があっ
た。
Since the conventional emulator device is configured as described above, the program operation through any path up to the current address indicated by the program counter when the program execution is broken is described. There is a problem that it is not easy to confirm whether the process has progressed.

【0007】このため、複数の場所から呼び出されてい
るサブルーチンの中でプログラムが停止した場合、その
停止したサブルーチンの実行状態がどこの場所から呼び
出されているものなのかを知るためには、スタックに格
納されている戻りアドレスから推定する推定作業が必要
であり、特にスタックに格納されている戻りアドレスの
配置、スタックの先頭を指し示すポインタからのオフセ
ットなどのスタックの形式がサブルーチン毎に異なると
きには前記推定作業が容易でなく、正しい戻りアドレス
を知ることが困難になる課題があった。
For this reason, when a program is stopped in a subroutine called from a plurality of places, it is necessary to determine the execution state of the stopped subroutine from where the program is called from the stack. Estimation from the return address stored in the stack is necessary.Especially when the stack format such as the arrangement of the return address stored in the stack and the offset from the pointer pointing to the top of the stack is different for each subroutine, There is a problem that the estimating operation is not easy and it is difficult to know a correct return address.

【0008】また、サブルーチンへ分岐したときの分岐
アドレスを前記推定作業により求めるためには、スタッ
クへ格納されている戻りアドレスから推測する計算が必
要となり、マイクロコンピュータの命令セットによって
は前記計算が困難になる課題があった。
Further, in order to obtain a branch address when branching to a subroutine by the above-mentioned estimating operation, a calculation inferring from a return address stored in a stack is required, and the calculation is difficult depending on an instruction set of a microcomputer. There was a problem that became.

【0009】この発明は上記のような課題を解決するた
めになされたもので、サブルーチン分岐および割込み分
岐についてのトレース情報をもとにプログラムの実行経
路の把握を容易にしてデバッグを効率的に行うエミュレ
ータ装置を得ることを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and makes it easy to grasp the execution path of a program based on trace information on subroutine branches and interrupt branches, thereby efficiently debugging. An object is to obtain an emulator device.

【0010】[0010]

【課題を解決するための手段】請求項1記載の発明に係
るエミュレータ装置は、分岐命令が実行されたときの各
種情報を順に格納するメモリと、前記分岐命令の実行お
よび復帰命令の実行を検出し、前記分岐命令の実行検出
をもとに前記各種情報を前記メモリへ格納し、前記復帰
命令の実行検出をもとにそのときの前記メモリに格納さ
れている最新の前記各種情報を前記メモリから削除する
分岐・復帰命令実行検出回路と、前記メモリへ格納され
ている前記各種情報を前記ホストコンピュータからの要
求をもとに参照可能にするトレース情報参照回路とを備
えるようにしたものである。
According to an embodiment of the present invention, there is provided an emulator device for storing a memory for sequentially storing various information when a branch instruction is executed, and detecting execution of the branch instruction and execution of a return instruction. The various information is stored in the memory based on the detection of the execution of the branch instruction, and the latest various information stored in the memory at that time is stored in the memory based on the detection of the execution of the return instruction. And a trace information reference circuit that enables the various information stored in the memory to be referred to based on a request from the host computer. .

【0011】請求項2記載の発明に係るエミュレータ装
置は、サブルーチン分岐命令の実行および割込み分岐命
令の実行とサブルーチン分岐先からの復帰命令の実行お
よび割込み分岐先からの復帰命令の実行を検出する分岐
・復帰命令実行検出回路を備えるようにしたものであ
る。
According to a second aspect of the present invention, there is provided an emulator for executing a subroutine branch instruction, executing an interrupt branch instruction, executing a return instruction from a subroutine branch destination, and detecting execution of a return instruction from an interrupt branch destination. A return instruction execution detection circuit is provided.

【0012】請求項3記載の発明に係るエミュレータ装
置は、プログラム実行中のアドレスバス、データバス、
命令フェッチ信号および命令実行信号を監視しサブルー
チン分岐命令の実行、割込み分岐命令の実行、サブルー
チン分岐先からの復帰命令の実行および割込み分岐先か
らの復帰命令の実行を検出する分岐・復帰命令実行検出
回路を備えるようにしたものである。
According to a third aspect of the present invention, there is provided an emulator device comprising an address bus, a data bus,
Branch / return instruction execution detection that monitors the instruction fetch signal and the instruction execution signal to detect execution of a subroutine branch instruction, execution of an interrupt branch instruction, execution of a return instruction from a subroutine branch destination, and execution of a return instruction from an interrupt branch destination. A circuit is provided.

【0013】請求項4記載の発明に係るエミュレータ装
置は、分岐命令の実行を検出するとサブルーチン分岐命
令ならびに割込み分岐命令の実行時の実行アドレスおよ
び予め決められたアドレスに格納された索引データなど
の各種情報をメモリへ格納し、サブルーチン分岐からの
復帰命令の実行や割込み分岐からの復帰命令の実行を検
出すると前記メモリに格納されているサブルーチン分岐
命令ならびに割込み分岐命令の実行時の最新の前記実行
アドレスおよび前記索引データを削除する分岐・復帰命
令実行検出回路を備えるようにしたものである。
The emulator device according to the present invention, when detecting the execution of a branch instruction, executes various addresses such as an execution address at the time of execution of a subroutine branch instruction and an interrupt branch instruction and index data stored at a predetermined address. When information is stored in a memory and execution of a return instruction from a subroutine branch or execution of a return instruction from an interrupt branch is detected, the latest execution address at the time of execution of the subroutine branch instruction and the interrupt branch instruction stored in the memory. And a branch / return instruction execution detection circuit for deleting the index data.

【0014】請求項5記載の発明に係るエミュレータ装
置は、サブルーチン分岐命令または割込み分岐命令の実
行を検出したときのそれら分岐命令の実行アドレスがモ
ニタ回路により設定されたアドレス範囲にあると、前記
分岐命令のアドレスをメモリに格納し、アドレス比較回
路に設定されたデータ格納指定情報が各種情報を前記メ
モリへ格納することを示していると、前記アドレス比較
回路に設定されたアドレスへの書き込みをリード・ライ
ト信号比較回路が検出することでデータ保存レジスタに
格納されているデータを索引データとして前記メモリに
格納し、また復帰命令の実行を検出したときのアドレス
が前記アドレス範囲にあり前記データ格納指定情報が前
記各種情報を前記メモリに格納することを示している
と、前記データ保存レジスタに格納されている前記デー
タと一致する索引データをもとに最新の前記分岐命令の
アドレスおよびその索引データを前記メモリから削除す
る分岐・復帰命令実行検出回路を有した履歴データ保存
回路を備えるようにしたものである。
According to a fifth aspect of the present invention, when the execution address of the branch instruction when the execution of the subroutine branch instruction or the interrupt branch instruction is detected is in the address range set by the monitor circuit, the branch is executed. If the address of the instruction is stored in the memory and the data storage designation information set in the address comparison circuit indicates that various information is stored in the memory, the writing to the address set in the address comparison circuit is read. The data stored in the data storage register is stored in the memory as index data upon detection by the write signal comparison circuit, and the address when the execution of the return instruction is detected is within the address range and the data storage designation If the information indicates that the various information is stored in the memory, the data storage A history data storage circuit having a branch / return instruction execution detection circuit for deleting the address of the latest branch instruction and the index data from the memory based on index data matching the data stored in the register; It is like that.

【0015】[0015]

【発明の実施の形態】以下、この発明の実施の一形態を
説明する。 実施の形態1.図1は、この実施の形態1のエミュレー
タ装置の履歴データ保存回路の構成を示すブロック図で
ある。この実施の形態1のエミュレータ装置のシステム
構成は図4に示した従来のエミュレータ装置のシステム
構成と同様であり、この実施の形態のエミュレータ装置
のシステム構成図として図4を使用して説明する。図1
において、31はアドレス比較回路、32はリード・ラ
イト信号比較回路、33はデータ保存レジスタ、34は
システムバスおよびステータス信号線を監視してサブル
ーチン分岐命令または割込み分岐命令を検出する分岐・
復帰命令実行検出回路、35は分岐履歴データを保存す
るメモリである。36はデータ保存レジスタ33に格納
されたデータを保存するメモリ領域であり、メモリ35
内に設けられている。また、36a,36b,36c・
・・36gはデータ保存レジスタ33に格納されたデー
タが保存されるメモリ領域であり、メモリ35内に設け
られている。37a,37b,37c・・・37gは、
サブルーチン分岐実行命令または割込み分岐実行命令の
実行時のプログラムカウンタ値が格納されるメモリ領域
でありメモリ35内に設けられている。39はメモリ3
5へ格納されている前記分岐履歴データなどの各種情報
をホストコンピュータ1からの要求をもとに参照可能に
する機能を有したモニタ回路(トレース情報参照回
路)、100はアドレス比較回路31、リード・ライト
信号比較回路32、データ保存レジスタ33、分岐・復
帰命令実行検出回路34、メモリ35を有した履歴デー
タ保存回路である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below. Embodiment 1 FIG. FIG. 1 is a block diagram showing the configuration of the history data storage circuit of the emulator device according to the first embodiment. The system configuration of the emulator of the first embodiment is the same as the system configuration of the conventional emulator shown in FIG. 4, and the system configuration of the emulator of this embodiment will be described with reference to FIG. FIG.
In the figure, 31 is an address comparison circuit, 32 is a read / write signal comparison circuit, 33 is a data saving register, 34 is a branch / monitor for monitoring a system bus and status signal lines to detect a subroutine branch instruction or an interrupt branch instruction.
The return instruction execution detection circuit 35 is a memory for storing branch history data. A memory area 36 stores data stored in the data storage register 33.
It is provided within. 36a, 36b, 36c
.. 36g is a memory area for storing data stored in the data storage register 33, and is provided in the memory 35. 37a, 37b, 37c ... 37g
A memory area for storing a program counter value at the time of execution of a subroutine branch execution instruction or an interrupt branch execution instruction, which is provided in the memory 35. 39 is memory 3
5, a monitor circuit (trace information reference circuit) having a function of referring to various information such as the branch history data stored in the host computer 1 based on a request from the host computer 1; A history data storage circuit including a write signal comparison circuit 32, a data storage register 33, a branch / return instruction execution detection circuit 34, and a memory 35.

【0016】次に動作について説明する。先ず、プログ
ラムの実行を行う前の初期設定処理として、プログラム
の分岐命令が実行された場合にメモリ35のメモリ領域
36a〜36gに格納されるデータであり、前記分岐命
令が実行されたときのプログラム上での状況(例えば、
I/Oポートが入力または出力に設定されている状況
や、マルチタスク処理が行われるときのタスク種別の状
況など)を示すコード(数値)データ(以下、索引デー
タという)をエミュレータ装置が特定できるようにする
ための基準となるデータをアドレス比較回路31へ設定
する。この基準となるデータは、分岐命令が実行された
ときに前記索引データの格納される予め指定されたメモ
リアドレスであり、例えばリアルタイムOSを用いたプ
ログラムでのタスクID、ポートの入出力設定用のコン
トロールワードなどが格納されるRAMやI/Oのコン
トロールワードレジスタのアドレスであってもよい。ま
た、前記索引データを前記メモリ領域36a〜36gへ
格納しない旨を指定することも可能であり、ホストコン
ピュータ1から与えられるデータ格納指定情報により指
定される。これらデータはモニタ回路39によりアドレ
ス比較回路31へ設定される。また、サブルーチン分岐
・復帰命令や割込み分岐・復帰命令の実行を検出するア
ドレス範囲をホストコンピュータ1からエミュレータ装
置に設定する。このアドレス範囲はモニタ回路39によ
り分岐・復帰命令実行検出回路34に設定される。
Next, the operation will be described. First, as initial setting processing before execution of a program, data stored in the memory areas 36a to 36g of the memory 35 when a branch instruction of the program is executed. The situation above (for example,
The emulator device can specify code (numerical value) data (hereinafter referred to as index data) indicating the status of the input / output of the I / O port or the status of the task type when the multitask processing is performed. Is set in the address comparison circuit 31 as a reference for the operation. The reference data is a previously specified memory address where the index data is stored when the branch instruction is executed. For example, a task ID in a program using a real-time OS, a port ID for input / output setting, It may be an address of a control word register of RAM or I / O in which a control word or the like is stored. It is also possible to specify that the index data is not stored in the memory areas 36a to 36g, which is specified by data storage specification information provided from the host computer 1. These data are set in the address comparison circuit 31 by the monitor circuit 39. Further, an address range for detecting execution of a subroutine branch / return instruction or an interrupt branch / return instruction is set from the host computer 1 to the emulator device. This address range is set in the branch / return instruction execution detection circuit 34 by the monitor circuit 39.

【0017】以上の初期設定終了後、プログラムを実行
する。そして、このプログラムの実行中、索引データを
前記メモリ領域へ格納する旨が指定されていると、アド
レス比較回路31とリード・ライト信号比較回路32に
よるシステムバスの監視によりアドレス比較回路31に
設定された前記アドレスへメモリ書き込みがあったこと
が検出されると、前記アドレスへ書き込まれた前記索引
データがデータ保存レジスタ33へ転送される。
After the above-mentioned initialization is completed, the program is executed. During execution of this program, if it is specified that the index data is to be stored in the memory area, the address comparison circuit 31 and the read / write signal comparison circuit 32 monitor the system bus and set the index data in the address comparison circuit 31. When it is detected that the memory has been written to the address, the index data written to the address is transferred to the data storage register 33.

【0018】分岐・復帰命令実行検出回路34は、サブ
ルーチン分岐命令または割込み分岐命令を検出したとき
にその分岐命令を実行したアドレスが前記設定されてい
るアドレス範囲にあると、その分岐命令を実行したアド
レスをメモリ領域37a〜37gへ格納し、索引データ
の格納の指定があるときにはデータ保存レジスタ33に
転送され格納されている前記索引データを前記メモリ領
域36a〜36gへ同時に格納する。この場合、メモリ
領域36a〜36gへ格納される前記索引データおよび
メモリ領域37a〜37gへ格納される前記分岐命令を
実行したアドレスは順次メモリ35の下側へ格納されて
いく。
The branch / return instruction execution detection circuit 34 executes a branch instruction when a subroutine branch instruction or an interrupt branch instruction is detected and an address at which the branch instruction is executed is within the set address range. The addresses are stored in the memory areas 37a to 37g, and when index data is specified to be stored, the index data transferred to and stored in the data storage register 33 is simultaneously stored in the memory areas 36a to 36g. In this case, the index data stored in the memory areas 36a to 36g and the address of the executed branch instruction stored in the memory areas 37a to 37g are sequentially stored below the memory 35.

【0019】また、分岐・復帰命令実行検出回路34
は、サブルーチン復帰命令または割込み復帰命令を検出
したときにその復帰命令を実行したアドレスが前記設定
されているアドレス範囲にあるか否かを判定する。この
結果、前記復帰命令を実行したアドレスが前記アドレス
範囲にあり、かつ索引データを前記メモリ領域へ格納す
る旨が指定されていると、データ保存レジスタ33に保
存されている索引データと一致する最新のメモリ内容
(この場合、メモリ領域36g,37gのメモリ内容)
をメモリ35から削除する。また、索引データを前記メ
モリ領域へ格納する旨が指定されていないときには最も
新しいデータを削除する。
A branch / return instruction execution detection circuit 34
Determines whether an address at which the return instruction is executed is within the set address range when a subroutine return instruction or an interrupt return instruction is detected. As a result, when the address at which the return instruction is executed is within the address range and the instruction to store the index data in the memory area is specified, the latest data that matches the index data stored in the data storage register 33 is used. Memory contents (in this case, the memory contents of the memory areas 36g and 37g)
Is deleted from the memory 35. When it is not specified to store the index data in the memory area, the latest data is deleted.

【0020】従って、図2に示すようなサブルーチン分
岐を繰り返しネストが深くなるプログラム構造において
は、メモリ35へ図3に示すような索引データと分岐命
令のアドレスが格納され、復帰命令により最新のメモリ
内容(分岐アドレス)が削除される。すなわち、メモリ
35へ格納されたサブルーチンS3への分岐命令のアド
レス“分岐C”はサブルーチンS3における復帰命令
“復帰A”の実行により削除され、またメモリ35へ格
納されたサブルーチンS2への分岐命令のアドレス“分
岐B”はサブルーチンS2における復帰命令“復帰B”
の実行により削除され、またメモリ35へ格納された最
初の分岐命令のアドレス“分岐A”はサブルーチンS1
における復帰命令“復帰C”の実行により削除され、メ
モリ35へ格納された分岐命令のアドレス“分岐D”は
そのプログラムにおける復帰命令“復帰D”の実行によ
り削除される。この場合の索引データは、データ格納指
定情報により索引データを前記メモリ領域へ格納する旨
が指定されていることでメモリ35へ格納される。例え
ば前記基準となるデータにより指定されたレジスタに対
しプログラム上で意味付けされている内部状態であり、
例えばI/Oの入出力状態の識別データ(一例として
“01”のときには“入力”、“02”のときには“出
力”)などであり、分岐経路を把握しようとする際にユ
ーザが着目する状態を示している情報である。
Therefore, in a program structure in which the nest is deepened by repeating the subroutine branch as shown in FIG. 2, the index data and the address of the branch instruction as shown in FIG. The content (branch address) is deleted. That is, the address "branch C" of the branch instruction to the subroutine S3 stored in the memory 35 is deleted by executing the return instruction "return A" in the subroutine S3, and the address of the branch instruction to the subroutine S2 stored in the memory 35 is deleted. Address "branch B" is a return instruction "return B" in subroutine S2.
Is executed, and the address "branch A" of the first branch instruction stored in the memory 35 is stored in the subroutine S1.
And the address "branch D" of the branch instruction stored in the memory 35 is deleted by executing the return instruction "return D" in the program. The index data in this case is stored in the memory 35 because the data storage specification information specifies that the index data is stored in the memory area. For example, an internal state that is given on a program for a register specified by the reference data,
For example, it is I / O input / output state identification data (for example, “input” when “01”, “output” when “02”), and a state that the user pays attention to when trying to grasp a branch route. Is the information indicating.

【0021】そして、ブレークポイントBrPでプログ
ラムをブレークした場合、メモリ35には図3に示すブ
レークポイントBrPより上側の分岐アドレスAと分岐
アドレスBおよびその索引データが格納されている状態
になる。分岐アドレスCは“復帰命令A”により削除さ
れている。従って、メモリ35に格納された索引データ
や分岐アドレスからブレークポイントBrPまでのプロ
グラムの分岐経路が容易に把握されることになる。
When the program breaks at the break point BrP, the memory 35 stores the branch address A and the branch address B above the break point BrP shown in FIG. 3 and the index data thereof. The branch address C has been deleted by the "return instruction A". Therefore, the branch path of the program from the index data or the branch address stored in the memory 35 to the break point BrP can be easily grasped.

【0022】次に、現在実行が停止している関数(サブ
ルーチンまたは割込みルーチン)から復帰するまでのプ
ログラム実行機能について説明する。この場合、プログ
ラムを実行する前に先ず分岐命令を実行した際に索引デ
ータを前記メモリ領域へ格納しない旨の指定をデータ格
納指定情報により行う。なお、この指定は前記索引デー
タを前記メモリ領域へ格納する旨の指定であってもよ
い。また、サブルーチン分岐命令およびサブルーチン復
帰命令、または割込み分岐命令および割込み復帰命令の
実行を検出するアドレスの範囲として全アドレスをホス
トコンピュータ1からエミュレータ装置の分岐・復帰命
令実行検出回路34へ設定する。
Next, a description will be given of a program execution function until returning from a function (subroutine or interrupt routine) whose execution is currently stopped. In this case, when the branch instruction is first executed before executing the program, designation that the index data is not stored in the memory area is performed by the data storage designation information. This designation may be a designation to store the index data in the memory area. In addition, all addresses are set from the host computer 1 to the branch / return instruction execution detection circuit 34 of the emulator device as a range of addresses for detecting execution of the subroutine branch instruction and the subroutine return instruction, or the execution of the interrupt branch instruction and the interrupt return instruction.

【0023】以上の初期設定を行った後、任意の関数内
でブレークさせる。その後、実行が停止している関数か
ら復帰するまでのプログラムの実行は、メモリ35から
最新の分岐アドレスを取得してそのアドレスの命令の次
の先頭アドレスを実行する直前までプログラムを実行す
ることになる。つまり、ブレークポイントが図3のBr
Pであった場合には、メモリ35から最新の分岐アドレ
ス“分岐B”を取得してそのアドレスの命令の次の先頭
アドレスを実行する直前までプログラムを実行する。
After the above initial setting, a break is made in an arbitrary function. Thereafter, the execution of the program until returning from the function whose execution has stopped is performed by acquiring the latest branch address from the memory 35 and executing the program until immediately before executing the first address next to the instruction at that address. Become. That is, the break point is Br in FIG.
If it is P, the latest branch address “branch B” is obtained from the memory 35 and the program is executed until immediately before the execution of the next head address of the instruction at that address.

【0024】次に、図1のエミュレータ装置によるリア
ルタイムOSを用いたプログラム上でのタスク毎のサブ
ルーチン分岐履歴を取得する機能について説明する。先
ずプログラムを実行する前に初期設定として、リアルタ
イムOSの現在実行中のタスクIDが格納されるアドレ
スを、ホストコンピュータ1からエミュレータ装置のア
ドレス比較回路31へ設定する。また、サブルーチン分
岐命令およびサブルーチン復帰命令、または割込み分岐
命令および割込み復帰命令の実行を検出するアドレスの
範囲として、リアルタイムOSのカーネル以外のアドレ
ス範囲をホストコンピュータ1からエミュレータ装置の
分岐・復帰命令実行検出回路34へ設定する。そして、
前記割込み分岐命令および前記割込み復帰命令を実行し
た際に索引データを前記メモリ領域へ格納する旨の指定
を行う。
Next, the function of acquiring the subroutine branch history for each task on the program using the real-time OS by the emulator device of FIG. 1 will be described. First, before executing the program, as an initial setting, the address where the task ID of the currently executing task of the real-time OS is stored is set from the host computer 1 to the address comparison circuit 31 of the emulator device. Also, as an address range for detecting execution of a subroutine branch instruction and a subroutine return instruction, or an interrupt branch instruction and an interrupt return instruction, an address range other than the kernel of the real-time OS is detected from the host computer 1 by the branch / return instruction execution of the emulator device. Set to circuit 34. And
When the interrupt branch instruction and the interrupt return instruction are executed, designation is made that index data is stored in the memory area.

【0025】以上の初期設定を行った後、任意の関数内
でブレークさせる。このとき、サブルーチン分岐命令ま
たは割込み分岐命令の実行時のプログラムカウンタ値が
メモリ領域37aからメモリ35へ保存されている。ま
た、前記サブルーチン分岐命令または前記割込み分岐命
令を実行したタスクIDが索引データとしてメモリ領域
36aからメモリ35へ保存されている。従って、タス
ク毎のサブルーチン分岐履歴や割込み分岐履歴は、メモ
リ35からタスク番号毎にメモリ領域37aからメモリ
35へ保存されているプログラムカウンタ値から取得す
ることが可能となる。
After performing the above initial settings, a break is made in an arbitrary function. At this time, the program counter value at the time of execution of the subroutine branch instruction or the interrupt branch instruction is stored in the memory 35 from the memory area 37a. Further, the task ID that has executed the subroutine branch instruction or the interrupt branch instruction is stored in the memory 35 from the memory area 36a as index data. Therefore, the subroutine branch history and the interrupt branch history for each task can be acquired from the memory 35 for each task number from the program counter value stored in the memory 35 from the memory area 37a.

【0026】[0026]

【発明の効果】以上のように、請求項1記載の発明によ
れば、分岐命令が実行されたときの各種情報を順に格納
するメモリと、前記分岐命令の実行および復帰命令の実
行を検出し、前記分岐命令の実行検出をもとに前記各種
情報を前記メモリへ格納し、前記復帰命令の実行検出を
もとにそのときの前記メモリに格納されている最新の前
記各種情報を前記メモリから削除する分岐・復帰命令実
行検出回路と、前記メモリへ格納されている前記各種情
報を前記ホストコンピュータからの要求をもとに参照可
能にするトレース情報参照回路とを備えるように構成し
たので、前記分岐命令や前記復帰命令による分岐動作や
復帰動作を複雑に繰り返すプログラムの実行を途中でブ
レークしたときのプログラム実行経路を、前記メモリに
格納されている前記各種情報をもとに容易に把握でき、
特に分岐先から戻ってきたときの当該分岐命令が実行さ
れたときの前記各種情報は最新の各種情報として削除さ
れ、前記メモリに保存されている前記各種情報は、分岐
先から復帰していない状況にある分岐命令が実行された
ときの各種情報が順に保存されている状態にあるため、
前記メモリに保存されている前記各種情報から復帰途中
のプログラム実行経路を容易に把握できる効果がある。
As described above, according to the first aspect of the present invention, a memory for sequentially storing various information when a branch instruction is executed, and an execution of the branch instruction and an execution of a return instruction are detected. Storing the various types of information in the memory based on the detection of the execution of the branch instruction, and retrieving the latest various types of information stored in the memory at that time based on the detection of the execution of the return instruction from the memory. A branch / return instruction execution detection circuit to be deleted, and a trace information reference circuit that makes it possible to refer to the various information stored in the memory based on a request from the host computer. The program execution path when the execution of the program in which the branch operation and the return operation by the branch instruction and the return instruction are complicatedly repeated is broken in the middle of the execution of the program is stored in the memory. Easily can be grasped on the basis of the various types of information,
In particular, the above-mentioned various information when the branch instruction is executed when returning from the branch destination is deleted as the latest various information, and the various information stored in the memory is not returned from the branch destination. Since the various information at the time when the branch instruction is executed is stored in order,
There is an effect that the program execution path during the return can be easily grasped from the various information stored in the memory.

【0027】請求項2記載の発明によれば、サブルーチ
ン分岐命令の実行および割込み分岐命令の実行およびサ
ブルーチン分岐からの復帰命令の実行および割込み分岐
からの復帰命令の実行を分岐・復帰命令実行検出回路が
検出するように構成したので、サブルーチン分岐および
割込み分岐による分岐動作や前記サブルーチン分岐およ
び前記割込み分岐からの復帰動作を複雑に繰り返すプロ
グラムの実行を途中でブレークしたときのプログラム実
行経路を、前記メモリに格納されている前記各種情報を
もとに容易に把握でき、特に前記サブルーチン分岐や前
記割込み分岐先から戻ってきたときの当該分岐命令が実
行されたときの前記各種情報は最新の各種情報として削
除され、前記メモリに保存されている前記各種情報は、
分岐先から復帰していない状況にある分岐命令が実行さ
れたときの各種情報が順に保存されている状態にあるた
め、前記メモリに保存されている前記各種情報を参照す
ることで前記サブルーチン分岐や前記割込み分岐先から
の復帰途中のプログラム実行経路を容易に把握できる効
果がある。
According to the second aspect of the present invention, execution of a subroutine branch instruction, execution of an interrupt branch instruction, execution of a return instruction from a subroutine branch, and execution of a return instruction from an interrupt branch are executed by a branch / return instruction execution detection circuit. Is configured to detect a program execution path when a break in the execution of a program that repeatedly repeats a branch operation by a subroutine branch and an interrupt branch and a return operation from the subroutine branch and the interrupt branch in the middle is performed by the memory. Can be easily grasped based on the various information stored in the subroutine branch and the various information when the branch instruction is executed when returning from the interrupt branch destination is executed as the latest various information. The various types of information deleted and stored in the memory are:
Since various information at the time of execution of a branch instruction that is not returning from the branch destination is stored in order, by referring to the various information stored in the memory, the subroutine branch and the There is an effect that the program execution path during the return from the interrupt branch destination can be easily grasped.

【0028】請求項3記載の発明によれば、プログラム
実行中のアドレスバス、データバス、命令フェッチ信号
および命令実行信号を監視してサブルーチン分岐命令の
実行や割込み分岐命令の実行を検出すると各種情報をメ
モリへ格納し、サブルーチン分岐からの復帰命令の実行
や割込み分岐からの復帰命令の実行を検出するとそのと
きの前記メモリに格納されている最新の前記各種情報を
前記メモリから削除する分岐・復帰命令実行検出回路を
備えるように構成したので、プログラム実行中のアドレ
スバス、データバス、命令フェッチ信号および命令実行
信号によるサブルーチン分岐命令の実行検出や割込み分
岐命令の実行検出をもとに前記メモリに格納した前記各
種情報により、前記サブルーチン分岐命令および前記割
込み分岐命令による分岐動作やサブルーチン分岐先およ
び割込み分岐先からの前記復帰命令による復帰動作を複
雑に繰り返すプログラムの実行を途中でブレークしたと
きのプログラム実行経路を容易に把握でき、特に前記サ
ブルーチン分岐や前記割込み分岐先から戻ってきたとき
の当該分岐命令が実行されたときの前記各種情報は最新
の各種情報として削除され、前記メモリに保存されてい
る前記各種情報は、分岐先から復帰していない状況にあ
る分岐命令が実行されたときの各種情報が順に保存され
ている状態にあるため、前記メモリに保存されている前
記各種情報を参照することで前記サブルーチン分岐や前
記割込み分岐先からの復帰途中のプログラム実行経路を
容易に把握できる効果がある。
According to the third aspect of the present invention, when the execution of a subroutine branch instruction or the execution of an interrupt branch instruction is detected by monitoring an address bus, a data bus, an instruction fetch signal and an instruction execution signal during execution of a program, various types of information are obtained. When the execution of a return instruction from a subroutine branch or the execution of a return instruction from an interrupt branch is detected, the latest various information stored in the memory at that time is deleted from the memory. With the configuration including the instruction execution detection circuit, the memory is stored in the memory based on the detection of the execution of the subroutine branch instruction or the detection of the execution of the interrupt branch instruction by the address bus, the data bus, the instruction fetch signal and the instruction execution signal during the program execution. According to the various information stored, the subroutine branch instruction and the interrupt branch instruction A program execution path can be easily grasped when a program breaks in the middle of execution of a program in which a branch operation, a subroutine branch destination, and a return operation by the return instruction from the interrupt branch destination are complicatedly performed. In particular, the subroutine branch and the interrupt branch destination can be easily grasped. The various information at the time of execution of the branch instruction when returning from is deleted as the latest various information, and the various information stored in the memory is a branch which is not returned from the branch destination. Since the various information at the time of execution of the instruction is stored in order, the program execution during the return from the subroutine branch or the interrupt branch destination can be performed by referring to the various information stored in the memory. There is an effect that the route can be easily grasped.

【0029】請求項4記載の発明によれば、サブルーチ
ン分岐命令および割込み分岐命令が実行されたときの実
行アドレスおよび予め決められたアドレスに格納された
索引データを各種情報として順に格納するメモリと、プ
ログラム実行中のアドレスバス、データバス、命令フェ
ッチ信号および命令実行信号を監視することで前記サブ
ルーチン分岐命令の実行、前記割込み分岐命令の実行、
サブルーチン分岐先からの復帰命令の実行および割込み
分岐先からの復帰命令の実行を検出し、前記分岐命令の
実行を検出すると前記各種情報を前記メモリへ格納し、
前記復帰命令の実行を検出すると、そのときの前記メモ
リに格納されている最新の前記各種情報を前記メモリか
ら削除する分岐・復帰命令実行検出回路を備えるように
構成したので、前記サブルーチン分岐命令および前記割
込み分岐命令による分岐動作や前記サブルーチン分岐先
および前記割込み分岐先からの前記復帰命令による復帰
動作を複雑に繰り返すプログラムの実行を途中でブレー
クしたときのプログラム実行経路を、前記メモリに格納
されている前記実行アドレスおよび前記索引データなど
の各種情報をもとに容易に把握でき、特に前記サブルー
チン分岐や前記割込み分岐先から戻ってきたときの当該
分岐命令が実行されたときの前記各種情報は最新の各種
情報として削除され、前記メモリに保存されている前記
各種情報は、分岐先から復帰していない状況にある分岐
命令が実行されたときの各種情報が順に保存されている
状態にあるため、前記メモリに保存されている前記各種
情報を参照することで前記サブルーチン分岐や前記割込
み分岐先からの復帰途中のプログラム実行経路を容易に
把握できる効果がある。
According to the present invention, a memory for sequentially storing, as various information, an execution address when a subroutine branch instruction and an interrupt branch instruction are executed and index data stored at a predetermined address, Monitoring the address bus, data bus, instruction fetch signal and instruction execution signal during execution of the program to execute the subroutine branch instruction, execute the interrupt branch instruction,
Detecting the execution of the return instruction from the subroutine branch destination and the execution of the return instruction from the interrupt branch destination, and storing the various information in the memory when detecting the execution of the branch instruction;
When the execution of the return instruction is detected, a branch / return instruction execution detection circuit that deletes the latest various information stored in the memory at that time from the memory is provided. A program execution path when a break in the execution of a program that repeats the branch operation by the interrupt branch instruction and the return operation by the return instruction from the subroutine branch destination and the interrupt branch destination in a complicated manner is stored in the memory. Can be easily grasped on the basis of various information such as the execution address and the index data, and in particular, the various information at the time of execution of the branch instruction when returning from the subroutine branch or the interrupt branch destination is updated. Are deleted as various types of information and stored in the memory, Since the various information at the time of execution of the branch instruction in a state not returning from the state is stored in order, the subroutine branch and the interruption can be performed by referring to the various information stored in the memory. There is an effect that the program execution path during the return from the branch destination can be easily grasped.

【0030】請求項5記載の発明によれば、サブルーチ
ン分岐命令または割込み分岐命令の実行を検出したとき
のそれら分岐命令の実行アドレスがモニタ回路により設
定されたアドレス範囲にあると、前記分岐命令のアドレ
スをメモリに格納し、アドレス比較回路に設定されたデ
ータ格納指定情報が各種情報を前記メモリへ格納するこ
とを示していると、前記アドレス比較回路に設定された
アドレスへの書き込みをリード・ライト信号比較回路が
検出することでデータ保存レジスタに格納されているデ
ータを索引データとして前記メモリに格納し、また復帰
命令の実行を検出したときのアドレスが前記アドレス範
囲にあり前記データ格納指定情報が前記各種情報を前記
メモリに格納することを示していると、前記データ保存
レジスタに格納されている前記データと一致する索引デ
ータをもとに最新の前記分岐命令のアドレスおよびその
索引データを前記メモリから削除する分岐・復帰命令実
行検出回路を有した履歴データ保存回路を備えるように
構成したので、前記分岐命令による分岐動作や前記復帰
命令による復帰動作を複雑に繰り返すプログラムの実行
を途中でブレークしたときのプログラム実行経路を、前
記メモリに格納されている前記分岐命令のアドレスや前
記索引データが示しているシステムの動作状態などの各
種情報をもとに容易に把握でき、特に前記サブルーチン
分岐や前記割込み分岐先から戻ってきたときの当該分岐
命令が実行されたときの前記各種情報は最新の各種情報
として削除され、前記メモリに保存されている前記各種
情報は、分岐先から復帰していない状況にある分岐命令
が実行されたときの各種情報が順に保存されている状態
にあるため、前記メモリに保存されている前記各種情報
を参照することで前記サブルーチン分岐や前記割込み分
岐先からの復帰途中のプログラム実行経路を容易に把握
できる効果がある。
According to the invention described in claim 5, when the execution address of the subroutine branch instruction or the execution of the interrupt branch instruction is detected within the address range set by the monitor circuit when the execution of the branch instruction is detected, When the address is stored in the memory, and the data storage designation information set in the address comparison circuit indicates that various information is stored in the memory, writing to the address set in the address comparison circuit is read / write. The data stored in the data storage register is stored in the memory as index data by detection by the signal comparison circuit, and the address when the execution of the return instruction is detected is in the address range and the data storage designation information is When indicating that the various information is stored in the memory, the information is stored in the data storage register. And a history data storage circuit having a branch / return instruction execution detection circuit for deleting the address of the latest branch instruction and the index data from the memory based on the index data matching the data. Therefore, the program execution path at the time of a break during the execution of a program that repeats the branch operation by the branch instruction and the return operation by the return instruction in a complicated manner is determined by the address of the branch instruction stored in the memory and the index data. Can be easily grasped on the basis of various information such as the operating state of the system indicated by the above, and in particular, the various information at the time of execution of the branch instruction when returning from the subroutine branch or the interrupt branch destination is updated. The various information stored in the memory is not restored from the branch destination. Since the various information at the time of execution of the branch instruction in the current situation is sequentially stored, the return from the subroutine branch or the interrupt branch destination can be performed by referring to the various information stored in the memory. There is an effect that the program execution path on the way can be easily grasped.

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

【図1】 この発明の実施の形態1のエミュレータ装置
の履歴データ保存回路の構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a history data storage circuit of an emulator device according to Embodiment 1 of the present invention.

【図2】 この発明の実施の形態1によるエミュレータ
装置の動作を説明するためのプログラム構造を示す説明
図である。
FIG. 2 is an explanatory diagram showing a program structure for explaining an operation of the emulator device according to the first embodiment of the present invention;

【図3】 この発明の実施の形態1によるエミュレータ
装置のメモリへ保存された索引データおよび分岐アドレ
スなどの各種情報を示す説明図である。
FIG. 3 is an explanatory diagram showing various information such as index data and branch addresses stored in a memory of the emulator device according to the first embodiment of the present invention.

【図4】 従来のエミュレータ装置を示すシステム構成
図である。
FIG. 4 is a system configuration diagram showing a conventional emulator device.

【図5】 従来のエミュレータ装置の内部構成を示すブ
ロック図である。
FIG. 5 is a block diagram showing an internal configuration of a conventional emulator device.

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

1 ホストコンピュータ、3 エミュレータ装置、31
アドレス比較回路、32 リード・ライト信号比較回
路、33 データ保存レジスタ、34 分岐・復帰命令
実行検出回路、35 メモリ、39 モニタ回路(トレ
ース情報参照回路)。
1 host computer, 3 emulator devices, 31
Address comparison circuit, 32 read / write signal comparison circuit, 33 data storage register, 34 branch / return instruction execution detection circuit, 35 memory, 39 monitor circuit (trace information reference circuit).

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 マイクロコンピュータシステムに適用す
るプログラムの誤りをホストコンピュータの制御のもと
で検索するエミュレータ装置において、分岐命令が実行
されたときの各種情報を順に格納するメモリと、前記分
岐命令の実行および復帰命令の実行を検出し、前記分岐
命令の実行検出をもとに前記各種情報を前記メモリへ格
納し、前記復帰命令の実行検出をもとにそのときの前記
メモリに格納されている最新の前記各種情報を前記メモ
リから削除する分岐・復帰命令実行検出回路と、前記メ
モリへ格納されている前記各種情報を前記ホストコンピ
ュータからの要求をもとに参照可能にするトレース情報
参照回路とを備えていることを特徴とするエミュレータ
装置。
1. An emulator for searching for an error in a program applied to a microcomputer system under the control of a host computer, a memory for sequentially storing various information when a branch instruction is executed, The execution and return instructions are detected, the various information is stored in the memory based on the detection of the execution of the branch instruction, and the information is stored in the memory at that time based on the detection of the execution of the return instruction. A branch / return instruction execution detection circuit for deleting the latest various information from the memory, a trace information reference circuit for enabling the various information stored in the memory to be referred based on a request from the host computer; An emulator device comprising:
【請求項2】 分岐・復帰命令実行検出回路が検出する
分岐命令の実行はサブルーチン分岐命令の実行および割
込み分岐命令の実行であり、前記分岐・復帰命令実行検
出回路が検出する復帰命令の実行はサブルーチン分岐か
らの復帰命令の実行および割込み分岐からの復帰命令の
実行であることを特徴とする請求項1記載のエミュレー
タ装置。
2. The execution of a branch instruction detected by a branch / return instruction execution detection circuit is the execution of a subroutine branch instruction and the execution of an interrupt branch instruction. The execution of a return instruction detected by the branch / return instruction execution detection circuit is 2. The emulator according to claim 1, wherein execution of a return instruction from a subroutine branch and execution of a return instruction from an interrupt branch are performed.
【請求項3】 分岐・復帰命令実行検出回路は、プログ
ラム実行中のアドレスバス、データバス、命令フェッチ
信号および命令実行信号を監視してサブルーチン分岐命
令の実行や割込み分岐命令の実行を検出すると各種情報
をメモリへ格納し、サブルーチン分岐からの復帰命令の
実行や割込み分岐からの復帰命令の実行を検出するとそ
のときの前記メモリに格納されている最新の前記各種情
報を前記メモリから削除することを特徴とする請求項1
または請求項2記載のエミュレータ装置。
3. A branch / return instruction execution detection circuit monitors an address bus, a data bus, an instruction fetch signal and an instruction execution signal during execution of a program and detects various types of execution of a subroutine branch instruction or an interrupt branch instruction. When information is stored in a memory and execution of a return instruction from a subroutine branch or execution of a return instruction from an interrupt branch is detected, the latest various types of information stored in the memory at that time are deleted from the memory. Claim 1.
Or the emulator device according to claim 2.
【請求項4】 分岐・復帰命令実行検出回路が分岐命令
の実行を検出したときにメモリへ格納する各種情報は、
サブルーチン分岐命令ならびに割込み分岐命令の実行時
の実行アドレスおよび予め決められたアドレスに格納さ
れた索引データであり、分岐・復帰命令実行検出回路が
サブルーチン分岐からの復帰命令の実行や割込み分岐か
らの復帰命令の実行を検出したときに削除する前記メモ
リに格納されている各種情報は、サブルーチン分岐命令
ならびに割込み分岐命令の実行時の最新の前記実行アド
レスおよび前記索引データであることを特徴とする請求
項3記載のエミュレータ装置。
4. Various information stored in a memory when a branch / return instruction execution detection circuit detects execution of a branch instruction is:
The execution address at the time of execution of a subroutine branch instruction and an interrupt branch instruction, and index data stored at a predetermined address. The branch / return instruction execution detection circuit executes a return instruction from a subroutine branch or returns from an interrupt branch. 4. The method according to claim 1, wherein the various information stored in the memory to be deleted when the execution of the instruction is detected are the latest execution address and the index data at the time of execution of the subroutine branch instruction and the interrupt branch instruction. 3. The emulator device according to 3.
【請求項5】 各種情報をメモリに格納するか否かを示
すホストコンピュータから与えられたデータ格納指定情
報と索引データの格納される予め決められたアドレスと
が設定されるアドレス比較回路と、システムバス上のリ
ード信号・ライト信号を監視するリード・ライト信号比
較回路と、前記アドレス比較回路に設定された前記アド
レスへの書き込みを前記リード・ライト信号比較回路が
検出したときの前記アドレスへ書き込まれたデータの格
納されるデータ保存レジスタと、サブルーチン分岐命令
または割込み分岐命令の実行を検出したときにその実行
された分岐命令のアドレスが予め設定されたアドレス範
囲にあると、前記分岐命令のアドレスを前記メモリに格
納し、前記データ格納指定情報が前記各種情報を前記メ
モリへ格納することを示していると前記データ保存レジ
スタに格納されているデータを索引データとして前記メ
モリに格納し、また復帰命令の実行を検出したときのア
ドレスが前記アドレス範囲にあり前記データ格納指定情
報が前記各種情報を前記メモリに格納することを示して
いると、前記データ保存レジスタに格納されている前記
データと一致する索引データをもとに最新の前記分岐命
令のアドレスおよびその索引データを前記メモリから削
除する分岐・復帰命令実行検出回路とを有した履歴デー
タ保存回路と、サブルーチン分岐命令および該サブルー
チン分岐先から復帰する復帰命令、または割込み分岐命
令および該割込み分岐先から復帰する復帰命令の各実行
を前記分岐・復帰命令実行検出回路が検出する際の前記
アドレス範囲をホストコンピュータから前記分岐・復帰
命令実行検出回路へ設定するモニタ回路とを備えている
ことを特徴とする請求項1記載のエミュレータ装置。
5. An address comparison circuit for setting data storage designation information provided from a host computer indicating whether or not various information is stored in a memory and a predetermined address where index data is stored, and a system. A read / write signal comparison circuit for monitoring a read / write signal on the bus; and a write to the address when the read / write signal comparison circuit detects writing to the address set in the address comparison circuit. When the execution of a subroutine branch instruction or an interrupt branch instruction is detected and the address of the executed branch instruction is within a preset address range, the address of the branch instruction is stored. Storing in the memory, the data storage designation information storing the various information in the memory Indicates that the data stored in the data storage register is stored in the memory as index data, and the address when the execution of the return instruction is detected is in the address range, and the data storage designation information is When indicating that information is stored in the memory, the latest address of the branch instruction and the index data thereof are deleted from the memory based on the index data matching the data stored in the data storage register. A history data storage circuit having a branch / return instruction execution detection circuit for executing each execution of a subroutine branch instruction and a return instruction returning from the subroutine branch destination, or an interrupt branch instruction and a return instruction returning from the interrupt branch destination. The address range when the branch / return instruction execution detection circuit detects Emulator device according to claim 1, characterized in that a monitor circuit for setting to the branch-return instruction execution detection circuit.
JP8226639A 1996-08-28 1996-08-28 Emulator device Pending JPH1069401A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8226639A JPH1069401A (en) 1996-08-28 1996-08-28 Emulator device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8226639A JPH1069401A (en) 1996-08-28 1996-08-28 Emulator device

Publications (1)

Publication Number Publication Date
JPH1069401A true JPH1069401A (en) 1998-03-10

Family

ID=16848342

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8226639A Pending JPH1069401A (en) 1996-08-28 1996-08-28 Emulator device

Country Status (1)

Country Link
JP (1) JPH1069401A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009059005A (en) * 2007-08-29 2009-03-19 Panasonic Corp DEBUG SYSTEM, DEBUG DEVICE AND METHOD

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009059005A (en) * 2007-08-29 2009-03-19 Panasonic Corp DEBUG SYSTEM, DEBUG DEVICE AND METHOD

Similar Documents

Publication Publication Date Title
US6052774A (en) Apparatus and method for identifying exception routines indicated by instruction address issued with an instruction fetch command
US5070476A (en) Sequence controller
JP2003015906A (en) Remote debugging method and device
EP0638864A1 (en) Development support system for microcomputer with internal cache
JP2003508864A (en) Thread-oriented debugging
US5903719A (en) Emulator apparatus and emulation method for efficiently analyzing program faults
JPH06103104A (en) Remote debugging method
KR960014825B1 (en) Information processing system
JPS61204703A (en) Developing device for engine control computer system
JPH0581087A (en) Processor monitoring system
JPS6120900B2 (en)
JP2506591B2 (en) Auxiliary processor
JPH07152598A (en) Incircuit emulator
JPS63177231A (en) Debug system for parallel program
JP3130798B2 (en) Bus transfer device
JP2954006B2 (en) Emulation device and emulation method
JP2817473B2 (en) Debug system
JPH10187480A (en) emulator
JPH11167501A (en) Program debugging system and program debugging method
JPH09293000A (en) In-circuit emulator device
JPH05173830A (en) Abnormal operation detecting method and emulator
JPH0782447B2 (en) DMA data transfer control device
JP2000353109A (en) Emulator and emulation system
JPS6227421B2 (en)
JPH0772874B2 (en) Interrupt receiving device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050927

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051004

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060214

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060223

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060310