JPH07191874A - In-circuit emulator - Google Patents

In-circuit emulator

Info

Publication number
JPH07191874A
JPH07191874A JP5347117A JP34711793A JPH07191874A JP H07191874 A JPH07191874 A JP H07191874A JP 5347117 A JP5347117 A JP 5347117A JP 34711793 A JP34711793 A JP 34711793A JP H07191874 A JPH07191874 A JP H07191874A
Authority
JP
Japan
Prior art keywords
instruction
execution
display
code
circuit emulator
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
JP5347117A
Other languages
Japanese (ja)
Inventor
Takayuki Takeya
貴之 竹谷
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.)
CSK Corp
Original Assignee
CSK Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CSK Corp filed Critical CSK Corp
Priority to JP5347117A priority Critical patent/JPH07191874A/en
Publication of JPH07191874A publication Critical patent/JPH07191874A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To provide a developing tool for improving the efficiency of program development by exactly debugging a program in a short time by using a host computer and the in-circuit emulator connected to that host computer. CONSTITUTION:The in-circuit emulator is provided with a disassembly processing means 24 for providing a code table and a text table by disassembling an assemble list 22 generated from the program of a target system on the host computer, check processing means 25 for detecting errors based on these tables, analysis execution control means 26 for transmitting the instruction codes of the code table to a main body part 1 of the emulator one by one and receiving the executed result of the emulator, display processing means 27 for performing processing to display the error detected result of the check processing means 25 and the executed result of the analysis execution control means 26 on a monitor 28, and command processing means 29 for processing command instructions to the disassembly processing means, check processing means, analysis execution control means and display processing means.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータプログラ
ムをホスト・コンピュータ及びエミュレータ本体部でデ
バッグするインサーキット・エミュレータに関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an in-circuit emulator for debugging a computer program with a host computer and an emulator body.

【0002】[0002]

【従来の技術】近年、プロセッサ、メモリ、入出力制御
装置等を一つのチップに集積したワンチップ・マイクロ
コンピュータ(ワンチップ・マイコン)は、汎用CPU
と比べて見劣りしない性能のものが多数開発され、また
価格も安くなり、産業用や家電製品等に広く用いられて
いる。
2. Description of the Related Art In recent years, a one-chip microcomputer (one-chip microcomputer) in which a processor, a memory, an input / output control device, etc. are integrated on one chip is a general-purpose CPU.
A number of products with comparable performance have been developed, and the price is low, and they are widely used in industrial and home electric appliances.

【0003】このようなマイクロコンピュータシステム
のソフトウェア部分の開発手順は、例えば、まず、
(1)仕様より、機能単位に分割してフローチャートを
作成し、(2)このフローチャートよりコーディング
し、(3)全てのプログラム・モジュールのコーディン
グが完了したらアセンブルし、(4)アセンブルエラー
が無くなるまでプログラムを見直し、(5)インサーキ
ット・エミュレータ等でプログラムの単体テストを行
い、(6)ROMに書き込んで台上で各機能毎に動作確
認をし、(7)仕様のように動作しなければリストを目
で追い、(8)プログラム修正して再度(4)から繰り
返していた。
The development procedure of the software part of such a microcomputer system is, for example, as follows.
(1) Create a flowchart by dividing it into functional units according to the specifications, (2) Coding from this flowchart, (3) Assemble when all program modules have been coded, and (4) Until there are no assemble errors. Review the program, (5) perform a unit test of the program with an in-circuit emulator, etc., (6) write it in the ROM and check the operation for each function on the stand, and (7) list it if it does not operate according to the specifications I followed (8) and revised the program and repeated from (4).

【0004】従来のコンピュータプログラムのデバッグ
には、主にインサーキット・エミュレータやデバッガ等
の開発ツールが使用されていた。インサーキット・エミ
ュレータは、マイクロプロセッサの代わりに目標システ
ムに接続することで、プログラムの任意の実行/停止、
メモリ資源等の読み/書き、実行のトレース機能等を有
するものである。また、通常、デバッガは、マシン語を
分析してその命令に対応するソースリストの行を表示す
る、いわゆるマシンコードデバッガが一般的である。
Development tools such as in-circuit emulators and debuggers have been mainly used for debugging conventional computer programs. The in-circuit emulator connects to the target system instead of the microprocessor to allow arbitrary execution / stop of programs,
It has a read / write function for memory resources, and a trace function for execution. Further, usually, a debugger is a so-called machine code debugger which analyzes a machine language and displays a line of a source list corresponding to the instruction.

【0005】[0005]

【発明が解決しようとする課題】プログラムのデバック
時には、プログラムの実行、メモリの表示、レジスタの
表示と繰り返して、プログラムの状態を確認していく必
要がある。ところが、従来のインサーキット・エミュレ
ータでは、スクロール画面表示のため、これらの画面を
同時に見ることができない。また、各々の情報を知るた
めには、各々のコマンドを入力していく必要があり、操
作が煩雑で効率が悪かった。
When debugging a program, it is necessary to confirm the state of the program by repeatedly executing the program, displaying the memory, and displaying the register. However, in the conventional in-circuit emulator, since these scroll screens are displayed, these screens cannot be viewed at the same time. Further, in order to know each information, it is necessary to input each command, and the operation is complicated and inefficient.

【0006】また、実行プログラムの表示は、実行プロ
グラムを逆アセンブルして表示しているため、ソースプ
ログラム上のコメント等の情報は表示されない。効率良
いデバックを行うためには、ソースプログラムを表示す
る必要がある。従来では、ソースプログラムを表示する
ために、アセンブル時に行番号をオブジェクトコードに
追加し、プログラム表示時にその行番号に対応したソー
スプログラムの行を表示していた。これはアセンブラと
インサーキット・エミュレータとが一つのシステムにな
っている場合に限られる。他のクロス・アセンブラの使
用等により、行番号がオブジェクトコードに追加されな
い場合には、ソースプログラムの表示ができなくなる。
Further, since the execution program is displayed by disassembling the execution program, information such as comments on the source program is not displayed. It is necessary to display the source program for efficient debugging. Conventionally, in order to display the source program, a line number is added to the object code at the time of assembly, and the line of the source program corresponding to the line number is displayed when the program is displayed. This is limited to the case where the assembler and in-circuit emulator are one system. If the line number is not added to the object code due to the use of another cross assembler, the source program cannot be displayed.

【0007】さらに、プログラムの実行開始アドレス
は、リンク時のプログラム配置アドレス+プログラムの
相対アドレスによって計算する必要があった。これは、
リンク時毎に行う必要があり煩雑でもあった。この問題
を解決するために、シンボリックデバックが考案された
がアセンブル時に、シンボルファイルを作成しておく必
要がある。
Further, the execution start address of the program has to be calculated by the program allocation address at the time of linking + the relative address of the program. this is,
It was complicated because it had to be done each time a link was made. In order to solve this problem, a symbolic debug was devised, but it is necessary to create a symbol file at the time of assembling.

【0008】また、従来のインサーキット・エミュレー
タでは、マシンコードの動作チェックはできたが、オペ
ランドの値については、その値がどのような値であって
も関与しなかったため、例えば、オペコードの長さの違
いによるエラー検出ができず、一見正しいように動作す
ることがあった。従来、このようなデバッグに対して
は、机上で目視によるチェックしかなかった。机上では
全てのチェックが可能であるが、人によるチェックのた
め検出能力にムラがあった。
In the conventional in-circuit emulator, the operation check of the machine code could be performed, but the operand value does not take any value. The error could not be detected due to the difference in the size, and it seemed to work correctly. Conventionally, such debugging has only been visually checked on a desk. All checks can be done on the desk, but the detection ability was uneven because it was checked by a person.

【0009】すなわち、従来のプログラム開発ツール
は、ある程度チップ・メーカーに頼らざるをえないのが
実情であり、あまり選択の余地がなく、また、マイコン
システムの開発は、手作業によるところが多く、特に、
デバッグ工程は、手と目のみに頼った作業の連続であ
り、システム開発のサイクルの短縮が困難であった。
In other words, the conventional program development tools have to rely on a chip maker to some extent, and there is not much choice, and the development of a microcomputer system is often done by hand, especially ,
The debugging process is a continuous work that requires only hands and eyes, and it has been difficult to shorten the system development cycle.

【0010】そこで本発明は、マイクロコンピュータの
プログラムをホスト・コンピュータとそれに接続された
インサーキット・エミュレータの本体部上で正確かつ短
時間にデバッグでき、システム開発の効率を向上できる
開発ツールを提供することを目的とする。
Therefore, the present invention provides a development tool capable of accurately and quickly debugging a microcomputer program on a host computer and a main body of an in-circuit emulator connected to the host computer and improving the efficiency of system development. The purpose is to

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に、本発明のインサーキット・エミュレータは、目標シ
ステムのソース・プログラムより生成したアセンブル・
リストをホスト・コンピュータ上で分解処理してコード
・テーブル及びテキスト・テーブルを得る分解処理手段
と、前記コード・テーブル及びテキスト・テーブルに基
づきエラー検出をするチェック処理手段と、前記コード
・テーブルの命令コードを1命令づつエミュレータ本体
部へ送信し該エミュレータ本体部で実行した結果を受信
する解釈実行制御手段と、前記チェック処理手段のエラ
ー検出結果及び解釈実行制御手段の実行結果をモニタに
表示する処理を行う表示処理手段と、前記分解処理手
段、チェック処理手段、解釈実行制御手段及び表示処理
手段に対するコマンド指示を処理するコマンド処理手段
とを備えたものである。
In order to achieve the above object, the in-circuit emulator of the present invention is an assembler generated from a source program of a target system.
Decomposition processing means for decomposing the list on the host computer to obtain a code table and a text table, a check processing means for detecting an error based on the code table and the text table, and an instruction of the code table. Interpretation execution control means for transmitting a code to the emulator main body one instruction at a time and receiving a result executed by the emulator main body, and processing for displaying an error detection result of the check processing means and an execution result of the interpretation execution control means on a monitor. And a command processing means for processing a command instruction to the disassembly processing means, the check processing means, the interpretation execution control means, and the display processing means.

【0012】分解処理手段のコード・テーブルは、各命
令行毎に前記解釈実行制御手段による命令実行結果によ
り実行済を設定する実行済フラグを有し、また各命令行
毎にコマンドによってブレーク・ポイントの設定・解除
を行うブレークフラグを有する。
The code table of the disassembling processing means has an executed flag for each instruction line which sets the executed state according to the instruction execution result by the interpretation execution control means, and a break point by a command for each instruction line. It has a break flag for setting and canceling.

【0013】チェック処理手段は、目標システムのメモ
リの属性情報を予めコマンドにより設定するアクセス管
理テーブルと、前記コード・テーブル、テキスト・テー
ブル、アクセス管理テーブルに基づいてエラー検出処理
を行うエラー検出部と、エラー検出時に設定するフラグ
とを有する。そして、エラー検出部は、前記コード・テ
ーブルから取り出した命令が擬似命令であるかを検出す
る。エラー検出部は、前記コード・テーブルから取り出
した命令がジャンプ命令であるときにオペコードよりジ
ャンプ先アドレスを計算し、テーブル上の該当アドレス
の有無を検出する。エラー検出部は、前記コード・テー
ブルから取り出した命令がイミディエイトデータ命令で
あるときにテーブル上のオペコード長さを得、CPUス
テータスのデータ長フラグを判断する。エラー検出部
は、前記コード・テーブルから取り出した命令がイミデ
ィエイトインデックス命令であるときにテーブル上のオ
ペコード長さを得、CPUステータスのインデックス長
フラグを判断する。エラー検出部は、前記コード・テー
ブルから取り出した命令コードの種類がメモリ読出し、
メモリ書込み、その他であるかを判断し、それぞれアク
セス・アドレスに対応する前記アクセス管理テーブルの
メモリ属性の一致を判断する。
The check processing means includes an access control table for setting attribute information of the memory of the target system in advance by a command, and an error detection section for performing error detection processing based on the code table, text table, and access control table. , And a flag set when an error is detected. Then, the error detection unit detects whether the instruction fetched from the code table is a pseudo instruction. The error detection unit calculates the jump destination address from the operation code when the instruction fetched from the code table is a jump instruction, and detects the presence or absence of the corresponding address on the table. When the instruction fetched from the code table is an immediate data instruction, the error detection unit obtains the operation code length on the table and determines the data length flag of the CPU status. The error detector obtains the operation code length on the table when the instruction fetched from the code table is the immediate index instruction, and judges the index length flag of the CPU status. The error detection unit reads the type of the instruction code fetched from the code table from the memory,
It is judged whether it is a memory write or other, and it is judged whether or not the memory attributes of the access management table corresponding to the respective access addresses match.

