JPH10326203A - Debugging devices capable of taking over operation from each other between hardware environments while running programs therein - Google Patents

Debugging devices capable of taking over operation from each other between hardware environments while running programs therein

Info

Publication number
JPH10326203A
JPH10326203A JP9163127A JP16312797A JPH10326203A JP H10326203 A JPH10326203 A JP H10326203A JP 9163127 A JP9163127 A JP 9163127A JP 16312797 A JP16312797 A JP 16312797A JP H10326203 A JPH10326203 A JP H10326203A
Authority
JP
Japan
Prior art keywords
command
state information
format
target
verification target
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
JP9163127A
Other languages
Japanese (ja)
Inventor
Motohide Nishihata
素秀 西畑
Yoshiyuki Iwamura
喜之 岩村
Fumio Sumi
史生 角
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP9163127A priority Critical patent/JPH10326203A/en
Publication of JPH10326203A publication Critical patent/JPH10326203A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To complement advantages and disadvantages of hardware environments having mutually different functions with each other and to enable supervisory control by specifying a switching source and a switching destination and reading operation state information from a switching source operation-verified object, and converting and setting a form in a switching destination operation-verified object. SOLUTION: A built-in program developed for a trial machine 30 is run on trial by either of its emulator machine (host computer) or software simulator (host computer 1) to verify the operation. If a specific indication by an operator is detected here, a stored operation-verified object is specified as a switching source operation-verified object and an operation-verified object different from it is specified as a switching destination operation-verified object. The operation state information is read out of the switching source and converted to the format of the switching destination. Then the operation information which is converted in format is set in the switching destination operation-verified object and the operation of the built-in program is restarted at the switching destination operation-verified object.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、組み込み用途プロ
グラムのデバッグを行うデバッグ装置に関する。
The present invention relates to a debugging device for debugging an embedded application program.

【0002】[0002]

【従来の技術】今日の家電製品にとってマイコンシステ
ムは必要不可欠な存在である。家電製品向けのプログラ
ムの開発は、大量生産に耐え得る品質が要求されるの
で、デバッグ作業の徹底が求められる。ここでいうデバ
ッグ作業とは プログラムをハードウェア環境上で動作
させ、その動作時において現れた不具合(バグ)の原因
を追究してこれを修正する作業をいう。
2. Description of the Related Art A microcomputer system is indispensable for today's home electric appliances. Developing programs for home appliances requires quality that can withstand mass production, so thorough debugging is required. The debugging work here refers to the work of running a program on a hardware environment, pursuing the cause of a defect (bug) that appeared during the operation, and correcting it.

【0003】プログラム(デバッグされるプログラムで
あるから、被デバッグプログラムという)の動作形態に
は、以下の〜のものがある 被デバッグプログラムを家電製品の試作機上で動作さ
せるもの。 被デバッグプログラムを評価ボード上で動作させるも
の。 被デバッグプログラムをホストコンピュ−タ上のシミ
ュレータを用いて模擬動作させるもの。
[0003] The operation modes of a program (referred to as a program to be debugged, which is referred to as a program to be debugged) include the following. Runs the program to be debugged on the evaluation board. A program that simulates a program to be debugged using a simulator on the host computer.

【0004】のようなハードウェア環境の形態は、プ
ログラムのモニタリングを行なうことを主目的にしたも
のである。プログラムのモニタリングを主目的としたハ
ードウェア環境は『モニタ型』という略称で称呼され
る。モニタ型のハードウェア環境は、ターゲットのマイ
クロコンピュータやマイクロプロセッサの試作機が完成
した際、その動作確認や簡単なデバッグ作業にもっぱら
使用される。
[0004] The form of the hardware environment as described above is mainly for monitoring a program. A hardware environment whose main purpose is to monitor a program is referred to by an abbreviation “monitor type”. When a prototype of a target microcomputer or microprocessor is completed, the monitor-type hardware environment is used exclusively for checking its operation and for simple debugging.

【0005】のようなハードウェア環境の形態は、イ
ンサーキットエミュレータと、様々なデバッグ用ツール
とを用いた高度なデバッグ作業を可能としている。この
ようなハードウェア環境は『ICE(In-Circuit Emulator)
型』という略称で称呼される。のようなハードウェア
環境の形態は、シミュレータ型と呼ばれる。シミュレー
タには、命令レベルのもの、論理レベルのものの二種類
がある。命令レベルソフトウェアシミュレータとは、マ
イクロコンピュータやマイクロプロセッサの命令をホス
トのオペレーティングシステム上のソフトウェアでシミ
ュレーション実行させることによりマイクロコンピュー
タやマイクロプロセッサと同じ実行状態を模擬的に他ホ
スト上に作りだすソフトウェアシステムである。
[0005] Such a hardware environment mode enables an advanced debugging operation using an in-circuit emulator and various debugging tools. Such a hardware environment is called ICE (In-Circuit Emulator)
Type ". Such a form of the hardware environment is called a simulator type. There are two types of simulators, one at the instruction level and one at the logic level. An instruction-level software simulator is a software system that simulates the execution state of a microcomputer or microprocessor on another host by simulating the instructions of the microcomputer or microprocessor with software on the host operating system. .

【0006】論理レベルソフトウェアシミュレータと
は、通常マイクロコンピュータやマイクロプロセッサの
チップの設計に使用され、ハードウェアと同じ動作を他
ホスト上にソフトウェアでシミュレーション実行するも
のである。
The logic level software simulator is usually used for designing a microcomputer or a chip of a microprocessor, and simulates the same operation as hardware on another host by software.

【0007】[0007]

【発明が解決しようとする課題】ところで上記の3つの
形態のハードウェア環境には、動作検証能力に限界があ
る。モニタ型ハードウェア環境の動作検証能力の限界と
は、モニタリングを前提にしたハードウェア環境である
から、動作検証中にバグが発見されても、その原因を解
析する能力が不充分であり、バグ発生に思うように対処
できない点である。ICE型ハードウェア環境では、トレ
ース機能を用いてプログラム実行の履歴を確認する等の
対処が可能であるが、モニタ型ハードウェア環境では、
メモリを多く用いるトレース機能等は利用できない場合
が多く、操作者は、貧弱な機能を駆使して原因を追求せ
ねばならない。また、ターゲットマシンの使用時の様々
なケースを想定しての動作確認が不充分となる点も軽視
できない。『ターゲットマシンの使用時の様々なケー
ス』の代表的なものには、プログラムの多重割り込み発
生時や、指定時刻での割り込み発生時の動作確認等、割
込発生に関連するものが多い。これらをターゲットマシ
ン上で実現するには、ハードウェアの一部改造等が必要
となるが、現実問題としてこのような改造はそうた易く
行えるものではなく、ターゲットマシンで動作確認でき
る内容は限られてしまう。
However, the above three types of hardware environments have a limit in their operation verification capability. The limitation of the operation verification capability of the monitor-type hardware environment is the hardware environment that presupposes monitoring, so even if a bug is found during operation verification, the ability to analyze the cause is insufficient, and It is a point that cannot be dealt with as expected. In the ICE type hardware environment, it is possible to take measures such as checking the history of program execution using the trace function, but in the monitor type hardware environment,
In many cases, a trace function or the like that uses a lot of memory cannot be used, and the operator must pursue the cause by making use of poor functions. Further, it cannot be underestimated that the operation check assuming various cases when the target machine is used is insufficient. Representative examples of "various cases when using the target machine" include those related to the occurrence of interrupts, such as when a program generates multiple interrupts or when an interrupt occurs at a specified time. To implement these on the target machine, some modification of the hardware is necessary, but as a practical matter, such modification is not so easy and the contents that can be confirmed on the target machine are limited. Would.

【0008】ICE型ハードウェア環境の動作検証能力の
限界とは、所詮ターゲットマシンとは回路構成が違う点
である。即ち、評価ボード上でたとえ完全に動作するに
ように見えても、その動作により出荷OKか否かの最終
判断を下すことはできない。またターゲットマシンの正
規の形態ではないため、周辺機器をも含めた動作検証が
不充分な場合がある。何故なら評価ボードにおける配線
長は、試作機実物のものよりも長い場合があり、この長
さ故に、周辺機器の制御にタイムラグが生じていること
も多々ある。このようなタイムラグのため、ICE型ハー
ドウェア環境における周辺機器をも含めた動作検証は厳
密さに欠けてしまう。
The limitation of the operation verification capability of the ICE type hardware environment is that the circuit configuration is different from that of the target machine. In other words, even if it appears to operate completely on the evaluation board, it is not possible to make a final decision as to whether or not the shipment is OK by the operation. In addition, since the target machine is not in a proper form, operation verification including peripheral devices may be insufficient. This is because the wiring length of the evaluation board may be longer than that of the actual prototype, and there is often a time lag in the control of peripheral devices due to this length. Due to such a time lag, the operation verification including peripheral devices in the ICE type hardware environment is not strict.

【0009】ソフトウェアシミュレータ型ハードウェア
環境の限界とは、シュミレータ自体がホストコンピュ−
タを利用して動作しているため、プログラムの動作がモ
ニタ型またはICE型よりもかなり鈍くなるという点であ
る。例えば、ICE型やモニタ型のハードウェア環境にお
いて1秒で処理が終了するものが、数分から数十分かか
ってしまう。
The limitation of the software simulator type hardware environment is that the simulator itself is a host computer.
The operation of the program is much slower than that of the monitor or ICE type. For example, in an ICE-type or monitor-type hardware environment, processing that takes one second to complete takes several minutes to several tens of minutes.

【0010】個々ハードウェア環境の動作検証能力の限
界のため、バグ原因作業の究明が捗らない場合、開発者
はバグが発生した当時の状況を別のハードウェア環境に
おいて再現したいと考える。しかし他のハードウェア環
境で再現するには、バグ発生当時のレジスタ、メモリの
保持値を他のハードウェア環境上に設定したり、マイク
ロコンピュータやマイクロプロセッサのプログラムを最
初から実行し直す等の試行錯誤を繰り返す必要がある。
このようにバグ発生当時の状況を再現するために試行錯
誤を繰り返せば、多くの開発時間が無駄に費やされてし
まう。
[0010] If the investigation of the cause of the bug is not progressed due to the limitation of the operation verification ability of the individual hardware environment, the developer wants to reproduce the situation at the time when the bug occurred in another hardware environment. However, in order to reproduce it in another hardware environment, it is necessary to set the value of the register and memory held at the time of the bug occurrence on the other hardware environment, or to re-execute the microcomputer or microprocessor program from the beginning It is necessary to repeat mistakes.
Repeating trial and error to reproduce the situation at the time of the bug occurrence wastes a lot of development time.

【0011】本発明の目的は、それぞれが異なる機能を
有するハードウェア環境の長所,短所を互いに補完しあ
えるように、統括して制御することができるデバッグ装
置を提供することである。本発明の別の目的は、開発者
の手間を煩わせることなく、バグ発生時のハードウェア
環境により近い状況を他のハードウェア環境上で再現す
ることができるデバッグ装置を提供することである。
It is an object of the present invention to provide a debugging device which can be controlled in an integrated manner so that the advantages and disadvantages of hardware environments having different functions can be complemented with each other. Another object of the present invention is to provide a debugging device that can reproduce a situation closer to a hardware environment at the time of occurrence of a bug on another hardware environment without bothering a developer.

【0012】[0012]

【課題を解決するための手段】上記の目的を達成するデ
バッグ装置は、所定のターゲットマシン向けに開発され
た組み込みプログラムを当該ターゲットマシン、当該タ
ーゲットマシンのエミュレータマシン、当該ターゲット
マシンのソフトウェアシミュレータのうち、何れかにお
いてテスト動作させ、これの動作検証を行うデバッグ装
置であって、前記ターゲットマシン、エミュレータマシ
ン、ソフトウェアシミュレータは、組み込みプログラム
の動作状態を示す動作状態情報を有し、動作状態情報の
入出力を固有の様式にて行い、ターゲットマシン、当該
ターゲットマシンのエミュレータマシン、当該ターゲッ
トマシンのソフトウェアシミュレータのうち何れかを動
作検証対象として記憶する動作検証対象記憶手段と、操
作者によるコマンド入力を受け付ける受付手段と、受付
手段が受け付けたコマンド内に所定指示が含まれていれ
ばこれを検出する検出手段と、所定指示が検出される
と、動作検証対象記憶手段に記憶されている動作検証対
象を切換元動作検証対象に指定し、受付手段が受け付け
たコマンドに基づいて前記ターゲットマシン、当該ター
ゲットマシンのエミュレータマシン、当該ターゲットマ
シンのソフトウェアシミュレータのうち切換元動作検証
対象と異なるものを切換先動作検証対象に指定する指定
手段と、切換元及び切換先が指定されると、切換元動作
検証対象から動作状態情報を読み出す読出手段と、読み
出された動作状態情報を、切換先動作検証対象の様式に
変換する変換手段と、動作状態情報が切換先の様式に変
換されれば、様式が変換された動作状態情報を切換先動
作検証対象に設定する設定手段と、動作状態情報が設定
されると、組み込みプログラムの動作を切換先動作検証
対象において再開するよう制御する動作再開手段とを備
えることを特徴としている。
A debugging apparatus for achieving the above object is a program for executing a built-in program developed for a predetermined target machine by using the target machine, the emulator machine of the target machine, or the software simulator of the target machine. A target device, an emulator machine, and a software simulator having operation state information indicating an operation state of an embedded program, and inputting the operation state information. Operation verification target storage means for performing output in a specific format and storing any one of a target machine, an emulator machine of the target machine, and a software simulator of the target machine as a target of operation verification; Receiving means for receiving an input, detecting means for detecting a predetermined instruction included in a command received by the receiving means, if detected, and an operation stored in the operation verification target storage means when the predetermined instruction is detected The verification target is designated as the switching source operation verification target, and the target machine, the emulator machine of the target machine, and the software simulator of the target machine which are different from the switching source operation verification target are switched based on the command received by the receiving unit. Designation means for designating the first operation verification target, reading means for reading the operation state information from the switching source operation verification target when the switching source and the switching destination are specified, and reading the operation state information for the switching destination operation verification A conversion means for converting to the target format; and, if the operation status information is converted to the switching destination format, the operation status for which the format has been converted. Setting means for setting information as a switching destination operation verification target, and operation resuming means for controlling operation of the embedded program to be restarted in the switching destination operation verification target when the operation state information is set. .

【0013】[0013]

【発明の実施の形態】以降デバッグ装置の実施形態につ
いて説明する。本デバッグ装置のハードウェア構成は汎
用コンピュ−タにICE制御ボード22、シリアル転送ポ
ート31を接続して構成される。図1は、本デバッグ装
置の外観図である。家電機器の試作機30はモニタ型の
ハードウェア環境を構築する。モニタ型であるから、組
み込み用途のプログラムが格納されたROMを有し、当
該被デバッグプログラムを試作機30上で動作させるこ
とができる。試作機30における被デバッグプログラム
はホストコンピュ−タ1の管轄下にあり、被デバッグプ
ログラムの動作開始、動作終了は、シリアル回線40を
介したホストコンピュ−タ1からの指示があって初めて
行われる。ホストコンピュ−タ1は試作機30上のメモ
リ、レジスタ等記憶資源のアクセス権も有し、所望のタ
イミングで、試作機30の記憶資源の内容を記憶資源の
状態情報として読み出すことができる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a debugging device will be described below. The hardware configuration of the debugging apparatus is configured by connecting an ICE control board 22 and a serial transfer port 31 to a general-purpose computer. FIG. 1 is an external view of the debugging device. The home electric appliance prototype 30 constructs a monitor-type hardware environment. Since it is a monitor type, it has a ROM in which a program for embedded use is stored, and the program to be debugged can be operated on the prototype 30. The program to be debugged in the prototype 30 is under the jurisdiction of the host computer 1, and the operation of the program to be debugged and the operation end are performed only when instructed by the host computer 1 via the serial line 40. . The host computer 1 also has access rights to storage resources such as memories and registers on the prototype 30 and can read the contents of the storage resources of the prototype 30 as storage resource status information at a desired timing.

【0014】評価ボード20は、被デバッグプログラム
を動作させることができる。評価ボード20における被
デバッグプログラムもホストコンピュ−タ1の管轄下に
あり、被デバッグプログラムの動作開始、動作終了は、
パラレル回線28を介したホストコンピュ−タ1からの
指示に従い行う。ホストコンピュ−タ1は評価ボード2
0上のメモリ、レジスタ等記憶資源のアクセス権も有
し、所望のタイミングで、評価ボード20の記憶資源の
内容を記憶資源の状態情報として読み出すことができ
る。
The evaluation board 20 can operate a program to be debugged. The program to be debugged on the evaluation board 20 is also under the jurisdiction of the host computer 1.
This is performed in accordance with an instruction from the host computer 1 via the parallel line 28. Host computer 1 is evaluation board 2
It also has access rights to storage resources such as memories and registers on 0, and can read the contents of the storage resources of the evaluation board 20 at desired timings as storage resource status information.

【0015】図2は、デバッグ装置のハードウェア構成
図である。図2に示すように、ホストコンピュ−タ1は
CPU、ディスプレイ、メモリ、ハードディスク、キー
ボードを有する汎用コンピュ−タであり、ICE制御ボー
ド22、シリアル転送ポート31が接続されている。IC
E制御ボード22及びシリアル転送ポート31はそれぞ
れ評価ボード20、試作機30と接続されている。
FIG. 2 is a hardware configuration diagram of the debugging device. As shown in FIG. 2, the host computer 1 is a general-purpose computer having a CPU, a display, a memory, a hard disk, and a keyboard. I c
The E control board 22 and the serial transfer port 31 are connected to the evaluation board 20 and the prototype 30, respectively.

【0016】試作機30上のマイコンシステムのハード
ウェア構成を図3に示す。図3において試作機30は、
プロセッサ33、メモリ34、周辺I/Oレジスタ群35
が実装されている。プロセッサ33は、被デバッグプロ
グラムを構成する機械語命令を逐一読み出す命令読み出
し回路と、読み出された機械語命令を解読する解読器
と、解読結果が演算命令であると解読結果が下された場
合にその特定演算命令の演算を行う演算器と、レジスタ
群と、命令読み出し回路に命令の読み出し先を指示する
プログラムカウンタとを有する。プロセッサ33は専用
端子39を有し、この専用端子39に所定の指示信号が
出力されると、プロセッサ33は試作機30の動作状態
を示す動作状態情報を読み出し、専用端子39を介して
ホストコンピュ−タ1に出力する。
FIG. 3 shows a hardware configuration of the microcomputer system on the prototype 30. In FIG. 3, the prototype 30
Processor 33, memory 34, peripheral I / O register group 35
Has been implemented. The processor 33 includes: an instruction reading circuit that reads out machine language instructions constituting the program to be debugged one by one; a decoder that decodes the read machine language instructions; And an arithmetic unit for performing the operation of the specific operation instruction, a register group, and a program counter for instructing the instruction reading circuit to read the instruction. The processor 33 has a dedicated terminal 39, and when a predetermined instruction signal is output to the dedicated terminal 39, the processor 33 reads out operation state information indicating the operation state of the prototype 30, and outputs the host computer via the dedicated terminal 39. To the data 1.

【0017】メモリ34には、ユーザ空間にモニタリン
グプログラム36と、被デバッグプログラム37と、被
デバッグプログラム37が試作機30内部で作業用に利
用するターゲット内ワークエリア38とが配されてい
る。被デバッグプログラム37は、デバッグの対象とな
る組み込み用途のプログラムであり、試作機30が起動
されるとプロセッサ33により実行される。被デバッグ
プログラム37はモニタリングの対象となるため、モニ
タリング命令が組み込まれている。モニタリング命令と
は、プロセッサ33が専用端子39を介してデータを受
け取ったとき、被デバッグプログラム37からモニタリ
ングプログラム36へと分岐する旨をプロセッサ33に
指示する命令である。
In the memory 34, a monitoring program 36, a program to be debugged 37, and a work area 38 in the target used by the debugged program 37 for work inside the prototype 30 are arranged in the user space. The program to be debugged 37 is an embedded application program to be debugged, and is executed by the processor 33 when the prototype 30 is started. Since the debugged program 37 is to be monitored, a monitoring instruction is incorporated. The monitoring instruction is an instruction for instructing the processor 33 to branch from the debugged program 37 to the monitoring program 36 when the processor 33 receives data via the dedicated terminal 39.

【0018】モニタリングプログラム36は、専用端子
39からのデータの入力待ちをプロセッサ33に行わせ
る。もし専用端子39にデータが入力されると、そのデ
ータに従った動作をプロセッサ33に行わせる。周辺I/
Oレジスタ[i](i=1,2,3・・・n)35は、周辺I/Oの値を保持
するレジスタである。ここで周辺I/Oとは、シリアルイ
ンタフェース、パラレルインタフェース、割り込みコン
トローラ、A/D変換器、D/A変換器、タイマカウン
タなどであり、これらの値が周辺I/Oレジスタに個別に
格納されていることにより、プロセッサ33は任意の周
辺I/Oの値を取り出すことができる。
The monitoring program 36 causes the processor 33 to wait for input of data from the dedicated terminal 39. If data is input to the dedicated terminal 39, the processor 33 performs an operation according to the data. Peripheral I /
The O register [i] (i = 1, 2, 3,..., N) 35 is a register for holding the value of the peripheral I / O. Here, the peripheral I / O is a serial interface, a parallel interface, an interrupt controller, an A / D converter, a D / A converter, a timer counter, and the like. These values are individually stored in a peripheral I / O register. By doing so, the processor 33 can extract an arbitrary peripheral I / O value.

【0019】評価ボード20上のマイコンシステムのハ
ードウェア構成を図4に示す。図4において評価ボード
20は、プロセッサ33に代えてICEチップ23が取り
付けられ、メモリ24、周辺I/Oレジスタ群25を有す
る。メモリ24は、スーパーバイザ空間と、ユーザ空間
とを有する。スーパーバイザ空間にはスーパバイザプロ
グラム26及びデバッグ情報エリア27が配されてお
り、ユーザ空間には被デバッグプログラム37、ターゲ
ット内ワークエリア38が配されている。
FIG. 4 shows a hardware configuration of the microcomputer system on the evaluation board 20. In FIG. 4, the evaluation board 20 is provided with a memory 24 and a peripheral I / O register group 25, in which an ICE chip 23 is attached instead of the processor 33. The memory 24 has a supervisor space and a user space. The supervisor space is provided with a supervisor program 26 and a debug information area 27, and the user space is provided with a program 37 to be debugged and a work area 38 in a target.

【0020】周辺I/Oレジスタ群25は、周辺I/Oであっ
て、評価ボード20上で動作可能なものの保持値を保持
するレジスタである。スーパバイザプログラム26は、
ブレークポイントを設定するブレークポイント設定ツー
ルと、ICEチップ23が命令を実行する度に、実行された
命令のアドレスを蓄積するトレースツールと、操作者が
定めた所定条件の成立、不成立を監視し、当該成立時に
割り込み信号を発生させる割り込み設定ツールとを有す
る。
The peripheral I / O register group 25 is a register that is a peripheral I / O and that holds a value that can be operated on the evaluation board 20. The supervisor program 26
A breakpoint setting tool for setting a breakpoint, a trace tool for storing the address of the executed instruction each time the ICE chip 23 executes an instruction, and monitoring whether a predetermined condition set by the operator is satisfied or not, And an interrupt setting tool for generating an interrupt signal when the condition is satisfied.

【0021】デバッグ情報エリア27は、スーパバイザ
プログラム26がワークエリアとして用いているメモリ
領域であり、前記ブレークポイントの設定先アドレス
と、前記ブレークポイントの動作の有効,無効に関する
ブレークポイント情報と、蓄積された複数の命令アドレ
スからなるトレースデータと、操作者が定めた割り込み
信号発生のための所定条件を示す割込信号発生要件情報
とが格納されている。
The debug information area 27 is a memory area used by the supervisor program 26 as a work area. The debug information area 27 stores the address to which the break point is set, the break point information regarding the validity / invalidity of the operation of the break point, and the like. In addition, trace data including a plurality of instruction addresses and interrupt signal generation requirement information indicating predetermined conditions for generating an interrupt signal determined by an operator are stored.

【0022】図27(a)は、ブレークポイント設定先
アドレスの一例を示す図である。図中の『BREAK_POINT
[1]=0x0020』は一個目のブレークポイントを0x0020から
始まる所定のサイズの領域に設定する旨を示し、『BREA
K_POINT[2]=0x0250』は二個目のブレークポイントを0x0
250から始まる所定のサイズの領域に設定する旨を示し
ている。『BREAK_POINT[3]=0x0300』は、三個目のブレ
ークポイントを0x0300から始まる所定のサイズの領域に
設定する旨を示している。これらのブレークポイント設
定先アドレスは、これまでのスーパバイザプログラム2
6による被デバッグプログラム37のデバッグ時に、操
作者がコマンドを用いてブレークポイントを設定し、プ
ロセッサ33がスーパバイザプログラム26内のブレー
クポイント設定ツールを実行したためにメモリ24に書
き込まれている。
FIG. 27A shows an example of a breakpoint setting destination address. "BREAK_POINT" in the figure
[1] = 0x0020 ”indicates that the first breakpoint is set in an area of a predetermined size starting from 0x0020, and“ BREAK
K_POINT [2] = 0x0250 ”sets the second breakpoint to 0x0
This indicates that the area is set to a predetermined size starting from 250. “BREAK_POINT [3] = 0x0300” indicates that the third breakpoint is set in an area of a predetermined size starting from 0x0300. These breakpoint setting destination addresses are the same as those in the previous supervisor program 2.
When the debugger 37 debugs the program 37 to be debugged, the operator sets a breakpoint using a command, and the processor 33 executes the breakpoint setting tool in the supervisor program 26, so that the data is written in the memory 24.

【0023】図27(b)は、割込信号発生要件の一例
を示す図である。図中の『CONDITION[1]=20cycle,Int
3』は、命令実行が実行時間の単位長の20倍だけ繰り
返された後に、3番の割り込み信号を発生させる旨を示
し、『CONDITION[2]=150cycle,Int5』命令実行が実行時
間の単位長の150倍だけ繰り返された後に、5番の割
り込み信号を発生させる旨を示している。これらの割込
信号発生要件は、これまでの被デバッグプログラム37
のデバッグ時に、操作者が割り込み発生設定操作を行
い、被デバッグプログラム37がスーパバイザプログラ
ム26内の割り込み信号発生ツールを実行したためにメ
モリ24に書き込まれている。
FIG. 27B shows an example of an interrupt signal generation requirement. "CONDITION [1] = 20cycle, Int"
"3" indicates that the third interrupt signal is generated after the instruction execution is repeated 20 times the unit length of the execution time, and "CONDITION [2] = 150cycle, Int5" This indicates that the fifth interrupt signal is generated after being repeated by 150 times the length. The requirements for generating these interrupt signals are as follows.
At the time of debugging, the operator performs an interrupt generation setting operation, and the program to be debugged 37 executes the interrupt signal generation tool in the supervisor program 26, so that the program is written in the memory 24.