【0014】解釈実行制御手段は、オペコード・テーブ
ルと、マシンコードのオペランドのアドレスを取得する
アドレス関数ルーチンと、目標システムに対応し命令の
実行により読み書きをするRAMテーブルと、前記コー
ドテーブルのマシンコードを取り出し、オペコード・テ
ーブルのマシンコードとの一致を比較し、一致したマシ
ンコードの対応する実行ルーチンをコールし、この実行
ルーチンにおいてアドレッシングモードに対応するアド
レス関数によりアドレスを取得して命令を実行する実行
処理部とを有する。そして、実行処理部は、コール命令
を管理するポインタとしてのネストを設け、コール命令
のときにネストに1を加え、リターン命令のときにネス
トから1を引き、コール命令を実行しないとき次の命令
を実行する。実行処理部は、ノーオペレーション・コマ
ンドをキー入力したとき、現在のカーソル行を1行進
め、続いて命令を実行せずにプログラムカウンタの値を
次の命令にスキップさせる。実行処理部は、命令実行時
に前記コード・テーブルのブレークフラグのオン・オフ
を判断し、オンであればブレークを発生させる。実行処
理部は、前記コード・テーブルの実行済フラグのオン・
オフを判断し、オフであれば実行行カウントに1を加え
るとともに、その実行済フラグをオンし、該実行行カウ
ントの値に基づきデバッグ率を算出する。
The interpretive execution control means includes an operation code table, an address function routine for obtaining an address of an operand of a machine code, a RAM table for reading and writing by executing an instruction corresponding to a target system, and a machine code of the code table. To compare the match with the machine code in the operation code table, call the corresponding execution routine of the matched machine code, obtain the address by the address function corresponding to the addressing mode in this execution routine, and execute the instruction And an execution processing unit. Then, the execution processing unit provides a nest as a pointer for managing the call instruction, adds 1 to the nest at the time of the call instruction, subtracts 1 from the nest at the time of the return instruction, and executes the next instruction when the call instruction is not executed. To execute. When the no-operation command is keyed in, the execution processing unit advances the current cursor line by one line and then skips the value of the program counter to the next instruction without executing the instruction. The execution processing unit determines whether the break flag of the code table is on or off when the instruction is executed, and if it is on, the break is generated. The execution processing unit turns on the execution completion flag of the code table.
It is determined to be off, and if it is off, 1 is added to the execution line count, the executed flag is turned on, and the debug ratio is calculated based on the value of the execution line count.

【0015】表示処理手段は、前記エラー検出部、実行
処理部及びアセンブル・リストのシンボル・ファイルか
ら生成されるデータのシンボルとアドレスとを対応付け
たシンボル・テーブルから与えられるデータをモニタに
表示するための表示処理を行う表示処理部を有する。そ
して、表示処理部は、前記実行処理部の命令実行により
設定された前記コード・テーブルの実行フラグのオン・
オフを判断し、その行の表示をオン・オフに対応して色
分けの表示の処理をする。表示処理部は、カーソルのオ
ペコードよりテーブル検索によりアドレッシング関数を
得、アドレッシング関数ルーチンをコールしてメモリの
アドレスを得、RAMアドレスよりメモリの内容を表示
する処理をする。表示処理部は、現在の前記ネストをセ
ーブし、命令の実行後にリターンしたときセーブしたネ
ストの比較をし、このセーブ値がネストの値より小さい
ときに表示のスキップ処理をする。表示処理部によるモ
ニタに表示される表示画面は、前記RAMテーブルのシ
ンボル名、そのアドレス及びそのアドレスの内容を表示
するRAM表示部と、前記テキスト・テーブルの内容及
びアンダーラインを付して現在のカーソル位置を表示す
るトレース表示部と、レジスタ類の内容を表示するレジ
スタ類表示部とを1つの画面上に有する。表示処理部に
よるモニタに表示される表示画面は、総実行ステップに
対する実行ステップ数の割合を表示する実行状況表示部
を有する。
The display processing means displays on the monitor the data provided from the symbol table in which the symbols and the addresses of the data generated from the error detecting section, the execution processing section and the symbol file of the assemble list are associated with each other. A display processing unit that performs display processing for Then, the display processing unit turns on the execution flag of the code table set by the instruction execution of the execution processing unit.
It is determined to be off, and the display of that line is displayed in different colors depending on whether it is on or off. The display processing unit obtains an addressing function by searching a table from the operation code of the cursor, calls an addressing function routine to obtain a memory address, and displays the content of the memory from the RAM address. The display processing unit saves the current nest, compares the saved nests when returning after executing the instruction, and skips the display when the saved value is smaller than the nest value. The display screen displayed on the monitor by the display processing unit is the RAM display unit for displaying the symbol name of the RAM table, its address and the contents of the address, and the contents of the text table and the underline for the current display. It has a trace display section for displaying the cursor position and a register display section for displaying the contents of registers on one screen. The display screen displayed on the monitor by the display processing unit has an execution status display unit that displays the ratio of the number of execution steps to the total number of execution steps.

【0016】[0016]

【作用】本発明によるインサーキット・エミュレータで
は、分解処理手段はアセンブル・リストをホスト・コン
ピュータ上で分解処理してコード・テーブル及びテキス
ト・テーブルを得、チェック処理手段はコード・テーブ
ル及びテキスト・テーブルに基づきエラー検出し、解釈
実行制御手段はコード・テーブルの命令コードを1命令
ずつホスト・コンピュータの命令列に翻訳して実行し、
表示処理手段はチェック処理手段のエラー検出結果及び
解釈実行制御手段の実行結果をモニタに表示し、コマン
ド処理手段は各手段に対するコマンド指示を処理するこ
とで、マイクロコンピュータのプログラムをホスト・コ
ンピュータとそれに接続されたインサーキット・エミュ
レータの本体部上で正確かつ短時間にデバッグでき、シ
ステム開発の効率を向上できる開発ツールを提供でき
る。
In the in-circuit emulator according to the present invention, the decomposition processing means decomposes the assemble list on the host computer to obtain the code table and the text table, and the check processing means the code table and the text table. And the interpretation execution control means translates the instruction code in the code table into an instruction sequence of the host computer and executes the instruction sequence,
The display processing means displays the error detection result of the check processing means and the execution result of the interpretation execution control means on the monitor, and the command processing means processes the command instruction to each means, so that the program of the microcomputer and the host computer It is possible to provide a development tool that enables accurate and short-time debugging on the main body of the connected in-circuit emulator and improves the efficiency of system development.

【0017】分解処理手段のコード・テーブルの各命令
行毎の実行済フラグに、解釈実行制御手段による命令実
行により実行済を設定することで、どのぐらい実行した
か把握でき、またコマンドによってブレーク・ポイント
のブレークフラグを設定・解除することで、任意の位置
でブレークを発生できる。
By setting the executed flag for each instruction line of the code table of the disassembling means to "executed" by the instruction execution by the interpretive execution control means, it is possible to grasp how long the instruction has been executed, and the break A break can be generated at any position by setting / clearing the break flag of the point.

【0018】チェック処理手段のアクセス管理テーブル
は目標システムのメモリの属性情報を予めコマンドによ
り設定し、エラー検出部はコード・テーブル、テキスト
・テーブル、アクセス管理テーブルに基づいて、擬似命
令実行エラー、ジャンプ命令飛び先エラー、イミディエ
イトデータ長エラー、イミディエイト・インデックス長
エラー、メモリアクセスエラー等のエラー検出を行い、
このエラー検出をしたときフラグを設定することで、人
手による目と手によらず強力なエラーチェックができ
る。
In the access management table of the check processing means, the attribute information of the memory of the target system is set in advance by a command, and the error detection unit, based on the code table, the text table and the access management table, the pseudo instruction execution error and the jump. Error detection such as instruction jump destination error, immediate data length error, immediate / index length error, memory access error, etc.
By setting a flag when this error is detected, powerful error checking can be performed regardless of human eyes.

【0019】解釈実行制御手段の実行処理部では、コー
ドテーブルのマシンコードを取り出し、オペコード・テ
ーブルのマシンコードとの一致を比較し、一致したマシ
ンコードの対応する実行ルーチンをコールし、この実行
ルーチンにおいてアドレッシングモードに対応するアド
レス関数によりアドレスを取得して命令を実行する。ま
た、コール命令を管理するポインタでネストを管理し、
ノーオペレーション・コマンドで現在のカーソル行を1
行進めて命令をスキップし、ブレークフラグのオン・オ
フを判断してオンであればブレークを発生させ、実行済
フラグのオン・オフを判断しオフであれば実行行カウン
トに1を加えその実行済フラグをオンし実行行カウント
の値に基づきデバッグ率を算出することで、正確かつ短
時間に効率よいデバッグができる。
In the execution processing section of the interpretation execution control means, the machine code in the code table is taken out, the match with the machine code in the operation code table is compared, the corresponding execution routine of the matched machine code is called, and this execution routine is called. At, the address is obtained by the address function corresponding to the addressing mode and the instruction is executed. Also, manage the nesting with the pointer that manages call instructions,
1 at the current cursor line with no operation command
Advances the line and skips the instruction, judges whether the break flag is on or off, and if it is on, generates a break, judges whether the executed flag is on or off, and if it is off, adds 1 to the line count and executes it By turning on the done flag and calculating the debug ratio based on the value of the execution line count, accurate and efficient debugging can be performed.

【0020】表示処理部では、各部から与えられるデー
タをモニタに表示する処理、特に、実行フラグのオン・
オフを判断してその行の表示をオン・オフに対応して色
分けの表示処理、メモリの内容を表示する処理、表示の
スキップ処理等をし、モニタに1つの画面上のRAM表
示部にアドレス及びそのアドレスの内容、トレース表示
部にテキスト・テーブルの内容及びアンダーラインを付
して現在のカーソル位置、レジスタ類表示部にレジスタ
類の内容を表示したり、あるいは実行状況表示部で総実
行ステップに対する実行ステップ数の割合を表示するこ
とで、命令を実行しながらRAMやレジスタ類の変化を
同時に知ることができ、また実行済の行の確認やデバッ
グの網羅性の把握ができる。
In the display processing section, the processing of displaying the data given from each section on the monitor, in particular, turning on the execution flag
It judges whether the line is off and displays the line according to whether it is on or off by color-coded display processing, memory content display processing, display skip processing, etc., and the RAM display section on one screen is addressed to the monitor. And its address, the contents of the text table and the underline in the trace display area to display the current cursor position, the contents of the registers in the registers display area, or the total execution step in the execution status display area. By displaying the ratio of the number of execution steps to, it is possible to know the changes in the RAM and registers at the same time as the instruction is executed, and it is possible to check the executed lines and grasp the completeness of debugging.

【0021】[0021]

【実施例】以下、本発明を図示の一実施例により具体的
に説明する。図1は本発明実施例のインサーキット・エ
ミュレータの全体システム構成を説明する図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to an embodiment shown in the drawings. FIG. 1 is a diagram for explaining the overall system configuration of an in-circuit emulator according to the embodiment of the present invention.

【0022】同図において、本発明のインサーキット・
エミュレータ20は、目標システムに直接接続されプロ
グラムの任意の実行/停止、メモリ資源等の読み/書
き、実行のトレース機能等を有するエミュレータ本体部
1と、コマンドを送信してエミュレータ本体部1を制御
するとともに、このエミュレータ本体部1から転送され
てくる実行結果に基づいて表示処理を行うパソコン側シ
ステム2とからなる。エミュレータ本体部1は、ターゲ
ットCPU3、入出力機器(I/O)4、メモリ5及び
インサーキット・エミュレータ(ICE)制御用CPU
6からなる。パソコン側システム部2は、ホスト・コン
ピュータを構成しICE制御用CPU6とRS232C
インターフェースにより接続される表示用のフトウエア
を備えるパーソナル・コンピュータ(パソコン)7、及
びそれに接続されるターゲット用メモリ8、ターゲット
用レジスター9、コマンド・ファイル10、プリンタ
(PRN)・ファイル11、16進(HEX)・ファイ
ル12、シンボル(SYM)・ファイル13、キーボー
ド15、CRT15、実行結果等を印字するプリンタ1
6等からなる。ターゲット用メモリ8及びターゲット用
レジスタ9は、エミュレータ本体部1での実行毎に、パ
ソコン側システム2に転送されてくるデータを記憶し、
読み出されてCRT15に表示される。
In the figure, the in-circuit of the present invention
The emulator 20 is directly connected to the target system and has an emulator main body 1 having arbitrary execution / stop of a program, reading / writing of memory resources, etc., execution trace function, etc., and controls the emulator main body 1 by sending commands. In addition, the personal computer side system 2 performs display processing based on the execution result transferred from the emulator main body 1. The emulator body 1 includes a target CPU 3, an input / output device (I / O) 4, a memory 5, and an in-circuit emulator (ICE) control CPU.
It consists of 6. The personal computer side system unit 2 constitutes a host computer, and includes an ICE controlling CPU 6 and an RS232C.
A personal computer (personal computer) 7 having a display software connected by an interface, and a target memory 8, a target register 9, a command file 10, a printer (PRN) file 11, hexadecimal (connected to it) HEX) file 12, symbol (SYM) file 13, keyboard 15, CRT 15, printer 1 for printing execution results, etc.
It consists of 6 mag. The target memory 8 and the target register 9 store data transferred to the personal computer side system 2 each time the emulator main body 1 executes the data.
It is read and displayed on the CRT 15.

【0023】図3は本発明実施例のインサーキット・エ
ミュレータの全体構成を説明するブロック図である。
FIG. 3 is a block diagram for explaining the overall configuration of the in-circuit emulator according to the embodiment of the present invention.