【0024】図27(c)は、トレースデータの一例を
示す図である。図中の『0x0000,0x0001,0x0002,0x0003,
0x0004,0x0005,』は、ICEチップ23が、被デバッグプロ
グラム37内の0アドレスx0000の機械語命令,アドレス0
x0001の機械語命令,アドレス0x0002の機械語命令,アド
レス0x0003の機械語命令を既に実行していることを示し
ている。これらのトレースデータは、これまでのICE型
ハードウェア環境による被デバッグプログラム37のデ
バッグ時に、操作者がTRACEコマンドを入力し、プロセ
ッサ33がスーパバイザプログラム26内のトレースツ
ールを実行したためにメモリ24に書き込まれている。
FIG. 27C shows an example of trace data. `` 0x0000,0x0001,0x0002,0x0003,
0x0004,0x0005, ”indicates that the ICE chip 23 executes the machine language instruction at the address x0000 in the program 37 to be debugged,
This indicates that the machine instruction at x0001, the machine instruction at address 0x0002, and the machine instruction at address 0x0003 have already been executed. These trace data are written to the memory 24 because the operator has input a TRACE command and the processor 33 has executed the trace tool in the supervisor program 26 at the time of debugging the program 37 to be debugged by the ICE type hardware environment. Have been.

【0025】ターゲット内ワークエリア38は被デバッ
グプログラムが用いるワークエリアである。図6は、図
1に示したホストコンピュ−タ1の内部階層図である。
ホストコンピュ−タ1の内部階層は、アプリケ−ション
層11、オペレーティングシステム層12、BIOS層1
3、物理層14からなり汎用的なコンピュ−タの階層構
成と何等変わりはない。このような汎用的な階層構成に
おいてアプリケ−ション層11にはシュミレータ10が
存在する。シュミレータ10がアプリケ−ション層11
上に存在するのは、シュミレータ10はオペレーティン
グシステム上で起動するアプリケ−ションプログラムの
一種であることを意味する。ICE制御ボード22及びシ
リアル転送ポート31は物理層14に位置することがわ
かる。ICE制御ボード22については専用のデバイスド
ライバがBIOS層13に存在する(ICE用デバイスドライ
バ21参照)。
The target work area 38 is a work area used by the program to be debugged. FIG. 6 is an internal hierarchical diagram of the host computer 1 shown in FIG.
The internal layers of the host computer 1 include an application layer 11, an operating system layer 12, and a BIOS layer 1.
3. It is composed of the physical layer 14 and is no different from the hierarchical structure of a general-purpose computer. In such a general-purpose hierarchical configuration, the simulator 10 exists in the application layer 11. The simulator 10 is an application layer 11
Existing above means that the simulator 10 is a kind of application program started on the operating system. It can be seen that the ICE control board 22 and the serial transfer port 31 are located on the physical layer 14. For the ICE control board 22, a dedicated device driver exists in the BIOS layer 13 (see the ICE device driver 21).

【0026】シュミレータ10がアプリケ−ション層1
1上に存在するから、シュミレータ型ハードウェア環境
の窓口は、アプリケ−ション層11となる。デバイスド
ライバ21がBIOS層13上に存在するから、ICE型ハー
ドウェア環境の窓口は、BIOS層13となる。シリアル転
送ポート31が物理層14上に存在するから、モニタ型
ハードウェア環境の窓口は、物理層14となる。
The simulator 10 is the application layer 1
Therefore, the window of the simulator type hardware environment is the application layer 11. Since the device driver 21 exists on the BIOS layer 13, the window of the ICE type hardware environment is the BIOS layer 13. Since the serial transfer port 31 exists on the physical layer 14, the window of the monitor-type hardware environment is the physical layer 14.

【0027】窓口が互いに異なる階層に存在するため、
各ハードウェア環境にパラメータを受け渡す際には、パ
ラメータを各階層に適した様式に変更ぜねばならない。
またハードウェア環境同士でパラメータの受け渡す際に
は、様式の変換が必要となる。具体的にはシュミレータ
10はアプリケ−ション層11上に存在するアプリケ−
ションプログラムの一種であるから引数様式によりパラ
メータを受け渡しする必要がある。デバイスドライバ2
1はBIOS層13に存在するデバイスドライバであるか
ら、BIOSコマンド様式によりパラメータを受け渡しする
必要がある。シリアル転送ポート31は物理層14に存
在するから、I/Oポートを用いてパラメータを受け渡し
する必要がある。
Since the windows exist at different levels,
When passing parameters to each hardware environment, the parameters must be changed in a format suitable for each layer.
When parameters are transferred between hardware environments, a format conversion is required. Specifically, the simulator 10 is an application that exists on the application layer 11.
Since it is a type of application program, it is necessary to transfer parameters in an argument format. Device driver 2
1 is a device driver existing in the BIOS layer 13, so it is necessary to transfer parameters in a BIOS command format. Since the serial transfer port 31 exists in the physical layer 14, it is necessary to transfer parameters using an I / O port.

【0028】ICE型、モニタ型、シュミレータ型という
3つのハードウェア環境を管理するため、本装置は、IC
E型、モニタ型、シュミレータ型にそれぞれ、TARGET1,T
ARGET2,TARGET3という識別子を付しており、また図示し
ない原簿テーブルに現状デバッグ対象に設定されている
ハードウェア環境の識別子を登録している。図7は、ア
プリケ−ション層11の内部においてICE型、モニタ
型、シュミレータ10型のハードウェア環境の統合のた
めに形成された階層を示す図である。
In order to manage three hardware environments of an ICE type, a monitor type, and a simulator type, this device uses an IC
TARGET1, T for E type, monitor type and simulator type respectively
The identifiers ARGET2 and TARGET3 are given, and the identifiers of the hardware environments that are currently set to be debugged are registered in a master table (not shown). FIG. 7 is a diagram showing a hierarchy formed for integrating the ICE type, the monitor type, and the simulator 10 type hardware environment inside the application layer 11.

【0029】ターゲット依存層53は、ICE型、モニタ
型、シュミレータ型のハードウェア環境間が用いている
データ様式を引数様式に統一するため階層である。ター
ゲット相互接続層52は、共通様式に統一されたデータ
をICE型、モニタ型、シュミレータ10型が共有し合う
ための階層であり、共有用のワークエリアを含む。
The target dependent layer 53 is a layer for unifying the data format used between the ICE type, monitor type, and simulator type hardware environments into an argument type. The target interconnect layer 52 is a layer for sharing data unified in a common format by the ICE type, the monitor type, and the simulator 10 type, and includes a work area for sharing.

【0030】デバッグ核層51は、いわゆるシンボルデ
バッガのアプリケ−ション部に相当する機能を有する階
層である。ユーザインターフェィス層50は、オペレー
ティングシステム層12の標準入出力ライブラリを用い
てユーザインターフェイスを操作者に提供する階層であ
る。即ち、ユーザインターフェィス層50は、オペレー
ティングシステム層12の標準入出力ライブラリを利用
して、操作者からの指示を仰ぐメッセージをディスプレ
イ2に表示する。コマンドが入力されると、そのコマン
ドの解釈及び実行をデバッグ核層51以下の階層に委ね
る。デバッグ核層51以下の階層が入力されたコマンド
を実行すると、ユーザインターフェィス層50はコマン
ドの実行結果をオペレーティングシステム層12の標準
入出力ライブラリを利用してディスプレイ2に表示す
る。
The debug core layer 51 is a layer having a function corresponding to an application section of a so-called symbol debugger. The user interface layer 50 is a layer that provides a user interface to an operator using a standard input / output library of the operating system layer 12. That is, the user interface layer 50 uses the standard input / output library of the operating system layer 12 to display a message asking for an instruction from the operator on the display 2. When a command is input, interpretation and execution of the command are entrusted to the debug kernel layer 51 and lower layers. When the command in which the layers below the debug kernel layer 51 are input is executed, the user interface layer 50 displays the execution result of the command on the display 2 using the standard input / output library of the operating system layer 12.

【0031】図8は、デバッグ核層51、ターゲット相
互接続層52、ターゲット依存層53のそれぞれの階層
にどのようなモジュールが存在するかを示した図であ
る。本図においてデバッグ核層51には、シンボル-ア
ドレスマップ71、コマンドインタプリタ72、及びコ
マンド変換ルーチン73が存在することがわかる。シン
ボル-アドレスマップ71は、シンボルと、アドレスと
の対応関係を示す情報である。ここでシンボルとは、ソ
ースプログラム内で使用されている変数名,ライブラリ
等をいい、シンボル-アドレスマップ71は、これらシ
ンボルが示す変数名がメモリ領域のどのアドレスに対応
しているかを示す。具体的には、シンボル-アドレスマ
ップ71はメモリサイズ、変数の型、ソースコードの一
文が存在する行の行番号と、その行に対応する実行コー
ドのアドレスとを対応づけるライン情報などから構成さ
れる。
FIG. 8 is a diagram showing what modules are present in the respective layers of the debug kernel layer 51, the target interconnect layer 52, and the target dependent layer 53. In the figure, it can be seen that a symbol-address map 71, a command interpreter 72, and a command conversion routine 73 exist in the debug kernel layer 51. The symbol-address map 71 is information indicating a correspondence between a symbol and an address. Here, the symbol means a variable name, a library, and the like used in the source program, and the symbol-address map 71 indicates which address in the memory area corresponds to the variable name indicated by the symbol. More specifically, the symbol-address map 71 includes a memory size, a type of a variable, line information that associates a line number of a line where one sentence of a source code exists with an address of an execution code corresponding to the line, and the like. You.

【0032】コマンドインタプリタ72は、ユーザイン
ターフェィス層50に対してプログラム開発者が入力し
たコマンドを解析し、その解析内容に従った指示をコマ
ンド変換ルーチン73に通知する。ここでコマンドイン
タプリタ72は、キータイプ入力されたコマンドが図9
に示す体系図内の何れかに該当するものとして解析を行
う。
The command interpreter 72 analyzes a command input by the program developer to the user interface layer 50, and notifies the command conversion routine 73 of an instruction according to the content of the analysis. Here, the command interpreter 72 determines that the command input by the key type is
The analysis is performed assuming that it corresponds to any of the system diagrams shown in.

【0033】図9に記載されているコマンドのうち、ru
nコマンド、stopコマンド、stepコマンド、setBPコマン
ド、clrBPコマンド、SetINTコマンド、readMEMコマン
ド、readREGコマンド、writeMEMコマンド、writeREGコ
マンド、TRACEコマンドは一般的なデバッグ装置向けの
コマンドである。runコマンドは、コマンド発行先に指
定されているハードウェア環境に、被デバッグプログラ
ムの動作開始を指示するコマンドであり、そのオペラン
ドにおいて被デバッグプログラムの動作開始アドレスを
指定させることができる。
Of the commands described in FIG.
The n command, stop command, step command, setBP command, clrBP command, SetINT command, readMEM command, readREG command, writeMEM command, writeREG command, and TRACE command are commands for general debugging devices. The run command is a command for instructing the hardware environment designated as the command issue destination to start the operation of the debugged program, and can specify the operation start address of the debugged program in its operand.

【0034】stopコマンドは、コマンド発行先に指定さ
れているハードウェア環境に、被デバッグプログラムの
動作停止を指示するコマンドである。stepコマンドは、
コマンド発行先に指定されているハードウェア環境に、
被デバッグプログラムの命令を一命令ずつ実行する旨を
指示するコマンドであり、そのオペランドにおいて被デ
バッグプログラムの動作開始アドレスを指定させること
ができる。
The stop command is a command for instructing the hardware environment designated as the command issue destination to stop the operation of the program to be debugged. The step command is
In the hardware environment specified as the command destination,
This command indicates that the instructions of the debugged program are to be executed one instruction at a time, and the operand thereof can specify the operation start address of the debugged program.

【0035】setBPコマンドは、コマンド発行先に指定
されているハードウェア環境に、オペランドに指定され
ている被デバッグプログラム内のアドレスへとブレーク
ポイントを設定させる旨を指示するコマンドである。こ
こでいう『ブレークポイント設定』とは、被デバッグプ
ログラム内に所定の割り込み信号を発生させる命令を書
き込むこと、或は、動作停止すべき被デバッグプログラ
ム内のアドレスをプロセッサ内の所定のレジスタに登録
することをいうが、本実施形態では、これらの動作と共
に、割り込み信号発生命令の書き込み先アドレスもハー
ドウェア環境内のメモリに書き込まれる。
The setBP command is a command for instructing the hardware environment designated as the command issue destination to set a breakpoint at the address in the debugged program designated by the operand. Here, "breakpoint setting" refers to writing an instruction for generating a predetermined interrupt signal in the debugged program or registering an address in the debugged program to be stopped in a predetermined register in the processor. However, in the present embodiment, the write destination address of the interrupt signal generation instruction is also written to the memory in the hardware environment along with these operations.

【0036】clrBPコマンドは、オペランド『breakNO』
で指示される番号のブレークポイントを発生する旨の割
り込み信号発生命令及び当該命令の書き込み先アドレス
を削除するコマンドである。SetINTコマンドは、オペラ
ンド『CycleNumber』で指定された実行時間(この実行
時間は、実行サイクルの整数倍数で表現されることは留
意されたい。)だけ命令実行が繰り返されたかをハード
ウェア環境に監視させ、もし当該実行時間だけ繰り返さ
れれば、オペランド『intNO.』で指示される番号の割込
信号を発生する旨をハードウェア環境に指示するコマン
ドである。
The clrBP command uses the operand "breakNO"
And a command for deleting an interrupt signal generation instruction for generating a breakpoint of the number indicated by the instruction and a write destination address of the instruction. The SetINT command causes the hardware environment to monitor whether instruction execution has been repeated for the execution time specified by the operand “CycleNumber” (note that this execution time is expressed as an integral multiple of the execution cycle). The command instructs the hardware environment to generate an interrupt signal of the number indicated by the operand "intNO." If repeated for the execution time.

【0037】readMEMコマンドは、『TARGET』で指示さ
れたハードウェア環境内のオペランド『s_address』『e
_address』で指示された領域の内容を読み出す旨をハー
ドウェア環境に指示する。readREGコマンドは、オペラ
ンド『register』で指示された番号のレジスタの内容を
読み出す旨をハードウェア環境に指示する。
The readMEM command is executed by the operands "s_address" and "e" in the hardware environment designated by "TARGET".
_address ”is instructed to the hardware environment to read the contents of the area specified. The readREG command instructs the hardware environment to read the contents of the register indicated by the operand “register”.

【0038】writeMEMコマンドは、『TARGET』で指示さ
れたハードウェア環境内のオペランド『address』で指
示されたメモリ領域に『value1』で指示された内容を
書き込む旨をハードウェア環境に指示する。writeREGコ
マンドはオペランド『register』で指示された番号のレ
ジスタに『value2』で指示される内容を書き込む旨を
ハードウェア環境に指示する。
The writeMEM command instructs the hardware environment to write the content specified by "value1" to the memory area specified by the operand "address" in the hardware environment specified by "TARGET". The writeREG command instructs the hardware environment to write the content indicated by “value2” to the register of the number indicated by the operand “register”.

【0039】尚readMEMコマンド、readREGコマンド、wr
iteMEMコマンド、writeREGコマンドはオペランドを変数
で指示することも可能である。変数で指示されている場
合は、コマンドインタプリタ72はシンボル-アドレス
マップ71に登録された情報を参照する。このような情
報を参照することにより、変数が存在しているメモリ上
のアドレスまたはレジスタ種別とサイズの特定ができ
る。変数情報取得後、変数の参照コマンドはコマンドイ
ンタプリタ72により、あるアドレスからサイズ分の情
報をメモリから取得またはあるレジスタの値を取得/設
定するというコマンドに置き換えられ、ターゲット相互
接続層52を介してシュミレータ10、モニタ制御層6
1、ICE制御層62の何れかに通知される。
The readMEM command, readREG command, wr
The iteMEM command and writeREG command can also designate operands by variables. When indicated by a variable, the command interpreter 72 refers to information registered in the symbol-address map 71. By referring to such information, it is possible to specify the address or register type and the size of the register where the variable exists in the memory. After obtaining the variable information, the command for referring to the variable is replaced by the command interpreter 72 with a command for obtaining information corresponding to the size from a certain address from the memory or obtaining / setting the value of a certain register. Simulator 10, monitor control layer 6
1. Notification to any of the ICE control layers 62.

【0040】TRACEコマンドは、ハードウェア環境にお
いて実行された命令のアドレスを蓄積する旨をハードウ
ェア環境に指示する。selectTARGETコマンドは、これま
でコマンド発行先に指定されていたハードウェア環境の
記憶資源の動作状態を他のハードウェア環境に転送する
指示と、デバッグコマンドの発行先を他のハードウェア
環境に切り換える旨の指示とを含むコマンドである。記
憶資源の動作状態を他のハードウェア環境に転送するに
は、ハードウェア環境のターゲット内ワークエリア38
の内容、レジスタの内容、ブレークポイント、割込信号
発生要件情報、周辺I/Oレジスタの内容、トレースデー
タを個別に転送せねばならない。個別転送を実現するた
め、コマンドインタプリタ72は、サブコマンドcopyME
Mコマンド、copyREGコマンド、copyBPコマンド、copyIN
Tコマンド、copyI/Oコマンド、copyTRACE_DATAコマンド
を発行する。
The TRACE command instructs the hardware environment to store the address of an instruction executed in the hardware environment. The selectTARGET command is an instruction to transfer the operation status of the storage resource of the hardware environment specified as the command issue destination to another hardware environment, and a command to switch the debug command issue destination to another hardware environment. Command. To transfer the operating state of the storage resource to another hardware environment, the work area 38 in the target of the hardware environment is used.
Contents, register contents, breakpoints, interrupt signal generation requirement information, peripheral I / O register contents, and trace data must be individually transferred. In order to realize the individual transfer, the command interpreter 72 executes the subcommand copyME
M command, copyREG command, copyBP command, copyIN
Issue T command, copyI / O command, and copyTRACE_DATA command.

【0041】copyMEMコマンドは、現在デバッグに用い
られているハードウェア環境内のメモリ内容のうち、タ
ーゲット内ワークエリア38の内容をselectTARGETコマ
ンドにより指定された切り換え先へと転送するようター
ゲット相互接続層52に指示する。またcopyMEMコマン
ドは、オペランドに転送範囲の開始アドレス−終了アド
レスを記載することにより任意の領域の転送を指定する
ことが可能であり、また全メモリ空間の転送を指定する
スイッチが設定されることにより、全メモリの値を転送
するよう指定することもできる。
The copyMEM command causes the target interconnect layer 52 to transfer the contents of the in-target work area 38 of the memory contents in the hardware environment currently used for debugging to the switching destination specified by the selectTARGET command. To instruct. The copyMEM command can specify the transfer of an arbitrary area by describing the start address-end address of the transfer range in the operand, and by setting a switch that specifies the transfer of the entire memory space, , Can be specified to transfer the values of all memories.

【0042】copyREGコマンドは、現在デバッグに用い
られているハードウェア環境内のレジスタ群の値をsele
ctTARGETコマンドにより指定された切り換え先へと転送
する旨を指示するコマンドである。copyBPコマンドは、
現在デバッグに用いられているハードウェア環境内のメ
モリ内容のうち、ブレークポイントの設定先アドレスを
selectTARGETコマンドにより指定された切り換え先へと
転送する旨を指示するコマンドである。
The copyREG command sets the value of a register group in the hardware environment currently used for debugging to sele.
This is a command for instructing transfer to the switching destination specified by the ctTARGET command. The copyBP command is
Of the memory contents in the hardware environment currently used for debugging, set the breakpoint setting address
This command instructs transfer to the switching destination specified by the selectTARGET command.

【0043】copyINTコマンドは、現在デバッグに用い
られているハードウェア環境内のメモリ内容のうち、割
り込み信号の割込信号発生要件を示す情報をselectTARG
ETコマンドにより指定された切り換え先へと転送する旨
を指示するコマンドである。copyI/Oコマンドは、現在
デバッグに用いられているハードウェア環境内の全ての
周辺I/Oレジスタを、selectTARGETコマンドにより指定
された切り換え先へと転送する旨を指示するコマンドで
ある。
The copyINT command selects information indicating the interrupt signal generation requirement of the interrupt signal from the memory contents in the hardware environment currently used for debugging.
This is a command for instructing transfer to the switching destination specified by the ET command. The copyI / O command is a command for instructing that all peripheral I / O registers in the hardware environment currently used for debugging be transferred to the switching destination specified by the selectTARGET command.

【0044】copyTRACE_DATAコマンドは、現在デバッグ
に用いられているハードウェア環境内のメモリ内容のう
ち、トレースデータをselectTARGETコマンドにより指定
された切り換え先への転送をターゲット相互接続層52
に指示する。デバッグ核層51の構成要素の説明を引き
続き行う。コマンド変換ルーチン73は、コマンドイン
タプリタ72が解釈したコマンド及びコマンドインタプ
リタ72が自動発行したコマンドをより下位レベルに変
換する。ここでいう下位レベルへの変換は、コマンドを
関数呼出コードに変換することをいう。
The copyTRACE_DATA command is used to transfer the trace data of the memory contents in the hardware environment currently used for debugging to the switching destination specified by the selectTARGET command.
To instruct. The description of the components of the debug core layer 51 will be continued. The command conversion routine 73 converts commands interpreted by the command interpreter 72 and commands automatically issued by the command interpreter 72 to lower levels. Here, the conversion to a lower level refers to converting a command into a function call code.

【0045】コマンドインタプリタ72が入力コマンド
をreadMEMコマンド等、状態情報の読み出し命令である
と解釈した際、関数呼出コードTCI_get_mem(adr,lengt
h,unit,image)等の関数呼出コードに変換する。『TCI_g
et_mem』の『TCI』とは、『Target Core Interface』の
略であり、本関数呼出コードがデバッグ核層51とター
ゲット相互接続層52との間で使用されることを意味す
る。即ち、本関数呼出コードは、デバッグ核層51−タ
ーゲット相互接続層52間という局所的な区間でのみ用
いられる関数呼出コードなのである。『TCI_get_mem』
の『get_mem』とは、『メモリの保持値を取得する』と
いう意味である。『adr,length,unit,image』はそれぞ
れが引数である。adrが開始アドレスを示し、lengthが
取得長を示す。unitは、バイト、ワード、ダブルワード
等取得単位を示し、imageはメモリ内容の格納先を示
す。
When the command interpreter 72 interprets the input command as a read command for status information such as a readMEM command, the function call code TCI_get_mem (adr, lengt
(h, unit, image) etc. 『TCI_g
“TCI” in “et_mem” is an abbreviation of “Target Core Interface” and means that this function call code is used between the debug kernel layer 51 and the target interconnect layer 52. That is, this function call code is a function call code used only in a local section between the debug kernel layer 51 and the target interconnect layer 52. 『TCI_get_mem』
“Get_mem” means “get the value held in memory”. "Adr, length, unit, image" is an argument. adr indicates the start address, and length indicates the acquisition length. The unit indicates an acquisition unit such as a byte, a word, or a double word, and the image indicates a storage destination of memory contents.

【0046】これらの意味から判るのは、コマンドイン
タプリタ72が入力コマンドをreadMEMコマンドと解釈
すると、デバッグ核層51からターゲット相互接続層5
2へと関数呼出コードを用いた指示がなされるというこ
とである。読み出し先が試作機30、評価ボード20、
シュミレータ10のうちどのハードウェア環境であるか
を明示していないため、抽象的なレベルにより関数呼出
が規定されていることがわかる。
It can be understood from these meanings that when the command interpreter 72 interprets an input command as a readMEM command, the debug kernel layer 51 sends the target interconnect layer 5
2, the instruction using the function call code is issued. The reading destination is the prototype 30, the evaluation board 20,
Since the hardware environment of the simulator 10 is not specified, it is understood that the function call is defined by the abstract level.

【0047】コマンドインタプリタ72が入力コマンド
をwriteREGコマンド等、状態情報の書き込み命令である
と解釈した際、関数呼出コードTCI_set_REG(regs,mask)
等の関数呼出コードに変換する。『TCI_set_REG』の『s
et_REG』とは、『レジスタの即値を設定する』という意
味である。『regs,mask』はそれぞれが引数である。reg
sとは、共用ワークエリアにおいて、汎用レジスタ、プ
ログラムカウンタ、状態レジスタ、データレジスタ、ア
ドレスレジスタ等の各種レジスタの値を個別に格納する
配列変数の配列名であり、maskとは、引数regsで指示さ
れる配列変数の要素(レジスタ保持値)のうち、どれを
ハードウェア環境内のプロセッサに設定し、どれをハー
ドウェア環境に設定しないかを示すマスク用のビットパ
ターンである。
When the command interpreter 72 interprets the input command as a write command of status information such as a writeREG command, the function call code TCI_set_REG (regs, mask)
And so on. "S" of "TCI_set_REG"
“et_REG” means “set an immediate value of a register”. "Regs, mask" is an argument. reg
s is the array name of an array variable that individually stores the values of various registers such as general-purpose registers, program counters, status registers, data registers, and address registers in the shared work area, and mask is specified by the argument regs. This is a mask bit pattern that indicates which of the elements (register holding values) of the array variable to be set are set in the processor in the hardware environment and which are not set in the hardware environment.

【0048】同様にコマンドインタプリタ72が、操作
者が入力したコマンドを『run』『stop』『step』『set
BP』『clrBP』『SetINT』『readREG』『writeMEM』『TR
ACE』と解釈すると、コマンド変換ルーチン73は『TCI
_run』『TCI_stop』『TCI_step』『TCI_setBP』『TCI_c
lrBP』『TCI_SetINT』『TCI_read_REG』『TCI_write_ME
M』『TCI_TRACE』という関数呼出コードに変換してター
ゲット相互接続層52に伝える。
Similarly, the command interpreter 72 converts the command input by the operator into “run”, “stop”, “step”, “set”.
BP, clrBP, SetINT, readREG, writeMEM, TR
ACE ”, the command conversion routine 73 executes“ TCI
_run, TCI_stop, TCI_step, TCI_setBP, TCI_c
lrBP, TCI_SetINT, TCI_read_REG, TCI_write_ME
M ”and converted to a function call code“ TCI_TRACE ”and transmitted to the target interconnect layer 52.

【0049】コマンドインタプリタ72が入力コマンド
をselectTARGETコマンドと解釈した際、自動発行される
copyMEMコマンド〜copyTRACE_DATAコマンドがどのよう
な関数呼出コードに変換されるかを説明する。copyMEM
コマンド〜copyTRACE_DATAコマンドによる状態情報の転
送は二段階の関数呼出コードにより行われる。第1段階
とは、『TCI_get〜』という関数呼出コードにより切換
元に対して記憶資源の状態情報を読み出しを指示するこ
とであり、第2段階とは、『TCI_set〜』という関数呼
出コードにより切換先に対して記憶資源の状態情報の書
き込みを指示することである。
Automatically issued when the command interpreter 72 interprets an input command as a selectTARGET command.
The function call codes converted from the copyMEM command to the copyTRACE_DATA command will be described. copyMEM
The transfer of state information by the command to the copyTRACE_DATA command is performed by a two-stage function call code. The first stage is to instruct the switching source to read out the status information of the storage resource by the function call code “TCI_get ~”, and the second stage is to switch the state by the function call code “TCI_set ~”. This is to instruct the destination to write the status information of the storage resource.

【0050】図13は、変換前のcopyMEMコマンド〜cop
yTRACE_DATAコマンドと、変換後の関数呼出コードTCI_g
et_mem(adr,length,unit,image)〜TCI_set_TD(adr,leng
th,unit,image)の対応関係を示す図である。本図を参照
すると、サブコマンドCopyMEMは、TCI_get_mem(adr,len
gth,unit,image)という関数呼出コードと、TCI_set_mem
(adr,length,unit,image)という関数呼出コードとに変
換されることがわかる。
FIG. 13 shows the copyMEM command to cop before conversion.
yTRACE_DATA command and converted function call code TCI_g
et_mem (adr, length, unit, image)-TCI_set_TD (adr, leng
FIG. 6 is a diagram showing a correspondence relationship of (th, unit, image). Referring to the figure, the subcommand CopyMEM is executed by TCI_get_mem (adr, len
gth, unit, image) and TCI_set_mem
It can be seen that it is converted to a function call code of (adr, length, unit, image).

【0051】関数呼出コードTCI_get_mem(adr,length,u
nit,image)は、切換元の記憶資源のうちターゲット内ワ
ークエリア38の内容を切換元から読み出す旨を指示
し、関数呼出コードTCI_set_mem(adr,length,unit,imag
e)は、切換先の記憶資源のうちターゲット内ワークエリ
ア38に状態情報を設定する旨を指示する。図13にお
いて留意すべきは、関数呼出コードの引数の個数であ
る。
Function call code TCI_get_mem (adr, length, u
nit, image) indicates that the contents of the in-target work area 38 among the storage resources of the switching source are to be read from the switching source, and the function call code TCI_set_mem (adr, length, unit, imag
e) indicates that status information is to be set in the work area 38 within the target among the storage resources at the switching destination. What should be noted in FIG. 13 is the number of arguments of the function call code.

【0052】『CopyReg』から変換された関数呼出コー
ド『TCI_get_reg(regs,mask)』、『TCI_set_reg(regs,m
ask)』のみ、引数が2つであり、それ以外の関数呼出コ
ードは、(adr,length,unit,image)のように引数を4つ
もっている。これは、内容の違いはあるが、『CopyME
M』『CopyBP』『CopyINT』『CopyI/O』が転送を命じて
いるコマンドは、何れも、記憶資源のうち、メモリに関
するものであり(周辺I/Oレジスタ群25、周辺I/Oレジ
スタ群35の内容はメモリを介したアクセスが可能であ
る。)、(adr,length,unit,image)という引数で、アク
セス内容を表現できるからである。
Function call codes “TCI_get_reg (regs, mask)” and “TCI_set_reg (regs, m) converted from“ CopyReg ”
ask) only has two arguments, and the other function call codes have four arguments like (adr, length, unit, image). Although this is different in content,
M, “CopyBP”, “CopyINT”, and “CopyI / O” command all transfer commands related to memory among the storage resources (peripheral I / O register group 25, peripheral I / O register group). This is because the contents of 35 can be accessed via a memory.) And (adr, length, unit, image) can be used to express the access contents.