【0024】同図において、本発明のインサーキット・
エミュレータ20は、エディタ等を使用して作成した目
標システムに対するソース・プログラム21を、アセン
ブラに入力して生成したアセンブル・リスト(プリント
・ファイル)22をホスト・コンピュータを利用して、
対象CPUの機械語命令を1命令ずつ解釈し、エラー判
定した後エミュレータ本体部1で実行するインタプリタ
方式のものであり、入出力インターフェース23を介し
て入力するアセンブル・リスト22をテキスト・テーブ
ルとコード・テーブルに分解処理する分解処理手段24
と、この分解処理手段24で分解したテキスト・テーブ
ルとコード・テーブル等に基づき各種のエラー検出に伴
うチェック処理を行うチェック処理手段25及び1命令
ずつホスト・コンピュータの命令列に翻訳して実行を制
御する解釈実行制御手段26と、チェック処理手段25
のチェック結果及び解釈実行制御手段26の実行結果の
表示処理を行う表示処理手段27と、この表示処理手段
27の処理結果を入出力インターフェース23を介して
出力し表示するモニタ18と、各分解処理手段24、チ
ェック処理手段25、解釈実行制御手段26及び表示処
理手段27等に対して各種の処理を指示するコマンド処
理手段19と、入出力インターフェース23に接続され
る各種の入出力機器30等とから構成される。
In the figure, the in-circuit of the present invention
The emulator 20 uses a host computer to generate an assemble list (print file) 22 generated by inputting a source program 21 for a target system created by using an editor or the like into an assembler.
This is an interpreter system in which the machine language instructions of the target CPU are interpreted one by one, and an error is judged and then executed by the emulator main body unit 1. The assemble list 22 input via the input / output interface 23 is a text table and a code. .Disassembly processing means 24 for disassembly processing into a table
And a check processing means 25 for performing check processing accompanying various error detections based on the text table and code table decomposed by the disassembly processing means 24, and one instruction is translated into an instruction string of the host computer and executed. Interpretation execution control means 26 for controlling and check processing means 25
Display processing means 27 for displaying the check result and the execution result of the interpretation execution control means 26, a monitor 18 for outputting and displaying the processing result of the display processing means 27 via the input / output interface 23, and each disassembling processing. Command processing means 19 for instructing various processing to the means 24, the check processing means 25, the interpretation execution control means 26, the display processing means 27, etc., and various input / output devices 30 etc. connected to the input / output interface 23. Composed of.

【0025】図2は本発明実施例のインサーキット・エ
ミュレータの具体的な構成を説明するブロック図であ
る。なお、図2の対応する部分は、同一の符号を記す。
FIG. 2 is a block diagram for explaining a concrete structure of the in-circuit emulator according to the embodiment of the present invention. The corresponding parts in FIG. 2 are designated by the same reference numerals.

【0026】同図において、インサーキット・エミュレ
ータ20を構成するパソコン側システム部2のホスト・
コンピュータ(パソコン)は、例えば、32ビットある
いは16ビットのマイクロプロセッサを搭載し、汎用の
オペレーティング・システム(OS)を備え、ユーザー
使用可能容量が256Kバイト以上のメモリ容量を有す
るマイクロコンピュータが使用される。また、目標シス
テムに使用されるマイコンの動作仕様は、ICEの仕様
により、例えば、シングルチップモードで、RAMテー
ブル最大シンボル数が1024個、RAMテーブルが6
4Kバイト、最大デバッグプログラム・ファイル・サイ
ズが240Kバイト、最大デバッグプログラム行数が5
000行等である。
In the figure, the host of the personal computer side system section 2 which constitutes the in-circuit emulator 20
As a computer (personal computer), for example, a microcomputer equipped with a 32-bit or 16-bit microprocessor, equipped with a general-purpose operating system (OS), and having a memory capacity with a user usable capacity of 256 Kbytes or more is used. . The operation specifications of the microcomputer used in the target system depend on the specifications of the ICE. For example, the maximum number of symbols in the RAM table is 1024 and the RAM table is 6 in the single chip mode.
4K bytes, maximum debug program file size is 240K bytes, maximum number of debug program lines is 5
For example, 000 lines.

【0027】アセンブル・リスト22は、予めソース・
プログラム21をアセンブラに入力して得られるプリン
ト・ファイル(図1のPRN・ファイル11)であり、
例えば、図4に示すように、行番号とロード・アドレス
部分とオブジェクト・プログラム部分とアセンブリ・ソ
ース・プログラム部分等とからなる。例えば、同図にお
いて、行番号「66」のロード・アドレス部分が「00
0018」、オブジェクト・プログラム部分が「A9C
7」、アセンブリ・ソース・プログラム部分が「LDA
A,#199」である。このようなアセンブル・リス
ト22は、もしアセンブル時にエラーがあれば、ソース
・プログラム21を修正して再びアセンブルしたもので
あり、本実施例のホスト・コンピュータで作成したも
の、あるいは他のコンピュータで作成したものである。
The assemble list 22 is a source file in advance.
A print file (PRN file 11 in FIG. 1) obtained by inputting the program 21 into the assembler,
For example, as shown in FIG. 4, it comprises a line number, a load address portion, an object program portion, an assembly source program portion, and the like. For example, in the figure, the load address part of the line number "66" is "00".
0018 ”, the object program part is“ A9C
7 ", the assembly source program part is" LDA
A, # 199 ". Such an assemble list 22 is the one prepared by modifying the source program 21 and reassembling if there is an error at the time of assembling. It is created by the host computer of this embodiment, or created by another computer. It was done.

【0028】分解処理手段24は、分解処理部31と、
コード・テーブル32と、テキスト・テーブル33とか
らなり、入出力インターフェース13を介して入力した
アセンブル・リスト22を、分解処理部31でコード・
テーブル32とテキスト・テーブル33に分解処理する
機能を有する。コード・テーブル32は、図5に示すよ
うに、例えば、アセンブル・リスト22のロード・アド
レス部分とオブジェクト・プログラム部分、及び後に詳
細に説明する各命令行毎に確保されるブレークフラグ領
域と実行済フラグ領域とからなる。このブレークフラグ
領域は、命令のブレークポイントをコマンドによって設
定・解除を行うための領域、実行済フラグ領域は、命令
実行時に実行済フラグを設定するための領域である。テ
キスト・テーブル33は、アセンブリ・ソース・プログ
ラム部分である。
The disassembly processing means 24 includes a disassembly processing section 31 and
The assemble list 22 which is composed of the code table 32 and the text table 33 and is input through the input / output interface 13 is coded by the disassembly processing unit 31.
It has a function of decomposing into a table 32 and a text table 33. As shown in FIG. 5, the code table 32 includes, for example, a load address portion and an object program portion of the assemble list 22, a break flag area secured for each instruction line, which will be described in detail later, and an execution completion portion. And a flag area. This break flag area is an area for setting / releasing a breakpoint of an instruction by a command, and the executed flag area is an area for setting an executed flag when an instruction is executed. The text table 33 is an assembly source program part.

【0029】チェック処理手段25は、各種エラー検出
処理を行うエラー検出部34と、メモリの属性情報を予
めコマンドにより設定したアクセス管理テーブル35
と、エラー検出部34によるエラー検出時に設定される
フラグ36等とからなり、エラー検出部34がコード・
テーブル32とテキスト・テーブル33及び必要により
アクセス管理テーブル35に基づいて各種エラー検出処
理を行い、エラー検出時にフラグ36を設定する機能を
有する。アクセス管理テーブル35は、例えば、図6に
示すように、256バイト単位に目標システムのメモリ
の属性情報を予め設定したもので、「R」で表示される
読み出し可能領域、「W」で表示される書き込み可能領
域、「RW」で表示される読み書き可能領域等が設定さ
れている。このようなメモリの属性情報は、後に説明す
るメモリ・プロテクトに関するコマンドにより設定され
る。また、エラー検出部34によるエラー検出は、各命
令別にそれぞれチェック項目が決められている。表1は
命令別チェック・サマリーの一部を示しており、各命令
に対して、記号A〜Iに示す9個のチェック項目のうち
のいずれか一つ以上(図において2重丸を付している)
をチェックする。この表1の命令は、転送命令の一部で
あり、それぞれの命令に対して、例えば、A、D、I等
の項目をチェックする。このチェック項目は、表2に示
すように、記号A〜E等のチェック項目に対応して一定
のチェック内容が決められている。例えば、表1及び表
2の例において、転送命令「LDA A,dd」は、エ
ラーチェック項目Dのメモリアクセスチェック(読み出
しチェック)が行われ、命令実行前にメモリの読み出し
アドレスのアクセスチェックが行われる。
The check processing means 25 includes an error detection unit 34 for performing various error detection processes, and an access management table 35 in which attribute information of the memory is set in advance by a command.
And a flag 36 and the like set when the error detection unit 34 detects an error.
It has a function of performing various kinds of error detection processing based on the table 32, the text table 33, and the access management table 35 as necessary, and setting a flag 36 when an error is detected. The access management table 35 is, for example, as shown in FIG. 6, in which the attribute information of the memory of the target system is preset in units of 256 bytes, and the readable area displayed by “R” is displayed by “W”. A writable area, a readable / writable area displayed by “RW”, and the like are set. Such attribute information of the memory is set by a command regarding memory protect described later. For the error detection by the error detection unit 34, check items are determined for each instruction. Table 1 shows a part of the check summary for each instruction. For each instruction, one or more of the nine check items shown by symbols A to I (double circles in the figure are attached. ing)
Check. The commands in Table 1 are a part of the transfer commands, and items such as A, D, and I are checked for each command. As shown in Table 2, the check items have a certain check content corresponding to the check items such as symbols A to E. For example, in the examples of Table 1 and Table 2, the transfer instruction “LDA A, dd” is subjected to the memory access check (read check) of the error check item D, and the access check of the memory read address is performed before the instruction execution. Be seen.

【0030】[0030]

【表1】 [Table 1]

【表2】 [Table 2]

【0031】解釈実行制御手段26は、実行処理部37
と、オペコード・テーブル38と、アドレス関数ルーチ
ン39と、RAMテーブル41等とからなる。オペコー
ド・テーブル38は、コード・テーブル32のオブジェ
クト・プログラム(コード)との対応付けをするテーブ
ルであり、例えば、図7に示すように、対象CPUに備
える全ての1バイトまたは2バイトのマシンコードにつ
いて、その1命令に要するマシンサイクル数(クロック
数)、リード、ライト、その他等のメモリへのアクセス
・タイプ、オペランドの長さ等で分類される命令コード
・タイプ、アドレス関数に関するアドレッシングモード
等の論理構成を示している。アドレス関数ルーチン39
は、マシンコードのオペランドのアドレスを取得するた
めのルーチン部分である。アドレス関数と実行ルーチン
の関係は、例えば、図8に示される。アセンブラの命令
は、ニーモニックとオペランドに分かれる。その2者の
組合せによって、マシンコードが決まる。すなわち、例
えば、「LDA #64H」ならば、マシンコードは、
「32,64」になる。逆にマシンコードより、ニーモ
ニック、オペランドのタイプが判る。ニーモニック、オ
ペランドのタイプ毎に関数を用意する。マシンコードよ
り、図8の上辺を見れば、アドレス関数が判り、左辺を
見れば実行ルーチンが判る。この図8のマシンコード順
に並べたのが図7である。RAMテーブル41は、目標
システムに搭載されるRAMに相当し、必要サイズのメ
モリ領域を確保し、実行により所定の値が書き込まれた
り、あるいは読み出されたりする記憶領域部分である。
実行処理部37は、実行に伴う各種の処理を行う機能を
有する部分である。すなわち、実行処理部37は、実行
開始時にコード・テーブル32のマシンコードを取り出
し、次にオペコード・テーブル38のマシンコードとの
一致を比較し、命令の実行後、RS232Cにより必要
箇所のメモリがエミュレータ本体部1より転送され、そ
れがRAMテーブル41に書き込まれる。
The interpretation execution control means 26 includes an execution processing section 37.
And an opcode table 38, an address function routine 39, a RAM table 41 and the like. The operation code table 38 is a table that associates the object programs (codes) of the code table 32 with each other. For example, as shown in FIG. 7, all 1-byte or 2-byte machine codes provided in the target CPU. About the number of machine cycles (number of clocks) required for one instruction, the type of memory access such as read, write, etc., the instruction code type classified by the length of the operand, the addressing mode for the address function, etc. The logical configuration is shown. Address function routine 39
Is a routine part for obtaining the address of the machine code operand. The relationship between the address function and the execution routine is shown in FIG. 8, for example. Assembler instructions are divided into mnemonics and operands. The machine code is determined by the combination of the two. That is, for example, in the case of "LDA # 64H", the machine code is
It becomes "32, 64". On the contrary, the mnemonic and the type of operand can be known from the machine code. Prepare a function for each mnemonic and operand type. From the machine code, the address function can be known by looking at the upper side of FIG. 8, and the execution routine can be known by looking at the left side. FIG. 7 shows the machine codes arranged in the order shown in FIG. The RAM table 41 corresponds to a RAM installed in the target system, is a storage area portion that secures a memory area of a required size, and a predetermined value is written or read by execution.
The execution processing unit 37 is a unit having a function of performing various processes associated with execution. That is, the execution processing unit 37 fetches the machine code of the code table 32 at the start of execution, compares the machine code with the machine code of the operation code table 38, and after the instruction is executed, the RS232C causes the memory at a necessary location to emulate the emulator. It is transferred from the main body 1 and written in the RAM table 41.

【0032】表示処理手段27は、エラー検出部34、
実行処理部37、シンボル・テーブル42等から与えら
れるデータを表示処理する表示処理部43等からなる。
シンボル・テーブル42は、データのシンボル(名前)
とアドレスとを対応付けたものであり、アセンブル・リ
スト22に付いてくるシンボル・ファイル(図1のSY
M・ファイル13)44から入出力インターフェース2
3を介して入力され、生成部45で生成されるものであ
る。なお、このシンボル・テーブル42は、外部で予め
生成したものを使用することもできる。
The display processing means 27 includes an error detecting section 34,
The execution processing section 37, the display processing section 43 for displaying the data given from the symbol table 42, and the like.
The symbol table 42 is a symbol (name) of data.
Symbol file attached to the assemble list 22 (SY in FIG. 1).
Input / output interface 2 from M / file 13) 44
3 and is generated by the generation unit 45. Note that this symbol table 42 may be externally generated in advance.

【0033】コマンド処理部29は、所定のコマンドを
キーボード等の入出力機器30から入出力インターフェ
ース23を介して入力することで、分解処理手段24、
チェック処理手段25、解釈実行制御手段26、表示処
理手段27等に対して各種コマンド処理をする機能を有
し、例えば、命令の実行、スキップ、停止、ブレーク・
ポントの設定・解除、各種レジスタ類の内容変更、RA
Mテーブル41への属性を表示・設定、各種の初期化処
理、表示に関する各種指示等の処理を行う。表3は本実
施例のインサーキット・エミュレータに用意されている
コマンド・リストの一例であり、左欄のコマンドに対し
て右欄の機能を備えており、例えば、コマンド「B」は
ブレークポイントをセット/リセットし、コマンド
「C」はカーソルをプログラムカウンタ(PC)行にセ
ットし、コマンド「M」はRAMテーブル41の内容を
設定し、コマンド「O」はメモリのプロテクト属性を表
示設定し、コマンド「RA」はアキュムレータAの内容
を変更する。なお、コマンドには、入力されるとメッセ
ージ行に、このコマンドのメッセージが表示され、カー
ソル表示されて次にパラメータの入力待ちになる入力コ
マンドと、コマンドが入力されるとメッセージ行に、コ
マンドのメッセージが表示されて直ちに実行されるダイ
レクト・コマンドとがある。表3のリスト中の「*」
は、ダイレクト・コマンドであることを示す。また、
[ ]の中は省略できることを示しており、省略した場
合にはデフォルト値が使用される。
The command processing section 29 inputs a predetermined command from the input / output device 30 such as a keyboard through the input / output interface 23, and thereby the disassembly processing means 24,
It has a function of processing various commands for the check processing means 25, the interpretation execution control means 26, the display processing means 27, etc., and for example, executes, skips, stops, or breaks instructions.
Setting / releasing points, changing the contents of various registers, RA
The attributes of the M table 41 are displayed and set, various initialization processes, and various display-related instructions are performed. Table 3 is an example of a command list prepared for the in-circuit emulator of the present embodiment. The command in the left column is provided with the function in the right column. For example, the command "B" sets a breakpoint. Set / reset, the command “C” sets the cursor on the program counter (PC) line, the command “M” sets the contents of the RAM table 41, the command “O” sets and displays the protect attribute of the memory, The command "RA" changes the contents of accumulator A. When a command is entered, the message for this command is displayed in the message line, the cursor is displayed, and the next input command waits for parameter input. There are direct commands that are executed immediately after a message is displayed. "*" In the list in Table 3
Indicates that it is a direct command. Also,
[] Indicates that it can be omitted. If omitted, the default value is used.

【0034】[0034]

【表3】 [Table 3]

【0035】また、図2において、PC(プログラムカ
ウンタ)46は、命令の存在する場所のアドレスを保持
するレジスタであり、コマンドによりセットができる。
また、ポインタ47は、実行用及び表示用の2つのレジ
スタからなり、コマンドによりセットできる。さらに、
トレースファイル48は、実行結果の経歴を記録する部
分であり、プログラム終了時に出力することができる。
このトレースファイル48の内容は、例えば、「RAM
の値」、「エラーカウント」、「実行済行数」、「デバ
ッグ比率」、「ファイル名」、「日付時間」等である。
Further, in FIG. 2, a PC (program counter) 46 is a register for holding an address where an instruction exists, and can be set by a command.
The pointer 47 is composed of two registers for execution and display, and can be set by a command. further,
The trace file 48 is a part for recording the history of execution results and can be output at the end of the program.
The content of the trace file 48 is, for example, "RAM
Value ”,“ error count ”,“ number of executed lines ”,“ debug ratio ”,“ file name ”,“ date time ”and the like.

【0036】入出力機器30は、キーボード49、フロ
ッピーディスク装置50、ハードディスク装置51、プ
リンタ52等からなる。
The input / output device 30 comprises a keyboard 49, a floppy disk device 50, a hard disk device 51, a printer 52 and the like.

【0037】図9は本発明実施例の表示処理部による表
示画面見本を示す。
FIG. 9 shows a sample display screen by the display processing unit according to the embodiment of the present invention.

【0038】同図において、表示画面60は、モニタ2
8に表示される標準的な画面例であり、最上部のタイト
ル表示部60aと、その下部のRAM表示部60bと、
ほぼ中央部のトレース表示部60cと、その右側の実行
状況表示部60d及びレジスタ類表示部60eと、最下
部のコマンド指示部60fとからなる。タイトル表示部
60aは、表題「インサーキット・エミュレータ」と、
ジャンプ命令等による飛び先を表示しないでスキップさ
せる注意表示「JSR skip trace」と、実行の年月日「19
93/5/10 」等とを表示している。RAM表示部60b
は、RAMテーブル41のシンボル名と、そのアドレス
と、そのアドレスの内容をそれぞれ16進表示、10進
表示、2進表示で表示しており、例えば、シンボル名
「RAM001」のアドレスが「(0001)」で、そ
のアドレスの内容の16進表示が「34」、10進表示
が「52」、2進表示が「00110100B」であ
る。なお、シンボル名の前の「*」は、現在のカーソル
の位置の命令のオペランドが指すメモリーアドレスを表
示している。トレース表示部60cは、アセンブリ・ソ
ース・プログラムの内容を表示しており、アンダーライ
ンを付してある部分は現在のカーソル位置を表示してい
る。実行状況表示部60dは、縦長の表示領域に、総ス
テップ数に対する実行ステップ数の割合をバーグラフで
表示しており、例えば、上部の0%位置から下部の10
0%位置に向かうバーの長さが割合を示している。レジ
スタ類表示部60eは、各レジスタ類の内容と、カーソ
ル位置のアドレス及びそのデータと、総ステップ数と、
実行ステップ数及びその割合と、実行ステップの累積さ
れたマシンサイクル数等とを表示している。例えば、A
レジスタ(アキュムレータ)の値が「FFFFH」、フ
ラグレジスタの「NVmxDIZC」に対応するビット
が「00001010B」、カーソル行のアドレスが
「(0005)」で、その内容が「0045H」、総ス
テップ「STEP」が「123」行、実行済行「EXE
C」の数が「12」でその割合が「23%」、累積マシ
ンサイクルが「12345」である。コマンド指示部6
0fは、コマンドを入力する部分を表示する「COMM
AND>」と、そのコマンド実行結果を表示する「ME
SSAGE>」とからなる。また、「NEST」はネス
トを示す数字が表示される。
In the figure, the display screen 60 is the monitor 2
8 is an example of a standard screen displayed in FIG. 8, and the title display section 60a at the top and the RAM display section 60b at the bottom thereof are
It is composed of a trace display section 60c in the substantially central portion, an execution status display section 60d and a register display section 60e on the right side thereof, and a command instruction section 60f at the bottom. The title display section 60a includes a title "in-circuit emulator",
A warning display "JSR skip trace" to skip without displaying the jump destination due to a jump instruction, and the date of execution "19
93/5/10 ”etc. are displayed. RAM display unit 60b
Displays the symbol name of the RAM table 41, its address, and the contents of the address in hexadecimal display, decimal display, and binary display. For example, the address of the symbol name "RAM001" is "(0001 ) ”, The hexadecimal display of the contents of the address is“ 34 ”, the decimal display is“ 52 ”, and the binary display is“ 00110100B ”. The "*" before the symbol name indicates the memory address pointed to by the operand of the instruction at the current cursor position. The trace display portion 60c displays the contents of the assembly source program, and the underlined portion shows the current cursor position. The execution status display unit 60d displays, in a vertically long display area, the ratio of the number of executed steps to the total number of steps in a bar graph.
The length of the bar towards the 0% position indicates the percentage. The register display unit 60e displays the contents of each register, the address of the cursor position and its data, the total number of steps,
The number of execution steps and its ratio, the number of accumulated machine cycles of execution steps, and the like are displayed. For example, A
The value of the register (accumulator) is “FFFFH”, the bit corresponding to “NVmxDIZC” of the flag register is “00001010B”, the address of the cursor line is “(0005)”, the content is “0045H”, and the total step is “STEP”. "123" line, executed line "EXE
The number of “C” is “12”, the ratio thereof is “23%”, and the cumulative machine cycle is “12345”. Command instruction section 6
0f is the “COMM which displays the part to input the command.
AND> ”and the command execution result“ ME
SSAGE> ”. In addition, a number indicating nesting is displayed for “NEST”.

【0039】次に、上記構成によるインサーキット・エ
ミュレータの実行処理を中心とする具体的な処理例を図
10〜図15のフローチャートを用いて説明する。
Next, a specific processing example centering on the execution processing of the in-circuit emulator having the above-mentioned configuration will be described with reference to the flowcharts of FIGS.

【0040】図10は本発明実施例の実行時におけるメ
イン処理を説明するフローチャートである。
FIG. 10 is a flow chart for explaining the main processing at the time of execution of the embodiment of the present invention.

【0041】同図において、まず、アセンブル・エラー
を修正したアセンブル・リスト22がインサーキット・
エミュレータ20を構成するホスト・コンピュータに入
出力インターフェース23を介して読み込まれる(ST
1)。次に、分解処理部31において、読み込まれたア
センブル・リスト22がテキスト部分とコード部分に分
けてテーブル化され、テキスト・テーブル33とコード
・テーブル32が生成される(ST2)。次に、実行処
理部37において、実行プログラムの読み込みが行われ
(ST3)、続いてこの実行プログラムが入出力インタ
ーフェース23を介してエミュレータ本体部1へ送信さ
れる(ST4)。次に、実行行より実行アドレスを得
(ST5)、この実行アドレスをエミュレータ本体部1
へ送信する(ST6)。そして、エミュレータ本体部1
での実行の完了を判断し(ST7)、実行が完了したと
きに再び実行アドレスを得るステップ(ST5)に戻
る。
In the figure, first, the assemble list 22 in which the assemble error is corrected is the in-circuit
It is read into the host computer that constitutes the emulator 20 through the input / output interface 23 (ST
1). Next, in the disassembling processing section 31, the read assemble list 22 is divided into a text portion and a code portion and tabulated, and a text table 33 and a code table 32 are generated (ST2). Next, the execution processing unit 37 reads the execution program (ST3), and then the execution program is transmitted to the emulator body 1 via the input / output interface 23 (ST4). Next, the execution address is obtained from the execution line (ST5), and this execution address is set in the emulator body 1
(ST6). And the emulator body 1
It is judged whether the execution is completed (ST7), and when the execution is completed, the process returns to the step (ST5) of obtaining the execution address again.

【0042】アセンブル・リスト22を入力して命令を
1ステップずつ実行できるため、従来のように実行形式
のファイルがなくても実行可能になり、全てのプログラ
ムモジュールが完成していなくても、開発の初期段階か
らプログラムモジュール単位のデバッグが可能になる。
Since the instructions can be executed step by step by inputting the assemble list 22, it becomes possible to execute even if there is no execution format file as in the past, and even if all the program modules are not completed, the development can be performed. Debugging in program module units is possible from the initial stage of.

【0043】図11は本発明実施例のコール命令のネス
ト処理を説明するフローチャートである。
FIG. 11 is a flow chart for explaining the nest processing of call instructions according to the embodiment of the present invention.

【0044】同図において、まず、実行処理部37で
は、コール命令を管理するポインタとしてネストを
「0」にして(ST11)、次に命令のうちコール命令
か否かを判断し(ST12)、コール命令のときにはネ
ストに1を加え(ST13)、コール命令でないときに
はリターン命令か否かを判断し(ST14)、リターン
命令のときにネストから1を引き(ST15)、コール
命令を実行しないとき及びリターン命令でないときにネ
スト表示を行う(ST16)。そして、次の命令を実行
し(ST17)、再びコール命令の判断のステップ(S
T11)に戻る。
In the figure, first, in the execution processing unit 37, the nest is set to "0" as a pointer for managing the call instruction (ST11), and then it is judged whether or not the instruction is a call instruction (ST12). When the instruction is a call instruction, 1 is added to the nest (ST13). When the instruction is not a call instruction, it is judged whether or not it is a return instruction (ST14). When the instruction is a return instruction, 1 is subtracted from the nest (ST15). When it is not a return command, nest display is performed (ST16). Then, the next command is executed (ST17), and the step of determining the call command again (S
Return to T11).

【0045】コール命令を続けると、ネストが深くなる
が、プログラム設計以上にネストが深くなっていないか
確認することができる。従来では、スタックポインタ等
によって計算していたが、処理が煩雑であった。
When the call instruction is continued, the nest becomes deeper, but it can be confirmed whether the nest is deeper than the program design. Conventionally, the calculation was performed using a stack pointer or the like, but the processing was complicated.

【0046】図12は本発明実施例の命令実行を飛ばす
NOP処理を説明するフローチャートである。
FIG. 12 is a flow chart for explaining the NOP processing for skipping the instruction execution of the embodiment of the present invention.

【0047】同図において、まず、NOP(ノーオペレ
ーション)コマンドである「N」をキー入力し(ST2
1)、次に現在のカーソル行を1行進め(ST22)、
PC(プログラムカウンタ)46の値を次の命令に進め
(ST23)、さらに空行であれば再びステップ(ST
23)に戻り(ST24)、空行でない場合は次の処理
に移行する(ST24)。
In the figure, first, the NOP (no operation) command "N" is keyed in (ST2
1), then advance the current cursor line by one line (ST22),
The value of the PC (program counter) 46 is advanced to the next instruction (ST23), and if it is a blank line, the step (ST) is performed again.
23) (ST24), and if it is not a blank line, shifts to the next processing (ST24).

【0048】命令の実行をスキップさせたいときに、コ
マンド入力により1行カーソルを進めることで命令をス
キップさせているため、スキップ処理の操作が簡単にな
る。従来のデバッガで所定の命令をスキップさせたい場
合には、PCを変更する操作をしなければならず操作が
煩雑であった。
When it is desired to skip the execution of an instruction, the instruction is skipped by advancing the cursor by one line by inputting a command, so the operation of the skip processing is simplified. When it is desired to skip a predetermined instruction with a conventional debugger, the operation of changing the PC has to be performed, and the operation is complicated.