【0053】『CopyBP』における引数について説明す
る。ブレークポイントの形態は各ハードウェア環境で異
なる場合があるが、大多数なものは、被デバッグプログ
ラム内の機械語命令のアドレスを個々に指示するタイプ
である。命令アドレスを個々に指示する場合は、引数(a
dr,length,unit,image)のうち『length,unit』は不用で
ある。しかしハードウェア環境の中には、ブレークポイ
ントを領域で指定できる、いわゆるエリアブレークを利
用可能なものも存在する。このようなエリアブレークが
利用可能なハードウェア環境の接続を前提にしているた
め、本装置は、引数(adr,length,unit,image)により、
ブレークポイントのサイズと、アクセス長の指定を関数
呼出コードの引数内に取り入れている。
The argument in “CopyBP” will be described. Although the form of the breakpoint may be different in each hardware environment, the majority is of a type in which the address of a machine instruction in the program to be debugged is individually indicated. To specify instruction addresses individually, use the argument (a
“length, unit” in dr, length, unit, image) is unnecessary. However, some hardware environments can use a so-called area break in which a breakpoint can be specified in an area. Because it is premised on the connection of the hardware environment where such an area break can be used, this device uses the arguments (adr, length, unit, image)
The breakpoint size and access length specification are incorporated into the function call code arguments.

【0054】図13における『CopyINT』の引数(cycle,
intkind)について説明する。引数cycleは、命令実行の
実行時間の単位長の整数倍値を示し、intkindは、発生
すべき割り込み信号の信号番号を示す。図8においてタ
ーゲット相互接続層52は、様式変換ルーチン74、ワ
ークエリアコンテンツ解析モジュール75、共用ワーク
エリア77からなる。ここでは、様式変換ルーチン74
及び、共用ワークエリア77について説明し、ワークエ
リアコンテンツ解析モジュール75については後述す
る。
The argument (cycle, cycle,
intkind) will be described. The argument cycle indicates an integral multiple of the unit length of the execution time of instruction execution, and intkind indicates a signal number of an interrupt signal to be generated. In FIG. 8, the target interconnection layer 52 includes a format conversion routine 74, a work area content analysis module 75, and a shared work area 77. Here, the style conversion routine 74
The shared work area 77 will be described, and the work area content analysis module 75 will be described later.

【0055】様式変換ルーチン74は、コマンド変換ル
ーチン73により変換された関数呼出コードをハードウ
ェア環境に依存した様式に変換する。ここでいう『ハー
ドウェア環境に依存した様式』とは、関数呼出コードが
含んでいる呼出先関数名をハードウェア環境を明示した
関数名に書き換えることをいう。ここでサブコマンドCo
pyMemをコマンド変換ルーチン73がTCI_get_mem(adr,l
ength,unit,image)、TCI_set_mem(adr,length,unit,ima
ge)という関数呼出コードに変換したものとする。この
場合様式変換ルーチン74はこれらの関数呼出コードに
含まれている関数名の書き換えを行う。
The format conversion routine 74 converts the function call code converted by the command conversion routine 73 into a format depending on the hardware environment. Here, the “format dependent on the hardware environment” means that the name of the callee function included in the function call code is rewritten to a function name indicating the hardware environment. Where the subcommand Co
pyMem converts the command conversion routine 73 to TCI_get_mem (adr, l
ength, unit, image), TCI_set_mem (adr, length, unit, ima
ge). In this case, the format conversion routine 74 rewrites the function names included in these function call codes.

【0056】先ず様式変換ルーチン74は、TCI_get_me
m(adr,length,unit,image)における『TCI_get_mem』と
いう関数名を切換元を明示した関数名に書き換える。例
えば、切換元がモニタ型であり、切換先がシュミレータ
型である場合に、関数呼出コードTCI_get_mem(adr,leng
th,unit,image)が生成されたものとする。切換元のハー
ドウェア環境はモニタ型であるから、当該関数呼出コー
ドはモニタ型を明示した関数名『MON_get_mem』に書き
換えられ、MON_get_mem(adr,length,unit,image)を得
る。
First, the format conversion routine 74 executes TCI_get_me
The function name “TCI_get_mem” in m (adr, length, unit, image) is rewritten to a function name that clearly indicates the switching source. For example, when the switching source is the monitor type and the switching destination is the simulator type, the function call code TCI_get_mem (adr, leng
th, unit, image) has been generated. Since the hardware environment of the switching source is of the monitor type, the function call code is rewritten to a function name "MON_get_mem" specifying the monitor type, and MON_get_mem (adr, length, unit, image) is obtained.

【0057】続いて様式変換ルーチン74は、TCI_set_
mem(adr,length,unit,image)における『TCI_set_mem』
という関数名を切換先を明示した関数名に書き換える。
切換先のハードウェア環境はシュミレータ型であるか
ら、シュミレータ型を明示した関数名『SIM_set_mem』
に書き換えられる。書き換え結果は、SIM_set_mem(adr,
length,unit,image)となる。関数名を書き換えた後、様
式変換ルーチン74は書き換え後の関数呼出コードを用
いて関数呼出を行う。
Subsequently, the format conversion routine 74 executes TCI_set_
"TCI_set_mem" in mem (adr, length, unit, image)
Is rewritten to a function name that clearly indicates the switching destination.
Since the hardware environment of the switching destination is a simulator type, the function name "SIM_set_mem" that explicitly specifies the simulator type
Is rewritten as The rewrite result is SIM_set_mem (adr,
length, unit, image). After rewriting the function name, the format conversion routine 74 calls the function using the rewritten function call code.

【0058】様式変換ルーチン74は同様の書き換え
を、図13に示した全ての関数呼出コードについて行
う。図14は図13に示した全ての関数呼出コードがど
のように書き換えられたかを示す図である。関数名の書
き換えを行う際、様式変換ルーチン74は、切換元及び
切換先がICE型、モニタ型、シュミレータ型の何れであ
るかを識別する。切換元は、現状デバッグ対象に設定さ
れているハードウェア環境であるから、原簿テーブルを
参照して、本ファイルに登録されている識別子を切換元
のハードウェア環境と識別する。切換先は、selectTARG
ETコマンドのオペランドに設定されているハードウェア
環境であるから、様式変換ルーチン74はコマンドイン
タプリタ72からselectTARGETコマンドを受け取り、se
lectTARGETコマンドのオペランドに示されている識別子
を切換先ハードウェア環境を示すものと解釈する。この
ようにして切換元、切換先が決定されると、関数呼出コ
ードの関数名の書き換えを行う。
The format conversion routine 74 performs the same rewriting for all the function call codes shown in FIG. FIG. 14 is a diagram showing how all the function call codes shown in FIG. 13 have been rewritten. When rewriting the function name, the format conversion routine 74 identifies whether the switching source and the switching destination are the ICE type, the monitor type, and the simulator type. Since the switching source is the hardware environment currently set as the debug target, the identifier registered in this file is identified as the switching source hardware environment by referring to the master table. The switching destination is selectTARG
Since the hardware environment is set in the operand of the ET command, the format conversion routine 74 receives the selectTARGET command from the command interpreter 72, and
The identifier indicated in the operand of the lectTARGET command is interpreted as indicating the hardware environment of the switching destination. When the switching source and the switching destination are determined in this way, the function name of the function call code is rewritten.

【0059】共用ワークエリア77は、引数Imageにて
指定された領域Image等、モニタ型、ICE型、シュミレー
タ型のハードウェア環境により共用されるワークエリア
である。ターゲット依存層53は、シュミレータ10、
モニタ制御層61、ICE制御層62からなる。
The shared work area 77 is a work area shared by a monitor-type, ICE-type, and simulator-type hardware environment, such as an area Image specified by the argument Image. The target dependent layer 53 includes the simulator 10,
It comprises a monitor control layer 61 and an ICE control layer 62.

【0060】シュミレータ10は、図5の構成を有する
アプリケ−ションプログラムである。図5に示すよう
に、シュミレータ10は、プロセッサ模擬ルーチン9
5、メモリ模擬ルーチン96、I/Oレジスタ模擬ルーチ
ン97から構成される。プロセッサ模擬ルーチン95
は、プロセッサ33の機能を模擬する。メモリ模擬ルー
チン96は、メモリ24同様、スーパバイザプログラム
26、デバッグ情報エリア27、被デバッグプログラム
37、ターゲット内ワークエリア38を記憶する。これ
らを記憶しているため、シュミレータ型ハードウェア環
境のバグ解析能力は、ICE型のそれとほぼ対等といえ
る。
The simulator 10 is an application program having the configuration shown in FIG. As shown in FIG. 5, the simulator 10 includes a processor simulation routine 9
5, a memory simulation routine 96 and an I / O register simulation routine 97. Processor simulation routine 95
Simulates the function of the processor 33. The memory simulation routine 96, like the memory 24, stores the supervisor program 26, the debug information area 27, the program to be debugged 37, and the in-target work area 38. Since these are stored, the bug analysis ability of the simulator type hardware environment is almost equal to that of the ICE type.

【0061】I/Oレジスタ模擬ルーチン97は、周辺I/O
レジスタ群35の機能を模擬する。プロセッサ模擬ルー
チン95、メモリ模擬ルーチン96、I/Oレジスタ模擬
ルーチン97はシュミレータ型を指定した関数呼出コー
ドにより起動する。関数呼出コードSIM_get_mem(adr,le
ngth,unit,image)を用いて様式変換ルーチン74により
呼び出されれば、プロセッサ模擬ルーチン95はメモリ
模擬ルーチン96において開始アドレスadrに格納され
ているデータを、取得長lengthに指定されているサイズ
だけ、取得単位unitにて指定されている単位毎に読み出
す。読み出されると、プロセッサ模擬ルーチン95はデ
ータを共用ワークエリア77において引数imageに指定
されている領域に格納する。
The I / O register simulation routine 97 includes a peripheral I / O
The function of the register group 35 is simulated. The processor simulation routine 95, the memory simulation routine 96, and the I / O register simulation routine 97 are activated by a function call code specifying a simulator type. Function call code SIM_get_mem (adr, le
(ngth, unit, image) using the format conversion routine 74, the processor simulation routine 95 converts the data stored in the start address adr in the memory simulation routine 96 by the size specified in the acquisition length length. Read for each unit specified in the acquisition unit. When read, the processor simulation routine 95 stores the data in the area specified by the argument image in the shared work area 77.

【0062】関数呼出コードSIM_set_mem(adr,length,u
nit,image)を用いて様式変換ルーチン74により呼び出
されれば、プロセッサ模擬ルーチン95は共用ワークエ
リア77において引数imageに指定されている領域のデ
ータをメモリ模擬ルーチン96内の開始アドレスadr以
降の領域に書き込む。書き込み作業は引数lengthに指定
されているサイズだけ、引数unitにて指定されている単
位で行われる。
Function call code SIM_set_mem (adr, length, u
nit, image), the processor simulation routine 95 transfers the data of the area specified by the argument image in the shared work area 77 to the area after the start address adr in the memory simulation routine 96. Write. The writing operation is performed by the size specified by the argument length in the unit specified by the argument unit.

【0063】モニタ制御層61は、試作機30における
被デバッグプログラムの管轄権及び試作機30上のメモ
リ、レジスタ等記憶資源のアクセス権も有し、所望のタ
イミングで、被デバッグプログラムを動作させ、試作機
30の記憶資源の内容を読み書きする。この読み書きの
制御は、シリアル転送ポート31、シリアル回線40、
専用端子39を介してモニタ制御層61がモニタリング
プログラム36と所定の通信シーケンスを行うことによ
り行われる。これらの通信シーケンスの実行条件とは、
様式変換ルーチン74による関数呼出が行われることで
ある。
The monitor control layer 61 also has jurisdiction over the program to be debugged in the prototype 30 and access to storage resources such as memories and registers on the prototype 30. The monitor control layer 61 operates the program to be debugged at a desired timing. The contents of the storage resources of the prototype 30 are read and written. This read / write control is performed by the serial transfer port 31, the serial line 40,
This is performed by the monitor control layer 61 performing a predetermined communication sequence with the monitoring program 36 via the dedicated terminal 39. The execution conditions for these communication sequences are:
A function call by the format conversion routine 74 is performed.

【0064】例えばメモリの内容を読み出すための通信
シーケンスは、図15の(2)に示すパケットを、(1)のプ
ロトコルに従って送受信することにより行われる。その
通信シーケンスがなされるのは、モニタ制御層61が関
数呼出コードMON_get_mem(adr,length,unit,image)を用
いて関数呼び出しを行った場合である。図15の(2)に
示した3種のパケット、即ちMEMREADパケット、ACKパケ
ット、DATA1/n〜n/nパケットは何れも8Byte長フィール
ドを有する。
For example, the communication sequence for reading the contents of the memory is performed by transmitting and receiving the packet shown in FIG. 15 (2) according to the protocol of (1). The communication sequence is performed when the monitor control layer 61 calls a function using the function call code MON_get_mem (adr, length, unit, image). Each of the three types of packets shown in (2) of FIG. 15, that is, the MEMREAD packet, the ACK packet, and the DATA1 / n to n / n packets has an 8-byte length field.

【0065】MEMREADパケットの第0バイトはCMDフィー
ルドであり、コマンドの種別を示すコマンドコードが書
き込まれる。第1バイトはUITフィールドであり、メモ
リからの読み出し単位(バイト、ワード、ダブルワード
がある)をプロセッサに指示する。第2、第3バイト
は、ADRSフィールドであり、読み出すべきメモリデータ
のサイズが書き込まれる。第4〜第7バイトにメモリの
読出先アドレスが書き込まれる。
The 0th byte of the MEMREAD packet is a CMD field in which a command code indicating the type of command is written. The first byte is a UIT field, which indicates to the processor the unit of reading from the memory (byte, word, double word). The second and third bytes are an ADRS field in which the size of memory data to be read is written. The read destination address of the memory is written in the fourth to seventh bytes.

【0066】ACKパケットは、第0バイトにモニタリン
グプログラム36において発生したエラーの種別を示す
種別コードが書き込まれる。図17は、メモリ内容の読
み出しシーケンスを実行する際のモニタ制御層61の処
理内容を示すフローチャートである。様式変換ルーチン
74が関数呼出コードMON_get_mem(adr,length,unit,im
age)にて関数呼び出しすると、モニタ制御層61は、ス
テップS1においてCMDフィールド,sizeフィールド,ADR
Sフィールド,UITフィールドを設定し、送信パケットを
作成する。この際、どのような内容を各フィールドに書
き込むかであるが、CMDフィールドに対しては、MEMREAD
を示すコードを書き込む。sizeフィールドに対しては、
引数lengthに示されている読み出しサイズを書き込み、
ADRSフィールドに対しては、引数adr に示されている読
み出し先アドレスを書き込む。UITフィールドに対して
は、引数unitに示されている読み出し先アドレスを書き
込む。このようにしてMEMREADパケットを作成すると、
ステップS2においてシリアル回線40を介して、作成
したパケットをモニタリングプログラム36側に送信す
る。送信後、モニタ制御層61は、ステップS3におい
てACKパケットの受信待ちを行う。ACKパケットが送信さ
れれば、ステップS3がYesとなり、ステップS4に移
行する。ステップS4では、モニタ制御層61はACKパ
ケットのERRフィールドをチェックする。もし異常なら
ば、ステップS2に移行してMEMREADパケットの再発行
を行うが、正常ならば、ステップS5において変数iを1
に設定し、ステップS6において引数に指定されたleng
thをDATAパケットサイズ(8byte)で割った数に変数n
を設定する。変数iとは、各DATAパケットに個別に付さ
れた番号を示し、変数nとは、DATAパケットの総数を示
す。
In the ACK packet, a type code indicating the type of error that has occurred in the monitoring program 36 is written in the 0th byte. FIG. 17 is a flowchart showing the processing content of the monitor control layer 61 when executing the memory content reading sequence. The format conversion routine 74 executes the function call code MON_get_mem (adr, length, unit, im
age), the monitor control layer 61 determines in step S1 that the CMD field, size field, ADR
Set the S field and UIT field and create a transmission packet. At this time, what content is written in each field, but MEMREAD
Write a code indicating For the size field,
Write the read size indicated by the argument length,
In the ADRS field, the read destination address indicated by the argument adr is written. In the UIT field, the read destination address indicated in the argument unit is written. When a MEMREAD packet is created in this way,
In step S2, the created packet is transmitted to the monitoring program 36 via the serial line 40. After the transmission, the monitor control layer 61 waits for reception of an ACK packet in step S3. If the ACK packet is transmitted, step S3 becomes Yes and the process moves to step S4. In step S4, the monitor control layer 61 checks the ERR field of the ACK packet. If abnormal, the process proceeds to step S2 to reissue the MEMREAD packet. If normal, the variable i is set to 1 in step S5.
, And the leng specified in the argument in step S6
variable n to the number obtained by dividing th by the DATA packet size (8 bytes)
Set. The variable i indicates a number individually assigned to each DATA packet, and the variable n indicates the total number of DATA packets.

【0067】これらの変数に初期値を設定すると、ステ
ップS7においてモニタ制御層61は受信パケットi(i=
1,2,3,4・・・n)の受信待ちを行う。このように受信待ちを
行っている間にDATAパケットが送信されれば、モニタ制
御層61はこれを受信する。そしてステップS8におい
て受信したDATAパケットのiのDATAフィールドに記載さ
れている8バイトデータを共用ワークエリア77内の引
数imageで指定されている領域に格納する。格納後、ス
テップS9において変数iと変数nとを比較し、もし変数
iと変数nと異なるなら、ステップS10において変数i
をインクリメントしてステップS7に移行する。
When initial values are set to these variables, the monitor control layer 61 in step S7 sets the received packet i (i =
Wait for reception of 1,2,3,4 ... n). If a DATA packet is transmitted while waiting for reception in this way, the monitor control layer 61 receives this. Then, in step S8, the 8-byte data described in the DATA field of i of the received DATA packet is stored in the area specified by the argument image in the shared work area 77. After storing, in step S9, the variable i is compared with the variable n, and if
If i is different from the variable n, the variable i is determined in step S10.
Is incremented, and the routine goes to Step S7.

【0068】以降、ステップS9がYes、即ち、変数i=
変数nとなるまでステップS7におけるDATAパケットの
受信と、ステップS8における共用ワークエリア77に
対しての8バイトデータの格納とを繰り返す。ステップ
S7〜ステップS10の繰り返しにより、試作機30の
データはシリアル転送ポート31−シリアル回線40−
専用端子39を介して8バイトずつモニタ制御層61に
転送されてゆく。転送された8バイトのデータは共用ワ
ークエリア77における領域imageに蓄積される。この
ような繰り返しがn回行われると、関数呼出コードに引
数lengthで指定したサイズのデータが共用ワークエリア
77のimage領域上に格納される。
Thereafter, step S9 returns Yes, ie, the variable i =
The reception of the DATA packet in step S7 and the storage of the 8-byte data in the shared work area 77 in step S8 are repeated until the variable n is reached. By repeating steps S7 to S10, the data of the prototype 30 is transferred to the serial transfer port 31-serial line 40-
The data is transferred to the monitor control layer 61 through the dedicated terminal 39 in units of 8 bytes. The transferred 8-byte data is accumulated in the area image in the shared work area 77. When such repetition is performed n times, data of the size specified by the argument length in the function call code is stored in the image area of the shared work area 77.

【0069】メモリ34上のデータが共用ワークエリア
77上へと読み出されると、これをシュミレータ10及
びICE制御層62に転送することが可能となる。上記の
ようにしてメモリ34上のデータが共用ワークエリア7
7上の領域imageへと読み出された後、様式変換ルーチ
ン74が関数呼出コードSIM_set_mem(adr,length,unit,
image)を用いて関数呼出を行うと、共用ワークエリア7
7において引数imageに格納されているメモリ34のタ
ーゲット内ワークエリア38のデータがメモリ模擬ルー
チン96内の開始アドレスadr以降の領域に書き込まれ
る。
When the data in the memory 34 is read out to the shared work area 77, it can be transferred to the simulator 10 and the ICE control layer 62. As described above, the data in the memory 34 is stored in the shared work area 7.
7, the format conversion routine 74 executes the function call code SIM_set_mem (adr, length, unit,
image), the shared work area 7
At 7, the data of the in-target work area 38 of the memory 34 stored in the argument image is written to the area after the start address adr in the memory simulation routine 96.

【0070】同様の通信シーケンスを、残りのレジスタ
の内容、ブレークポイント、割込信号発生要件情報、周
辺I/Oレジスタの内容、トレースデータについて繰り返
し、モニタ制御層61は試作機30の記憶資源の状態情
報をメモリ模擬ルーチン96へと転送する。またターゲ
ット内ワークエリア38の内容を試作機30内のメモリ
34に書き込むための通信シーケンスは、図16の(2)
に示すパケットを、(1)のプロトコルに従って送受信す
ることにより行われる。通信シーケンスがなされるの
は、モニタ制御層61が関数呼出コードMON_set_mem(ad
r,length,unit,image)を用いて関数呼び出しを行った場
合である。
The same communication sequence is repeated for the contents of the remaining registers, breakpoints, interrupt signal generation requirement information, contents of peripheral I / O registers, and trace data. The state information is transferred to the memory simulation routine 96. A communication sequence for writing the contents of the work area 38 in the target to the memory 34 in the prototype 30 is shown in (2) of FIG.
Are transmitted and received according to the protocol (1). The communication sequence is performed because the monitor control layer 61 uses the function call code MON_set_mem (ad
(r, length, unit, image).

【0071】図16の(2)に示した3種のパケット、即
ちMEMWRITEパケット、DATA1〜nパケット、ACK1,2パケッ
トは何れも8Byte長フィールドを有する。MEMWRITEパケ
ットの第0バイトは、CMDフィールドであり、コマンド
の種別を示すコマンドコードが書き込まれる。第1バイ
トはUITフィールドであり、メモリからの読み出し単位
(バイト、ワード、ダブルワードがある)をプロセッサ
に指示する。第2、第3バイトはSIZEフィールドであ
り、読み出すべきターゲット内ワークエリア38データ
のサイズが書き込まれる。第4〜第7バイトはADRSフィ
ールドであり、メモリ34の内容の書込先アドレスが書
き込まれる。
Each of the three types of packets shown in FIG. 16B, that is, MEMWRITE packets, DATA1 to n packets, and ACK1 and 2 packets has an 8-byte length field. The 0th byte of the MEMWRITE packet is a CMD field in which a command code indicating the type of command is written. The first byte is a UIT field, which indicates to the processor the unit of reading from the memory (byte, word, double word). The second and third bytes are a SIZE field in which the size of the in-target work area 38 data to be read is written. The fourth to seventh bytes are an ADRS field in which the write destination address of the contents of the memory 34 is written.

【0072】ACK1パケット,ACK2パケットは、第0バイ
トにモニタリングプログラム36において発生したエラ
ーの種別を示す種別コードが書き込まれる。図18は、
ターゲット内ワークエリア38の内容の読み出しシーケ
ンスを実行する際のモニタ制御層61の処理内容を示す
フローチャートである。
In the ACK1 packet and ACK2 packet, a type code indicating the type of error that has occurred in the monitoring program 36 is written in the 0th byte. FIG.
9 is a flowchart showing the processing contents of a monitor control layer 61 when executing a read sequence of the contents of a work area 38 in a target.

【0073】様式変換ルーチン74が関数呼出コードMO
N_set_mem(adr,length,unit,image)にて関数呼び出しす
ると、モニタ制御層61は、ステップS11においてCM
Dフィールド,sizeフィールド,ADRSフィールドを設定
し、送信パケットを作成する。この際、どのような内容
を各フィールドに書き込むかであるが、CMDフィールド
に対しては、MEMWRITEを示すコードを書き込む。sizeフ
ィールドに対しては、引数lengthに示されているサイズ
を書き込み、ADRSフィールドに対しては、引数adr に示
されている書込先アドレスを書き込む。UITフィールド
に対しては、引数adr に示されている書込先アドレスを
書き込む。
The format conversion routine 74 uses the function call code MO
When the function is called by N_set_mem (adr, length, unit, image), the monitor control layer 61 determines in step S11 that the CM
Set the D field, size field, and ADRS field, and create a transmission packet. At this time, depending on what content is to be written in each field, a code indicating MEMWRITE is written in the CMD field. The size indicated by the argument length is written into the size field, and the write destination address indicated by the argument adr is written into the ADRS field. In the UIT field, write the write destination address indicated by the argument adr.

【0074】このようにしてMEMWRITEパケットを作成す
ると、ステップS12においてシリアル回線40を介し
て、作成したパケットをモニタリングプログラム36側
に送信する。送信後、モニタ制御層61は、ステップS
13においてACKパケットの受信待ちを行う。ACKパケッ
トが送信されれば、ステップS13がYesとなり、ステ
ップS14に移行する。ステップS14では、モニタ制
御層61はACK1パケットのERRフィールドをチェックす
る。もし異常ならば、ステップS12に移行してMEMREA
Dパケットの再発行を行うが、正常ならば、ステップS
15において変数jを1に設定し、ステップS16におい
て引数に指定されたlengthをDATAパケットサイズ(8by
te)で割った数に変数nを設定する。変数jとは、各DATA
パケットに個別に付された番号を示し、変数nとは、DAT
Aパケットの送信総数を示す。
When the MEMWRITE packet is created in this way, the created packet is transmitted to the monitoring program 36 via the serial line 40 in step S12. After transmission, the monitor control layer 61 proceeds to step S
At 13, the reception of the ACK packet is waited. If the ACK packet has been transmitted, step S13 becomes Yes and the process proceeds to step S14. In step S14, the monitor control layer 61 checks the ERR field of the ACK1 packet. If abnormal, the process proceeds to step S12 and the MEMREA
The D packet is reissued.
In step S15, the variable j is set to 1, and in step S16, the length specified in the argument is set to the DATA packet size (8 by
Set the variable n to the number divided by te). Variable j is each DATA
Indicates the number individually assigned to the packet, and the variable n is the DAT
Indicates the total number of A packet transmissions.

【0075】これらの変数に初期値を設定すると、ステ
ップS18において引数imageで指定された領域imageに
格納されているデータのうち、(8*(j-1))バイト目から
(8*j-1)バイト目までの8byteを読み出す。ここでj=1で
あるから、第0バイト目から第7バイト目までのデータ
が読み出され、モニタ制御層61はこれを送信DATAパケ
ットjのDATAフィールドに記載する。記載後、ステップ
S19においてDATAパケットを発行してステップS20
に移行する。ステップS20において変数jと変数nとを
比較し、もし変数jと変数nと異なるなら、ステップS2
1において変数jをインクリメントしてステップS18
に移行する。
When initial values are set for these variables, of the data stored in the area image specified by the argument image in step S18, from the (8 * (j-1)) th byte
Read 8 bytes up to the (8 * j-1) byte. Here, since j = 1, data from the 0th byte to the 7th byte is read out, and the monitor control layer 61 writes this in the DATA field of the transmission DATA packet j. After the description, a DATA packet is issued in step S19 and step S20
Move to In step S20, the variable j is compared with the variable n. If the variable j is different from the variable n, the process proceeds to step S2.
In step S18, the variable j is incremented.
Move to

【0076】以降、ステップS20がYes、即ち、変数j
=変数nとなるまでステップS18、ステップS19に
おける8バイトデータの送信とを繰り返す。ステップS
18〜ステップS21の繰り返しにより、共用ワークエ
リア77のデータはシリアル転送ポート31、シリアル
回線40、専用端子39を介して8バイトずつメモリ3
4に転送されてゆく。転送された8バイトのデータはメ
モリ34に蓄積される。このような繰り返しがn回行わ
れると、領域imageに格納されているデータがメモリ3
4上に格納される。
Thereafter, step S20 returns Yes, that is, the variable j
= Transmission of 8-byte data in step S18 and step S19 is repeated until variable = n. Step S
Through the repetition of steps 18 to S21, the data in the shared work area 77 is transferred to the memory 3 via the serial transfer port 31, the serial line 40, and the dedicated terminal 39 in units of 8 bytes.
It is transferred to 4. The transferred 8-byte data is stored in the memory 34. When such repetition is performed n times, the data stored in the area image is stored in the memory 3
4 is stored.

【0077】同様の通信シーケンスを、残りのレジスタ
の内容、ブレークポイント、割込信号発生要件情報、周
辺I/Oレジスタの内容、トレースデータについて繰り返
し、モニタ制御層61は共用ワークエリア77の状態情
報を試作機30の記憶資源に格納する。ここで関数呼出
コードMON_set_mem(adr,length,unit,image)を用いて関
数呼出を行う前に予め共用ワークエリア77にシュミレ
ータ10の保持値を書き込んでおけば、共用ワークエリ
ア77上のシュミレータ10及びICE制御層62の保持
値をメモリ34に転送することも可能である。
The same communication sequence is repeated for the contents of the remaining registers, breakpoints, interrupt signal generation requirement information, contents of peripheral I / O registers, and trace data. Is stored in the storage resource of the prototype 30. Here, before the function call is performed using the function call code MON_set_mem (adr, length, unit, image), if the held value of the simulator 10 is written in the shared work area 77 in advance, the simulator 10 in the shared work area 77 It is also possible to transfer the value held in the ICE control layer 62 to the memory 34.

【0078】ICE制御層62は、評価ボード20におけ
るICEチップ23の制御権を掌握している。即ち、被デバ
ッグプログラムの管轄権及び評価ボード20上のメモ
リ、レジスタ等記憶資源のアクセス権を有する。そし
て、所望のタイミングで、被デバッグプログラムを動作
させ、評価ボード20の記憶資源に共用ワークエリア7
7の内容を書き込ませる。
The ICE control layer 62 controls the ICE chip 23 in the evaluation board 20. That is, it has the jurisdiction of the program to be debugged and the access right of the storage resources such as the memory and the register on the evaluation board 20. Then, the debugged program is operated at a desired timing, and the shared work area 7 is stored in the storage resources of the evaluation board 20.
7 is written.

【0079】上記読み書き制御は、様式変換ルーチン7
4による、ICE型を明示した関数呼出に伴って、ICE制御
層62がデバイスドライバ21にBIOSコマンドを発行す
ることにより行われる。図19は、評価ボード20内の
被デバッグプログラム37の内容を読み出させる際の、
ICE制御層62の制御内容を示す説明図である。ICE制御
層62が関数呼出コードICE_get_mem(adr,length,unit,
image)を用いて関数呼び出しされると、ICE制御層62
はデバイスドライバ21に対して、BIOSコマンド『MEM_
READ(adrs,type,num)』を発行する。
The above read / write control is performed by the format conversion routine 7
4, the ICE control layer 62 issues a BIOS command to the device driver 21 in accordance with the function call specifying the ICE type. FIG. 19 shows a state in which the contents of the debugged program 37 in the evaluation board 20 are read out.
FIG. 4 is an explanatory diagram showing control contents of an ICE control layer 62. The ICE control layer 62 executes the function call code ICE_get_mem (adr, length, unit,
image), the ICE control layer 62
Sends the BIOS command “MEM_
READ (adrs, type, num)].

【0080】BIOSコマンドのパラメータについて説明す
る。パラメータadrsは、評価ボード20のワークエリア
のうち、どのアドレスから状態情報を読み出すかを示
し、パラメータtypeは、評価ボード20上での読み出し
単位を示す。引数unitも同内容の読み出し単位を指定し
ているが、評価ボード20で通用している取得単位が異
なる場合がある。その場合、デバイスドライバ21は、
評価ボード20で通用している取得単位にパラメータty
peを設定する。
The parameters of the BIOS command will be described. The parameter “adrs” indicates from which address in the work area of the evaluation board 20 the state information is read, and the parameter “type” indicates the unit of reading on the evaluation board 20. Although the argument unit specifies the same reading unit, the acquisition unit used in the evaluation board 20 may be different. In that case, the device driver 21
The parameter ty is used in the unit of acquisition that is accepted by the evaluation board 20.
Set pe.

【0081】パラメータnumは、語数を示す。ここでい
う『語』の語長は、パラメータtypeで指定された取得単
位を意味し、パラメータnumは関数呼出時において、引
数lengthにおいて指定した読み出しサイズを語長unitで
割った数に設定される。以上のようにして、パラメータ
adr,type,numを設定すると、デバイスドライバ21にME
M_READ(adrs,type,num)を発行する。発行後、デバイス
ドライバ21が結果を出力するのを待ち、結果を出力す
ると、その内容を評価ボード20におけるメモリ24の
領域のadrからの値として受け取り、これを共用ワーク
エリア77の引数adrsに指定された領域に格納する。
The parameter num indicates the number of words. The word length of “word” here means the acquisition unit specified by the parameter type, and the parameter num is set to the number obtained by dividing the read size specified by the argument length by the word length unit when calling the function . As described above, the parameters
When adr, type, and num are set, ME
Issue M_READ (adrs, type, num). After the issuance, it waits for the device driver 21 to output the result. When the result is output, the content is received as a value from adr in the area of the memory 24 on the evaluation board 20 and is specified in the argument adrs of the shared work area 77. In the specified area.

【0082】図20は、評価ボード20内の被デバッグ
プログラム37に内容を書き込む際の、ICE制御層62
の制御内容を示す説明図である。ICE制御層62が関数
呼出コードICE_set_mem(adr,length,unit,image)を用い
て関数呼び出しされると、ICE制御層62はデバイスド
ライバ21に対して、BIOSコマンド『MEM_WRITE(adrs,t
ype,num)』を発行する。発行後、共用ワークエリア77
内の引数adrに指定されている領域の値を、書き込むべ
き値としてデバイスドライバ21に出力する。
FIG. 20 shows the ICE control layer 62 when writing contents to the debugged program 37 in the evaluation board 20.
FIG. 4 is an explanatory diagram showing the control contents of FIG. When the ICE control layer 62 calls a function using the function call code ICE_set_mem (adr, length, unit, image), the ICE control layer 62 sends a BIOS command “MEM_WRITE (adrs, t
ype, num)]. After issuance, shared work area 77
Is output to the device driver 21 as a value to be written.