【0049】図13は本発明実施例のブレーク処理を説
明するフローチャートである。
FIG. 13 is a flow chart for explaining the break processing of the embodiment of the present invention.

【0050】同図において、まず、ブレークコマンドで
ある「B」をキー入力し(ST31)、次に現在のカー
ソル位置にブレークポイントを設定することでブレーク
フラグの設定・解除(オン・オフ)行う(ST32)。
すなわち、ブレークコマンドによりコード・テーブル3
2のブレークフラグ領域に行単位にブレークポイントを
設定する。次に、実行処理部37は、命令実行時にコー
ド・テーブル32のブレークフラグのオン・オフを判断
し(ST33)、オンであればブレークを発生し(ST
34)、オフであれば次の命令の実行時のブレークフラ
グの判断ステップに戻る。
In the figure, first, the break command "B" is keyed in (ST31), and then a break point is set at the current cursor position to set / clear (turn on / off) the break flag. (ST32).
That is, the code table 3 is generated by the break command.
Set a break point for each line in the break flag area of 2. Next, the execution processing unit 37 determines whether the break flag of the code table 32 is on or off when the instruction is executed (ST33), and if it is on, a break occurs (ST).
34) If it is off, the process returns to the break flag determination step when the next instruction is executed.

【0051】コード・テーブル32において、行単位に
ブレークフラグ領域を設け、ブレークコマンドによりブ
レークポイントを設定・解除することで、ブレーク個数
に制限がなく、設定も容易である。従来のデバッガで
は、ブレークを発生させたい命令のアドレスを設定し、
そのアドレスとプログラムカウンタが同じ値になったと
きに、ブレークを発生させていたため、設定が煩雑で、
またブレークアドレスを管理するテーブルが必要にな
り、かつその設定個数も制限されていた。
In the code table 32, a break flag area is provided for each line, and a break point is set / released by a break command, so that there is no limit to the number of breaks and the setting is easy. In the conventional debugger, set the address of the instruction you want to generate a break,
Since the break was generated when the address and the program counter reached the same value, the setting was complicated,
In addition, a table for managing break addresses is required, and the number of settings is limited.

【0052】図14は本発明実施例のデバッグ率の把握
処理を説明するフローチャートである。
FIG. 14 is a flow chart for explaining the debug rate grasping process of the embodiment of the present invention.

【0053】同図において、まず、実行処理部37で
は、テーブルの総実行行数をカウントし(ST41)、
次に各命令の実行した(ST42)後、コード・テーブ
ル32の実行済フラグのオン・オフを判断し(ST4
3)、オフであれば実行カウントに1を加え(ST4
4)、その実行済フラグをオンして(ST45)から、
表示処理部43の処理で実行カレント表示を行い(ST
46)、オフであれば実行カウントと実行済フラグを変
化させずに実行カレント表示を行い、次の命令の分岐実
行のステップに戻る。実行カレント表示としては、モニ
タ28表示画面中のレジスタ類表示部60eに、実行行
カウントの値、この実行行カウントの値を総実行行数で
割り算して算出したデバッグ率等が表示され、また、実
行状況表示部60dに、デバッグ率がバーグラフで表示
される。
In the figure, first, the execution processing section 37 counts the total number of executed rows in the table (ST41),
Next, after each instruction is executed (ST42), it is judged whether the execution flag of the code table 32 is on or off (ST4).
3) If it is off, add 1 to the execution count (ST4
4) After turning on the executed flag (ST45),
The execution current is displayed by the processing of the display processing unit 43 (ST
46) If it is off, the execution current is displayed without changing the execution count and the executed flag, and the process returns to the step of branch execution of the next instruction. As the execution current display, the register display unit 60e in the monitor 28 display screen displays the execution line count value, the debug rate calculated by dividing the execution line count value by the total execution line number, and the like. The debug rate is displayed as a bar graph on the execution status display unit 60d.

【0054】行単位に実行済フラグを設け、実行後に実
行行をカウントするとともに、実行済フラグをオンする
ことで、全実行行のうち現在どのぐらい実行したかを示
すデバッグ率を把握することができ、デバッグ率が10
0%になれば、全ステップを通過したことになり、効率
的なデバッグが図れ、テスト洩れをなくすことができ
る。従来の開発ツールでは、実行中のデバッグ率を知る
ことができなかった。
By setting the executed flag for each line, counting the executed lines after execution, and turning on the executed flag, it is possible to grasp the debug ratio indicating how many of the executed lines are currently executed. Yes, debug rate is 10
If it becomes 0%, it means that all steps have been passed, efficient debugging can be achieved, and omission of test can be eliminated. With conventional development tools, it was not possible to know the debug rate during execution.

【0055】図15は本発明実施例のPCの設定処理を
説明するフローチャートである。
FIG. 15 is a flow chart for explaining the PC setting process of the embodiment of the present invention.

【0056】同図において、まず、カーソルを実行しよ
うとする行に移動させ(ST51)、次にコマンド
「P」をキー入力することで(ST52)、現在のカー
ソル行のアドレスがPC46に設定され(ST53)、
続いてそのアドレスの命令が実行される(ST54)。
In the figure, first, the cursor is moved to the line to be executed (ST51), and then the command "P" is keyed in (ST52), and the address of the current cursor line is set in the PC46. (ST53),
Then, the instruction at that address is executed (ST54).

【0057】カーソルを実行しようとする行に移動さ
せ、コマンドによりカーソル位置のアドレスをPC46
に設定して実行することで、ユーザーがプログラムのア
ドレスを意識することなく必要な所から実行できる。従
来の開発ツールでは、プログラムカウンタにアドレスを
設定したり、実行コマンドによりアドレスまたはシンボ
ルを設定する必要があり、操作が煩雑であった。
The cursor is moved to the line to be executed, and the address of the cursor position is set to PC46 by the command.
By setting it to and executing it, the user can execute it from the necessary place without being aware of the program address. In the conventional development tool, it is necessary to set an address in the program counter or an address or a symbol by an execution command, which makes the operation complicated.

【0058】次に、上記構成によるインサーキット・エ
ミュレータのエラー検出処理を中心とする具体的な処理
例を図16〜図20のフローチャートを用いて説明す
る。
Next, a specific processing example centered on the error detection processing of the in-circuit emulator having the above-mentioned configuration will be described with reference to the flowcharts of FIGS.

【0059】図16は本発明実施例の擬似命令実行エラ
ー検出処理を説明するフローチャートである。
FIG. 16 is a flow chart for explaining the pseudo instruction execution error detection processing of the embodiment of the present invention.

【0060】同図において、まず、エラー検出部34で
は、テーブル(コード及びテキスト)より命令コードを
取り出し(ST61)、次にこの命令コードが擬似命令
であるか否かを判断し(ST62)、擬似命令であれば
表示処理部33においてエラー表示の処理をし(ST6
3)、擬似命令でなければエラー表示をしないで次の処
理に進む。
In the figure, first, the error detection unit 34 extracts an instruction code from the table (code and text) (ST61), and then determines whether this instruction code is a pseudo instruction (ST62). If it is a pseudo instruction, the display processing unit 33 performs error display processing (ST6
3) If it is not a pseudo instruction, no error is displayed and the process proceeds to the next step.

【0061】命令コード中に擬似命令があったときに、
エラーの検出ができる。従来、インサーキット・エミュ
レータ等では、例えば、データの1バイトずつの定義を
するDB擬似命令、2バイト単位でデータを指定するD
W擬似命令等があっても、そのまま命令コードとして実
行してきた。
When there is a pseudo instruction in the instruction code,
Can detect errors. Conventionally, in an in-circuit emulator or the like, for example, a DB pseudo-instruction that defines data in 1-byte units, and D that specifies data in 2-byte units
Even if there is a W pseudo-instruction or the like, it is executed as it is as an instruction code.

【0062】図17は本発明実施例のジャンプ命令飛び
先エラー検出処理を説明するフローチャトである。
FIG. 17 is a flow chart for explaining the jump instruction jump destination error detection processing of the embodiment of the present invention.

【0063】同図において、まず、エラー検出部34で
は、コード・テーブル32から取り出した命令コードが
ジャンプ命令であるか否かを判断し(ST71)、ジャ
ンプ命令であるときには、オペコードよりジャンプ先ア
ドレスを計算し(ST72)、次にテーブル上の該当ア
ドレスの有無を判断し(ST73)、無いときにのみ表
示処理部43においてエラー表示の処理(ST74)を
して次の処理に進み、ジャンプ命令でないときには、そ
のまま次の処理に進む。
In the figure, first, the error detecting section 34 judges whether the instruction code fetched from the code table 32 is a jump instruction (ST71). Is calculated (ST72), then the presence or absence of the corresponding address on the table is determined (ST73), and only when there is no address, the display processing unit 43 performs an error display process (ST74) and proceeds to the next process to jump command. If not, the process directly proceeds to the next process.

【0064】ジャンプ命令で、シンボルを使用しない場
合、インデックスを使用する場合等に、命令以外に飛び
先が変わることがあり、そのときのエラー検出ができ
る。従来の開発ツールでは、このようなエラー検出がで
きなかった。
When a jump instruction does not use a symbol or uses an index, the jump destination may change other than the instruction, and an error can be detected at that time. Conventional development tools have been unable to detect such errors.

【0065】図18は本発明実施例のイミディエイトデ
ータ長エラー検出処理を説明するフローチャートであ
る。
FIG. 18 is a flow chart for explaining the immediate data length error detection processing of the embodiment of the present invention.

【0066】同図において、まず、エラー検出部34で
は、コード・テーブルから取り出した命令コードがイミ
ディエイトデータ命令であるか否かを判断する(ST8
1)。イミディエイトデータ命令であるときには、テー
ブル上のオペコード長さを得(ST82)、次にCPU
ステータスのデータ長フラグで1バイトデータか1バイ
トデータかを判断する(ST83)。1バイトデータの
ときには、テーブル上のオペコード長が1バイトである
か判断し(ST84)、1バイトでないときにのみ表示
処理部43においてエラー表示の処理(ST85)をし
て次の処理に進み、また、2バイトデータのときには、
テーブル上のオペコード長が2バイトであるか判断し
(ST86)、2バイトでないときにのみ表示処理部4
3においてエラー表示の処理(ST85)をして次の処
理に進む。イミディエイトデータ命令でないときには、
そのまま次の処理に進む。
In the figure, first, the error detector 34 judges whether the instruction code fetched from the code table is an immediate data instruction (ST8).
1). If it is an immediate data instruction, the operation code length on the table is obtained (ST82), then the CPU
It is determined whether the data length flag of the status is 1-byte data or 1-byte data (ST83). When it is 1 byte data, it is judged whether the opcode length on the table is 1 byte (ST84), and when it is not 1 byte, the display processing unit 43 performs error display processing (ST85) and proceeds to the next processing. Also, for 2-byte data,
It is determined whether the opcode length on the table is 2 bytes (ST86), and when it is not 2 bytes, the display processing unit 4
In step 3, an error display process (ST85) is performed and the process proceeds to the next process. When not an immediate data command,
The process proceeds as it is.

【0067】イミディエイトデータ長は、CPUステー
タスの状態によって、1バイト長、2バイト長に変化す
る。アセンブル時に、仮の値として擬似命令で指定す
る。実際にCPUが動作するとき、CPUステータスの
状態が不一致であると、バグになる。従来のデバッグで
は、目視によって検出していた。
The immediate data length changes to 1 byte length or 2 bytes length depending on the CPU status. When assembling, specify with a pseudo instruction as a temporary value. When the CPU actually operates, if the CPU statuses do not match, it becomes a bug. In the conventional debugging, it was detected visually.

【0068】図19は本発明実施例のイミディエイト・
インデックス長エラー検出処理を説明するフローチャー
トである。
FIG. 19 is a diagram showing the immediate of the embodiment of the present invention.
It is a flow chart explaining index length error detection processing.

【0069】同図において、まず、エラー検出部34で
は、コード・テーブル32から取り出した命令コードが
イミディエイトインデックス命令であるか否かを判断す
る(ST91)。イミディエイトインデックス命令であ
るときには、テーブル上のオペコード長さを得(ST9
2)、次にCPUステータスのインデックス長フラグで
1バイトデータか1バイトデータかを判断する(ST9
3)。1バイトデータのときには、テーブル上のオペコ
ード長が1バイトであるか判断し(ST94)、1バイ
トでないときにのみ表示処理部43においてエラー表示
の処理(ST95)をして次の処理に進み、また、2バ
イトデータのときには、テーブル上のオペコード長が2
バイトであるか判断し(ST96)、2バイトでないと
きにのみ表示処理部43においてエラー表示の処理(S
T95)をして次の処理に進む。イミディエイトインデ
ックス命令でないときには、そのまま次の処理に進む。
In the figure, first, the error detector 34 determines whether the instruction code fetched from the code table 32 is an immediate index instruction (ST91). If it is an immediate index instruction, the operation code length on the table is obtained (ST9
2) Next, it is determined whether the index length flag of the CPU status is 1-byte data or 1-byte data (ST9).
3). When the data is 1-byte data, it is determined whether the opcode length on the table is 1 byte (ST94), and when it is not 1 byte, the display processing unit 43 performs error display processing (ST95) and proceeds to the next processing. If the data is 2 bytes, the opcode length on the table is 2
If it is not 2 bytes, it is judged whether it is a byte (ST96).
T95) is performed and the process proceeds to the next step. If it is not the immediate index instruction, the process directly proceeds to the next processing.

【0070】イミディエイト・インデックス長は、CP
Uステータスの状態によって、1バイト長、2バイト長
に変化する。アセンブル時に、仮の値として擬似命令で
指定する。実際にCPUが動作するとき、CPUステー
タスの状態が不一致であると、バグになる。従来のデバ
ッグでは、目視によって検出していた。
The immediate index length is CP
Depending on the state of the U status, the length changes to 1 byte length or 2 bytes length. When assembling, specify with a pseudo instruction as a temporary value. When the CPU actually operates, if the CPU statuses do not match, it becomes a bug. In the conventional debugging, it was detected visually.

【0071】図20は本発明実施例のメモリアクセスの
エラー検出処理を説明するフローチャートである。
FIG. 20 is a flow chart for explaining the memory access error detection processing according to the embodiment of the present invention.

【0072】同図において、まず、エラー検出部34で
は、コード・テーブルから取り出した命令コードの種類
が、メモリ読出し、メモリ書込み、その他であるかを判
断する(ST101)。このような判断は、例えば、オ
ペコード・テーブル38のメモリのアクセス・タイプ欄
で行う。命令コードがメモリ読出しのときには、アクセ
ス・アドレスに対応するメモリの属性が読出し可能
(R)であるか否かをアクセス管理テーブル35から判
断し(ST102)、読出し可能でないときにのみ表示
処理部43においてエラー表示の処理(ST103)を
して次の処理に進む。命令コードがメモリ書込みのとき
には、アクセス・アドレスに対応するメモリの属性が書
込み可能(W)であるか否かをアクセス管理テーブル3
5から判断し(ST104)、書込み可能でないときに
のみ表示処理部43においてエラー表示の処理(ST1
03)をして次の処理に進む。命令コードがその他のと
きには、そのまま次の処理に進む。
In the figure, first, the error detection unit 34 determines whether the type of the instruction code fetched from the code table is memory read, memory write, or the like (ST101). Such a determination is made, for example, in the access type column of the memory of the opcode table 38. When the instruction code is memory read, it is judged from the access management table 35 whether or not the attribute of the memory corresponding to the access address is readable (R) (ST102), and only when it is not readable, the display processing unit 43. In step S103, an error display process is performed and the process proceeds to the next process. When the instruction code is memory write, it is determined whether or not the attribute of the memory corresponding to the access address is writable (W).
5 (ST104), error display processing is performed in the display processing unit 43 only when writing is not possible (ST1).
03) and proceed to the next processing. When the instruction code is other than that, the processing directly proceeds to the next processing.

【0073】アクセス管理テーブル35にメモリの属性
情報を予め設定し、命令の種類を判断して、メモリアク
セスのエラー検出をすることで、例えば、プログラム領
域でないアドレスへのアクセス、メモリが実装されてな
い領域への不正なアクセス等があった場合に、エラー検
出できる。従来では、インサーキット・エミュレータの
機能として、メモリアクセスエラー検出がある。これ
は、予めメモリの属性をマップテーブルに書き込んで、
メモリアクセスがあるとハードウェアによって検出する
ものである。
By setting the attribute information of the memory in the access management table 35 in advance, judging the kind of the instruction, and detecting the error of the memory access, for example, the access to the address which is not the program area and the memory are mounted. An error can be detected when there is an unauthorized access to an area that does not exist. Conventionally, memory access error detection is a function of the in-circuit emulator. This is because the attributes of memory are written in the map table in advance,
When there is a memory access, it is detected by hardware.

【0074】なお、メモリが実装されていないアドレス
や、プログラム領域でないアドレスを実行しようとした
とき、同様にして、インストラクション・フェッチ・ア
ドレスのエラー検出することができる。
When an address where the memory is not mounted or an address which is not the program area is to be executed, the instruction fetch address error can be detected in the same manner.

【0075】次に、上記構成によるインサーキット・エ
ミュレータの表示処理を中心とする具体的な処理例を図
21〜図23のフローチャートを用いて説明する。
Next, a specific processing example centering on the display processing of the in-circuit emulator having the above-mentioned configuration will be described with reference to the flowcharts of FIGS.

【0076】図21は本発明実施例の実行表示処理を説
明するフローチャートである。
FIG. 21 is a flow chart for explaining the execution display processing of the embodiment of the present invention.

【0077】同図において、まず、実行処理部37で
は、命令実行による実行フラグをコード・テーブル32
に設定する(ST111)。次に、表示処理部43で
は、各行のプログラムの実行フラグがオンかオフかを判
断し(ST112)、オフのときにはその行を白表示処
理をし(ST113)、オンのときにはその行を緑表示
処理をし(ST113)て次の処理に進む。
In the figure, first, in the execution processing unit 37, the execution flag by the instruction execution is set in the code table 32.
(ST111). Next, the display processing unit 43 determines whether the program execution flag of each line is on or off (ST112), performs white display processing for that line when it is off (ST113), and displays that line in green when it is on. The process is performed (ST113) and the process proceeds to the next process.

【0078】コード・テーブル32の命令実行による実
行フラグのオン・オフを検出して、それに応じて白また
は緑で色分けで表示することで、プログラムが実行済か
否かを把握することができ、いわゆるホワイト・ボック
ス・テストの網羅性を確認することができる。従来で
は、このような網羅性を簡単に目視することができなか
った。
By detecting ON / OFF of the execution flag by the instruction execution of the code table 32 and displaying it in white or green in accordance with the color, it is possible to grasp whether or not the program has been executed. You can check the completeness of the so-called white box test. In the past, such comprehensiveness could not be easily visually checked.

【0079】図22は本発明実施例のカーソルRAM表
示処理を説明するフローチャートである。
FIG. 22 is a flow chart for explaining the cursor RAM display processing of the embodiment of the present invention.

【0080】同図において、まず、表示処理部43で
は、カーソルのオペコードよりテーブル検索によりアド
レッシング関数を得(ST121)、次にアドレッシン
グ関数をコールしてメモリのアドレスを得(ST12
2)、続いてRAMアドレスよりメモリの内容を表示す
る(ST123)。
In the figure, first, the display processing unit 43 obtains an addressing function by table search from the operation code of the cursor (ST121), and then calls the addressing function to obtain a memory address (ST12).
2) Then, the contents of the memory are displayed from the RAM address (ST123).

【0081】実行する命令の指すRAMがどのような値
かを、カーソルを移動させるだけで簡単に確認すること
ができる。従来では、メモリダンプコマンドで必要なR
AMを表示させたり、プログラムカウンタのある所のみ
表示させていたため、操作が煩雑であった。
The value of the RAM pointed to by the instruction to be executed can be easily confirmed simply by moving the cursor. Conventionally, R required for the memory dump command
Since AM is displayed or only the place where the program counter is present is displayed, the operation is complicated.

【0082】図23は本発明実施例のスキップ処理を説
明するフローチャートである。
FIG. 23 is a flow chart for explaining the skip processing of the embodiment of the present invention.

【0083】同図において、まず、現在のネストをセー
ブし(ST131)、次に、命令の実行(ST132)
の後、リターンしたときセーブしたネストの比較をして
(ST133)、セーブ値がネストの値より小さいとき
には再び命令実行に戻り、セーブ値がネストの値より大
きいか等しいときに、次の処理に進む。このセーブ値が
ネストの値より小さいときは、表示処理が行われない。
In the figure, first, the current nest is saved (ST131), and then the instruction is executed (ST132).
After that, when the return is returned, the saved nests are compared (ST133). When the save value is smaller than the nest value, the operation is returned to the instruction execution. When the save value is larger than or equal to the nest value, the next processing is performed. move on. When the save value is smaller than the nest value, the display processing is not performed.

【0084】テスト済のルーチンは、各ステップ毎にト
レースして確認する必要がなく、その処理さえすれば良
いから、時間短縮になる。従来では、コール命令の次の
命令にブレークポイントを置き、そのアドレスまで連続
実行させていた。
The tested routine does not need to be traced and confirmed at each step, and only needs to be processed so that the time is shortened. Conventionally, a breakpoint is placed at the instruction next to the call instruction, and execution is continued up to that address.

【0085】なお、命令の実行エラーの場合、エラー種
別ごとにカウントされ、この結果がプログラム終了時に
表示され、トレースファイル48に書き込まれる。表示
されるエラーメッセージとしては、例えば、不正命令コ
ード、データ長選択フラグとオブジェクトコードがあっ
ていない、ジャンプ先が命令行の中間、読出し禁止メモ
リに読出しをした、書込み禁止メモリに書込みをした、
アドレスが定義されていない等が表示される。
In the case of an instruction execution error, it is counted for each error type, and the result is displayed at the end of the program and written in the trace file 48. The displayed error messages include, for example, incorrect instruction code, data length selection flag and object code, jump destination is in the middle of instruction line, read-protected memory is read, write-protected memory is written,
An address is not defined is displayed.

【0086】次に、エミュレータ本体部1側とパソコン
側システム部2側とのリンケージを図24及び図25に
説明する。
Next, the linkage between the emulator main unit 1 side and the personal computer side system unit 2 side will be described with reference to FIGS. 24 and 25.

【0087】図24は本発明実施例の命令の実行を説明
するフローチャートである。
FIG. 24 is a flow chart for explaining the execution of instructions according to the embodiment of the present invention.

【0088】同図において、まず、パソコン側システム
部2は実行行より実行アドレスを得(ST141)、次
に実行アドレスをエミュレータ本体部1側に送信する
(ST142)。そして、エミュレータ本体部1での実
行完了を判断し(ST143)、実行完了により終了す
る。
In the figure, first, the personal computer side system section 2 obtains an execution address from the execution line (ST141), and then transmits the execution address to the emulator main body section 1 side (ST142). Then, the completion of execution in the emulator main body 1 is judged (ST143), and the process is terminated by the completion of execution.

【0089】図25は本発明実施例のエミュレータ本体
部(ICE)とパソコン(PC)とのリンケージを説明
するフローチャートである。
FIG. 25 is a flow chart for explaining the linkage between the emulator body (ICE) and the personal computer (PC) according to the embodiment of the present invention.

【0090】同図において、まず、ICE側では、PC
側からコマンド受信の有無を判断し(ST151)、コ
マンド受信が有るときには、コマンド実行ルーチンに進
み(ST152)、終了後にICEからPCへ実行結果
のデータを送信し(ST153)、再びコマンド受信の
有無の判断のステップに戻る。次に、PC側では、モニ
タ画面であるCRT表示(ST154)を行い、キー入
力の有無を判断し(ST155)、キー入力が有ったと
きにコマンド実行とコマンドをICE側に送信し(ST
156)、続いてICE側から実行結果のデータ受信の
有無を判断し(ST157)、データ受信が有ったとき
にCRT表示のステップに戻る。ここで、ICE側とP
C側との間の通信フォーマットは、表4に示すように、
その形式は、ヘッダーコード、送信データ、最後に誤り
制御のチェックサムが続く。例えば、ICE側からPC
側へのレジスタ内容の送信では、ヘッダコード「0
0」、送信データ「レジスタA」、「レジスタB」、
…、「レジスタPCL」にチェックサムが続き、メモリ
内容の送信では、ヘッダコード「01」、送信データ
「アドレス0の送信メモリ」から「順次アドレスをイン
クリメントした送信メモリ」にチェックサムが続く。ま
た、PC側からICE側への送信では、ヘッダコード
「80」、送信データ「コマンド」、「送信メモリのア
ドレス」、「データ」、「プログラムカウンター」にチ
ェックサムが続く。コマンド例は、例えば、レジスタ設
定/表示、メモリ設定/表示、プログラムセーブ/表
示、実行1ステップ/連続等である。
In the figure, first, on the ICE side, a PC
Whether or not the command is received from the side (ST151), when the command is received, the process proceeds to the command execution routine (ST152), after completion, the data of the execution result is transmitted from the ICE to the PC (ST153), and the command is received again or not. Return to the judgment step. Next, on the PC side, a CRT display (ST154), which is a monitor screen, is performed, and it is determined whether or not there is a key input (ST155). When there is a key input, command execution and command transmission to the ICE side (ST).
156), subsequently, it is judged from the ICE side whether or not the execution result data is received (ST157), and when the data is received, the process returns to the CRT display step. Where ICE and P
The communication format with the C side is, as shown in Table 4,
Its format is a header code, transmitted data, and finally an error control checksum. For example, from ICE side to PC
Sending the register contents to the
0 ”, transmission data“ register A ”,“ register B ”,
The checksum follows the "register PCL", and when transmitting the memory contents, the checksum follows the header code "01" and the transmission data "transmission memory with address 0" to "transmission memory with sequentially incremented address". Further, in the transmission from the PC side to the ICE side, the checksum follows the header code “80”, the transmission data “command”, the “transmission memory address”, the “data”, and the “program counter”. Examples of commands are register setting / display, memory setting / display, program save / display, execution 1 step / continuous, and the like.

【0091】[0091]

【表4】 [Table 4]

【0092】上記構成のインサーキット・エミュレータ
によれば、ホスト・コンピュータのPC上に構成される
ソフトウェアによる機能実現手段である、分解処理手段
24、チェック処理手段25、解釈実行制御手段26、
表示処理手段27、コマンド処理手段29等を備えるこ
とで、アセンブル時に作成されるアセンブル・リスト
(リストファイル)を読み込み、1命令づつエミュレー
タ本体部(ICE)1で実行させることができ、また、
アセンブラでできない各種のエラーチェックをすること
で、従来の人手による目と手に依らなければできなかっ
たデバックが機械的に正確かつ短時間にでき、システム
開発の効率を向上できる。
According to the in-circuit emulator having the above-mentioned configuration, the disassembling processing means 24, the check processing means 25, the interpretation execution control means 26, which are function realizing means by software configured on the PC of the host computer,
By providing the display processing means 27, the command processing means 29, etc., the assemble list (list file) created at the time of assembly can be read and executed by the emulator main body (ICE) 1 one instruction at a time.
By performing various error checks that cannot be done by the assembler, debugging, which could not be done by human eyes and hands, can be done mechanically accurately and in a short time, and the efficiency of system development can be improved.