【0083】当該BIOSコマンドのパラメータの内容につ
いて説明する。パラメータadrsは、共用ワークエリア7
7の内容を評価ボード20内のワークエリア38のうち
どのアドレスに書き込むかを示し、パラメータtypeは、
書き込み単位を示す。パラメータnumは、語数を示す。
ここでいう『語』の語長は、評価ボード20内の取得単
位を意味し、関数呼出時において、引数lengthにおいて
指定した書き込みサイズを語長typeで割った数に設定さ
れる。
The contents of the parameters of the BIOS command will be described. Parameter adrs is shared work area 7
7 indicates to which address of the work area 38 in the evaluation board 20 the parameter is to be written.
Indicates a writing unit. The parameter num indicates the number of words.
The word length of the “word” here means an acquisition unit in the evaluation board 20, and is set to a value obtained by dividing the write size specified by the argument length by the word length type when calling a function.

【0084】以上のようにして、パラメータadr,type,n
umを設定すると、デバイスドライバ21にMEM_WRITE(ad
rs,type,num)を発行する。デバイスドライバ21は、IC
E制御層62が発行したBIOSコマンドに従って、評価ボ
ード20上のアドレス設定用ICE資源、サイズ設定用ICE
資源、動作指定用ICE資源の設定を行う。
As described above, the parameters adr, type, n
When um is set, MEM_WRITE (ad
rs, type, num). The device driver 21 is an IC
In accordance with the BIOS command issued by the E control layer 62, the address setting ICE resources and the size setting ICE on the evaluation board 20
Set up resources and ICE resources for operation specification.

【0085】これらのICE用資源を設定する理由は、ICE
チップ23は、これらのICE資源に記述されている内容を
ホストコンピュ−タ1からの指示と解釈して、メモリの
読み書きやブレークポイント設定等の動作を行うからで
ある。BIOSコマンドMEM_READ(adrs,type,num)が発行さ
れればデバイスドライバ21は、第1にパラメータadrs
に指定された値をアドレス設定用ICE資源に設定し、第
2にパラメータnumに設定された値をサイズ設定用ICE資
源に設定する。そして、動作指定用ICE資源にリード動
作を設定する。そうするとICEチップ23は、メモリ24
内の領域のうち、パラメータadrsに指定された内容をnu
mだけ、デバイスドライバ21へと読み出す。デバイス
ドライバ21は読み出された値を評価ボード20内のメ
モリ24の状態情報としてICE制御層62に出力する。
The reason for setting these ICE resources is as follows.
This is because the chip 23 interprets the contents described in these ICE resources as instructions from the host computer 1 and performs operations such as reading / writing of a memory and setting of a breakpoint. If the BIOS command MEM_READ (adrs, type, num) is issued, the device driver 21 first sets the parameter adrs
Is set to the address setting ICE resource, and second, the value set to the parameter num is set to the size setting ICE resource. Then, a read operation is set in the operation specifying ICE resource. Then, the ICE chip 23 stores the memory 24
The contents specified in the parameter adrs among the areas in
Only m is read out to the device driver 21. The device driver 21 outputs the read value to the ICE control layer 62 as status information of the memory 24 in the evaluation board 20.

【0086】BIOSコマンドMEM_WRITE(adrs,type,num)が
発行されればデバイスドライバ21は、第1にパラメー
タadrsに指定された値をアドレス設定用ICE資源に設定
し、第2にパラメータnumに設定された値をサイズ設定
用ICE資源に設定する。そして、動作指定用ICE資源にラ
イト動作を設定する。そうしてデバイスドライバ21が
モニタ制御層61から渡された共用ワークエリア77内
の領域imageの値を出力するとICEチップ23は、メモリ2
4内の領域のうち、パラメータadrsに指定された領域に
numだけ、デバイスドライバ21から引き渡された内容
を書き込む。
When the BIOS command MEM_WRITE (adrs, type, num) is issued, the device driver 21 first sets the value specified in the parameter adrs in the address setting ICE resource, and secondly sets the value in the parameter num. The set value is set in the size setting ICE resource. Then, a write operation is set to the operation specifying ICE resource. When the device driver 21 outputs the value of the area image in the shared work area 77 passed from the monitor control layer 61, the ICE chip 23
In the area specified in parameter adrs among the areas in 4
The contents transferred from the device driver 21 are written by num.

【0087】以上までの構成要素による本デバッグ装置
の動作について説明する。図12は、ユーザインターフ
ェィス層50により行われるメッセージ表示の一例を示
す図である。デバッグ装置が起動すると、ユーザインタ
ーフェィス層50は先ず、参照符号p1に示すように、
『*ハードウェア環境は{TARGET1}に設定されていま
す。{TARGET1}は{モニタ型}のハードウェア環境で
す。』というメッセージを表示し、『*コマンドを入力
して下さい 』というメッセージと、プロンプトとを表
示してコマンドの入力待ちとなる。
The operation of the debugging device according to the above components will be described. FIG. 12 is a diagram illustrating an example of a message display performed by the user interface layer 50. When the debugging device is started, the user interface layer 50 firstly sets the reference
"* Hardware environment is set to {TARGET1}. {TARGET1} is a {monitor type} hardware environment. Is displayed, and a message "* Please enter a command" and a prompt are displayed, and a command input is awaited.

【0088】<『readMEM 0x0100,16』の入力>この状
態で操作者がキーボード3をタイプして『readMEM 0x0
100,16』というコマンドを入力すると、ユーザインター
フェィス層50は、入力されたコマンドをデバッグ核層
51に出力して、当該コマンドの解釈及び実行を委ね
る。コマンド変換ルーチン73は入力されたコマンドを
関数呼出コード『TCI_read_MEM (0x0100,16,byte,imag
e)』に変換して、様式変換ルーチン74に出力する。様
式変換ルーチン74は、関数呼出コードをハードウェア
環境に依存した様式に書き換える。ハードウェア環境は
モニタ型であるから、モニタ型に依存した様式『MON_re
ad_MEM (0x0100,16,byte,image)』に書き換えられる。
<Input of "readMEM 0x0100,16"> In this state, the operator types the keyboard 3 and reads "readMEM 0x0100,16".
When the command "100, 16" is input, the user interface layer 50 outputs the input command to the debug kernel layer 51, and entrusts interpretation and execution of the command. The command conversion routine 73 converts the input command into a function call code “TCI_read_MEM (0x0100,16, byte, imag
e)] and outputs it to the format conversion routine 74. The format conversion routine 74 rewrites the function call code into a format depending on the hardware environment. Since the hardware environment is a monitor type, the format "MON_re
ad_MEM (0x0100,16, byte, image)].

【0089】様式変換ルーチン74が関数呼出コードMO
N_get_mem(0x0100,16,byte,image)にて関数呼び出しす
ると、モニタ制御層61は、図17のフローチャートに
従い、試作機30のデータをシリアル転送ポート31−
シリアル回線40−専用端子39を介して8バイトずつ
モニタ制御層61に読み出す。読み出された8バイトの
データは共用ワークエリア77における領域imageに蓄
積される。このような繰り返しがn回行われると、関数
呼出コードに引数lengthで指定したサイズのデータが共
用ワークエリア77のimage領域上に格納される。
When the format conversion routine 74 has the function call code MO
When a function is called by N_get_mem (0x0100,16, byte, image), the monitor control layer 61 transfers the data of the prototype 30 to the serial transfer port 31- according to the flowchart of FIG.
The data is read out to the monitor control layer 61 in units of 8 bytes via the serial line 40 and the dedicated terminal 39. The read 8-byte data is accumulated in the area image in the shared work area 77. When such repetition is performed n times, data of the size specified by the argument length in the function call code is stored in the image area of the shared work area 77.

【0090】ここで共用ワークエリア77の格納内容
が、『FF FF FF FF FF FF FF FFFF FF FF FF FF FF
FF FF』であると、ユーザインターフェィス層50は、
『*ハードウェア環境{TARGET1}の{0x0100,16}の値
は以下の通りです』という文字列を表示して、操作者が
指定した読出先をエコーバックすると共に、共用ワーク
エリア77の保持値『FF FF FF FF FF FF FF FF FF
FF FF FF FF FFFF FF』を表示する。その後、『*コ
マンドを入力して下さい 』というメッセージを表示し
てコマンドの入力待ちとなる。
Here, the content stored in the shared work area 77 is “FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF ”, the user interface layer 50
The character string "* 0x0100,16 value of the hardware environment {TARGET1} is as follows" is displayed, the reading destination specified by the operator is echoed back, and the value held in the shared work area 77 is displayed. 『FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FFFF FF ”is displayed. After that, a message "* Please enter a command" is displayed and command input is waited.

【0091】<『writeREG D1,03』の入力>操作者がキ
ーボード3をタイプして『writeREG D1,03』というコマ
ンドを入力すると、ユーザインターフェィス層50は、
入力されたコマンドをデバッグ核層51に出力して、当
該コマンドの解釈及び実行を委ねる。コマンド変換ルー
チン73は入力されたコマンドに従って、共用ワークエ
リア内の配列regsのレジスタD1の要素に03を格納し、関
数呼出コード『TCI_write_REG (regs,mask)』に変換し
て、様式変換ルーチン74に出力する。様式変換ルーチ
ン74は、関数呼出コードをハードウェア環境に依存し
た様式に書き換える。ハードウェア環境はモニタ型であ
るから、モニタ型に依存した様式『MON_write_REG (D1,
03)』に書き換えられる。
<Input of "writeREG D1,03"> When the operator inputs a command of "writeREG D1,03" by typing on the keyboard 3, the user interface layer 50
The input command is output to the debug kernel layer 51, and interpretation and execution of the command are entrusted. The command conversion routine 73 stores 03 in the element of the register D1 of the array regs in the shared work area according to the input command, converts it to a function call code “TCI_write_REG (regs, mask)”, and Output. The format conversion routine 74 rewrites the function call code into a format depending on the hardware environment. Since the hardware environment is of the monitor type, the format "MON_write_REG (D1,
03)].

【0092】様式変換ルーチン74が関数呼出コードMO
N_write_REG(regs,mask)にて関数呼び出しすると、モニ
タ制御層61は、レジスタ書き込みをプロセッサ33に
指示すると共に即値『03』をシリアル転送ポート31−
シリアル回線40−専用端子39を介して試作機30に
出力する。レジスタ書き込みが命じられたので、プロセ
ッサ33は、当該即値を指示されたレジスタD1に書き込
む。
The format conversion routine 74 uses the function call code MO
When the function is called by N_write_REG (regs, mask), the monitor control layer 61 instructs the processor 33 to write the register and also sends the immediate value “03” to the serial transfer port 31−.
Output to the prototype 30 via the serial line 40-dedicated terminal 39. Since the register write has been ordered, the processor 33 writes the immediate value into the designated register D1.

【0093】その後、正常書き込みを示す信号をプロセ
ッサ33がモニタ制御層61に出力すると、モニタ制御
層61は正常終了を、様式変換ルーチン74−コマンド
変換ルーチン73−コマンドインタプリタ72を介して
ユーザインターフェィス層50に通知する。ユーザイン
ターフェィス層50は『*ハードウェア環境{TARGET
1}の{D1}に値{03}を設定しました』というメッセ
ージによりエコーバックを行った後、プロムプト『>』
を表示して、操作者からの入力待ちになる。
Thereafter, when the processor 33 outputs a signal indicating normal writing to the monitor control layer 61, the monitor control layer 61 notifies the monitor interface 61 of normal end via the format conversion routine 74, the command conversion routine 73, and the command interpreter 72 to the user interface layer. Notify 50. The user interface layer 50 is “* Hardware environment @ TARGET
Echoed back with the message "D03 of 1 has been set to {D1}", and then prompt ">"
Is displayed and input from the operator is awaited.

【0094】<『SetBP BP1,0x0123』の入力>操作者が
キーボード3をタイプして『SetBP BP1,0x0123』という
コマンドを入力すると、ユーザインターフェィス層50
は、入力されたコマンドをデバッグ核層51に出力し
て、当該コマンドの解釈及び実行を委ねる。コマンド変
換ルーチン73は入力されたコマンドを関数呼出コード
『TCI_SET_BP (BP1,0x0123)』に変換して、様式変換ル
ーチン74に出力する。様式変換ルーチン74は、関数
呼出コードをハードウェア環境に依存した様式に書き換
える。ハードウェア環境はモニタ型であるから、モニタ
型に依存した様式『MON_SET_BP (BP1,0x0123)』に書き
換えられる。
<Input of "SetBP BP1,0x0123"> When the operator types the keyboard 3 and inputs a command of "SetBP BP1,0x0123", the user interface layer 50
Outputs the input command to the debug kernel layer 51 and entrusts interpretation and execution of the command. The command conversion routine 73 converts the input command into a function call code “TCI_SET_BP (BP1, 0x0123)” and outputs it to the format conversion routine 74. The format conversion routine 74 rewrites the function call code into a format depending on the hardware environment. Since the hardware environment is of the monitor type, it is rewritten to the format "MON_SET_BP (BP1,0x0123)" depending on the monitor type.

【0095】様式変換ルーチン74が関数呼出コードMO
N_SET_BP (BP1,0x0123)にて関数呼び出しすると、モニ
タ制御層61は、アドレス『0x0123』にブレークポイン
ト『BP1』を設定する旨をシリアル転送ポート31−シ
リアル回線40−専用端子39を介して試作機30に出
力する。ブレークポイント設定が命じられたので、プロ
セッサ33は、当該アドレス0x0123に、ブレークポイン
トBP1を設定する。
The format conversion routine 74 is executed when the function call code MO
When the function is called by N_SET_BP (BP1, 0x0123), the monitor control layer 61 notifies the setting of the breakpoint "BP1" at the address "0x0123" via the serial transfer port 31-serial line 40-dedicated terminal 39 via the prototype terminal. Output to 30. Since the setting of the breakpoint is instructed, the processor 33 sets the breakpoint BP1 at the address 0x0123.

【0096】その後、正常設定を示す信号をプロセッサ
33がモニタ制御層61に出力すると、モニタ制御層6
1は正常終了を、様式変換ルーチン74−コマンド変換
ルーチン73−コマンドインタプリタ72を介してユー
ザインターフェィス層50に通知する。正常設定が通知
されると、ユーザインターフェィス層50は『*ハード
ウェア環境{TARGET1}の{BP1}に値{0x0123}を設定
しました』というメッセージを表示した後、プロムプト
『>』を表示して、操作者からの入力待ちになる。
Thereafter, when the processor 33 outputs a signal indicating a normal setting to the monitor control layer 61, the monitor control layer 6
1 notifies the user interface layer 50 of the normal end via the format conversion routine 74, the command conversion routine 73, and the command interpreter 72. When the normal setting is notified, the user interface layer 50 displays a message “The value {0x0123} has been set to“ BP1 ”of the hardware environment“ TARGET1 ””, and then displays the prompt “>”. , Waiting for input from the operator.

【0097】<『RUN』の入力>操作者がキーボード3
をタイプして『RUN』というコマンドを入力すると、ユ
ーザインターフェィス層50は、入力されたコマンドを
デバッグ核層51に出力して、当該コマンドの解釈及び
実行を委ねる。コマンド変換ルーチン73は入力された
コマンドを関数呼出コード『TCI_RUN(0x0000)』に変換
して、様式変換ルーチン74に出力する。様式変換ルー
チン74は、関数呼出コードをハードウェア環境に依存
した様式に書き換える。ハードウェア環境はモニタ型で
あるから、モニタ型に依存した様式『MON_RUN (0x000
0)』に書き換えられる。
<Input of "RUN">
And the command "RUN" is input, the user interface layer 50 outputs the input command to the debug kernel layer 51, and entrusts interpretation and execution of the command. The command conversion routine 73 converts the input command into a function call code “TCI_RUN (0x0000)” and outputs it to the format conversion routine 74. The format conversion routine 74 rewrites the function call code into a format depending on the hardware environment. Since the hardware environment is a monitor type, the format "MON_RUN (0x000
0)].

【0098】様式変換ルーチン74が関数呼出コードMO
N_RUN(0x0000)にて関数呼び出しすると、モニタ制御層
61は、被デバッグプログラム37を実行する旨をシリ
アル転送ポート31−シリアル回線40−専用端子39
を介して試作機30に出力する。プログラム実行が命じ
られたので、プロセッサ33は、被デバッグプログラム
37の実行を開始する。
The format conversion routine 74 is executed by the function call code MO
When a function is called by N_RUN (0x0000), the monitor control layer 61 informs the serial transfer port 31-serial line 40-dedicated terminal 39 that the debugged program 37 is to be executed.
And outputs the result to the prototype 30. Since execution of the program has been ordered, the processor 33 starts execution of the debugged program 37.