【0093】また、実行処理部37では実行行をカウン
トし、どのくらい実行したかを表示処理部43の処理に
より、モニタ28の表示画面に表示することで、従来の
開発ツールでできなかったデバッグ率の把握が可能にな
る。
Further, the execution processing section 37 counts the execution lines, and the display processing section 43 displays the number of executions on the display screen of the monitor 28. Can be understood.

【0094】さらに、エラー検出部34では、アクセス
管理テーブルを用いて、RAMのアクセスをチェックし
ているため、RAMのアクセス状況が把握できる。
Further, since the error detecting section 34 checks the RAM access using the access management table, the RAM access status can be grasped.

【0095】また、表示処理部43で表示処理して、モ
ニタ28の表示画面60において、RAM表示部60b
にRAMテーブル41の内容、トレース表示部60cに
カーソルを付したソース・プログラムの内容、レジスタ
類表示部60eに各種のレジスタの内容を、1つの画面
上に表示しているため、命令を実行しながらRAMやレ
ジスタの変化を同時に確認することができ効率的なデバ
ックができる。また、表示処理部43では、命令を実行
することによって表示色が変化し、実行済の行が確認で
きるため、内部処理機能が明白である場合は、この処理
ルーチンの全パスを通るような入力テータを与えてその
結果をチェックを行う、いわゆるホワイト・ボックス・
テストの網羅性の把握ができる。
The display processing unit 43 performs display processing, and the RAM display unit 60b is displayed on the display screen 60 of the monitor 28.
Since the contents of the RAM table 41, the contents of the source program with the cursor on the trace display unit 60c, and the contents of various registers on the registers display unit 60e are displayed on one screen, the instruction is executed. However, changes in RAM and registers can be checked at the same time, and efficient debugging can be performed. Further, in the display processing unit 43, the display color is changed by executing the command, and the executed line can be confirmed. Therefore, when the internal processing function is clear, the input that passes through all the paths of this processing routine is performed. The so-called white box that gives the data and checks the result
You can grasp the completeness of the test.

【0096】プログラムのテスト結果は、例えば、トレ
ースファイル48にファイルされるため、後でテスト結
果の机上チェックも可能になる。また、ログファイルか
ら入力コマンドを自動運転により与えることもでき、こ
れによりプログラムの内容を知らない人でも簡単に取り
扱うことができる。
Since the test result of the program is stored in, for example, the trace file 48, it is possible to check the test result later on the desk. Further, an input command can be given from the log file by automatic operation, which allows a person who does not know the contents of the program to easily handle it.

【0097】なお、上記実施例において、マイコンを例
に説明したが、各種のマイクロコンピュータを搭載した
システムのプログラム開発に適用でき、ホスト・コンピ
ュータも必要な性能と容量を有するワークステーション
やパーソナルコンピュータを使用することができる。
In the above embodiment, the microcomputer is taken as an example, but it can be applied to the program development of a system equipped with various microcomputers, and the host computer can be a workstation or personal computer having the required performance and capacity. Can be used.

【0098】また、オペコード・テーブル38、アドレ
ス関数ルーチン39は、目標CPUの命令やホスト・コ
ンピュータの種類により任意に設定される。実施例のチ
ェック処理手段25におけるエラー検出は、代表的な例
であり、その他の任意のエラー検出を追加することがで
きる。また、モニタ28の表示画面は一例であり、実施
例に限定されない。
Further, the operation code table 38 and the address function routine 39 are arbitrarily set according to the instruction of the target CPU and the type of the host computer. The error detection in the check processing means 25 of the embodiment is a typical example, and any other error detection can be added. Further, the display screen of the monitor 28 is an example, and the display screen is not limited to the embodiment.

【0099】[0099]

【発明の効果】以上説明したように本発明では、分解処
理手段24、チェック処理手段25、解釈実行制御手段
26、表示処理手段27、コマンド処理手段29等を備
え、アセンブル時に作成されるアセンブル・リストを読
み込み、1命令づつエミュレータ本体部で実行するとと
もに、アセンブラや従来のインサーキット・エミュレー
タでできない各種のエラーチェックをすることで、プロ
グラムのデバッグを正確かつ短時間にでき、開発の効率
を向上できる効果がある。
As described above, the present invention is provided with the disassembling processing means 24, the check processing means 25, the interpretation execution control means 26, the display processing means 27, the command processing means 29, etc. By reading the list and executing it one instruction at a time in the emulator main unit, and performing various error checks that cannot be done by the assembler or conventional in-circuit emulator, the program can be debugged accurately and quickly, improving the development efficiency. There is an effect that can be done.

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

【図1】本発明実施例のインサーキット・エミュレータ
の全体システム構成を説明する図である。
FIG. 1 is a diagram illustrating an overall system configuration of an in-circuit emulator according to an embodiment of the present invention.

【図2】本発明実施例のインサーキット・エミュレータ
の具体的な構成を説明するブロック図である。
FIG. 2 is a block diagram illustrating a specific configuration of the in-circuit emulator according to the embodiment of the present invention.

【図3】本発明実施例のインサーキット・エミュレータ
の全体構成を説明するブロック図である。
FIG. 3 is a block diagram illustrating an overall configuration of an in-circuit emulator according to an embodiment of the present invention.

【図4】本発明実施例のアセンブル・リストの具体例を
説明する図である。
FIG. 4 is a diagram illustrating a specific example of an assemble list according to an embodiment of the present invention.

【図5】本発明実施例のコード・テーブルの具体例を説
明する図である。
FIG. 5 is a diagram illustrating a specific example of a code table according to the embodiment of this invention.

【図6】本発明実施例のアクセス管理テーブルの具体例
を説明する図である。
FIG. 6 is a diagram illustrating a specific example of an access management table according to the embodiment of this invention.

【図7】本発明実施例のオペコード・テーブルの具体例
を説明する図である。
FIG. 7 is a diagram illustrating a specific example of an operation code table according to the embodiment of this invention.

【図8】本発明実施例のアドレス関数と実行ルーチンの
関係を説明する図である。
FIG. 8 is a diagram illustrating a relationship between an address function and an execution routine according to the embodiment of this invention.

【図9】本発明実施例の表示処理部による表示画面見本
を示す。
FIG. 9 shows a sample display screen by the display processing unit according to the embodiment of the present invention.

【図10】本発明実施例の実行時のメイン処理を説明す
るフローチャートである。
FIG. 10 is a flowchart illustrating main processing at the time of execution of the embodiment of the present invention.

【図11】本発明実施例のコール命令のネスト管理処理
を説明するフローチャートである。
FIG. 11 is a flowchart illustrating nest management processing of call instructions according to the embodiment of this invention.

【図12】本発明実施例の命令の実行を飛ばすNOP処
理を説明するフローチャートである。
FIG. 12 is a flowchart illustrating NOP processing that skips execution of an instruction according to the embodiment of this invention.

【図13】本発明実施例のブレーク処理を説明するフロ
ーチャートである。
FIG. 13 is a flowchart illustrating break processing according to the embodiment of this invention.

【図14】本発明実施例のデバッグ率の把握処理を説明
するフローチャートである。
FIG. 14 is a flowchart illustrating a debug rate grasping process according to the embodiment of this invention.

【図15】本発明実施例のPCの設定処理を説明するフ
ローチャートである。
FIG. 15 is a flowchart illustrating a PC setting process according to an embodiment of the present invention.

【図16】本発明実施例の擬似命令実行エラー検出処理
を説明するフローチャートである。
FIG. 16 is a flowchart illustrating a pseudo instruction execution error detection process according to the embodiment of this invention.

【図17】本発明実施例のジャンプ命令飛び先エラー検
出処理を説明するフローチャートである。
FIG. 17 is a flowchart illustrating a jump instruction jump destination error detection process of the embodiment of the present invention.

【図18】本発明実施例のイミディエイトデータ長エラ
ー検出処理を説明するフローチャートである。
FIG. 18 is a flowchart illustrating an immediate data length error detection process of the embodiment of the present invention.

【図19】本発明実施例のイミディエイト・インデック
ス長エラー検出処理を説明するフローチャートである。
FIG. 19 is a flowchart illustrating an immediate index length error detection process according to the embodiment of this invention.

【図20】本発明実施例のメモリアクセスのエラー検出
処理を説明するフローチャートである。
FIG. 20 is a flowchart illustrating a memory access error detection process according to the embodiment of this invention.

【図21】本発明実施例の実行表示処理を説明するフロ
ーチャートである。
FIG. 21 is a flowchart illustrating an execution display process according to the embodiment of this invention.

【図22】本発明実施例のカーソルRAM表示処理を説
明するフローチャートである。
FIG. 22 is a flowchart illustrating cursor RAM display processing according to the embodiment of the present invention.

【図23】本発明実施例のスキップ処理を説明するフロ
ーチャートである。
FIG. 23 is a flowchart illustrating skip processing according to the embodiment of this invention.

【図24】本発明実施例の命令の実行を説明するフロー
チャートである。
FIG. 24 is a flowchart illustrating execution of instructions according to an embodiment of the present invention.

【図25】本発明実施例のエミュレータ本体(ICE)
とパソコン(PC)とのリンケージを説明するフローチ
ャートである。
FIG. 25 is an emulator main body (ICE) according to an embodiment of the present invention.
3 is a flowchart illustrating a linkage between a computer and a personal computer (PC).

【符号の説明】 1 エミュレータ本体部 2 パソコン側システム部 20 インサーキット・エミュレータ 21 ソース・プログラム 22 アセンブル・リスト 23 入出力インターフェース 24 分解処理手段 25 チェック処理手段 26 解釈実行処理手段 27 表示処理手段 28 モニタ 29 コマンド処理部 30 入出力機器 31 分解処理部 32 コードテーブル 33 テキストテーブル 34 エラー検出部 35 アクセス管理テーブル 36 フラグ 37 実行処理部 38 オペコード・テーブル 39 アドレス関数ルーチン 41 RAMテーブル 42 シンボル・テーブル 43 表示処理部 44 シンボル・ファイル 45 生成部 46 プログラムカウンタ 47 ポインタ 48 トレースファイル 60 表示画面 23 入出力インターフェース 24 分解処理手段 25 チェック処理手段 26 解釈実行手段 27 表示処理手段 28 モニタ 29 コマンド処理手段 30 入出力機器 31 分解処理部 32 コード・テーブル 33 テキスト・テーブル 34 エラー検出部 35 アクセス管理テーブル 36 フラグ 37 実行処理部 38 オペコード・テーブル 39 アドレス関数ルーチン 40 実行ルーチン 41 RAMテーブル 42 シンボル・テーブル 43 表示処理部 44 シンボル・ファイル 45 生成部 46 PC(プログラムカウンタ) 47 ポインタ 48 トレースファイル 49 キーボード 50 フロッピーディスク装置 51 ハードディスク装置 52 プリンタ 60 表示画面[Explanation of symbols] 1 emulator main unit 2 personal computer side system unit 20 in-circuit emulator 21 source program 22 assemble list 23 input / output interface 24 disassembly processing unit 25 check processing unit 26 interpretation execution processing unit 27 display processing unit 28 monitor 29 Command processing unit 30 Input / output device 31 Disassembly processing unit 32 Code table 33 Text table 34 Error detection unit 35 Access management table 36 Flag 37 Execution processing unit 38 Operation code table 39 Address function routine 41 RAM table 42 Symbol table 43 Display processing Part 44 symbol file 45 generation part 46 program counter 47 pointer 48 trace file 60 display screen 23 input / output interface 24 disassembly Processing means 25 Check processing means 26 Interpretation execution means 27 Display processing means 28 Monitor 29 Command processing means 30 Input / output equipment 31 Disassembly processing section 32 Code table 33 Text table 34 Error detection section 35 Access control table 36 Flag 37 Execution processing section 38 Opcode table 39 Address function routine 40 Execution routine 41 RAM table 42 Symbol table 43 Display processing unit 44 Symbol file 45 Generation unit 46 PC (program counter) 47 Pointer 48 Trace file 49 Keyboard 50 Floppy disk device 51 Hard disk device 52 Printer 60 display screen

Claims (21)