【0099】プロセッサ33が被デバッグプログラム3
7の実行を開始したので、試作機30は動作を開始す
る。その後、先に設定されたブレークポイントにより、
被デバッグプログラム37の動作が中断すると、プロセ
ッサ33はプログラムが中断した旨を専用端子39−シ
リアル回線40−シリアル転送ポート31を介してモニ
タ制御層61に通知する。
The processor 33 executes the debugged program 3
7, the prototype 30 starts operating. Then, with the breakpoint set earlier,
When the operation of the debugged program 37 is interrupted, the processor 33 notifies the monitor control layer 61 via the dedicated terminal 39, the serial line 40, and the serial transfer port 31 that the program has been interrupted.

【0100】動作中断を示す信号をプロセッサ33がモ
ニタ制御層61に出力すると、モニタ制御層61は動作
中断を、様式変換ルーチン74−コマンド変換ルーチン
73−コマンドインタプリタ72を介してユーザインタ
ーフェィス層50に通知する。動作中断が通知される
と、ユーザインターフェィス層50は『*{TARGET1}
のプログラムは{0x0123}で中断しました。』というメ
ッセージを表示した後、プロムプト『>』を表示して、
操作者からの入力待ちになる。
When the processor 33 outputs a signal indicating operation interruption to the monitor control layer 61, the monitor control layer 61 sends the operation interruption to the user interface layer 50 via the format conversion routine 74, the command conversion routine 73, and the command interpreter 72. Notice. When the operation interruption is notified, the user interface layer 50 displays "* {TARGET1}".
Program aborted at {0x0123}. ] Is displayed, then the prompt ">" is displayed,
Waits for input from the operator.

【0101】<selectTARGETの入力時の動作>図21〜
図26は、図7及び図8に示したデバッグ装置の内部階
層図に対して、コマンド、関数呼出コード、状態情報の
行き来を加筆した説明図である。そのうち図21は、モ
ニタ型ハードウェア環境におけるプログラムの動作中に
切り換え先をシュミレータ型に規定したSelectTargetコ
マンドが入力された場合の状態情報の行き来を示してい
る。各階層にはこの際に用いられる関数呼出コード、コ
マンドが配置され、これらの間の行き来が矢印にて加筆
されている。図21の説明図と、図30のフローチャー
トを参照しながらselectTARGETコマンドの解読に関連す
るコマンドインタプリタ72の処理内容を説明する。
<Operation at the time of input of selectTARGET> FIGS.
FIG. 26 is an explanatory diagram in which commands, function call codes, and exchange of state information are added to the internal hierarchy of the debugging device shown in FIGS. 7 and 8. Among them, FIG. 21 shows the flow of state information when a SelectTarget command that specifies a switching destination as a simulator type is input during the operation of a program in a monitor-type hardware environment. A function call code and a command used at this time are arranged in each hierarchy, and the flow between them is added by arrows. The processing contents of the command interpreter 72 related to the decoding of the selectTARGET command will be described with reference to the explanatory diagram of FIG. 21 and the flowchart of FIG.

【0102】モニタ型のハードウェア環境にて動作検証
を行っている際、操作者がキーボード3をキータイプし
て、切換先をシュミレータに規定したselectTARGETコマ
ンドを入力したものとする。図30におけるステップS
81においてユーザインターフェィス層50は図12に
示したプロムプト『>』を表示し、操作者からのコマン
ド入力を待っている。キータイプにより操作者がデバッ
グコマンドを入力すると、ステップS82に移行して、
コマンドインタプリタ72は入力されたコマンドの解析
を行う。解析の結果オペコードが『selectTARGET』なら
ステップS83がYesとなってステップS84に移行
し、現在デバッグに用いているハードウェア環境(以下
『src_target』という)側にプログラム実行の停止を指
示する。そしてステップS85、ステップS86、ステ
ップS87、ステップS88、ステップS89、ステッ
プS90においてコマンドインタプリタ72はcopyMEM
コマンド、copyREGコマンド、copyBPコマンド、copyINT
コマンド、copyI/Oコマンド、copyTRACE_DATAコマンド
を自動発行する(図21の矢印y1参照)。
It is assumed that during operation verification in a monitor-type hardware environment, the operator types a key on the keyboard 3 and inputs a selectTARGET command in which a switching destination is specified in the simulator. Step S in FIG.
At 81, the user interface layer 50 displays the prompt ">" shown in FIG. 12, and waits for a command input from the operator. When the operator inputs a debug command by the key type, the process proceeds to step S82,
The command interpreter 72 analyzes the input command. If the operation code is "selectTARGET" as a result of the analysis, step S83 becomes Yes and the process moves to step S84 to instruct the hardware environment (hereinafter referred to as "src_target") currently used for debugging to stop the program execution. In step S85, step S86, step S87, step S88, step S89, and step S90, the command interpreter 72
Command, copyREG command, copyBP command, copyINT
A command, a copyI / O command, and a copyTRACE_DATA command are automatically issued (see arrow y1 in FIG. 21).

【0103】copyMEM〜copyTRACE_DATAコマンドの自動
発行が行われると、下位層に位置するコマンド変換ルー
チン73は、自動発行されたコマンドを関数呼出コード
に変換する。サブコマンドCopyMEMは、コマンド変換ル
ーチン73によりTCI_get_mem(adr,length,unit,image)
という関数呼出コードと、TCI_set_mem(adr,length,uni
t,image)という関数呼出コードとに変換される(図21
の矢印y2参照)。サブコマンドCopyRegは、コマンド変
換ルーチン73によりTCI_get_reg(regs,mask)といい関
数呼出コードと、TCI_set_reg(regs,mask)という関数呼
出コードとに変換される。
When the copyMEM to copyTRACE_DATA commands are automatically issued, the command conversion routine 73 located in the lower layer converts the automatically issued commands into function call codes. The subcommand CopyMEM is transmitted by the command conversion routine 73 using TCI_get_mem (adr, length, unit, image).
Function call code and TCI_set_mem (adr, length, uni
t, image) (Fig. 21
Arrow y2). The command conversion routine 73 converts the subcommand CopyReg into a function call code called TCI_get_reg (regs, mask) and a function call code called TCI_set_reg (regs, mask).

【0104】様式変換ルーチン74は、コマンド変換ル
ーチン73により変換された関数呼出コードをハードウ
ェア環境に依存した様式に変換する。切換元はモニタ型
に設定され、切換先はシュミレータ型に設定されている
ことから、先ず様式変換ルーチン74は、TCI_get_mem
(adr,length,unit,image)における『TCI_get_mem』とい
う関数名を切換元を明示した関数名に書き換える。切換
元のハードウェア環境はモニタ型であるから、モニタ型
を明示した関数名『MON_get_mem』に書き換え、MON_get
_mem(adr,length,unit,image)を得る(図21の矢印y3
参照)。
The format conversion routine 74 converts the function call code converted by the command conversion routine 73 into a format depending on the hardware environment. Since the switching source is set to the monitor type and the switching destination is set to the simulator type, first, the style conversion routine 74 sets the TCI_get_mem
The function name “TCI_get_mem” in (adr, length, unit, image) is rewritten to a function name that specifies the switching source. Since the hardware environment of the switching source is a monitor type, it is rewritten to a function name "MON_get_mem" that clearly indicates the monitor type, and MON_get
_mem (adr, length, unit, image) is obtained (arrow y3 in FIG. 21).
reference).

【0105】続いて様式変換ルーチン74は、TCI_set_
mem(adr,length,unit,image)における『TCI_set_mem』
という関数名を切換先を明示した関数名に書き換える。
切換先のハードウェア環境はシュミレータ型であるか
ら、シュミレータ型を明示した関数名『SIM_set_mem』
に書き換える。書き換え結果は、SIM_set_mem(adr,leng
th,unit,image)となる(図21の矢印y4参照)。関数名
を書き換えた後、様式変換ルーチン74は関数呼出コー
ドを用いて関数呼出を行う。
Subsequently, the format conversion routine 74 executes TCI_set_
"TCI_set_mem" in mem (adr, length, unit, image)
Is rewritten to a function name that clearly indicates the switching destination.
Since the hardware environment of the switching destination is a simulator type, the function name "SIM_set_mem" that explicitly specifies the simulator type
Rewrite to The rewrite result is SIM_set_mem (adr, leng
th, unit, image) (see arrow y4 in FIG. 21). After rewriting the function name, the format conversion routine 74 calls the function using the function call code.

【0106】様式変換ルーチン74が関数呼出コードMO
N_get_mem(adr,length,unit,image)にて関数呼び出しす
ると、モニタ制御層61は、図17のフローチャートに
従い、試作機30のデータをシリアル転送ポート31−
シリアル回線40−専用端子39を介して8バイトずつ
モニタ制御層61に読み出す。読み出された8バイトの
データは共用ワークエリア77における領域imageに蓄
積される。このような繰り返しがn回行われると、関数
呼出コードに引数lengthで指定したサイズのデータが状
態情報として共用ワークエリア77のimage領域上に格
納される(矢印T1参照)。
The format conversion routine 74 uses the function call code MO
When the function is called by N_get_mem (adr, length, unit, image), the monitor control layer 61 transfers the data of the prototype 30 to the serial transfer port 31- according to the flowchart of FIG.
The data is read out to the monitor control layer 61 in units of 8 bytes via the serial line 40 and the dedicated terminal 39. The read 8-byte data is accumulated in the area image in the shared work area 77. When such repetition is performed n times, data of the size specified by the argument length in the function call code is stored as state information in the image area of the shared work area 77 (see arrow T1).

【0107】蓄積された後、様式変換ルーチン74が関
数呼出コードSIM_set_mem(adr,length,unit,image)を用
いて関数呼出を行う。様式変換ルーチン74により呼び
出されれば、共用ワークエリア77において引数image
に指定されている領域のデータを状態情報としてメモリ
模擬ルーチン96内の開始アドレスadr以降の領域に書
き込む(矢印T2参照)。書き込み作業は取得長lengthに
指定されているサイズだけ、取得単位unitにて指定され
ている単位で行われる。このように共用ワークエリア7
7からメモリ模擬ルーチン96への書き込みを行うこと
により試作機30からシュミレータ10へのメモリ内容
の転送が完了する。
After the storage, the format conversion routine 74 calls a function using the function call code SIM_set_mem (adr, length, unit, image). If called by the style conversion routine 74, the argument image in the shared work area 77
Is written as state information into the area after the start address adr in the memory simulation routine 96 (see arrow T2). The writing operation is performed by the size specified in the acquisition length length in the unit specified in the acquisition unit. Thus, the shared work area 7
7 to the memory simulation routine 96, the transfer of the memory contents from the prototype 30 to the simulator 10 is completed.

【0108】同様の作業をcopyREGコマンド、copyBPコ
マンド、copyINTコマンド、copyI/Oコマンド、copyTRAC
E_DATAコマンドについて行う。そうすると、試作機30
の記憶資源の動作状態がシュミレータ10へと転送され
る。その結果、それまでの試作機30の動作状態がシュ
ミレータ10に継承される。継承後、動作状態情報が設
定されると、プログラムの動作を切換先シュミレータ1
0において再開するよう制御する。
The same operation is performed by the copyREG command, copyBP command, copyINT command, copyI / O command, copyTRAC
This is performed for the E_DATA command. Then, the prototype 30
Is transferred to the simulator 10. As a result, the operating state of the prototype 30 up to that time is inherited by the simulator 10. After the inheritance, when the operation state information is set, the operation of the program is switched to the switching destination simulator 1
Control to restart at 0.

【0109】図22は、モニタ型ハードウェア環境にお
けるプログラムの動作中に切り換え先をICE型に規定し
たSelectTargetコマンドが入力された場合の状態情報の
行き来を示している。本図が図21と異なるのは、ICE
型ハードウェア環境を指定したselectTARGETコマンドが
入力されたため、コマンド変換ルーチン73が生成した
関数呼出コードTCI_SET_mem(adr,length,unit,image)
を様式変換ルーチン74がICE型に依存した様式に書き
換え、この書き換えにより、ICE制御層62が駆動され
た点である。
FIG. 22 shows the flow of state information when a SelectTarget command specifying an ICE destination is input during the operation of a program in the monitor-type hardware environment. This figure differs from FIG.
A function call code TCI_SET_mem (adr, length, unit, image) generated by the command conversion routine 73 because the selectTARGET command specifying the type hardware environment is input
Is converted into a format dependent on the ICE type by the format conversion routine 74, and the ICE control layer 62 is driven by this rewriting.

【0110】駆動されたICE制御層62は、試作機30
内の状態情報が格納された領域imageの内容をBIOSコマ
ンドを用いて評価ボード20内に書き込む(矢印T4参
照)。このようにして、試作機30の状態情報が評価ボ
ード20へと転送され、それまでの試作機30のプログ
ラムの動作が評価ボード20上へと継承される。図23
は、ICE型ハードウェア環境におけるプログラムの動作
中に切り換え先をモニタ型に規定したSelectTargetコマ
ンドが入力された場合の状態情報の行き来を示してい
る。本図が図22と異なるのは、転送元と転送先の関係
が入れ代わっている点である。即ち、転送元がICE型で
あり、転送先がモニタ型なのである。ICE型ハードウェ
ア環境を指定したselectTARGETコマンドが入力されたた
め、コマンド変換ルーチン73が生成した関数呼出コー
ドTCI_GET_mem(adr,length,unit,image)を様式変換ル
ーチン74がICE型に依存した様式に書き換える。この
書き換えにより、ICE制御層62が駆動され、駆動され
たICE制御層62は、評価ボード20内の状態情報をBIO
Sコマンドを用いて共用ワークエリア77内の領域image
内に書き込む(矢印T5参照)。
The driven ICE control layer 62 is
The content of the area image in which the status information is stored is written into the evaluation board 20 using the BIOS command (see arrow T4). In this way, the state information of the prototype 30 is transferred to the evaluation board 20, and the operation of the program of the prototype 30 up to that point is inherited on the evaluation board 20. FIG.
Shows the exchange of state information when a SelectTarget command specifying a switch destination as a monitor type is input during operation of a program in an ICE-type hardware environment. This drawing differs from FIG. 22 in that the relationship between the transfer source and the transfer destination is interchanged. That is, the transfer source is the ICE type and the transfer destination is the monitor type. Since the selectTARGET command specifying the ICE type hardware environment is input, the format conversion routine 74 rewrites the function call code TCI_GET_mem (adr, length, unit, image) generated by the command conversion routine 73 into a format dependent on the ICE type. By this rewriting, the ICE control layer 62 is driven, and the driven ICE control layer 62 transmits the status information in the evaluation board 20 to the BIO
The area image in the shared work area 77 using the S command
(See arrow T5).

【0111】一方コマンド変換ルーチン73が生成した
関数呼出コードTCI_SET_mem(adr,length,unit,image)
を様式変換ルーチン74がモニタ型に依存した様式に書
き換える。この書き換えにより、モニタ制御層61が駆
動され、駆動されたモニタ制御層61は、評価ボード2
0内の状態情報が格納された領域imageの内容をシリア
ル回線40を介して試作機30内に書き込む(矢印T6参
照)。このようにして、評価ボード20の状態情報が試
作機30へと転送され、それまでの評価ボード20のプ
ログラムの動作が試作機30上へと継承される。
On the other hand, the function call code TCI_SET_mem (adr, length, unit, image) generated by the command conversion routine 73
Is rewritten by the format conversion routine 74 into a format dependent on the monitor type. This rewriting drives the monitor control layer 61, and the driven monitor control layer 61
The contents of the area image in which the status information in 0 is stored are written into the prototype 30 via the serial line 40 (see arrow T6). In this manner, the state information of the evaluation board 20 is transferred to the prototype 30, and the operation of the program of the evaluation board 20 up to that point is inherited on the prototype 30.

【0112】図24は、ICE型ハードウェア環境におけ
るプログラムの動作中に切り換え先をシュミレータ型に
規定したSelectTargetコマンドが入力された場合の状態
情報の行き来を示している。本図が図23と異なるの
は、転送先がモニタ型からシュミレータ型に入れ代わっ
ている点である。即ち、転送元がICE型であり、転送先
がシュミレータ型なのである。ICE型ハードウェア環境
を指定したselectTARGETコマンドが入力されたため、コ
マンド変換ルーチン73が生成した関数呼出コードTCI_
GET_mem(adr,length,unit,image)を様式変換ルーチン
74がICE型に依存した様式に書き換える。この書き換
えにより、ICE制御層62が駆動され、駆動されたICE制
御層62は、評価ボード20内の状態情報をBIOSコマン
ドを用いて共用ワークエリア77内の領域image内に書
き込む(矢印T7参照)。
FIG. 24 shows the flow of state information when a SelectTarget command specifying a switch destination as a simulator type is input during the operation of a program in an ICE type hardware environment. This drawing is different from FIG. 23 in that the transfer destination is changed from the monitor type to the simulator type. That is, the transfer source is the ICE type and the transfer destination is the simulator type. Since the selectTARGET command specifying the ICE type hardware environment is input, the function call code TCI_
The format conversion routine 74 rewrites GET_mem (adr, length, unit, image) to a format dependent on the ICE type. By this rewriting, the ICE control layer 62 is driven, and the driven ICE control layer 62 writes the state information in the evaluation board 20 into the area image in the shared work area 77 using the BIOS command (see the arrow T7). .

【0113】一方コマンド変換ルーチン73が生成した
関数呼出コードTCI_SET_mem(adr,length,unit,image)
を様式変換ルーチン74がシュミレータ型に依存した様
式に書き換える。この書き換えにより、シュミレータ1
0が駆動され、評価ボード20内の状態情報が格納され
た領域imageの内容をその内部のメモリ模擬ルーチン9
6に書き込む(矢印T8参照)。このようにして、評価ボ
ード20の状態情報がシュミレータ10へと転送され、
それまでの評価ボード20のプログラムの動作がシュミ
レータ10上へと継承される。
On the other hand, the function call code TCI_SET_mem (adr, length, unit, image) generated by the command conversion routine 73
Is rewritten by the format conversion routine 74 into a format dependent on the simulator type. By this rewriting, simulator 1
0 is driven and the contents of the area image in the evaluation board 20 where the state information is stored are stored in the memory simulation routine 9 therein.
Write 6 (see arrow T8). In this way, the state information of the evaluation board 20 is transferred to the simulator 10,
The operation of the program on the evaluation board 20 up to that time is inherited on the simulator 10.

【0114】図25は、シュミレータ型ハードウェア環
境におけるプログラムの動作中に切り換え先をモニタ型
に規定したSelectTargetコマンドが入力された場合の状
態情報の行き来を示している。本図が図21と異なるの
は、転送先と転送元とが入れ代わっている点である。即
ち、転送元がシュミレータ型であり、転送先がモニタ型
なのである。モニタ型ハードウェア環境を指定したsele
ctTARGETコマンドが入力されたため、コマンド変換ルー
チン73が生成した関数呼出コードTCI_GET_mem(adr,l
ength,unit,image)を様式変換ルーチン74がシュミレ
ータ型に依存した様式に書き換える。この書き換えによ
り、シュミレータ10が駆動され、駆動されたシュミレ
ータ10は、自身の状態情報を共用ワークエリア77内
の領域image内に書き込む(矢印T9参照)。
FIG. 25 shows the flow of state information when a SelectTarget command specifying a monitor destination is input during the operation of a program in a simulator-type hardware environment. This drawing differs from FIG. 21 in that the transfer destination and the transfer source are interchanged. That is, the transfer source is a simulator type and the transfer destination is a monitor type. Sele specifying monitor type hardware environment
Since the ctTARGET command is input, the function call code TCI_GET_mem (adr, l
ength, unit, image) is rewritten by the format conversion routine 74 into a format dependent on the simulator type. By this rewriting, the simulator 10 is driven, and the driven simulator 10 writes its own state information in the area image in the shared work area 77 (see arrow T9).

【0115】一方コマンド変換ルーチン73が生成した
関数呼出コードTCI_SET_mem(adr,length,unit,image)
を様式変換ルーチン74がモニタ型に依存した様式に書
き換える。この書き換えにより、モニタ制御層61が駆
動され、駆動されたモニタ制御層61は、格納された領
域imageの内容を試作機30内部に書き込む(矢印T10参
照)。このようにして、シュミレータ10の状態情報が
試作機30へと転送され、それまでのシュミレータ10
のプログラムの動作が試作機30上へと継承される。
On the other hand, the function call code TCI_SET_mem (adr, length, unit, image) generated by the command conversion routine 73
Is rewritten by the format conversion routine 74 into a format dependent on the monitor type. By this rewriting, the monitor control layer 61 is driven, and the driven monitor control layer 61 writes the contents of the stored area image into the prototype 30 (see the arrow T10). In this way, the state information of the simulator 10 is transferred to the prototype 30 and the simulator 10
The operation of the program is inherited on the prototype 30.

【0116】図26は、シュミレータ型ハードウェア環
境におけるプログラムの動作中に切り換え先をICE型に
規定したSelectTargetコマンドが入力された場合の状態
情報の行き来を示している。本図が図22と異なるの
は、転送先と転送元とが入れ代わっている点である。即
ち、転送元がシュミレータ型であり、転送先がICE型な
のである。ICE型ハードウェア環境を指定したselectTAR
GETコマンドが入力されたため、コマンド変換ルーチン
73が生成した関数呼出コードTCI_GET_mem(adr,lengt
h,unit,image)を様式変換ルーチン74がシュミレータ
型に依存した様式に書き換える。この書き換えにより、
シュミレータ10が駆動され、駆動されたシュミレータ
10は、自身の状態情報を共用ワークエリア77内の領
域image内に書き込む(矢印T11参照)。
FIG. 26 shows the flow of state information when a SelectTarget command specifying an ICE-type switching destination is input during operation of a program in a simulator-type hardware environment. This drawing differs from FIG. 22 in that the transfer destination and the transfer source are interchanged. That is, the transfer source is a simulator type and the transfer destination is an ICE type. SelectTAR specifying ICE type hardware environment
Since the GET command has been input, the function call code TCI_GET_mem (adr, lengt) generated by the command conversion routine 73
h, unit, image) is rewritten by the format conversion routine 74 into a format dependent on the simulator type. With this rewrite,
The simulator 10 is driven, and the driven simulator 10 writes its own state information in the area image in the shared work area 77 (see the arrow T11).

【0117】一方コマンド変換ルーチン73が生成した
関数呼出コードTCI_SET_mem(adr,length,unit,image)
を様式変換ルーチン74がICE型に依存した様式に書き
換える。この書き換えにより、ICE制御層62が駆動さ
れ、駆動されたICE制御層62は、格納された領域image
の内容を評価ボード20内部に書き込む(矢印T12参
照)。このようにして、シュミレータ10の状態情報が
評価ボード20へと転送され、それまでのシュミレータ
10のプログラムの動作が評価ボード20上へと継承さ
れる。
On the other hand, the function call code TCI_SET_mem (adr, length, unit, image) generated by the command conversion routine 73
Is converted to a format dependent on the ICE type by the format conversion routine 74. By this rewriting, the ICE control layer 62 is driven, and the driven ICE control layer 62
Is written into the evaluation board 20 (see arrow T12). In this way, the state information of the simulator 10 is transferred to the evaluation board 20, and the operation of the program of the simulator 10 up to that point is inherited on the evaluation board 20.

【0118】モニタ型、ICE型、シュミレータ型間のハ
ードウェア環境の任意の切り換えは、以上の図21〜図
26に示した状態情報の受け渡しにより実現される。続
いて、説明を保留したターゲット相互接続層52の残り
の構成要素(ワークエリアコンテンツ解析モジュール7
5)について説明する。ワークエリアコンテンツ解析モ
ジュール75は、各ハードウェア環境が有するメモリの
領域を、ブレークポイントの設定が可能な領域と不可能
な領域とに分割してハードウェア環境毎に管理するブレ
ークポイント管理機能(1)と、各ハードウェア環境がト
レースデータの蓄積に用いることができるメモリサイズ
をハードウェア環境毎に管理するトレースデータ蓄積サ
イズ管理機能(2)と、各ハードウェア環境が割込発生条
件の成立/不成立を監視する能力を有するか否かをハー
ドウェア環境毎に管理する割込発生条件管理機能(3)
と、I/Oマッピング情報の管理機能(4)とを有する。
Arbitrary switching of the hardware environment between the monitor type, the ICE type, and the simulator type is realized by the transfer of the state information shown in FIGS. Subsequently, the remaining components of the target interconnect layer 52 (the work area content analysis module 7)
5) will be described. The work area content analysis module 75 divides a memory area of each hardware environment into an area where breakpoints can be set and an area where breakpoints cannot be set, and manages the breakpoint management function (1) for each hardware environment. ), A trace data storage size management function (2) that manages the memory size that each hardware environment can use for storing trace data for each hardware environment, and each hardware environment Interrupt occurrence condition management function (3) that manages whether or not it has the ability to monitor failure for each hardware environment
And an I / O mapping information management function (4).

【0119】ワークエリアコンテンツ解析モジュール7
5が何故ブレークポイント管理機能(1)を有するかであ
るが、これはブレークポイントを割込命令の記入により
行う場合、ブレークポイント設定の可否がICE型、モニ
タ型、シュミレータ型間で異なることを想定しているか
らである。即ち切換元でRAMで構成されブレークポイン
トが設定されていたメモリ空間内の所定領域が、切換先
でROMで構成されている場合、そのブレークポイントを
切換先において設定することは不可能である。このよう
に切換元にて設定可能なブレークポイントが切換先では
不可能となる場合、これを予め操作者に通知しておかな
いと、ハードウェア環境を切り換えた途端にブレークポ
イントが無効になるという現象が発生する。このように
ハードウェア環境の切り換えに伴いブレークポイントが
無効になると、操作者はこれを故障と勘違いする恐れが
有り、不信感を抱かせかねない。そこでワークエリアコ
ンテンツ解析モジュール75にメモリ内のどの領域にブ
レークポイント設定が可能であり、どの領域はブレーク
ポイント設定が不可能であるかを管理させておくのであ
る。図28(a)はブレークポイント管理に用いる管理
情報の一例を示す図である。図中の『START_ADDR1 〜 E
ND_ADDR1』『START_ADDR2 〜 END_ADDR2』『START_ADDR
3 〜 END_ADDR3』は、それぞれがブレークポイント設定
の設定が可能な領域の開始アドレス、終了アドレスを示
している。図中の『VALID_AREA1』,『VALID_AREA2』,
『VALID_AREA3』は、ブレークポイントの設定可能領域
に付されたラベルを示している。
Work area content analysis module 7
5 has a breakpoint management function (1). This is because when a breakpoint is performed by writing an interrupt instruction, the possibility of setting a breakpoint differs between the ICE type, monitor type, and simulator type. Because it is assumed. That is, when a predetermined area in the memory space that is configured by the RAM at the switching source and has the breakpoint set is configured by the ROM at the switching destination, it is impossible to set the breakpoint at the switching destination. If a breakpoint that can be set at the switching source becomes impossible at the switching destination in this way, the breakpoint becomes invalid as soon as the hardware environment is switched unless the operator is notified in advance. This phenomenon occurs. When the breakpoint is invalidated in accordance with the switching of the hardware environment as described above, the operator may misunderstand the breakpoint as a failure, which may cause distrust. Therefore, the work area content analysis module 75 manages in which area in the memory a breakpoint can be set and in which area a breakpoint cannot be set. FIG. 28A shows an example of management information used for breakpoint management. START_ADDR1 to E in the figure
ND_ADDR1, START_ADDR2 to END_ADDR2, START_ADDR
3 to END_ADDR3 "respectively indicate the start address and the end address of the area in which a breakpoint can be set. “VALID_AREA1”, “VALID_AREA2”,
“VALID_AREA3” indicates a label attached to an area where a breakpoint can be set.

【0120】次にワークエリアコンテンツ解析モジュー
ル75が何故トレースデータ蓄積サイズ管理機能(2)を
有するかであるが、これはトレースデータの蓄積に割り
当ることができるメモリサイズがモニタ型、ICE型、シ
ュミレータ型間で異なることを想定しているからであ
る。即ち切換元がシミュレータであり、切換先がモニタ
である場合、切換元側で蓄積された全てのトレースデー
タをそのまま切換先に転送するのは不可能である。転送
途中で切換先のメモリがオーバーフローし、これまで蓄
積してきたトレースデータの一部が欠落してしまう。こ
のような欠落の可能性は予め操作者に通知しておかない
と、操作者はトレースデータが何の前触れもなく欠落す
るのを見て不信感を抱いてしまう。そこでワークエリア
コンテンツ解析モジュール75はトレースデータの蓄積
に割り当ることができるメモリサイズをハードウェア環
境毎に管理するのである。図28(b)は、トレースデ
ータを蓄積するためのメモリサイズを管理するための管
理情報の一例を示す図である。図中の『target1』『tar
get2』は、各ハードウェア環境の識別名であり、『SPAC
E_FOR_TRACE_DATA MAX 16Kbyte』は、各々のハードウ
ェア環境内においてトレースデータの蓄積に割り当てる
ことができるメモリサイズが16Kbyteであることを示し
ている。
The reason why the work area content analysis module 75 has the trace data storage size management function (2) is that the memory size that can be allocated to the storage of trace data is of the monitor type, ICE type, This is because it is assumed that there is a difference between the simulator types. That is, when the switching source is a simulator and the switching destination is a monitor, it is impossible to transfer all trace data accumulated on the switching source side to the switching destination as it is. During the transfer, the memory at the switching destination overflows, and a part of the trace data accumulated so far is lost. Unless the operator is notified in advance of the possibility of such a loss, the operator may have a distrust of seeing that the trace data is lost without any warning. Therefore, the work area content analysis module 75 manages the memory size that can be allocated to the accumulation of trace data for each hardware environment. FIG. 28B is a diagram illustrating an example of management information for managing a memory size for storing trace data. "Target1" and "tar"
"get2" is the identifier of each hardware environment.
“E_FOR_TRACE_DATA MAX 16 Kbytes” indicates that the memory size that can be allocated to the accumulation of trace data in each hardware environment is 16 Kbytes.

【0121】次にワークエリアコンテンツ解析モジュー
ル75が何故割り込み発生条件管理機能(3)を有するか
であるが、これは割り込み発生条件が成立しているか、
不成立であるかの監視能力の有無がモニタ型、ICE型、
シュミレータ型間で異なることを想定しているからであ
る。例えば、割り込み発生条件が命令の実行時間であ
り、切換元及び切換先がシミュレータ、モニタであるも
のとする。この場合切換元側では命令実行のカウントを
ソフトウェアにより実現すれば良いから割り込み発生条
件の成立を監視することができる。これに対して切換先
側では命令実行のカウントは、特別のハードウェアの改
造を行わない限り実現することは不可能である。もしそ
のような改造がなされていない場合、切換先では割り込
み発生条件の成立を監視することは不可能となるので、
切換先では何時まで立っても割り込み発生条件が発生し
ないという現象が表れる。このように割り込み発生条件
が成立しない場合は前もって操作者に通知しておかない
と、操作者に不信感を抱せてしまう。そこでワークエリ
アコンテンツ解析モジュール75は割り込み発生条件の
監視能力の有無をハードウェア環境毎に管理するのであ
る。図28(c)は、ハードウェア環境毎の監視能力を
管理するための管理情報の一例を示す図である。図中の
『target1』『target2』は、各ハードウェア環境の識別
名であり、『CYCLE_NUMBER_COUNT VALID』は、対応す
る識別情報のハードウェア環境において、プロセッサの
サイクル数のカウントが可能である旨を示し、『CYCLE_
NUMBER_COUNT INVALID』は、対応する識別情報のハー
ドウェア環境において、プロセッサのサイクル数のカウ
ントが不可能である旨を示す。
The reason why the work area contents analysis module 75 has the interrupt generation condition management function (3) is as follows.
Monitor type, ICE type,
This is because it is assumed that there is a difference between the simulator types. For example, it is assumed that the interrupt generation condition is an instruction execution time, and the switching source and the switching destination are a simulator and a monitor. In this case, the switching source side can monitor the satisfaction of the interrupt occurrence condition since the instruction execution count can be realized by software. On the other hand, on the switching destination side, counting of instruction execution cannot be realized unless special hardware is modified. If such a modification has not been made, it will not be possible to monitor the satisfaction of the interrupt occurrence condition at the switching destination.
At the switching destination, a phenomenon occurs in which the interrupt occurrence condition does not occur no matter how long it stands. As described above, if the interrupt occurrence condition is not satisfied, the operator must be notified in advance, or the operator may be distrusted. Therefore, the work area content analysis module 75 manages the presence or absence of the monitoring capability of the interrupt occurrence condition for each hardware environment. FIG. 28C is a diagram showing an example of management information for managing the monitoring capability for each hardware environment. In the figure, "target1" and "target2" are identifiers of each hardware environment, and "CYCLE_NUMBER_COUNT VALID" indicates that the number of processor cycles can be counted in the hardware environment of the corresponding identification information. , "CYCLE_
“NUMBER_COUNT INVALID” indicates that it is impossible to count the number of cycles of the processor in the hardware environment of the corresponding identification information.

【0122】次にワークエリアコンテンツ解析モジュー
ル75が何故I/Oマッピング情報の管理機能を有するか
であるが、これは周辺I/Oの実装状況がモニタ型、ICE
型、シュミレータ型間で異なることを想定しているから
である。即ち切換先がシミュレータであり、切換元がモ
ニタであるものとする。この場合、切換元では、ハード
ウェア調整等の進捗が遅れている等の理由により、周辺
I/Oが一部しか動作していないが、切換先側では実行環
境をソフトウェアにより仮想的に作成しているため全周
辺I/Oを動作させることができる。この状態のままI/Oの
状態情報を転送すると、切換先の周辺I/Oには、一部無
効な値が格納されてしまう。そこでワークエリアコンテ
ンツ解析モジュール75はハードウェア環境毎にどの周
辺I/Oが動作可能であり、どの周辺I/Oが動作不可能であ
るかを個別に管理するのである。
Next, the reason why the work area content analysis module 75 has a function of managing I / O mapping information is as follows.
This is because it is assumed that there is a difference between the type and the simulator type. That is, it is assumed that the switching destination is the simulator and the switching source is the monitor. In this case, at the switching source, the progress of hardware adjustment etc. is delayed,
Although only a part of the I / O is operating, all the peripheral I / Os can be operated on the switching destination side because the execution environment is virtually created by software. If the I / O state information is transferred in this state, a partially invalid value is stored in the peripheral I / O of the switching destination. Therefore, the work area content analysis module 75 individually manages which peripheral I / O is operable and which peripheral I / O is inoperable for each hardware environment.

【0123】ワークエリアコンテンツ解析モジュール7
5により管理されるI/Oマッピング情報の一例を図29
に示す。I/Oマッピング情報とは、切換元ハードウェア
環境において周辺I/Oレジスタの値が存在しない場合
に、切換先のハードウェア環境にどのような値を設定す
れば良いかを示す情報である。図中の『I/O_REGISTER_A
DDR1』は、一個目の周辺I/Oレジスタを示し、『PSW=STA
TUS1 0x1F』は、切換先のハードウェア環境においてプ
ロセッサのPSWレジスタ値が『STATUS1』である場合に一
個目の周辺I/Oレジスタに『0x1F』を設定する旨を示し
ている。また『PSW=STATUS2 0x2A』は、切換先のハー
ドウェア環境においてプロセッサのPSWレジスタの値が
『STATUS2』である場合に一個目の周辺I/Oレジスタに
『0x2A』を設定する旨を示している。更に『PSW=STATUS
3 0x3B』は、切換先のハードウェア環境においてプロ
セッサのPSWレジスタの値が『STATUS3』である場合に一
個目の周辺I/Oレジスタに『0x3B』を設定する旨を示し
ている。
Work area content analysis module 7
FIG. 29 shows an example of I / O mapping information managed by
Shown in The I / O mapping information is information indicating what value should be set in the hardware environment of the switching destination when the value of the peripheral I / O register does not exist in the hardware environment of the switching source. "I / O_REGISTER_A" in the figure
`` DDR1 '' indicates the first peripheral I / O register, and `` PSW = STA
“TUS1 0x1F” indicates that “0x1F” is set in the first peripheral I / O register when the PSW register value of the processor is “STATUS1” in the hardware environment of the switching destination. “PSW = STATUS2 0x2A” indicates that if the value of the PSW register of the processor is “STATUS2” in the hardware environment of the switching destination, “0x2A” is set in the first peripheral I / O register. . In addition, "PSW = STATUS
“30x3B” indicates that “0x3B” is set in the first peripheral I / O register when the value of the PSW register of the processor is “STATUS3” in the hardware environment of the switching destination.

【0124】続いてselectTARGETコマンドの拡張型コマ
ンドについて説明する。図10は拡張型コマンドのうち
3つの代表的なものを示している。ここでいうselectTA
RGETコマンドの拡張とは、selectTARGETコマンドの発行
に所定の条件を与えたという意味であり、図10におけ
る3つのコマンドはselectTARGETコマンド発行の条件が
それぞれ異なる。
Next, an extended command of the selectTARGET command will be described. FIG. 10 shows three typical extended commands. SelectTA here
The extension of the RGET command means that a predetermined condition is given to the issuance of the selectTARGET command, and the three commands in FIG. 10 have different conditions for issuing the selectTARGET command.

【0125】IFBreakコマンドは、現在デバッグに用い
られているハードウェア環境に被デバッグプログラムの
実行を指示し、もし当該実行がBreakNOで指定されたブ
レークポイントにより停止すれば、ターゲット相互接続
層52にハードウェア環境の切り換えを行うようSelect
TARGETを自動発行する。TargetASSIGNコマンドは、オペ
ランドでTABLE*にて指定した割り当てにてハードウェア
環境を切り換えるようターゲット相互接続層52に命じ
るコマンドである。図11は、TargetASSIGNコマンドに
より指定されるテーブルの一例であり、ハードウェア環
境切換の割り当てをターゲット相互接続層52に指示す
るようフォーマットが規定されている。本フォーマット
では、先頭アドレス、終了アドレスの一組毎に切り換え
を望むハードウェア環境を指定できるようになってい
る。図11では先頭アドレス、終了アドレスの組みを最
大n個の羅列することができ、それぞれの組み毎に異な
るハードウェア環境を切り換え先に規定できる。
The IFBreak command instructs the hardware environment currently used for debugging to execute the program to be debugged, and if the execution is stopped by the breakpoint specified by BreakNO, the hardware Select to switch hardware environment
Issue TARGET automatically. The TargetASSIGN command instructs the target interconnect layer 52 to switch the hardware environment according to the assignment specified by TABLE * in the operand. FIG. 11 is an example of a table specified by the TargetASSIGN command, in which the format is specified so as to instruct the target interconnect layer 52 to assign hardware environment switching. In this format, it is possible to specify a hardware environment for which switching is desired for each set of a start address and an end address. In FIG. 11, a maximum of n sets of combinations of the start address and the end address can be listed, and a different hardware environment can be defined as a switching destination for each set.

【0126】Switch()コマンドは、ハードウェア環境t
arget0の変数varの値に応じてハードウェア環境を切り
換えることをターゲット相互接続層52に命じるコマン
ドである。case'*1'は、変数 varの値が*1である場
合を想定しており、このときはハードウェア環境target
1が起動される。case'*2'は、変数 varの値が*2で
ある場合を想定しており、このときはハードウェア環境
target2が起動される。
The Switch () command is used in the hardware environment t
This command instructs the target interconnect layer 52 to switch the hardware environment according to the value of the variable var of arget0. case '* 1' assumes that the value of the variable var is * 1, in which case the hardware environment target
1 is activated. case '* 2' assumes that the value of the variable var is * 2, in which case the hardware environment
target2 is activated.

【0127】続いて、図10に示したselectTARGETコマ
ンドの3つの拡張コマンドが入力された場合のコマンド
インタプリタ72の処理を図31〜図33のフローチャ
ートを参照しながら説明する。ユーザインターフェィス
層50に対して操作者が『TargetASSIGN』コマンドを入
力したとする。この場合図30のステップS83がNoと
なり、図31のステップS71に移行する。ステップS
71においてコマンドインタプリタ72はオペコードが
TargetASSIGNであるかを判定する。この場合コマンドの
オペコードが合致するので、ステップS72においてTA
BLE*で指定されたテーブルを常駐させる。常駐後、ステ
ップS73においてテーブルにおける各開始アドレス
[i](i=1,2・・・n)にブレークポイントを設定する。設定
後、ステップS74において被デバッグプログラムを実
行させる。実行させると、ステップS75において被デ
バッグプログラムがブレークしたかを監視し、ブレーク
した場合はステップS76においてブレークしたアドレ
スが開始アドレス[i](i=1,2,3・・・n)のうち、何れに対応
するかを判定する。何れかに該当すると判定すると、ス
テップS77において開始アドレス[i]に対応するハー
ドウェア環境に切り換える旨のSelectTARGETを自動発行
する。
Next, the processing of the command interpreter 72 when three extended commands of the selectTARGET command shown in FIG. 10 are input will be described with reference to the flowcharts of FIGS. It is assumed that the operator has input a “TargetASSIGN” command to the user interface layer 50. In this case, step S83 in FIG. 30 is No, and the process shifts to step S71 in FIG. Step S
At 71, the command interpreter 72
Determine whether it is TargetASSIGN. In this case, since the operation codes of the commands match, the TA
Make the table specified by BLE * resident. After being resident, in step S73, each start address in the table
Set a breakpoint at [i] (i = 1, 2,... n). After the setting, the program to be debugged is executed in step S74. When the program is executed, it is monitored in step S75 whether or not the program to be debugged has been broken. It is determined which one corresponds. If it is determined that any of the above conditions is satisfied, a SelectTARGET for automatically switching to the hardware environment corresponding to the start address [i] is automatically issued in step S77.

【0128】次にユーザインターフェィス層50に対し
て操作者が『IFBreak』コマンドを入力したとする。こ
の場合図30のステップS83がNoとなり、ステップS
71に移行するが、図31のステップS71においても
Noとなり、ステップS91に移行する。ステップS91
においてコマンドインタプリタ72は、入力されたコマ
ンドのオペコードがIFBreakであるかを判定する。この
場合Yesとなり、ステップS92に移行して、オペラン
ドで指定された『BreakNO』『SelectTARGET target』を
常駐させる。その後、ステップS93において被デバッ
グプログラムを実行させる。実行させると、ステップS
94において被デバッグプログラムがブレークしたかを
判定し、もしブレークしたなら、ステップS96におい
てブレークしたアドレスがブレークポイント[i](i=1,2,
3・・・n)のうち、何れのBreakNOに対応するかを判定す
る。対応するものを判定すると、ステップS97におい
てSelectTARGETを自動発行する。
Next, it is assumed that the operator inputs an “IFBreak” command to the user interface layer 50. In this case, step S83 in FIG.
71, but also in step S71 of FIG.
No, the process moves to step S91. Step S91
In, the command interpreter 72 determines whether the operation code of the input command is IFBreak. In this case, the result is Yes, and the process shifts to step S92 to make “BreakNO” and “SelectTARGET target” specified by the operands resident. Thereafter, the program to be debugged is executed in step S93. When executed, step S
At 94, it is determined whether or not the program to be debugged has broken. If a break has occurred, the address at which the break has occurred is set at the breakpoint [i] (i = 1, 2,
It is determined which BreakNO corresponds to 3 ... n). When a corresponding one is determined, SelectTARGET is automatically issued in step S97.

【0129】ユーザインターフェィス層50に対して操
作者が『Switch(var)』コマンドを入力したとする。こ
の場合図30のステップS83がNoとなり、ステップS
71に移行するが、図31のステップS71においても
Noとなり、ステップS91に移行する。ステップS91
においてもNoとなりステップS100へと進行する。ス
テップS100ではオペコードがSwitch(var)であるか
が判定され、この場合はそうであるのでステップS10
1に移行する。ステップS101では、コマンドインタ
プリタ72は変数『var』をメモリアドレスmem_adr(va
r)に変換するようデバッグ核層51に指示し、変換後ス
テップS102において指定された『target0』のハー
ドウェア環境に変数adr(var)のメモリデータの読み出し
を指示する。指示後、ステップS103において読み出
しされたメモリデータがcasei(i=1,2,3,4,5・・・n)の何れ
かの内容と一致するかを判定し、一致する場合は、ステ
ップS104においてTARGET[i]に切り換える旨のSelec
tTARGETを自動発行する。
It is assumed that the operator has input a "Switch (var)" command to the user interface layer 50. In this case, step S83 in FIG.
71, but also in step S71 of FIG.
No, the process moves to step S91. Step S91
Is also No, and the process proceeds to step S100. In step S100, it is determined whether or not the operation code is Switch (var).
Move to 1. In step S101, the command interpreter 72 sets the variable “var” to the memory address mem_adr (va
r), and instructs the debug core layer 51 to read the memory data of the variable adr (var) to the hardware environment of “target0” specified in step S102 after the conversion. After the instruction, it is determined whether the memory data read in step S103 matches any of the contents of casei (i = 1, 2, 3, 4, 5,... N). To switch to TARGET [i]
Issue tTARGET automatically.

【0130】以上のように本実施形態によれば、select
TARGETコマンド入力という手軽な操作により、操作者は
デバッグ中のどのような状況においても、思い通りにハ
ードウェア環境を切り換えることができる。そのためバ
グが発生した状況を他のハードウェア環境で再現する手
間に煩わされることなく、別のハードウェア環境にてそ
のバグの発生原因を追究することができ、貴重な開発時
間を有効に活用することができる。
As described above, according to the present embodiment, select
With the simple operation of inputting the TARGET command, the operator can switch the hardware environment as desired in any situation during debugging. Therefore, it is possible to investigate the cause of the bug occurrence in another hardware environment without having to worry about reproducing the situation where the bug occurred in another hardware environment, and to use valuable development time effectively be able to.

【0131】特にバグが発生したデバッグ装置が解析機
能に乏しいモニタである場合、そのバグ原因を追究をIC
Eやシミュレータ等解析機能が豊富な実行環境に切り換
えることができ、原因解明までの時間がより短縮され
る。上記実施形態に基づいて説明してきたが、現状にお
いて最善の効果が期待できるシステム例として提示した
に過ぎない。本発明は、その要旨を逸脱しない範囲で変
更実施することができる。ハードウェア環境の切り換え
を意図したであればどのようなシステムに適用できるこ
とはいうまでもない。以下(a)(b)(c)・・・・に示
すような変更実施が可能である。
In particular, if the debug device in which the bug has occurred is a monitor with a poor analysis function, the cause of the bug should be investigated using an IC.
The execution environment can be switched to an abundant analysis function such as E or a simulator, and the time required to elucidate the cause is further reduced. Although the description has been given based on the above embodiment, it is merely presented as an example of a system in which the best effect can be expected at present. The present invention can be modified and implemented without departing from the gist thereof. It goes without saying that the present invention can be applied to any system as long as it is intended to switch the hardware environment. The following changes (a), (b), (c),... Are possible.

【0132】(a)本実施形態では、スーパーバイザプ
ログラムをメモリに配したが、デバッグ核層51内に存
在させる構成にしても良い。またターゲット相互接続層
52は、デバッグ核層51内に存在する構成にしても良
い。 (b)以上の説明では、ICE型ハードウェア環境がブレ
ークポイント、トレース設定、割り込み設定を有してい
る場合について記述したが、切換先がブレークポイン
ト、トレース設定、割り込み設定のうち何れかの機能が
利用できない場合、利用できる機能の設定情報のみを切
換先に設定するようにしてもよい。
(A) In this embodiment, the supervisor program is arranged in the memory. However, a configuration in which the supervisor program exists in the debug kernel layer 51 may be adopted. The target interconnect layer 52 may be configured to exist in the debug kernel layer 51. (B) In the above description, the case where the ICE type hardware environment has a breakpoint, a trace setting, and an interrupt setting is described. When is not available, only the setting information of available functions may be set as the switching destination.

【0133】(c)以上の説明では、ターゲット内ワー
クエリア38の内容を全て切換先へと転送しているが、
前回の転送分からの変更分のみを転送することにより転
送負荷を軽減しても良い。この場合スタック領域と、外
部変数領域の内容のバックアップをデバッグ核層51或
はターゲット相互接続層52に記憶させておく。そして
もしselectTARGETコマンド入力によりハードウェア環境
切り換えが指示されれば、そのバックアップしておいた
記憶内容と、これから転送すべき記憶内容とを比較して
変更された部分を検出し、変更があった部分のみを転送
するのである。この場合、変更されたメモリ領域を記憶
しておけば良いが、変更されたメモリ領域を含む領域を
保存するようにしてもよい。
(C) In the above description, the entire contents of the in-target work area 38 are transferred to the switching destination.
The transfer load may be reduced by transferring only the change from the previous transfer. In this case, a backup of the contents of the stack area and the external variable area is stored in the debug kernel layer 51 or the target interconnect layer 52. If the hardware environment switching is instructed by the input of the selectTARGET command, the storage contents that have been backed up and the storage contents to be transferred are compared to detect the changed part, and the changed part is detected. Only transfer. In this case, the changed memory area may be stored, but an area including the changed memory area may be stored.

【0134】(d)(c)において変更されたメモリ領
域をハードウェア環境の切替時に一括して転送する応用
例を示したが、ハードウェア環境がメモリ内容を変更す
る毎に、変更された内容を別のハードウェア環境に転送
してもよい。この場合、一方のハードウェア環境を他の
ハードウェア環境に切替る際にメモリ内容の転送が発生
しないので、ハードウェア環境の切り換えがより高速に
なる。
(D) The application example in which the changed memory area is transferred in a lump when the hardware environment is switched in (c) has been described. However, each time the hardware environment changes the memory content, the changed content is changed. May be transferred to another hardware environment. In this case, since the transfer of the memory contents does not occur when one hardware environment is switched to another hardware environment, the hardware environment is switched more quickly.

【0135】(e)さらに、以上の説明では、変更され
たメモリ領域を記憶し、記憶されたメモリ領域を切換先
に転送しているが、さらに変更されたレジスタの値を記
憶するようにし、記憶されたレジスタの値を切換元から
切換先に転送するようにしてもよい。この場合、変更さ
れたレジスタの値のみを転送するので、全てのレジスタ
を転送する場合と比較してハードウェア環境切り換えが
より高速となる。
(E) In the above description, the changed memory area is stored and the stored memory area is transferred to the switching destination. However, the changed register value is stored. The stored register value may be transferred from the switching source to the switching destination. In this case, only the changed register values are transferred, so that the hardware environment switching is faster than in the case where all registers are transferred.

【0136】(f)被デバッグプログラムのブレーク時
にハードウェア環境を切り換えるコマンドを示したが、
ハードウェア環境がエリアブレークを使用できる時に
は、エリアブレークによるハードウェア環境の切替を実
現してもよい。ここで、エリアブレークとは、あるアド
レス領域にハードウェア環境がアクセスした時、実行中
のプログラムを停止させる機能をさす。この場合、現在
のプログラムの命令読み出し先がどの先頭アドレスと最
終アドレスの範囲内にあるかを調べ、その範囲内に対応
したプログラムを実行する。
(F) The command for switching the hardware environment at the time of the break of the debugged program has been described.
When the hardware environment can use the area break, the hardware environment may be switched by the area break. Here, the area break refers to a function of stopping a running program when a hardware environment accesses a certain address area. In this case, it is checked which instruction read destination of the current program is within the range of the start address and the end address, and the program corresponding to the range is executed.

【0137】(g)本実施形態では、変数の値に応じて
ハードウェア環境を切り換えるというコマンドを示した
が、パラメータの値に応じてハードウェア環境を切り換
えるというコマンドを設けてハードウェア環境の切り換
えを実現してもよい。 (h)ハードウェア環境の切換指示と、割込信号発生を
監視する旨の指示と、切換先に規定すべきハードウェア
環境の指示とをコマンド内に配置し、これらの指示をコ
マンドインタプリタ72が解読して、解読結果に基づい
てハードウェア環境の切り換えを行わせてもよい。本デ
バッグ装置がこのような構成のコマンドよりハードウェ
ア環境の切り換えを行うことにより、操作者は特定の割
込信号発生時の被デバッグプログラムの動作を他のハー
ドウェア環境において観測することができる。
(G) In the present embodiment, the command for switching the hardware environment according to the value of the variable has been described. However, the command for switching the hardware environment according to the value of the parameter is provided to switch the hardware environment. May be realized. (H) A hardware environment switching instruction, an instruction to monitor the generation of an interrupt signal, and an instruction of a hardware environment to be specified as a switching destination are arranged in a command, and the command interpreter 72 interprets these instructions. The decryption may be performed, and the hardware environment may be switched based on the decryption result. By switching the hardware environment by using the command of the configuration, the operator can observe the operation of the program to be debugged when a specific interrupt signal is generated in another hardware environment.

【0138】(i)ハードウェア環境の切換指示と、ハ
ードウェア環境内の所定メモリ或はレジスタの内容の書
き換えを監視する旨の指示と、切換先に指定すべき第2
のハードウェア環境の指示とをコマンド内に配し、これ
らの指示をコマンドインタプリタ72が解読して、解読
結果に基づいてハードウェア環境の切り換えを行わせて
もよい。本デバッグ装置がこのような構成のコマンドよ
りハードウェア環境の切り換えを行うことにより、操作
者は特定メモリ或はレジスタの書き換え時の被デバッグ
プログラムの動作を他のハードウェア環境において観測
することができる。
(I) An instruction to switch the hardware environment, an instruction to monitor rewriting of the contents of a predetermined memory or register in the hardware environment, and a second instruction to be designated as the switching destination
May be arranged in a command, the command interpreter 72 decodes these instructions, and the hardware environment may be switched based on the result of the decoding. The present debugging apparatus switches the hardware environment by using the command having such a configuration, so that the operator can observe the operation of the program to be debugged when the specific memory or the register is rewritten in another hardware environment. .