【特許請求の範囲】[Claims] 【請求項1】 目標システムのソース・プログラムより
生成したアセンブル・リストをホスト・コンピュータ上
で分解処理してコード・テーブル及びテキスト・テーブ
ルを得る分解処理手段と、前記コード・テーブル及びテ
キスト・テーブルに基づきエラー検出をするチェック処
理手段と、前記コード・テーブルの命令コードを1命令
づつエミュレータ本体部へ送信し該エミュレータ本体部
で実行した結果を受信する解釈実行制御手段と、前記チ
ェック処理手段のエラー検出結果及び解釈実行制御手段
の実行結果をモニタに表示する処理を行う表示処理手段
と、前記分解処理手段、チェック処理手段、解釈実行制
御手段及び表示処理手段に対するコマンド指示を処理す
るコマンド処理手段とを備えたインサーキット・エミュ
レータ。
1. A disassembling means for disassembling an assemble list generated from a source program of a target system on a host computer to obtain a code table and a text table, and the code table and the text table. A check processing means for detecting an error based on the above, an interpretation execution control means for transmitting the instruction code of the code table to the emulator main body one instruction at a time and receiving a result executed by the emulator main body, and an error of the check processing means. Display processing means for performing processing for displaying the detection result and the execution result of the interpretation execution control means on a monitor; and command processing means for processing command instructions for the disassembly processing means, check processing means, interpretation execution control means, and display processing means. In-circuit emulator equipped with.
【請求項2】 前記分解処理手段のコード・テーブル
は、各命令行毎に前記解釈実行制御手段による命令実行
により実行済を設定する実行済フラグを有する請求項1
記載のインサーキット・エミュレータ。
2. The code table of the disassembling processing means has an execution flag for each instruction line, which sets execution completion by instruction execution by the interpretation execution control means.
In-circuit emulator described.
【請求項3】 前記分解処理手段のコード・テーブル
は、各命令行毎にコマンドによってブレーク・ポイント
の設定・解除を行うブレークフラグを有する請求項1記
載のインサーキット・エミュレータ。
3. The in-circuit emulator according to claim 1, wherein the code table of the disassembly processing unit has a break flag for setting / clearing a break point by a command for each instruction line.
【請求項4】 前記チェック処理手段は、目標システム
のメモリの属性情報を予めコマンドにより設定するアク
セス管理テーブルと、前記コード・テーブル、テキスト
・テーブル、アクセス管理テーブルに基づいてエラー検
出処理を行うエラー検出部と、エラー検出時に設定する
フラグとを有する請求項1、2または3記載のインサー
キット・エミュレータ。
4. The error check processing means performs error detection processing based on an access management table in which the attribute information of the memory of the target system is set in advance by a command, and the code table, text table, and access management table. 4. The in-circuit emulator according to claim 1, further comprising a detection unit and a flag set when an error is detected.
【請求項5】 前記エラー検出部は、前記コード・テー
ブルから取り出した命令が擬似命令であるかを検出する
請求項4記載のインサーキット・エミュレータ。
5. The in-circuit emulator according to claim 4, wherein the error detection unit detects whether the instruction fetched from the code table is a pseudo instruction.
【請求項6】 前記エラー検出部は、前記コード・テー
ブルから取り出した命令がジャンプ命令であるときにオ
ペコードよりジャンプ先アドレスを計算し、テーブル上
の該当アドレスの有無を検出する請求項4記載のインサ
ーキット・エミュレータ。
6. The error detecting section according to claim 4, wherein when the instruction fetched from the code table is a jump instruction, the jump destination address is calculated from the operation code and the presence or absence of the corresponding address on the table is detected. In-circuit emulator.
【請求項7】 前記エラー検出部は、前記コード・テー
ブルから取り出した命令がイミディエイトデータ命令で
あるときにテーブル上のオペコード長さを得、CPUス
テータスのデータ長フラグを判断する請求項4記載のイ
ンサーキット・エミュレータ。
7. The error detecting section according to claim 4, wherein when the instruction fetched from the code table is an immediate data instruction, the error detecting section obtains an operation code length on the table and judges a data length flag of the CPU status. In-circuit emulator.
【請求項8】 前記エラー検出部は、前記コード・テー
ブルから取り出した命令がイミディエイトインデックス
命令であるときにテーブル上のオペコード長さを得、C
PUステータスのインデックス長フラグを判断する請求
項4記載のインサーキット・エミュレータ。
8. The error detecting section obtains an opcode length on a table when the instruction fetched from the code table is an immediate index instruction, and C
The in-circuit emulator according to claim 4, wherein the index length flag of the PU status is determined.
【請求項9】 前記エラー検出部は、前記コード・テー
ブルから取り出した命令コードの種類がメモリ読出し、
メモリ書込み、その他であるかを判断し、それぞれアク
セス・アドレスに対応する前記アクセス管理テーブルの
メモリ属性の一致を判断する請求項4記載のインサーキ
ット・エミュレータ。
9. The error detecting unit reads the type of the instruction code fetched from the code table from the memory,
5. The in-circuit emulator according to claim 4, wherein it is judged whether it is a memory write or the like, and it is judged whether the memory attributes of the access management table corresponding to the respective access addresses match.
【請求項10】 前記解釈実行制御手段は、前記コード
・テーブルのオブジェクト・プログラムとの対応付けを
するオペコード・テーブルと、マシンコードのオペラン
ドのアドレスを取得するアドレス関数ルーチンと、目標
システムに対応し命令の実行により読み書きをするRA
Mテーブルと、前記コードテーブルのマシンコードを取
り出し、オペコード・テーブルのマシンコードとの一致
を比較し、一致したマシンコードの対応する実行ルーチ
ンをコールし、この実行ルーチンにおいてアドレッシン
グモードに対応するアドレス関数によりアドレスを取得
して命令を実行する実行処理部とを有する請求項1、
2、3または4記載のインサーキット・エミュレータ。
10. The interpretation execution control means corresponds to an operation code table for associating with an object program of the code table, an address function routine for obtaining an address of an operand of a machine code, and a target system. RA that reads and writes by executing instructions
The machine code in the M table and the code table is fetched, the match between the machine code in the operation code table is compared, the corresponding execution routine of the matched machine code is called, and the address function corresponding to the addressing mode is executed in this execution routine. And an execution processing unit that acquires an address and executes an instruction.
In-circuit emulator according to item 2, 3 or 4.
【請求項11】 前記実行処理部は、コール命令を管理
するポインタとしてのネストを設け、コール命令のとき
にネストに1を加え、リターン命令のときにネストから
1を引き、コール命令のとき次の命令を実行する請求項
10記載のインサーキット・エミュレータ。
11. The execution processing unit is provided with a nest as a pointer for managing a call instruction, adds 1 to the nest at the time of a call instruction, subtracts 1 from the nest at the time of a return instruction, and next at the time of a call instruction. 11. The in-circuit emulator according to claim 10, which executes the instructions of.
【請求項12】 前記実行処理部は、ノーオペレーショ
ン・コマンドをキー入力したとき、現在のカーソル行を
1行進め、続いて命令を実行せずにプログラムカウンタ
の値を次の命令にスキップさせる請求項10記載のイン
サーキット・エミュレータ。
12. The execution processing unit, when a no-operation command is keyed in, advances the current cursor line by one line and then skips the value of the program counter to the next instruction without executing the instruction. An in-circuit emulator according to item 10.
【請求項13】 前記実行処理部は、命令実行時に前記
コード・テーブルのブレークフラグのオン・オフを判断
し、オンであればブレークを発生させる請求項10記載
のインサーキット・エミュレータ。
13. The in-circuit emulator according to claim 10, wherein the execution processing unit determines whether a break flag of the code table is turned on or off at the time of executing an instruction, and generates a break if the break flag is turned on.
【請求項14】 前記実行処理部は、前記コード・テー
ブルの実行済フラグのオン・オフを判断し、オフであれ
ば実行行カウントに1を加えるとともに、その実行済フ
ラグをオンし、該実行行カウントの値に基づきデバッグ
率を算出する請求項10記載のインサーキット・エミュ
レータ。
14. The execution processing unit determines whether the execution flag of the code table is on or off. If the execution flag is off, the execution line count is incremented by 1, and the execution flag is turned on. The in-circuit emulator according to claim 10, wherein the debug rate is calculated based on the value of the line count.
【請求項15】 前記表示処理手段は、前記エラー検出
部、実行処理部及びアセンブル・リストのシンボル・フ
ァイルから生成されるデータのシンボルとアドレスとを
対応付けたシンボル・テーブルから与えられるデータを
モニタに表示するための表示処理を行う表示処理部を有
する請求項1、2、3、4または10記載のインサーキ
ット・エミュレータ。
15. The display processing means monitors data provided from a symbol table in which symbols and addresses of data generated from the error detection unit, the execution processing unit and the symbol file of the assemble list are associated with each other. 11. The in-circuit emulator according to claim 1, further comprising a display processing unit that performs display processing for displaying on the screen.
【請求項16】 前記表示処理部は、前記実行処理部の
命令実行により設定された前記コード・テーブルの実行
フラグのオン・オフを判断し、その行の表示をオン・オ
フに対応して色分けの表示の処理をする請求項15記載
のインサーキット・エミュレータ。
16. The display processing unit determines whether the execution flag of the code table set by the instruction execution of the execution processing unit is turned on or off, and displays the line by color according to on or off. 16. The in-circuit emulator according to claim 15, which processes the display of.
【請求項17】 前記表示処理部は、カーソルのオペコ
ードよりテーブル検索によりアドレッシング関数を得、
アドレッシング関数ルーチンをコールしてメモリのアド
レスを得、RAMアドレスよりメモリの内容を表示する
処理をする請求項15記載のインサーキット・エミュレ
ータ。
17. The display processing unit obtains an addressing function by performing a table search from an operation code of a cursor,
The in-circuit emulator according to claim 15, which performs a process of calling an addressing function routine to obtain an address of a memory and displaying a content of the memory from a RAM address.
【請求項18】 前記表示処理部は、現在の前記ネスト
をセーブし、命令の実行後にリターンしたときセーブし
たネストの比較をし、このセーブ値がネストの値より小
さいときに表示のスキップ処理をする請求項11または
15記載のインサーキット・エミュレータ。
18. The display processing unit saves the current nest, compares the saved nest when returning after execution of an instruction, and skips display when the saved value is smaller than the nest value. The in-circuit emulator according to claim 11 or 15.
【請求項19】 前記表示処理部によるモニタに表示さ
れる表示画面は、前記RAMテーブルのシンボル名、そ
のアドレス及びそのアドレスの内容を表示するRAM表
示部と、前記テキスト・テーブルの内容及びアンダーラ
インを付して現在のカーソル位置を表示するトレース表
示部と、レジスタ類の内容を表示するレジスタ類表示部
とを1つの画面上に有する請求項15記載のインサーキ
ット・エミュレータ。
19. The display screen displayed on the monitor by the display processing unit includes a RAM display unit for displaying the symbol name of the RAM table, its address and the contents of the address, and the contents and underline of the text table. 16. The in-circuit emulator according to claim 15, further comprising a trace display unit for displaying the current cursor position with a mark and a register display unit for displaying the contents of the registers on one screen.
【請求項20】 前記表示処理部によるモニタに表示さ
れる表示画面は、総実行ステップに対する実行済ステッ
プ数の割合を表示する実行状況表示部を有する請求項1
5または19記載のインサーキット・エミュレータ。
20. The display screen displayed on the monitor by the display processing unit has an execution status display unit for displaying the ratio of the number of executed steps to the total number of executed steps.
The in-circuit emulator described in 5 or 19.
【請求項21】 前記表示処理部によるモニタに表示さ
れる表示画面は、レジスタ類の内容を表示するレジスタ
類表示部を有する請求項15、19または20記載のイ
ンサーキット・エミュレータ。
21. The in-circuit emulator according to claim 15, 19 or 20, wherein the display screen displayed on the monitor by said display processing unit has a register display unit for displaying the contents of registers.
JP5347117A 1993-12-27 1993-12-27 In-circuit emulator Pending JPH07191874A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5347117A JPH07191874A (en) 1993-12-27 1993-12-27 In-circuit emulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5347117A JPH07191874A (en) 1993-12-27 1993-12-27 In-circuit emulator

Publications (1)

Publication Number Publication Date
JPH07191874A true JPH07191874A (en) 1995-07-28

Family

ID=18388031

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5347117A Pending JPH07191874A (en) 1993-12-27 1993-12-27 In-circuit emulator

Country Status (1)

Country Link
JP (1) JPH07191874A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007325100A (en) * 2006-06-02 2007-12-13 Yamaha Corp Digital signal processing apparatus
JP2022044616A (en) * 2019-05-15 2022-03-17 カシオ計算機株式会社 Program, emulation method, and information processing device
US11928328B2 (en) 2017-09-19 2024-03-12 Casio Computer Co., Ltd. Non-volatile recording medium, information processing method, and electronic apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007325100A (en) * 2006-06-02 2007-12-13 Yamaha Corp Digital signal processing apparatus
US11928328B2 (en) 2017-09-19 2024-03-12 Casio Computer Co., Ltd. Non-volatile recording medium, information processing method, and electronic apparatus
JP2022044616A (en) * 2019-05-15 2022-03-17 カシオ計算機株式会社 Program, emulation method, and information processing device

Similar Documents

Publication Publication Date Title
US7266809B2 (en) Software debugger and software development support system for microcomputer operable to execute conditional execution instruction
AU658413B2 (en) System and method for transforming procedure calls in a cross-debugging environment
US8266608B2 (en) Post-compile instrumentation of object code for generating execution trace data
US5926638A (en) Program debugging system for debugging a program having graphical user interface
US5394544A (en) Software system debugger with distinct interrupt vector maps for debugging and application programs
US7100152B1 (en) Software analysis system having an apparatus for selectively collecting analysis data from a target system executing software instrumented with tag statements and method for use thereof
US9152531B2 (en) Post-compile instrumentation of object code for generating execution trace data
US20080270840A1 (en) Device and method for testing embedded software using emulator
US6141791A (en) Debug aid device, program compiler device, storage medium storing computer-readable debugger program, and storage medium storing program compiler program
JPH0689200A (en) Debug system and method
US7093165B2 (en) Debugging Method
US20080034255A1 (en) Program failure analysis system, failure analysis method, and emulator device
US7103876B1 (en) System and method for analyzing executing computer applications in real-time
US20030177471A1 (en) System and method for graphically developing a program
Winterbottom ACID: A Debugger Built From A Language.
JPH07191874A (en) In-circuit emulator
JP2001034497A (en) Method for acquiring binary code of inverse assembler
JPH0766342B2 (en) Program test equipment
JP3398178B2 (en) Simulator
US7162618B2 (en) Method for enhancing the visibility of effective address computation in pipelined architectures
EP0801348A1 (en) Method of monitoring the operation of a computer
US20020046396A1 (en) Object file server (OFS)
JPH07200352A (en) Data processor, program translation method and debug tool
JPH03144833A (en) Debugging system
Morton New Laboratory Tools and Techniques for Embedded Microcontrollers