【0139】(j)ハードウェア環境の切換指示と、操
作者が複数のハードウェア環境にどの実行予定時刻を対
応付けたかを示す対応表とをコマンド内に配し、これら
の指示をコマンドインタプリタ72が解読して、解読結
果に基づいてハードウェア環境の切り換えを行わせても
よい。 (k)デバッグ情報を、メモリ24及びメモリ模擬ルー
チン96上に配置する構成を示したが、これらをデバッ
グ核層51〜ターゲット相互接続層52上に配置しても
よい。このように配置した場合、ターゲット依存層53
内のモニタ制御層61、ICE制御層62、シミュレータ
からデバッグ情報を読み出す処理は実質不用となり、コ
マンド変換ルーチン73による関数呼出コードTCI_get_
mem、TCI_get_reg、TCI_get_BPの発行は行わなくてもよ
い。
(J) A command for switching the hardware environment and a correspondence table indicating which scheduled execution times are associated with the plurality of hardware environments by the operator are arranged in the command, and these instructions are transmitted to the command interpreter 72. May be decoded, and the hardware environment may be switched based on the decoding result. (K) Although the configuration in which the debug information is arranged on the memory 24 and the memory simulation routine 96 has been described, these may be arranged on the debug kernel layer 51 to the target interconnect layer 52. In such an arrangement, the target dependent layer 53
The process of reading debug information from the monitor control layer 61, the ICE control layer 62, and the simulator in the inside becomes substantially unnecessary, and the function call code TCI_get_
It is not necessary to issue mem, TCI_get_reg, and TCI_get_BP.

【0140】[0140]

【発明の効果】以上説明したようにデバッグ装置は、所
定のターゲットマシン向けに開発された組み込みプログ
ラムを当該ターゲットマシン、当該ターゲットマシンの
エミュレータマシン、当該ターゲットマシンのソフトウ
ェアシミュレータのうち、何れかにおいてテスト動作さ
せ、これの動作検証を行うデバッグ装置であって、前記
ターゲットマシン、エミュレータマシン、ソフトウェア
シミュレータは、組み込みプログラムの動作状態を示す
動作状態情報を有し、動作状態情報の入出力を固有の様
式にて行い、ターゲットマシン、当該ターゲットマシン
のエミュレータマシン、当該ターゲットマシンのソフト
ウェアシミュレータのうち何れかを動作検証対象として
記憶する動作検証対象記憶手段と、操作者によるコマン
ド入力を受け付ける受付手段と、受付手段が受け付けた
コマンド内に所定指示が含まれていればこれを検出する
検出手段と、所定指示が検出されると、動作検証対象記
憶手段に記憶されている動作検証対象を切換元動作検証
対象に指定し、受付手段が受け付けたコマンドに基づい
て前記ターゲットマシン、当該ターゲットマシンのエミ
ュレータマシン、当該ターゲットマシンのソフトウェア
シミュレータのうち切換元動作検証対象と異なるものを
切換先動作検証対象に指定する指定手段と、切換元及び
切換先が指定されると、切換元動作検証対象から動作状
態情報を読み出す読出手段と、読み出された動作状態情
報を、切換先動作検証対象の様式に変換する変換手段
と、動作状態情報が切換先の様式に変換されれば、様式
が変換された動作状態情報を切換先動作検証対象に設定
する設定手段と、動作状態情報が設定されると、組み込
みプログラムの動作を切換先動作検証対象において再開
するよう制御する動作再開手段とを備えるので、プログ
ラム開発者の指定によりハードウェア環境を切り換えな
がら、被デバッグプログラムのデバッグを行うことがで
きるので、各々のハードウェア環境の欠点を他のハード
ウェア環境の優位点が補う形でプログラムを実行するこ
とができ、効率のよいプログラムのデバッグを行なうこ
とができる。
As described above, the debugging device tests an embedded program developed for a predetermined target machine on any one of the target machine, the emulator machine of the target machine, and the software simulator of the target machine. A debug apparatus for operating and verifying the operation of the target machine, wherein the target machine, the emulator machine, and the software simulator have operation state information indicating an operation state of the embedded program, and input / output the operation state information in a specific format. Operation verification target storage means for storing any one of a target machine, an emulator machine of the target machine, and a software simulator of the target machine as a target of operation verification, and accepting a command input by an operator Receiving means, detecting means for detecting if a predetermined instruction is included in the command received by the receiving means, and detecting the operation verification target stored in the operation verification target storage means when the predetermined instruction is detected. The target machine, the emulator machine of the target machine, and the software simulator of the target machine, which are different from the target of the switching source operation verification, are designated as the switching source operation verification target and based on the command received by the receiving means. Designation means for designating an object, read means for reading the operation state information from the switching source operation verification target when the switching source and the switching destination are specified, and the read operation state information in the format of the switching destination operation verification object A converting means for converting the operating state information into the switching destination format, and converting the operating state information having the converted format into the switching destination format. A setting unit for setting the verification target; and an operation restarting unit for controlling the operation of the embedded program to be restarted in the switching operation verification target when the operation state information is set. Since the debugged program can be debugged while switching the environment, the program can be executed in such a way that the disadvantages of each hardware environment are compensated for by the advantages of the other hardware environment, and an efficient program can be created. You can debug.

【0141】例えばあるハードウェア環境がシミュレー
タにより構成されるものであり、解析機能を豊富に持ち
ながらも試作機のハードウェア環境を利用しているハー
ドウェア環境と比較して膨大な実行時間を要する場合
は、途中までの被デバッグプログラムの実行を試作機の
ハードウェア環境に行わせ、肝心のバグ原因解析をシミ
ュレータの豊富な機能を用いて行わせることができる。
For example, a certain hardware environment is constituted by a simulator, and requires a huge amount of execution time as compared with a hardware environment using a hardware environment of a prototype while having abundant analysis functions. In this case, the debugged program can be executed halfway in the hardware environment of the prototype, and the essential bug cause analysis can be performed using the abundant functions of the simulator.

【0142】数十回、数百回の被デバッグプログラム実
行につき一回発生するという発生頻度が非常に低いバグ
の原因追究時に、シミュレータの解析機能を用いたい場
合、本来ならシミュレータにより被デバッグプログラム
の実行を数十回、数百回繰り返させる必要がある。しか
し上記のようなハードウェア環境の切り換えを利用すれ
ば、試作機のハードウェア環境に数十回、数百回の被デ
バッグプログラムの繰り返しを行わせ、シミュレータを
バグ原因の追究のみに用いることができる。このように
ハードウェア環境の切り換えを応用すれば、数十回、数
百回の被デバッグプログラムの実行が早く行え、尚且つ
豊富な解析機能が利用できるのでデバッグ作業に要する
時間が大きく短縮される。
If it is desired to use the analysis function of the simulator when investigating the cause of a bug that occurs very frequently, once for every several tens or hundreds of executions of the program to be debugged, it is normally necessary to execute the program to be debugged by the simulator. The execution needs to be repeated tens or hundreds of times. However, by using the hardware environment switching described above, it is possible to make the hardware environment of the prototype machine repeat the program to be debugged tens or hundreds of times, and use the simulator only to find the cause of the bug. it can. By applying the switching of the hardware environment in this way, the program to be debugged can be executed several tens or hundreds of times quickly, and abundant analysis functions can be used, so that the time required for the debugging work is greatly reduced. .

【0143】更にこの切り換えは、コマンド発行という
手軽な操作であるので、操作者はデバッグ中のどのよう
な状況においても、思い通りに行える。そのためバグが
発生した状況を他のデバッグ装置で再現する手間に煩わ
されることなく、別の実行環境にてそのバグの発生原因
を追究することができ、貴重な開発時間を有効に活用す
ることができる。
Further, since this switching is a simple operation of issuing a command, the operator can perform the switching as desired in any situation during debugging. Therefore, it is possible to investigate the cause of the bug occurrence in another execution environment without having to worry about reproducing the situation where the bug occurred on another debug device, and to use valuable development time effectively. it can.

【0144】またその切り換えは、バグ発生当時の保持
値を他のハードウェア環境に設定し、マイクロコンピュ
ータやマイクロプロセッサのプログラムを最初から実行
し直すという煩わしさを伴わずに行われるので、貴重な
開発時間を有効に活用できる。また、前記ターゲットマ
シンは、動作状態情報の入出力を第1の様式にて行い、
前記エミュレータマシンは、動作状態情報の入出力を第
2の様式にて行い、前記ソフトウェアシミュレータは、
動作状態情報の入出力を第3の様式にて行い、前記変換
手段は、切換元がターゲットマシンであり切換先がソフ
トウェアシミュレータであれば、第1の様式を有する動
作状態情報を第3の様式に変換する第1変換部と、切換
元がエミュレータマシンであり切換先がソフトウェアシ
ミュレータであれば、第2の様式を有する動作状態情報
を第3の様式に変換する第2変換部とを備え、前記設定
手段は、動作状態情報が第3の様式に変換されれば、動
作状態情報をソフトウェアシミュレータに設定する第1
設定部を備えるように構成してもよい。この構成では、
たとえ動作状態情報の入出力が3つの様式を用いて行わ
れていても、ターゲットマシン、エミュレータマシンは
動作状態情報を相互にやりとりすることができる。
The switching is performed without the trouble of setting the value held at the time of the bug occurrence in another hardware environment and re-executing the microcomputer or microprocessor program from the beginning. Effective use of development time. Further, the target machine performs input / output of operation state information in a first format,
The emulator machine performs input / output of operation state information in a second format, and the software simulator includes:
The input / output of the operation state information is performed in a third format, and the conversion means converts the operation state information having the first format into the third format if the switching source is the target machine and the switching destination is the software simulator. And a second converter for converting the operating state information having the second format into a third format if the switching source is an emulator machine and the switching destination is a software simulator, The setting means sets the operation state information in the software simulator when the operation state information is converted into the third format.
You may comprise so that a setting part may be provided. In this configuration,
Even if the input / output of the operation state information is performed using three modes, the target machine and the emulator machine can exchange the operation state information with each other.

【0145】また、上記のように構成されたデバッグ装
置における前記変換手段は、切換元がソフトウェアシミ
ュレータであり切換先がターゲットマシンであれば、第
3の様式を有する動作状態情報を第1の様式に変換する
第3変換部と、切換元がソフトウェアシミュレータであ
り切換先がエミュレータマシンであれば、第3の様式を
有する動作状態情報を第2の様式に変換する第4変換部
とを備え、前記設定手段は、動作状態情報が第1の様式
に変換されれば、動作状態情報をターゲットマシンに設
定する第2設定部と、動作状態情報が第2の様式に変換
されれば、動作状態情報をエミュレータマシンに設定す
る第3設定部とを備えるように構成してもよい。この構
成では、たとえ動作状態情報の入出力が3つの様式を用
いて行われていても、ターゲットマシン、エミュレータ
マシンは動作状態情報を相互にやりとりすることができ
る。
Further, in the debugging device configured as described above, if the switching source is a software simulator and the switching destination is a target machine, the converting means converts the operating state information having the third format into the first format. And a fourth conversion unit for converting the operating state information having the third format into the second format if the switching source is a software simulator and the switching destination is an emulator machine, A setting unit configured to set the operation state information in the target machine if the operation state information is converted to the first format; and to set the operation state if the operation state information is converted to the second format. A third setting unit for setting information in the emulator machine may be provided. With this configuration, the target machine and the emulator machine can exchange the operating state information with each other even if the input and output of the operating state information are performed using three modes.

【0146】また前記変換手段は、切換元がターゲット
マシンであり切換先がエミュレータマシンであれば、第
1変換部を制御して、第1の様式を有する動作状態情報
を第3の様式に変換させ、変換後、第4変換部を制御し
て、第3の様式を有する動作状態情報を第2の様式に変
換させる第1制御部と、切換元がエミュレータマシンで
あり切換先がターゲットマシンであれば、第2変換部を
制御して、第2の様式を有する動作状態情報を第3の様
式に変換させ、変換後、第3変換部を制御して、第3の
様式を有する動作状態情報を第1の様式に変換させる第
2制御部とを備えるように構成してもよい。この構成で
は、たとえ動作状態情報の入出力が3つの様式を用いて
行われていても、ターゲットマシン、エミュレータマシ
ンは動作状態情報を相互にやりとりすることができる。
If the switching source is the target machine and the switching destination is the emulator machine, the conversion means controls the first conversion unit to convert the operation state information having the first format into the third format. After the conversion, a first control unit that controls the fourth conversion unit to convert the operation state information having the third format into the second format, and that the switching source is the emulator machine and the switching destination is the target machine If so, the second converter is controlled to convert the operating state information having the second format into the third format, and after the conversion, the third converter is controlled to control the operating state having the third format. And a second control unit configured to convert the information into the first format. With this configuration, the target machine and the emulator machine can exchange the operating state information with each other even if the input and output of the operating state information are performed using three modes.

【0147】また前記エミュレータ内部のプロセッサと
第1回線により接続され、第1の様式に変換された動作
状態情報の入出力を行うシリアル転送ポートと、ターゲ
ットマシン内部のインサーキットエミュレータマシンと
第2回線により接続され、第2の様式に変換された動作
状態情報の入出力を行うエミュレータマシンドライバ部
とを備えるように構成してもよい。
A serial transfer port connected to a processor inside the emulator by a first line for inputting / outputting operating state information converted into a first format, an in-circuit emulator machine inside a target machine, and a second line And an emulator machine driver unit for inputting and outputting the operation state information converted into the second format.

【0148】またターゲットマシン、エミュレータマシ
ン、ソフトウェアシミュレータが有するレジスタ及びメ
モリを、有効値が格納されているものと、無効値が格納
されているものとに分類して管理する記憶資源管理手段
と、読出手段により切換元動作検証対象から動作状態情
報が読み出されると、記憶資源管理手段の管理内容を参
照して、読み出された動作状態情報に含まれている無効
値をデフォルト値に書き換える書換手段とを備え、前記
変換手段は、無効値がデフォルト値に書き換えられた動
作状態情報を、切換先動作検証対象の様式に変換するよ
うに構成してもよい。この構成によれば、プログラム開
発者がハードウェア環境を切替る際、動作状態情報に含
まれていた無効な値をデフォルト値に書き換えるので、
スムーズなプログラムのデバッグを行うことができる。
A storage resource management means for classifying and managing registers and memories of the target machine, emulator machine and software simulator into those storing valid values and those storing invalid values, When the operating state information is read from the switching source operation verification target by the reading unit, the rewriting unit rewrites an invalid value included in the read operating state information to a default value by referring to the management content of the storage resource managing unit. The conversion means may be configured to convert the operation state information in which the invalid value has been rewritten to the default value into a format of the switching destination operation verification target. According to this configuration, when the program developer switches the hardware environment, the invalid value included in the operation state information is rewritten to the default value.
You can debug programs smoothly.

【0149】加えて、切換先、切換元においてレジスタ
の実装状態が異なっていても、その差違している部分に
予め定めた値を設定することができる。故に周辺機器レ
ジスタの制御を含む被デバッグプログラムのデバッグも
行うことが可能になる。またターゲットマシン、エミュ
レータマシン、ソフトウェアシミュレータが有するメモ
リにおいて、ブレークポイントの設定が可能な領域と、
不可能な領域とに分割して管理する設定可否領域管理手
段と、動作状態情報が変換されると、設定可否領域管理
手段を参照して、ブレークポイントが切換先動作検証対
象においても同様に設定することができるか否かを判定
する判定手段と、切換先動作検証対象においてブレーク
ポイントが設定できない場合、切換先ではブレークポイ
ントが設定できない旨を操作者に通知する通知手段とを
上記構成に付加してもよい。
In addition, even if the mounting state of the register is different between the switching destination and the switching source, a predetermined value can be set in the difference. Therefore, debugging of a program to be debugged including control of the peripheral device register can be performed. In the memory of the target machine, emulator machine, and software simulator, an area where breakpoints can be set,
The setting possible / impossible area management means which divides and manages the area into impossible areas, and when the operation state information is converted, the break point is similarly set in the switching operation verification target by referring to the setting possible / impossible area management means. A judgment means for judging whether or not a breakpoint can be set at a switching destination operation verification target and a notifying means for notifying an operator that a breakpoint cannot be set at a switching destination when a breakpoint cannot be set at a switching destination are added to the above configuration. May be.

【0150】この構成によれば、これまで切換元側で使
用しつ続けていたブレークポイントのうち一部が切換先
において使用不可能となる場合、切替後は該ブレークポ
イントが使えないことをプログラム開発者に察知させる
ことができる。ここで各動作検証対象が蓄積できるアド
レスの最大量を管理する最大量管理手段と、動作状態情
報が変換されると、最大量管理手段におけるアドレスの
最大量を参照して切換先動作検証対象における命令アド
レス群の蓄積量を認識する認識手段と、蓄積量を認識す
ると、切換先動作検証対象のアドレス蓄積量と、切換先
動作検証対象とのアドレス蓄積量の違いを操作者に通知
する通知手段とを上記構成に付加してもよい。
According to this configuration, if some of the breakpoints that have been used at the switching source until now become unusable at the switching destination, it is determined by the program that the breakpoint cannot be used after the switching. Let developers know. Here, the maximum amount management means for managing the maximum amount of addresses that each operation verification target can store, and when the operation state information is converted, the maximum amount management means refers to the maximum amount of addresses in the switching destination operation verification target. Recognition means for recognizing the storage amount of the instruction address group, and, when recognizing the storage amount, notification means for notifying the operator of the difference between the address storage amount of the switching destination operation verification target and the address storage amount of the switching destination operation verification target May be added to the above configuration.

【0151】この構成によれば、これまで切換元側で蓄
積され続けていたトレースデータのうち一部が切換先に
おいて欠落する場合、その欠落部に注意する旨をプログ
ラム開発者に察知させることができる。
According to this configuration, when a part of the trace data which has been continuously accumulated on the switching source side is lost at the switching destination, the program developer can be informed that the missing part is to be noted. it can.

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

【図1】本実施形態におけるデバッグ装置の外観図であ
る。
FIG. 1 is an external view of a debugging device according to an embodiment.

【図2】本実施形態におけるデバッグ装置のハードウェ
ア構成を示す構成図である。
FIG. 2 is a configuration diagram illustrating a hardware configuration of a debugging device according to the present embodiment.

【図3】モニタ型ハードウェア環境の構成を示す図であ
る。
FIG. 3 is a diagram illustrating a configuration of a monitor-type hardware environment.

【図4】ICE型ハードウェア環境の構成を示す図であ
る。
FIG. 4 is a diagram showing a configuration of an ICE type hardware environment.

【図5】シュミレータ型ハードウェア環境の構成を示す
図である。
FIG. 5 is a diagram illustrating a configuration of a simulator-type hardware environment.

【図6】デバッグ装置の階層構造を示す図である。FIG. 6 is a diagram showing a hierarchical structure of the debugging device.

【図7】アプリケ−ション層11内部の階層構造を示す
図である。
FIG. 7 is a diagram showing a hierarchical structure inside an application layer 11;

【図8】アプリケ−ション層11内部の各階層に含まれ
ている構成要素を示す図である。
FIG. 8 is a diagram showing components included in each layer inside the application layer 11.

【図9】本実施形態のデバッグ装置において用いること
ができるデバッグコマンドの体系図である。
FIG. 9 is a system diagram of a debug command that can be used in the debug device of the present embodiment.

【図10】本実施形態のデバッグ装置において用いるこ
とができるselectTARGETコマンドの拡張コマンドを示す
図である。
FIG. 10 is a diagram showing an extended command of a selectTARGET command that can be used in the debugging device of the present embodiment.

【図11】ハードウェア環境切り換えを規定するテーブ
ルのフォーマットを示す図である。
FIG. 11 is a diagram showing a format of a table that specifies hardware environment switching.

【図12】ユーザインターフェィス層50によるデバッ
グ作業時のディスプレイ2の表示例である。
FIG. 12 is a display example of the display 2 at the time of debugging work by the user interface layer 50.

【図13】変換前のcopyMEMコマンド〜copyTRACE_DATA
コマンドと、変換後の関数呼出コードTCI_get_mem(adr,
length,unit,image)〜TCI_get_TD(adr,length,unit,ima
ge)の対応関係を示す図である。
FIG. 13: copyMEM command before conversion to copyTRACE_DATA
Command and the converted function call code TCI_get_mem (adr,
length, unit, image) ~ TCI_get_TD (adr, length, unit, ima
ge) is a diagram showing a correspondence relationship. FIG.

【図14】図13に示した全ての関数呼出コードがどの
ように書き換えられたかを示す図である。
FIG. 14 is a diagram showing how all the function call codes shown in FIG. 13 have been rewritten.

【図15】ターゲット内ワークエリア38の内容を読み
出す際、モニタ制御層61と試作機30との間でなされ
る通信プロトコル及び当該通信プロトコルに用いられる
パケットを示す説明図である。
15 is an explanatory diagram showing a communication protocol between the monitor control layer 61 and the prototype 30 when reading the contents of the in-target work area 38, and a packet used for the communication protocol. FIG.

【図16】ターゲット内ワークエリア38に内容を書き
込む際、モニタ制御層61と試作機30との間でなされ
る通信プロトコル及び当該通信プロトコルに用いられる
パケットを示す説明図である。
FIG. 16 is an explanatory diagram showing a communication protocol performed between the monitor control layer 61 and the prototype 30 when writing contents to the in-target work area 38, and a packet used for the communication protocol.

【図17】ターゲット内ワークエリア38の内容を読み
出す際、モニタ制御層61が行う処理のフローチャート
である。
FIG. 17 is a flowchart of a process performed by the monitor control layer 61 when reading the contents of the in-target work area 38.

【図18】ターゲット内ワークエリア38に内容を書き
込む際、モニタ制御層61が行う処理のフローチャート
である。
FIG. 18 is a flowchart of a process performed by a monitor control layer 61 when writing contents to a work area 38 in a target.

【図19】ICE型ハードウェア環境の内容を読み出す
際、ICE制御層62及びICE用デバイスドライバが行う処
理の説明図である。
FIG. 19 is an explanatory diagram of a process performed by the ICE control layer 62 and the ICE device driver when reading the contents of the ICE type hardware environment.

【図20】ICE型ハードウェア環境に内容を書き込む
際、ICE制御層62及びICE用デバイスドライバが行う処
理の説明図である。
FIG. 20 is an explanatory diagram of processing performed by the ICE control layer 62 and the ICE device driver when writing content to the ICE type hardware environment.

【図21】モニタ型からシュミレータ型へと状態情報が
転送される様子を示す説明図である。
FIG. 21 is an explanatory diagram showing how state information is transferred from a monitor type to a simulator type.

【図22】モニタ型からICE型へと状態情報が転送され
る様子を示す説明図である。
FIG. 22 is an explanatory diagram showing how state information is transferred from a monitor type to an ICE type.

【図23】ICE型からモニタ型へと状態情報が転送され
る様子を示す説明図である。
FIG. 23 is an explanatory diagram showing how state information is transferred from the ICE type to the monitor type.

【図24】ICE型からシュミレータ型へと状態情報が転
送される様子を示す説明図である。
FIG. 24 is an explanatory diagram showing how state information is transferred from the ICE type to the simulator type.

【図25】シュミレータ型からモニタ型へと状態情報が
転送される様子を示す説明図である。
FIG. 25 is an explanatory diagram showing how state information is transferred from a simulator type to a monitor type.

【図26】シュミレータ型からICE型へと状態情報が転
送される様子を示す説明図である。
FIG. 26 is an explanatory diagram showing how state information is transferred from a simulator type to an ICE type.

【図27】(a)ブレークポイント設定先アドレスの一
例を示す図である。 (b)割り込み信号発生要件の一例を示す図である。 (c)トレースデータの一例を示す図である。
FIG. 27A shows an example of a breakpoint setting destination address. FIG. 3B is a diagram illustrating an example of an interrupt signal generation requirement. FIG. 3C is a diagram illustrating an example of trace data.

【図28】(a)ブレークポイント管理機能(1)のため
の管理情報の一例を示す図である。 (b)トレースデータ蓄積サイズ管理機能(2)のための
管理情報の一例を示す図である。 (c)割り込み発生条件管理機能(3)のための管理情報
の一例を示す図である。
FIG. 28A illustrates an example of management information for a breakpoint management function (1). FIG. 4B is a diagram illustrating an example of management information for a trace data storage size management function (2). (C) is a diagram showing an example of management information for the interrupt generation condition management function (3).

【図29】I/Oマッピング情報の管理機能(4)のための管
理情報の一例を示す図である。
FIG. 29 is a diagram showing an example of management information for a management function (4) of I / O mapping information.

【図30】本実施形態のselectTARGETコマンド実行時の
デバッグ装置の処理内容を示すフローチャートである。
FIG. 30 is a flowchart showing the processing contents of the debug device when executing a selectTARGET command according to the present embodiment.

【図31】本実施形態のTargetASSIGNコマンド実行時の
デバッグ装置の処理内容を示すフローチャートである。
FIG. 31 is a flowchart showing the processing contents of the debugging device when a TargetASSIGN command of the present embodiment is executed.

【図32】本実施形態のIFBreakコマンド実行時のデバ
ッグ装置の処理内容を示すフローチャートである。
FIG. 32 is a flowchart showing the processing contents of the debug device when executing the IFBreak command of the present embodiment.

【図33】本実施形態のSwitch(var)実行時のデバッグ
装置の処理内容を示すフローチャートである。
FIG. 33 is a flowchart showing the processing contents of the debug device when executing a switch (var) of the embodiment.

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

1 ホストコンピュ−タ 2 ディスプレイ 3 キーボード 10 シュミレータ 11 アプリケ−ション層 12 オペレーティングシステム層 13 BIOS層 14 物理層 20 評価ボード 21 デバイスドライバ 22 制御ボード 24 メモリ 25 レジスタ群 26 スーパバイザプログラム 27 デバッグ情報エリア 28 パラレル回線 30 試作機 31 シリアル転送ポート 33 プロセッサ 34 メモリ 35 周辺I/Oレジスタ群 36 モニタリングプログラム 37 被デバッグプログラム 38 ターゲット内ワークエリア 39 専用端子 40 シリアル回線 50 ユーザインターフェィス層 51 デバッグ核層 52 ターゲット相互接続層 53 ターゲット依存層 61 モニタ制御層 62 ICE制御層 72 コマンドインタプリタ 73 コマンド変換ルーチン 74 様式変換ルーチン 75 ワークエリアコンテンツ解析モジュール 77 共用ワークエリア 95 プロセッサ模擬ルーチン 96 メモリ模擬ルーチン 97 レジスタ模擬ルーチン DESCRIPTION OF SYMBOLS 1 Host computer 2 Display 3 Keyboard 10 Simulator 11 Application layer 12 Operating system layer 13 BIOS layer 14 Physical layer 20 Evaluation board 21 Device driver 22 Control board 24 Memory 25 Register group 26 Supervisor program 27 Debug information area 28 Parallel line Reference Signs List 30 prototype 31 serial transfer port 33 processor 34 memory 35 peripheral I / O register group 36 monitoring program 37 program to be debugged 38 work area in target 39 dedicated terminal 40 serial line 50 user interface layer 51 debug core layer 52 target interconnection layer 53 Target dependent layer 61 Monitor control layer 62 ICE control layer 72 Command interpreter 73 Command conversion routine 74 Formula conversion routine 75 Work area content analysis module 77 Shared work area 95 Processor simulation routine 96 Memory simulation routine 97 Register simulation routine

Claims (17)

【特許請求の範囲】[Claims] 【請求項1】 所定のターゲットマシン向けに開発され
た組み込みプログラムを当該ターゲットマシン、当該タ
ーゲットマシンのエミュレータマシン、当該ターゲット
マシンのソフトウェアシミュレータのうち、何れかにお
いてテスト動作させ、これの動作検証を行うデバッグ装
置であって、 前記ターゲットマシン、エミュレータマシン、ソフトウ
ェアシミュレータは、組み込みプログラムの動作状態を
示す動作状態情報を有し、動作状態情報の入出力を固有
の様式にて行い、 ターゲットマシン、当該ターゲットマシンのエミュレー
タマシン、当該ターゲットマシンのソフトウェアシミュ
レータのうち何れかを動作検証対象として記憶する動作
検証対象記憶手段と、 操作者によるコマンド入力を受け付ける受付手段と、 受付手段が受け付けたコマンド内に所定指示が含まれて
いればこれを検出する検出手段と、 所定指示が検出されると、動作検証対象記憶手段に記憶
されている動作検証対象を切換元動作検証対象に指定
し、受付手段が受け付けたコマンドに基づいて前記ター
ゲットマシン、当該ターゲットマシンのエミュレータマ
シン、当該ターゲットマシンのソフトウェアシミュレー
タのうち切換元動作検証対象と異なるものを切換先動作
検証対象に指定する指定手段と、 切換元及び切換先が指定されると、切換元動作検証対象
から動作状態情報を読み出す読出手段と、 読み出された動作状態情報を、切換先動作検証対象の様
式に変換する変換手段と、 動作状態情報が切換先の様式に変換されれば、様式が変
換された動作状態情報を切換先動作検証対象に設定する
設定手段と、 動作状態情報が設定されると、組み込みプログラムの動
作を切換先動作検証対象において再開するよう制御する
動作再開手段とを備えることを特徴とするデバッグ装
置。
1. A test operation of an embedded program developed for a predetermined target machine is performed on one of the target machine, an emulator machine of the target machine, and a software simulator of the target machine, and the operation of the test program is verified. A debugging device, wherein the target machine, the emulator machine, and the software simulator have operation state information indicating an operation state of the embedded program, and perform input and output of the operation state information in a specific format. An operation verification target storage unit for storing any one of a machine emulator machine and a software simulator of the target machine as an operation verification target; a reception unit for receiving a command input by an operator; and a reception unit for receiving Detecting means for detecting if a predetermined instruction is included in the command, and specifying the operation verification target stored in the operation verification target storage means as a switching source operation verification target when the predetermined instruction is detected, Designation means for designating a target machine, an emulator machine of the target machine, and a software simulator of the target machine that are different from the switching source operation verification target as the switching destination operation verification target based on the command received by the reception means; Reading means for reading operating state information from the switching source operation verification target when the source and the switching destination are specified; converting means for converting the read operation state information into a switching destination operation verification target format; Setting means for setting, when the information is converted into the switching destination format, the operation status information whose format has been converted to the switching destination operation verification target; When the operation status information is set, the debugging apparatus characterized by comprising an operation resuming means for controlling to restart the operation of the built-in program in the switching destination operation verified.
【請求項2】 前記ターゲットマシンは、動作状態情報
の入出力を第1の様式にて行い、前記エミュレータマシ
ンは、動作状態情報の入出力を第2の様式にて行い、前
記ソフトウェアシミュレータは、動作状態情報の入出力
を第3の様式にて行い、 前記変換手段は、 切換元がターゲットマシンであり切換先がソフトウェア
シミュレータであれば、第1の様式を有する動作状態情
報を第3の様式に変換する第1変換部と、 切換元がエミュレータマシンであり切換先がソフトウェ
アシミュレータであれば、第2の様式を有する動作状態
情報を第3の様式に変換する第2変換部とを備え、 前記設定手段は、 動作状態情報が第3の様式に変換されれば、動作状態情
報をソフトウェアシミュレータに設定する第1設定部を
備えることを特徴とする請求項1記載のデバッグ装置。
2. The target machine performs input and output of operation state information in a first format, the emulator machine performs input and output of operation state information in a second format, and the software simulator includes: The input / output of the operation state information is performed in a third format, and the conversion unit converts the operation state information having the first format into the third format if the switching source is the target machine and the switching destination is the software simulator. And a second converter for converting the operating state information having the second format into a third format if the switching source is an emulator machine and the switching destination is a software simulator, The said setting means is provided with the 1st setting part which sets operation state information to a software simulator, when operation state information is converted into the 3rd format. 1 debug device described.
【請求項3】 前記デバッグ装置において前記変換手段
は、 切換元がソフトウェアシミュレータであり切換先がター
ゲットマシンであれば、第3の様式を有する動作状態情
報を第1の様式に変換する第3変換部と、 切換元がソフトウェアシミュレータであり切換先がエミ
ュレータマシンであれば、第3の様式を有する動作状態
情報を第2の様式に変換する第4変換部とを備え、 前記設定手段は、 動作状態情報が第1の様式に変換されれば、動作状態情
報をターゲットマシンに設定する第2設定部と、 動作状態情報が第2の様式に変換されれば、動作状態情
報をエミュレータマシンに設定する第3設定部とを備え
ることを特徴とする請求項2記載のデバッグ装置。
3. The conversion device according to claim 1, wherein the conversion unit converts the operation state information having the third format into the first format if the switching source is a software simulator and the switching destination is a target machine. And a fourth conversion unit configured to convert the operation state information having the third format into the second format when the switching source is a software simulator and the switching destination is an emulator machine. A second setting unit that sets the operation state information to the target machine if the state information is converted to the first format; and sets the operation state information to the emulator machine if the operation state information is converted to the second format. 3. The debugging device according to claim 2, further comprising a third setting unit that performs setting.
【請求項4】 前記デバッグ装置において前記変換手段
は、 切換元がターゲットマシンであり切換先がエミュレータ
マシンであれば、第1変換部を制御して、第1の様式を
有する動作状態情報を第3の様式に変換させ、 変換後、第4変換部を制御して、第3の様式を有する動
作状態情報を第2の様式に変換させる第1制御部と、 切換元がエミュレータマシンであり切換先がターゲット
マシンであれば、第2変換部を制御して、第2の様式を
有する動作状態情報を第3の様式に変換させ、変換後、
第3変換部を制御して、第3の様式を有する動作状態情
報を第1の様式に変換させる第2制御部とを備えること
を特徴とする請求項3記載のデバッグ装置。
4. The debugging device according to claim 1, wherein the conversion unit controls the first conversion unit if the switching source is the target machine and the switching destination is the emulator machine, and outputs the operating state information having the first format. And a first control unit that controls the fourth conversion unit to convert the operation state information having the third format into the second format, and that the switching source is an emulator machine and the conversion is performed. If the destination is the target machine, the second conversion unit is controlled to convert the operation state information having the second format into the third format.
The debugging device according to claim 3, further comprising: a second control unit that controls the third conversion unit to convert the operation state information having the third format into the first format.
【請求項5】 前記デバッグ装置は、 エミュレータ内部のプロセッサと第1回線により接続さ
れ、第1の様式に変換された動作状態情報の入出力を行
うシリアル転送ポートと、 ターゲットマシン内部のインサーキットエミュレータマ
シンと第2回線により接続され、第2の様式に変換され
た動作状態情報の入出力を行うエミュレータマシンドラ
イバ部とを備えることを特徴とする請求項4記載のデバ
ッグ装置。
5. A debugger, comprising: a serial transfer port connected to a processor in an emulator via a first line for inputting / outputting operation state information converted into a first format; and an in-circuit emulator in a target machine. 5. The debugging device according to claim 4, further comprising: an emulator machine driver unit connected to the machine via a second line and configured to input and output the operation state information converted into the second format.
【請求項6】 前記動作状態情報は、動作検証対象内の
レジスタの保持値と、メモリの保持値とからなることを
特徴とする請求項5記載のデバッグ装置。
6. The debugging device according to claim 5, wherein the operation state information includes a held value of a register in an operation verification target and a held value of a memory.
【請求項7】 前記メモリの保持値は、 プロセッサに動作停止を指示するブレークポイント、 組み込みプログラムを構成する命令のうち、実行された
命令のアドレスからなるトレースデータ、 操作者が定めた所定条件を有し、当該成立時に割り込み
信号を発生させる割込設定情報の何れかであることを特
徴とする請求項6記載のデバッグ装置。
7. The value held in the memory includes a breakpoint for instructing the processor to stop operation, trace data including an address of an executed instruction among instructions constituting an embedded program, and a predetermined condition determined by an operator. 7. The debug device according to claim 6, wherein the debug device has any one of interrupt setting information for generating an interrupt signal when the condition is satisfied.
【請求項8】 前記デバッグ装置は更に、 ターゲットマシン、エミュレータマシン、ソフトウェア
シミュレータが有するレジスタ及びメモリを、有効値が
格納されているものと、無効値が格納されているものと
に分類して管理する記憶資源管理手段と、 読出手段により切換元動作検証対象から動作状態情報が
読み出されると、記憶資源管理手段の管理内容を参照し
て、読み出された動作状態情報に含まれている無効値を
デフォルト値に書き換える書換手段とを備え、 前記変換手段は、 無効値がデフォルト値に書き換えられた動作状態情報
を、切換先動作検証対象の様式に変換することを特徴と
する請求項7記載のデバッグ装置。
8. The debugging device further manages registers and memories of the target machine, the emulator machine, and the software simulator by classifying the registers and the memory of the target machine, the emulator machine, and the register of a valid value into a type storing a valid value and a type storing an invalid value. When the operating state information is read from the switching source operation verification target by the reading means, the invalid value included in the read operating state information is referred to by referring to the management contents of the storage resource managing means. And a rewriting means for rewriting the operation state information to a default value, wherein the conversion means converts the operation state information in which the invalid value has been rewritten to the default value into a format of a switching destination operation verification target. Debug device.
【請求項9】 前記デバッグ装置は更に、 ターゲットマシン、エミュレータマシン、ソフトウェア
シミュレータが有するメモリにおいて、ブレークポイン
トの設定が可能な領域と、不可能な領域とに分割して管
理する設定可否領域管理手段と、 動作状態情報が変換されると、設定可否領域管理手段を
参照して、ブレークポイントが切換先動作検証対象にお
いても同様に設定することができるか否かを判定する判
定手段と、 切換先動作検証対象においてブレークポイントが設定で
きない場合、切換先ではブレークポイントが設定できな
い旨を操作者に通知する通知手段とを備えることを特徴
とする請求項7記載のデバッグ装置。
9. The setting device according to claim 1, wherein the debug device further manages the memory of the target machine, the emulator machine, and the software simulator by dividing the memory into areas where breakpoints can be set and areas where breakpoints cannot be set. When the operation state information is converted, the determination unit determines whether the breakpoint can be similarly set in the switching destination operation verification target with reference to the setting possibility area management unit, 8. The debugging device according to claim 7, further comprising: a notifying unit that notifies an operator that a breakpoint cannot be set at a switching destination when a breakpoint cannot be set at an operation verification target.
【請求項10】 前記デバッグ装置は更に、 各動作検証対象が蓄積できるアドレスの最大量を管理す
る最大量管理手段と、 動作状態情報が変換されると、最大量管理手段における
アドレスの最大量を参照して切換先動作検証対象におけ
る命令アドレス群の蓄積量を認識する認識手段と、 蓄積量を認識すると、切換先動作検証対象のアドレス蓄
積量と、切換先動作検証対象とのアドレス蓄積量の違い
を操作者に通知する通知手段とを備えることを特徴とす
る請求項7記載のデバッグ装置。
10. The debugging device further comprises: a maximum amount management means for managing a maximum amount of addresses that can be stored by each operation verification target; and, when the operation state information is converted, a maximum amount of addresses in the maximum amount management means. A recognizing means for recognizing an accumulation amount of the instruction address group in the switching destination operation verification target by referring to the address storage amount of the switching destination operation verification target and an address accumulation amount of the switching destination operation verification target when recognizing the accumulation amount; The debugging device according to claim 7, further comprising: a notification unit configured to notify an operator of the difference.
【請求項11】 前記デバッグ装置は更に、 各動作検証対象が割り込み発生条件の成立、不成立を監
視する能力を有するか否かを動作検証対象毎に管理する
監視能力管理手段と、 動作状態情報が切換先の様式に変換されると、切換先動
作検証対象が当該条件の成立を監視する能力を有するか
否かを判定する判定手段と、 能力を有さない場合、切換先動作検証対象には、成立、
不成立を監視する能力がない旨を操作者に通知する通知
手段とを備えることを特徴とする請求項7記載のデバッ
グ装置。
11. The debugging device further comprises: a monitoring capability management unit that manages, for each operation verification target, whether each operation verification target has a capability of monitoring whether an interrupt generation condition is satisfied or not satisfied; When converted into the switching destination format, the switching destination operation verification target determines whether or not the switching target operation verification target has the ability to monitor the satisfaction of the condition, and if the switching destination operation verification target does not have the capability, the switching destination operation verification target includes , Established,
8. The debugging device according to claim 7, further comprising: a notifying unit that notifies an operator that there is no ability to monitor the failure.
【請求項12】 前記デバッグ装置は更に、 受付手段が受け付けたコマンド内に所定指示が含まれて
いない場合、同コマンドに割込信号発生を監視する旨の
指示が含まれていればこれを解読する第1解読手段と、 同コマンドに発生した割込信号の信号番号と、当該番号
に応じた切換先が含まれていればこれを解読する第2解
読手段と、 監視する旨の指示が解読されると、現在動作中の切換元
の動作検証対象における割込信号発生を監視する監視手
段と、 監視中割込信号が発生すると、その割込信号が解読され
た信号番号に合致するかを判定する判定手段とを備え、 前記読出手段は、 信号番号と合致すると、切換元動作検証対象から動作状
態情報を読み出すことを特徴とする請求項7記載のデバ
ッグ装置。
12. When the command received by the receiving unit does not include a predetermined instruction, the debugging device decodes the command if the command includes an instruction to monitor the generation of an interrupt signal. First decoding means for decoding, a signal number of an interrupt signal generated in the command, and second decoding means for decoding a switching destination corresponding to the number if the command is included, and an instruction for monitoring is decoded. Then, the monitoring means for monitoring the generation of the interrupt signal in the operation verification target of the switching source currently being operated, and, when the monitored interrupt signal is generated, whether the interrupt signal matches the decoded signal number. 8. The debugging device according to claim 7, further comprising: a determination unit configured to determine the operation state information from the switching source operation verification target when the signal matches the signal number.
【請求項13】 前記デバッグ装置は更に、 受付手段が受け付けたコマンドに所定指示が含まれてい
ない場合、同コマンド内に所定メモリ或はレジスタの内
容書き換えを監視する旨の指示が含まれていればこれを
解読する第1解読手段と、 同コマンドに、内容書き換えが発生した場合に切り換え
るべき切換先の指示が含まれていればこれを解読する第
2解読手段と、 書き換えを監視する旨の指示が含まれていると、動作状
態情報内の所定メモリ或はレジスタの内容の書き換えを
監視する監視手段とを備え、 前記読出手段は、 切換先動作検証対象が規定されれば、動作状態情報を読
み出し、 前記変換手段は、 読み出された動作状態情報を、コマンドに含まれていた
切換先動作検証対象の様式に変換することを特徴とする
請求項7記載のデバッグ装置。
13. The debugging device according to claim 1, wherein the command received by the receiving unit does not include a predetermined instruction, and the command includes an instruction to monitor rewriting of the contents of the predetermined memory or the register in the command. For example, a first decoding means for decoding the command, a second decoding means for decoding if the command contains an instruction of a switching destination to be switched when the content rewriting occurs, and a command for monitoring rewriting. Monitoring means for monitoring rewriting of the contents of a predetermined memory or a register in the operation state information when the instruction is included, wherein the readout means includes: 8. The device according to claim 7, wherein the conversion unit converts the read operation state information into a format of a switching destination operation verification target included in the command. Grayed apparatus.
【請求項14】 前記デバッグ装置は更に、 受付手段が受け付けたコマンドに所定指示が含まれてい
ない場合、動作検証対象の切換指示が含まれていればこ
れを解読する第1解読手段と、 操作者が組み込みプログラム内の複数の領域にどの動作
検証対象を割り当てるべきかを示す割当表が同コマンド
に含まれていれば、これを解読する第2解読手段と、 切換元動作検証対象における領域間の移動タイミングを
検出する旨の指示が同コマンドに含まれていればこれを
解読する第3解読手段と、 監視させる旨の指示が解読されると、切換元動作検証対
象内の組み込みプログラムにおける複数領域間の移動を
監視する監視手段とを備え、 前記指定手段は、 移動の監視中、複数領域間の移動が確認されると、領域
に対応づけられた動作検証対象を切換先動作検証対象に
規定する切換先規定部とを備え、 前記読出手段は、 切換先動作検証対象が規定されれば、切換元動作検証対
象から動作状態情報を読み出すことを特徴とする請求項
7記載のデバッグ装置。
14. The debugging device further comprises: first decoding means for decoding, if the command received by the receiving means does not include a predetermined instruction, a switching instruction of an operation verification target if the command is included, If the command includes an assignment table indicating which operation verification target should be allocated to a plurality of areas in the embedded program, the second decoding means for decoding this command, A third decoding means for decoding the instruction to detect the movement timing of the command if the command is included in the same command; and Monitoring means for monitoring the movement between the areas, wherein the specifying means disconnects the operation verification target associated with the area when the movement between the plurality of areas is confirmed during the monitoring of the movement. A switching destination defining unit for defining a switching destination operation verification target, wherein the reading unit reads the operation state information from the switching source operation verification target when the switching destination operation verification target is defined. 7. The debugging device according to 7.
【請求項15】 前記デバッグ装置は更に、 受付手段が受け付けたコマンド内に所定指示が含まれて
いない場合に動作検証対象の切換指示が含まれていれば
これを解読する第1解読手段と、 前記組み込みプログラム中で使用される変数がとり得る
複数の値域に操作者がどの動作検証対象を割り当てたか
を示す割当表が同コマンドに含まれていればこれを解読
する第2解読手段と、 組み込みプログラムにおける所定変数の値の変化を参照
する旨の指示が同コマンドに含まれていればこれを解読
する第3解読手段と、 変化を参照する旨が解読されると、変数に対応するレジ
スタ或はメモリの保持値が区分された複数値域のうち、
何れに該当するかを判定する判定手段とを備え、 前記指定手段は、 判定された領域に対応づけられた動作検証対象を切換先
動作検証対象に規定する切換先規定部を備え、 前記読出手段は、 切換先動作検証対象が規定されれば、切換元動作検証対
象から動作状態情報を読み出すことを特徴とする請求項
7記載のデバッグ装置。
15. The debugging device further comprises: first decoding means for decoding, when a command received by the receiving means does not include a predetermined instruction, an operation verification target switching instruction if the command is included, A second decryption means for decrypting, if the command includes an assignment table indicating which operation verification target has been assigned to a plurality of value ranges that can be taken by variables used in the embedded program, the command; If the command includes an instruction to refer to a change in the value of a predetermined variable in the program, a third decryption unit that decrypts the instruction. If the instruction to reference the change is decrypted, a register or a register corresponding to the variable is read. Is a multi-value range in which the values held in the memory are divided.
A determination unit that determines which one of the areas corresponds to, the designation unit includes a switching destination specifying unit that defines an operation verification target associated with the determined area as a switching destination operation verification target; 8. The debugging device according to claim 7, wherein, when a switching destination operation verification target is specified, the operation state information is read from the switching source operation verification target.
【請求項16】 前記デバッグ装置は、 受付手段が受け付けたコマンド内に所定指示が含まれて
いない場合、前記組み込みプログラム中で使用されるパ
ラメータがとり得る複数の値域に操作者がどの動作検証
対象を割り当てたかを示す割当表が同コマンドに含まれ
ていればこれを解読する第1解読手段と、 組み込みプログラムにおける所定パラメータの値を参照
する旨の指示が同コマンド内に含まれていればこれを解
読する第2解読手段と、 現在のパラメータの値の変化が検出されると、変化後の
値が区分された複数領域のうち、何れに該当するかを判
定する判定手段とを備え、 前記指定手段は、 判定された値域に対応づけられた動作検証対象を切換先
動作検証対象に規定する切換先規定部を備え、 前記読出手段は、 切換先動作検証対象が規定されれば、切換元動作検証対
象から動作状態情報を読み出すことを特徴とする請求項
7記載のデバッグ装置。
16. The method according to claim 16, wherein when the command received by the receiving unit does not include a predetermined instruction, the debugger determines which operation verification target the plurality of value ranges that the parameters used in the embedded program can take. If the command contains an assignment table indicating whether or not the command has been assigned, first decoding means for decoding the command, and if the command contains an instruction to refer to the value of a predetermined parameter in the embedded program, A second decryption unit for decrypting the current parameter value, and a determination unit for determining which one of the plurality of regions where the value after the change is detected when a change in the value of the current parameter is detected, The designating means includes a switching destination specifying unit that specifies an operation verification target associated with the determined value range as a switching destination operation verification target, and the reading unit includes a switching destination operation verification target. If it is defined, the debugging system of claim 7, wherein the reading the operating state information from the switching 換元 operation verified.
【請求項17】 前記デバッグ装置は、 受付手段が受け付けたコマンド内に所定指示が含まれて
いない場合、操作者が複数の動作検証対象にどの実行予
定時刻を対応付けたかを示す対応表が同コマンド内に含
まれていればこれを解読する第1解読手段と、 現在時刻を計時する計時手段とを備え、 前記指定手段は、 計時されている現在時刻が実行予定時刻に到達すると、
その動作検証対象を切り替え先に規定する切換先規定部
を備え、 前記読出手段は、 切換先動作検証対象が規定されれば、切換元動作検証対
象から動作状態情報を読み出すことを特徴とする請求項
7記載のデバッグ装置。
17. The debugging device according to claim 1, wherein, if the command received by the receiving unit does not include a predetermined instruction, a correspondence table indicating which scheduled execution time the operator has associated with the plurality of operation verification targets is the same. A first decoding unit that decodes the command if it is included in the command; and a timing unit that counts the current time. When the current time reaches the scheduled execution time,
A switching destination defining unit that defines the operation verification target as a switching destination, wherein the reading unit reads the operation state information from the switching source operation verification target when the switching destination operation verification target is defined. Item 7. The debugging device according to Item 7.
JP9163127A 1996-06-19 1997-06-19 Debugging devices capable of taking over operation from each other between hardware environments while running programs therein Pending JPH10326203A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9163127A JPH10326203A (en) 1996-06-19 1997-06-19 Debugging devices capable of taking over operation from each other between hardware environments while running programs therein

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP8-157841 1996-06-19
JP15784196 1996-06-19
JP7842097 1997-03-28
JP9-78420 1997-03-28
JP9163127A JPH10326203A (en) 1996-06-19 1997-06-19 Debugging devices capable of taking over operation from each other between hardware environments while running programs therein

Publications (1)

Publication Number Publication Date
JPH10326203A true JPH10326203A (en) 1998-12-08

Family

ID=27302708

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9163127A Pending JPH10326203A (en) 1996-06-19 1997-06-19 Debugging devices capable of taking over operation from each other between hardware environments while running programs therein

Country Status (1)

Country Link
JP (1) JPH10326203A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007510992A (en) * 2003-11-10 2007-04-26 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Simulation system and computer-implemented method for simulating and verifying a control system
EP1850232A2 (en) * 2006-04-27 2007-10-31 Matsushita Electric Industrial Co., Ltd. Simulator
JP2010140240A (en) * 2008-12-11 2010-06-24 Renesas Electronics Corp Processor, multiprocessor and debugging method
JP2019054868A (en) * 2017-09-19 2019-04-11 株式会社大一商会 Game machine
JP2019054869A (en) * 2017-09-19 2019-04-11 株式会社大一商会 Game machine

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007510992A (en) * 2003-11-10 2007-04-26 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Simulation system and computer-implemented method for simulating and verifying a control system
EP1850232A2 (en) * 2006-04-27 2007-10-31 Matsushita Electric Industrial Co., Ltd. Simulator
EP1850232A3 (en) * 2006-04-27 2010-03-24 Panasonic Corporation Simulator
JP2010140240A (en) * 2008-12-11 2010-06-24 Renesas Electronics Corp Processor, multiprocessor and debugging method
JP2019054868A (en) * 2017-09-19 2019-04-11 株式会社大一商会 Game machine
JP2019054869A (en) * 2017-09-19 2019-04-11 株式会社大一商会 Game machine

Similar Documents

Publication Publication Date Title
EP0814404B1 (en) Debugging apparatus for debugging a program
CN100555218C (en) Be used to improve the apparatus and method of the simulation velocity of the middle-and-high-ranking language of analogue system on the sheet
CN110046479B (en) Link library file anti-debugging method and device based on android operating system
WO2013007068A1 (en) Automatic test system and method oriented to functions of hardware apparatus
JP2007500401A (en) Software debugging apparatus and method
US7363544B2 (en) Program debug method and apparatus
JPH10326203A (en) Debugging devices capable of taking over operation from each other between hardware environments while running programs therein
WO2011109971A1 (en) Circuit and method for microcontroller online debugging, microcontroller
Gatliff Embedding with gnu: the gdb remote serial protocol
JP2008135008A (en) Program module verification method
EP0942371B1 (en) Debugging method for a microcomputer
CN113282439A (en) eMMC test method, device, readable storage medium and electronic equipment
US20040205410A1 (en) Program-controlled unit
US6560698B1 (en) Register change summary resource
JP2003281076A (en) Unauthorized access detection circuit of dma controller, unauthorized access detecting method and program thereof
CN117422026B (en) RISC-V architecture-based processor verification system
JP2007140620A (en) Microcomputer and debugging device connected to this microcomputer
JP2543640B2 (en) Virtual computer system
Shilaskar et al. Post Silicon Validation for I2C (SMBUS) Peripheral
US7716533B2 (en) System and method for trapping bus cycles
JP2654105B2 (en) Microprocessor
JPH08221297A (en) Program debugging device
JPH0934795A (en) Copy protection method for cpu program
JPH03237502A (en) Programmable controller
JP3037295B1 (en) Event detection circuit