JPH0844591A - Simulator - Google Patents

Simulator

Info

Publication number
JPH0844591A
JPH0844591A JP6176365A JP17636594A JPH0844591A JP H0844591 A JPH0844591 A JP H0844591A JP 6176365 A JP6176365 A JP 6176365A JP 17636594 A JP17636594 A JP 17636594A JP H0844591 A JPH0844591 A JP H0844591A
Authority
JP
Japan
Prior art keywords
address
message
instruction
read
machine language
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP6176365A
Other languages
Japanese (ja)
Other versions
JP2704117B2 (en
Inventor
Shinichi Takeda
伸一 武田
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.)
NEC Communication Systems Ltd
Original Assignee
NEC Communication Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Communication Systems Ltd filed Critical NEC Communication Systems Ltd
Priority to JP6176365A priority Critical patent/JP2704117B2/en
Publication of JPH0844591A publication Critical patent/JPH0844591A/en
Application granted granted Critical
Publication of JP2704117B2 publication Critical patent/JP2704117B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the time required for simulation without simulating the part describing the output operation of a message in a program when no simulation for the part is required and by outputting the message required for a simulator. CONSTITUTION:The leading address of a message processing part in the program is registered by an address registering means 3. An address comparison means 5 compares a registered leading address with the address of a machine language instruction read in by a program read-in control means 6a, and reports the machine language instruction on the leading address to a simulation control means 2a when it is detected. At this time, the simulation is interrupted. and the message stored in a message storage means 8 in advance is outputted. After that, the simulation is sampled by an instruction analysis executing means 7a, and an operation is restarted from the address next to the last address of a message part set on a simulation address register 13.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はシミュレータに関し、特
にデバッグの対象となるプログラムをシミュレーション
するシミュレータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a simulator, and more particularly to a simulator for simulating a program to be debugged.

【0002】[0002]

【従来の技術】従来のシミュレータは、デバッグの対象
となるプログラムの機械語命令を一命令読出してはシミ
ュレーションし、さらに次の一命令を読出しシミュレー
ションするというように、一命令ずつシミュレーション
していた。プログラムの中に分岐トレース情報や中断情
報等のメッセージの出力動作を記述する部分についても
プログラムの機械語命令を一命令ずつ読出しては逐次シ
ミュレーションしていた。
2. Description of the Related Art In a conventional simulator, a machine language instruction of a program to be debugged is read and simulated for one instruction, and the next one instruction is read for simulation. The machine language instructions of the program were also read one by one and simulated sequentially for the part of the program that describes the output operation of messages such as branch trace information and interruption information.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のシミュ
レータは、デバッグの対象となるプログラム全体の機械
語命令を一命令ずつ読出してはシミュレーションしてい
くので、プログラムに含まれるメッセージの出力動作を
記述する部分についても他の部分と同様にシミュレーシ
ョンしていた。しかし、この部分をデバッグする必要が
ない場合には、それだけ余計にシミュレーション時間が
かかってしまうという欠点を有していた。
The above-described conventional simulator reads the machine language instructions of the entire program to be debugged one by one and then simulates them. Therefore, the output operation of the message included in the program is described. The part to be simulated was simulated as in the other parts. However, if this part does not need to be debugged, it has a drawback that the simulation time will be longer than that.

【0004】本発明の目的は、デバッグの対象となるプ
ログラムの中のメッセージの出力動作を記述する部分を
デバッグする必要がない場合はその部分のシミュレーシ
ョンを行わず、シミュレーション時間を短縮してデバッ
グ効率を上げることができるシミュレータを提供するこ
とにある。
The object of the present invention is to reduce the simulation time by shortening the simulation time without simulating the part describing the output operation of the message in the program to be debugged. It is to provide a simulator that can raise the cost.

【0005】[0005]

【課題を解決するための手段】第1の発明のシミュレー
タは、(A)デバッグの対象となる被テストプログラム
を格納する被テストプログラム格納手段、(B)アドレ
ス比較指示信号,第1の機械語命令読込指示信号,命令
実行禁止信号および第2の機械語命令読込指示信号を出
力し前記被テストプログラムのシミュレーションを制御
する第1のシミュレーション制御手段、(C)前記被テ
ストプログラムのメッセージ出力処理部分の先頭アドレ
スを登録するアドレス登録手段、(D)前記第1のシミ
ュレーション制御手段からシミュレーションが行われる
アドレスを受け取り格納する読込アドレス格納手段、
(E)前記アドレス比較指示信号を受け取り、前記読込
アドレス格納手段から読み出したアドレス値と前記アド
レス登録手段から受け取り内部にあらかじめ登録アドレ
スとして設定してある前記先頭アドレス値とを比較し、
一致したとき先頭アドレス検出信号を出力するアドレス
比較手段、(F)前記第1の機械語命令読込指示信号に
より、前記被テストプログラム格納手段に格納されてい
る被テストプログラムの機械語命令を一語ずつ読み込
み、前記シミュレーション制御手段が前記先頭アドレス
検出信号を受け取ったときは、先頭アドレス検出後に前
記被テストプログラム格納手段から最初に読み込む機械
語命令のアドレスとして前記第2の機械語命令読込指示
信号により指示されたアドレス格納手段からアドレスを
読み込み、前記アドレスに基づいて前記被テストプログ
ラム格納手段に格納されている機械語命令を読み込む第
1のプログラム読込制御手段、(G)前記第1のプログ
ラム読込制御手段により読み込まれた前記被テストプロ
グラムの機械語命令を解析し解析が終了したことを前記
第1のシミュレーション制御手段に報告し、前記解析終
了した機械語命令を実行し、前記機械語命令の解析およ
び実行の結果得られるメッセージ情報を出力し、前記先
頭アドレスの機械語命令を解析したときにはメッセージ
出力部分の最後のアドレスの次のアドレスを抽出してシ
ミュレータ再開アドレス情報として出力し、前記先頭ア
ドレス検出信号を受け取った前記第1のシミュレーショ
ン制御手段から命令実行禁止信号が送出されてきたとき
は前記解析終了した機械語命令を実行しない第1の命令
解析実行手段、(H)前記メッセージ情報を格納するメ
ッセージ格納手段、(I)前記メッセージ格納手段のメ
ッセージ情報が格納されているアドレス値と前記第1の
命令解析実行手段から受け取った前記シミュレータ再開
アドレス情報から得られる被テストプログラムのメッセ
ージ出力処理部分の最後のアドレス値の次のアドレス値
とを保持するアドレス情報レジスタ、(J)前記先頭ア
ドレス検出信号を受け取ったとき、前記メッセージ格納
手段のメッセージが格納されているアドレス値と前記被
テストプログラムのメッセージ出力処理部分の最後のア
ドレス値の次のアドレス値とを前記アドレス情報レジス
タから読出すレジスタ情報読出手段、(K)前記レジス
タ情報読出手段から前記メッセージ格納手段のメッセー
ジが格納されているアドレス値を受け取り前記メッセー
ジ格納手段からメッセージを読み出すメッセージ読出手
段、(L)前記メッセージ読出手段に読み出されたメッ
セージを出力するメッセージ出力手段、(M)前記第2
の機械語命令読込指示信号により指示されたアドレス格
納手段として、前記アドレス情報レジスタから読み出さ
れた前記被テストプログラムのメッセージ出力処理部分
の最後のアドレス値の次のアドレス値をセットするシミ
ュレーションアドレスレジスタ、を備えて構成されてい
る。
The simulator of the first invention comprises: (A) a program under test storage means for storing a program under test to be debugged; (B) an address comparison instruction signal; and a first machine language. First simulation control means for controlling the simulation of the program under test by outputting an instruction read instruction signal, an instruction execution prohibition signal and a second machine language instruction read instruction signal, (C) a message output processing portion of the program under test An address registration means for registering the leading address of (1), (D) a read address storage means for receiving and storing the address at which the simulation is performed from the first simulation control means,
(E) receives the address comparison instruction signal, compares the address value read from the read address storage means with the head address value received from the address registration means and preset internally as a registered address,
(F) One word of the machine language instruction of the program under test stored in the program under test storage means by the address comparing means for outputting a head address detection signal when they match (F) the first machine language instruction read instruction signal When the simulation control means receives the head address detection signal, the second machine language instruction read instruction signal is used as the address of the machine language instruction to be read first from the tested program storage means after the head address is detected. First program read control means for reading an address from the instructed address storage means and for reading a machine language instruction stored in the tested program storage means based on the address, (G) first program read control Machine language instructions of the program under test read by the means Analyze and report that the analysis is completed to the first simulation control means, execute the analyzed machine language instruction, output message information obtained as a result of analysis and execution of the machine language instruction, and start the When the machine language instruction of the address is analyzed, the address next to the last address of the message output portion is extracted and output as simulator restart address information, and the instruction is executed from the first simulation control means that has received the head address detection signal. First instruction analysis executing means that does not execute the machine language instruction that has been analyzed when a prohibition signal is sent, (H) message storing means for storing the message information, (I) message information in the message storing means Is stored and the address value received from the first instruction analysis executing means. An address information register for holding the address value next to the last address value of the message output processing part of the program under test obtained from the emulator restart address information, and (J) the message storage means when the leading address detection signal is received. Information reading means for reading from the address information register the address value in which the message is stored and the address value next to the last address value of the message output processing part of the program under test, (K) reading the register information Message reading means for receiving the address value in which the message of the message storing means is stored from the means, and reading the message from the message storing means; (L) message outputting means for outputting the read message to the message reading means; M) the second
A simulation address register for setting the address value next to the last address value of the message output processing part of the program under test read from the address information register, as the address storing means indicated by the machine language instruction read instruction signal , And are configured.

【0006】また、第2の発明のシミュレータは、
(A)デバッグ対象となる被テストプログラムを格納す
る被テストプログラム格納手段、(B)アドレス比較指
示信号,第1の機械語命令読込指示信号,命令実行禁止
信号,第2の機械語命令読込指示信号および第3の機械
語命令読込指示信号を出力し前記被テストプログラムの
シミュレーションを制御する第2のシミュレーション制
御手段、(C)前記被テストプログラムのメッセージ出
力処理部分の先頭アドレスを登録するアドレス登録手
段、(D)前記先頭アドレスの命令の中に特殊命令コー
ドを埋め込む特殊命令コード設定手段、(E)前記第2
のシミュレーション制御手段からシミュレーションが行
われるアドレスを受け取り格納する読込アドレス格納手
段、(F)前記アドレス比較指示信号を受け取り、前記
読込アドレス格納手段から読み出したアドレス値と前記
アドレス登録手段から受け取り内部にあらかじめ登録ア
ドレスとして設定してある前記先頭アドレス値とを比較
し、一致したとき先頭アドレス検出信号を出力するアド
レス比較手段、(G)前記第3の機械語命令読込指示信
号制御信号により、前記アドレス登録手段に登録された
先頭アドレスに格納されている機械語命令を読み込み前
記特殊命令コード設定手段に送出し、前記第1の機械語
命令読込指示信号により、前記被テストプログラム格納
手段に格納されている被テストプログラムの機械語命令
を一語ずつ読み込み、前記第2のシミュレーション制御
手段が前記先頭アドレス検出信号を受け取ったときは、
先頭アドレス検出後に前記被テストプログラム格納手段
から最初に読み込む機械語命令のアドレスとして前記第
2の機械語命令読込指示信号により指示されたアドレス
格納手段からアドレスを読み込み、前記アドレスに基づ
いて前記被テストプログラム格納手段に格納されている
機械語命令を読み込む第2のプログラム読込制御手段、
(H)前記第2のプログラム読込制御手段により読み込
まれた前記被テストプログラムの機械語命令を解析し解
析が終了したことを前記第2のシミュレーション制御手
段に報告し、前記解析が終了した機械語命令を実行し、
前記機械語命令の解析および実行の結果得られるメッセ
ージ情報を出力し、前記先頭アドレスの機械語命令を解
析したときにはメッセージ出力部分の最後のアドレスの
次のアドレスを抽出してシミュレータ再開アドレス情報
として出力し、解析の結果、読み込まれた前記被テスト
プログラムの機械語命令の中に前記特殊命令コードが埋
め込まれていたが検出されたとき、前記アドレス比較手
段を動作させるための前記アドレス比較指示信号を前記
第2のシミュレーション制御手段から出力させ、前記先
頭アドレス検出信号を受け取った前記第2のシミュレー
ション制御手段から命令実行禁止信号が送出されてきた
ときは前記解析終了した機械語命令を実行しない第2の
命令解析実行手段、(I)前記メッセージ情報を格納す
るメッセージ格納手段、(J)前記メッセージ格納手段
のメッセージが格納されているアドレス値と前記第2の
命令解析実行手段から受け取った前記シミュレータ再開
アドレス情報から得られる被テストプログラムのメッセ
ージ出力処理部分の最後のアドレス値の次のアドレス値
とを保持するアドレス情報レジスタ、(K)前記先頭ア
ドレス検出信号を受け取ったとき、前記メッセージ格納
手段のメッセージが格納されているアドレス値と前記被
テストプログラムのメッセージ出力処理部分の最後のア
ドレス値の次のアドレス値とを前記アドレス情報レジス
タから読出すレジスタ情報読出手段、(L)前記レジス
タ情報読出手段から前記メッセージ格納手段のメッセー
ジが格納されているアドレス値を受け取り前記メッセー
ジ格納手段からメッセージを読み出すメッセージ読出手
段、(M)前記メッセージ読出手段に読み出されたメッ
セージを出力するメッセージ出力手段、(N)前記第2
の機械語命令読込指示信号により指示されたアドレス格
納手段として、前記アドレス情報レジスタから読み出さ
れた前記被テストプログラムのメッセージ出力処理部分
の最後のアドレス値の次のアドレス値をセットするシミ
ュレーションアドレスレジスタ、を備えて構成されてい
る。
The simulator of the second invention is
(A) Test program storage means for storing a test program to be debugged, (B) address comparison instruction signal, first machine language instruction read instruction signal, instruction execution prohibition signal, second machine language instruction read instruction Second simulation control means for controlling the simulation of the program under test by outputting a signal and a third machine language instruction read instruction signal, and (C) address registration for registering the top address of the message output processing portion of the program under test. Means, (D) special instruction code setting means for embedding a special instruction code in the instruction at the start address, and (E) the second
Read address storing means for receiving and storing an address to be simulated from the simulation controlling means, and (F) receiving the address comparison instruction signal, receiving the address value read from the read address storing means and the address registering means, and preliminarily internally Address comparison means for comparing the start address value set as a registration address and outputting a start address detection signal when they match, (G) registering the address by the third machine language instruction read instruction signal control signal The machine language instruction stored in the head address registered in the means is read and sent to the special instruction code setting means, and is stored in the tested program storage means by the first machine language instruction read instruction signal. Read the machine language instructions of the program under test word by word , When the second simulation control means receives said first address detection signal,
After the head address is detected, the address is read from the address storage means designated by the second machine language instruction read instruction signal as the address of the machine language instruction to be read first from the test program storage means, and the test subject is tested based on the address. Second program read control means for reading a machine language instruction stored in the program storage means,
(H) A machine language instruction of the program under test read by the second program read control means is analyzed and the fact that the analysis is completed is reported to the second simulation control means, and the machine language after the analysis is completed. Execute the instruction,
Message information obtained as a result of analysis and execution of the machine language instruction is output, and when the machine language instruction at the start address is analyzed, the address next to the last address of the message output portion is extracted and output as simulator restart address information. However, as a result of the analysis, when it is detected that the special instruction code is embedded in the read machine language instruction of the program under test, the address comparison instruction signal for operating the address comparison means is detected. When the instruction execution prohibition signal is output from the second simulation control means which is output from the second simulation control means and receives the head address detection signal, the machine language instruction whose analysis has been completed is not executed. Instruction analysis and execution means of (I) message storage for storing the message information (J) The last address of the message output processing part of the program under test obtained from the address value in which the message of the message storage means is stored and the simulator restart address information received from the second instruction analysis execution means. An address information register for holding an address value next to the value, (K) when the head address detection signal is received, the address value at which the message of the message storage means is stored and the message output processing portion of the program under test Register information reading means for reading the address value next to the last address value of the message from the address information register, and (L) receiving the address value in which the message of the message storing means is stored from the register information reading means. Read message from storage Message reading means, (M) a message output means for outputting a message read in the message reading means, (N) and the second
A simulation address register for setting the address value next to the last address value of the message output processing part of the program under test read from the address information register, as the address storing means indicated by the machine language instruction read instruction signal , And are configured.

【0007】[0007]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0008】図1は、本発明のシミュレータの第1の実
施例を示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of the simulator of the present invention.

【0009】図1に示す実施例のシミュレータは、デバ
ッグ対象となる被テストプログラムを格納する被テスト
プログラム格納手段1、被テストプログラムのシミュレ
ーションを制御するシミュレーション制御手段2a、被
テストプログラムのメッセージ出力処理部分の先頭アド
レス(以下先頭アドレスという)の値を登録するアドレ
ス登録手段3、シミュレーションが行われているアドレ
スを示すアドレス値を格納する読込アドレス格納手段
4、読込アドレス格納手段4から読み出したアドレス値
とアドレス登録手段3に登録された先頭アドレス値とを
比較し一致したとき、先頭アドレス検出信号を出力する
アドレス比較手段5、被テストプログラム格納手段1に
格納されている被テストプログラムの機械語命令を読み
込むプログラム読込制御手段6a、読み込まれた被テス
トプログラムの機械語命令を解析し実行する命令解析実
行手段7a、メッセージが格納されるメッセージ格納手
段8、メッセージ格納手段8のメッセージが格納されて
いるアドレス値及び被テストプログラムのメッセージ出
力処理部分の最後のアドレス値の次のアドレス値を保持
するアドレス情報レジスタ9、メッセージ格納手段8の
メッセージが格納されているアドレス値と被テストプロ
グラムのメッセージ出力処理部分の最後のアドレス値の
次のアドレス値とをアドレス情報レジスタ9から読出す
レジスタ情報読出手段10、メッセージ格納手段8から
メッセージを読み出すメッセージ読出手段11、メッセ
ージ読出手段11に読み出されたメッセージを出力する
メッセージ出力手段12、アドレス情報レジスタ9から
読み出した被テストプログラムのメッセージ出力処理部
分の最後のアドレス値の次のアドレス値をセットするシ
ミュレーションアドレスレジスタ13から構成されてい
る。
The simulator of the embodiment shown in FIG. 1 includes a test program storage means 1 for storing a test program to be debugged, a simulation control means 2a for controlling a simulation of the test program, and a message output process of the test program. Address registration means 3 for registering the value of the top address of the part (hereinafter referred to as the top address), read address storage means 4 for storing the address value indicating the address where the simulation is being performed, and address value read from the read address storage means 4. And the start address value registered in the address registration means 3 are compared, and when they match, an address comparison means 5 which outputs a start address detection signal and a machine language instruction of the program under test stored in the program under test storage means 1 Read program Control means 6a, instruction analysis execution means 7a for analyzing and executing the machine language instructions of the loaded test program, message storage means 8 for storing messages, address values for storing messages in the message storage means 8 and The address information register 9 that holds the address value next to the last address value of the message output processing portion of the test program, the address value at which the message of the message storage means 8 is stored, and the last of the message output processing portion of the program under test. A register information reading means 10 for reading the address value next to the address value from the address information register 9, a message reading means 11 for reading a message from the message storing means 8, and a message output for outputting the read message to the message reading means 11. Means 12, address information And a simulation address register 13 to set the next address value of the last address value of the message output processing portion of the test program read from the register 9.

【0010】次に、動作を説明する。Next, the operation will be described.

【0011】図1において、被テストプログラム格納手
段1に格納されているデバッグの対象となる被テストプ
ログラムのシミュレーションを開始するまえに、オペレ
ータ(図示せず)がシミュレーションコンソール(図示
せず)からアドレス登録手段3に、被テストプログラム
の中のメッセージ出力動作を記述する部分、すなわち被
テストプログラムのメッセージ出力処理部分の先頭アド
レス値を登録する。アドレス登録手段3はシミュレーシ
ョン制御手段2にアドレス登録終了信号を送出する。登
録された先頭アドレス値は、アドレス登録手段2からア
ドレス比較手段5に送出されアドレス比較手段5の内部
にあらかじめ登録アドレスとして設定される。
In FIG. 1, before starting a simulation of a test program to be debugged, which is stored in the test program storage means 1, an operator (not shown) sends an address from a simulation console (not shown). In the registration means 3, the portion describing the message output operation in the program under test, that is, the head address value of the message output processing portion of the program under test is registered. The address registration means 3 sends an address registration end signal to the simulation control means 2. The registered start address value is sent from the address registration means 2 to the address comparison means 5 and is set inside the address comparison means 5 in advance as a registered address.

【0012】次に、シミュレーションが開始されると、
シミュレーション制御手段2aから機械語命令読込指示
信号101がプログラム読込制御手段6aに送出され、
機械語命令読込指示信号101を受けたプログラム読込
制御手段6aは、被テストプログラム格納手段1に格納
されているデバッグの対象となる被テストプログラムの
機械語命令を一語読み込み命令解析実行手段7aに送出
する。命令解析実行手段7aは、プログラム読込制御手
段6aから受け取った被テストプログラムの機械語命令
の一語を解析しその機械語命令の解析が終了すると、命
令解析終了信号102をシミュレーション制御手段2a
に送出して機械語命令の解析が終了したことを報告す
る。次に、命令解析実行手段7aは解析した機械語命令
を実行する。命令解析実行手段7aはその機械語命令の
実行が終了すると、命令実行終了信号103をシミュレ
ーション制御手段2aに送出して機械語命令の実行が終
了したことを報告する。一方、命令解析実行手段7aは
機械語命令の解析および実行の結果得られるメッセージ
情報を出力しメッセージ格納手段8に格納するととも
に、メッセージ情報を格納したメッセージ格納手段8の
アドレス情報をアドレス情報レジスタ9に出力する。さ
らに、命令解析実行手段7aは、先頭アドレスの機械語
命令を解析したときに、メッセージ出力部分の最後のア
ドレスの次のアドレスを抽出してシミュレータ再開アド
レス情報としてアドレス情報レジスタ9に出力する。
Next, when the simulation is started,
A machine language instruction read instruction signal 101 is sent from the simulation control means 2a to the program read control means 6a,
Upon receiving the machine language instruction read instruction signal 101, the program read control means 6a causes the one word read instruction analysis execution means 7a to read the machine language instruction of the test program to be debugged, which is stored in the test program storage means 1. Send out. The instruction analysis execution means 7a analyzes one word of the machine language instruction of the program under test received from the program read control means 6a, and when the analysis of the machine language instruction is completed, the instruction analysis end signal 102 is sent to the simulation control means 2a.
To report that the analysis of the machine language instruction is completed. Next, the instruction analysis executing means 7a executes the analyzed machine language instruction. When the execution of the machine language instruction is completed, the instruction analysis execution means 7a sends an instruction execution end signal 103 to the simulation control means 2a to report that the execution of the machine language instruction is completed. On the other hand, the instruction analysis executing means 7a outputs the message information obtained as a result of the analysis and execution of the machine language instruction and stores it in the message storing means 8 and the address information of the message storing means 8 storing the message information in the address information register 9 Output to. Further, the instruction analysis executing means 7a extracts the address next to the last address of the message output portion and outputs it to the address information register 9 as simulator restart address information when the machine language instruction of the first address is analyzed.

【0013】また、命令実行終了信号103を受けたシ
ミュレーション制御手段2aは次の機械語命令読込指示
信号101をプログラム読込制御手段6aに送出する。
シミュレーション制御手段2aから機械語命令読込指示
信号101を受け取るごとに、機械語命令読込指示信号
101が示すアドレスに従って、プログラム読込制御手
段6aは被テストプログラムの次の機械語命令を一語読
み込んで命令解析実行手段7aに送出する。また、命令
解析実行手段7aは機械語命令をプログラム読込制御手
段6aから受け取るごとにその機械語命令を解析し実行
して、シミュレーション制御手段2aに命令解析終了信
号102および命令実行終了信号103を送出する。こ
のようにしてシミュレーション動作が進んでいく。
Upon receiving the instruction execution end signal 103, the simulation control means 2a sends the next machine language instruction read instruction signal 101 to the program read control means 6a.
Every time the machine language instruction read instruction signal 101 is received from the simulation control means 2a, the program reading control means 6a reads one machine language instruction next to the program under test in accordance with the address indicated by the machine language instruction read instruction signal 101. It is sent to the analysis executing means 7a. The instruction analysis executing means 7a analyzes and executes the machine language instruction every time it receives the machine language instruction from the program read control means 6a, and sends the instruction analysis end signal 102 and the instruction execution end signal 103 to the simulation control means 2a. To do. In this way, the simulation operation proceeds.

【0014】上記のシミュレーション動作が進んでいく
中で、シミュレーション制御手段2aは命令解析終了信
号102を受け取ると、次に実行される機械語命令のア
ドレス値を読込アドレス格納手段4に送出する。読込ア
ドレス格納手段4がそれまで格納していたアドレス値
は、シミュレーション制御手段2aから新たに受け取っ
た最新のアドレスに置き換えられる。また、シミュレー
ション制御手段2aは次に実行される機械語命令のアド
レス値を読込アドレス格納手段4に送出すると同時に、
アドレス比較手段5に対して、既に登録された先頭アド
レス値と読込アドレス格納手段4に格納されている次に
実行される機械語命令のアドレス値とを比較させるため
にアドレス比較指示信号104を送出する。アドレス比
較手段5は、アドレス比較指示信号104を受け取ると
先頭アドレス値と読込アドレス格納手段4に格納されて
いる次に実行される機械語命令のアドレス値とを比較
し、一致したとき、すなわち先頭アドレスが検出された
とき、シミュレーション制御手段2aおよびレジスタ情
報読出手段10に先頭アドレス検出信号105,106
を送出する。シミュレーション制御手段2aは、命令解
析実行手段7aに命令実行禁止信号107を送出し、命
令解析実行手段7aが先に解析した機械語命令を実行し
ないように指示する。また、レジスタ情報読出手段10
は、アドレス情報レジスタ9からメッセージ格納手段8
のメッセージが格納されているアドレスと、被テストプ
ログラムのメッセージ出力処理部分の最後のアドレスの
次のアドレスとを読み出す。レジスタ情報読出手段10
は、アドレス情報レジスタ9から読み出したメッセージ
格納手段8のメッセージが格納されているアドレスをメ
ッセージ読出手段11に送出する。メッセージ読出手段
11はメッセージ格納手段8からメッセージを読み出
し、メッセージ出力手段12に出力する。メッセージ出
力手段12によりメッセージが出力される。メッセージ
出力手段12はメッセージを出力した後、シミュレーシ
ョン制御手段2aにメッセージ出力完了信号108を送
出する。
When the simulation control means 2a receives the instruction analysis end signal 102 while the above-mentioned simulation operation proceeds, it sends the address value of the machine language instruction to be executed next to the read address storage means 4. The address value previously stored in the read address storage means 4 is replaced with the latest address newly received from the simulation control means 2a. The simulation control means 2a sends the address value of the machine language instruction to be executed next to the read address storage means 4 and at the same time.
An address comparison instruction signal 104 is sent to the address comparison means 5 in order to compare the already registered head address value with the address value of the machine language instruction to be executed next, which is stored in the read address storage means 4. To do. When the address comparison means 5 receives the address comparison instruction signal 104, the address comparison means 5 compares the head address value with the address value of the machine language instruction to be executed next, which is stored in the read address storage means 4, and when they match, that is, at the head. When an address is detected, the leading address detection signals 105 and 106 are sent to the simulation control means 2a and the register information reading means 10.
Is sent. The simulation control means 2a sends an instruction execution prohibition signal 107 to the instruction analysis execution means 7a, and instructs the instruction analysis execution means 7a not to execute the machine language instruction previously analyzed. Further, the register information reading means 10
From the address information register 9 to the message storage means 8
And the address next to the last address of the message output processing part of the program under test are read. Register information reading means 10
Sends the address in which the message of the message storing means 8 read from the address information register 9 is stored to the message reading means 11. The message reading means 11 reads the message from the message storage means 8 and outputs it to the message output means 12. A message is output by the message output means 12. After outputting the message, the message output means 12 sends a message output completion signal 108 to the simulation control means 2a.

【0015】また、レジスタ情報読出手段10は、アド
レス情報レジスタ9から読出した被テストプログラムの
メッセージ出力処理部分の最後のアドレスの次のアドレ
スをシミュレーションアドレスレジスタ13にセットす
る。シミュレーション制御手段2aは、メッセージ出力
手段12からメッセージ出力完了信号108を受け取る
と、プログラム読込制御手段6に対して、まずシミュレ
ーションアドレスレジスタ13にセットされたアドレス
を読み込み被テストプログラム格納手段1のそのアドレ
スから機械語命令の読み出しを再開するための機械語命
令読込指示信号109を送出する。プログラム読込制御
手段6は、機械語命令読込指示信号109を受け取ると
シミュレーションアドレスレジスタ13にセットされた
アドレスを読み込み、被テストプログラム格納手段1の
そのアドレスから機械語命令を読み込み命令解析実行手
段7aに送出する。命令解析実行手段7aは、その機械
語命令を解析し実行することにより、シミュレーション
を再開する。
Further, the register information reading means 10 sets the address next to the last address of the message output processing part of the program under test read from the address information register 9 in the simulation address register 13. Upon receiving the message output completion signal 108 from the message output means 12, the simulation control means 2a first reads the address set in the simulation address register 13 from the program read control means 6 and reads the address in the program under test storage means 1. From the machine language instruction read instruction signal 109 for restarting the reading of the machine language instruction. Upon receiving the machine language instruction read instruction signal 109, the program read control means 6 reads the address set in the simulation address register 13 and reads the machine language instruction from that address of the program under test storage means 1 to the instruction analysis execution means 7a. Send out. The instruction analysis executing means 7a resumes the simulation by analyzing and executing the machine language instruction.

【0016】このようにして、被テストプログラムのメ
ッセージ出力処理部分のシミュレーションを行わずに、
メッセージを出力することができる。
In this way, without simulating the message output processing part of the program under test,
A message can be output.

【0017】次に、本発明の第2の実施例について図面
を参照して説明する。
Next, a second embodiment of the present invention will be described with reference to the drawings.

【0018】図2は、本発明のシミュレータの第2の実
施例を示すブロック図である。
FIG. 2 is a block diagram showing a second embodiment of the simulator of the present invention.

【0019】図2に示す実施例のシミュレータは、デバ
ッグ対象となる被テストプログラムを格納する被テスト
プログラム格納手段1、被テストプログラムのシミュレ
ーションを制御するシミュレーション制御手段2b、被
テストプログラムのメッセージ出力部分の先頭アドレス
の値を登録するアドレス登録手段3、先頭アドレスの命
令の中に特殊命令コードを埋め込む特殊命令コード設定
手段14、シミュレーションが行われているアドレスを
示すアドレス値を格納する読込アドレス格納手段4、読
込アドレス格納手段4から読み出したアドレス値とアド
レス登録手段3に登録された先頭アドレス値とを比較し
一致したとき、先頭アドレス検出信号を出力するアドレ
ス比較手段5、被テストプログラム格納手段1に格納さ
れている被テストプログラムの機械語命令を読み込むプ
ログラム読込制御手段6b、読み込まれた被テストプロ
グラムの機械語命令を解析し実行する命令解析実行手段
7b、メッセージが格納されるメッセージ格納手段8、
メッセージ格納手段8のメッセージが格納されているア
ドレス値及び被テストプログラムのメッセージ出力処理
部分の最後のアドレス値の次のアドレス値を保持するア
ドレス情報レジスタ9、メッセージ格納手段8のメッセ
ージが格納されているアドレス値と被テストプログラム
のメッセージ出力処理部分の最後のアドレス値の次のア
ドレス値とをアドレス情報レジスタ9から読出すレジス
タ情報読出手段10、メッセージ格納手段8からメッセ
ージを読み出すメッセージ読出手段11、メッセージ読
出手段11に読み出されたメッセージを出力するメッセ
ージ出力手段12、アドレス情報レジスタ9から読み出
した被テストプログラムのメッセージ出力処理部分の最
後のアドレス値の次のアドレス値をセットするシミュレ
ーションアドレスレジスタ13から構成されている。
The simulator of the embodiment shown in FIG. 2 includes a test program storage means 1 for storing a test program to be debugged, a simulation control means 2b for controlling a simulation of the test program, and a message output portion of the test program. Address registering means 3 for registering the value of the start address of the above, special instruction code setting means 14 for embedding a special instruction code in the instruction of the start address, read address storing means for storing the address value indicating the address where the simulation is being performed 4, the address value read from the read address storage means 4 and the start address value registered in the address registration means 3 are compared, and when they match, an address comparison means 5 which outputs a start address detection signal, and the test program storage means 1 Tested stored in Message storing means 8 programmed read control means 6b to read machine instructions programs, instruction analyzing execution means 7b which analyzes and executes machine language instructions of the test program is loaded, the message is stored,
An address information register 9 for holding the address value in which the message of the message storage means 8 is stored and the address value next to the last address value of the message output processing part of the program under test, the message of the message storage means 8 is stored. The register information reading means 10 for reading the address value present and the address value next to the last address value of the message output processing portion of the program under test from the address information register 9, the message reading means 11 for reading the message from the message storing means 8, A message output means 12 for outputting the read message to the message reading means 11, a simulation address for setting the address value next to the last address value of the message output processing portion of the program under test read from the address information register 9. And a register 13.

【0020】次に、動作を説明する。Next, the operation will be described.

【0021】図2において、被テストプログラムのメッ
セージ出力部分の先頭アドレス値をアドレス登録手段3
により登録し、アドレス比較手段5の内部にあらかじめ
設定する動作は、図1に示される第1の実施例の場合と
同様である。本実施例の場合は、さらにシミュレーショ
ン動作に入る前段階の動作として、特殊命令コード設定
の動作が行われる。
In FIG. 2, the head address value of the message output portion of the program under test is set to the address registration means 3
The operation of registering by the above and presetting in the address comparing means 5 is the same as in the case of the first embodiment shown in FIG. In the case of the present embodiment, a special instruction code setting operation is performed as an operation before the start of the simulation operation.

【0022】まず、アドレス登録手段3による上記先頭
アドレスの登録が終了したとき、アドレス登録手段3は
シミュレーション制御手段2bにアドレス登録終了信号
を送出する。シミュレーション制御手段2bは、プログ
ラム読込制御手段6bに機械語命令読込指示信号101
を送出する。プログラム読込制御手段6bは、アドレス
登録終了信号が示す被テストプログラムのメッセージ出
力部分の先頭アドレスに格納されている機械語命令を読
み込み、特殊命令コード設定手段14に送出する。特殊
命令コード設定手段14は、被テストプログラムでは使
用されていない特殊命令コードを上記先頭アドレスの機
械語命令の中に埋め込む。特殊命令コードを埋め込まれ
た先頭アドレスの機械語命令は、特殊命令コード設定手
段14から被テストプログラム格納手段1の元のアドレ
スに格納され、特殊命令コード設定完了信号が特殊命令
コード設定手段14からシミュレーション制御手段2b
へ送出され特殊命令コード設定の動作が完了する。
First, when the registration of the leading address by the address registration means 3 is completed, the address registration means 3 sends an address registration end signal to the simulation control means 2b. The simulation control means 2b instructs the program read control means 6b to read the machine language instruction read instruction signal 101.
Is sent. The program read control means 6b reads the machine language instruction stored at the head address of the message output portion of the program under test indicated by the address registration end signal and sends it to the special instruction code setting means 14. The special instruction code setting means 14 embeds a special instruction code not used in the program under test into the machine language instruction at the above-mentioned start address. The machine language instruction of the head address in which the special instruction code is embedded is stored from the special instruction code setting means 14 to the original address of the tested program storage means 1, and the special instruction code setting completion signal is sent from the special instruction code setting means 14. Simulation control means 2b
To the special command code setting operation is completed.

【0023】次に、シミュレーションが開始された後の
動作でも、シミュレーション制御手段2bからの機械語
命令読み込み信号により、プログラム読込制御手段6b
が、被テストプログラム格納手段1に格納されているデ
バッグの対象となる被テストプログラムの機械語命令を
読み込み命令解析実行手段7bに送出し、命令解析実行
手段7bが、その機械語命令を解析し実行していく過程
の動作は第1の実施例の場合と同じである。また、上記
のシミュレーション動作が進んでいく中で、次に実行さ
れる機械語命令のアドレス値がシミュレーション制御手
段2bから読込アドレス格納手段4に送出され格納され
る動作も同じである。
Next, even in the operation after the simulation is started, the program read control means 6b is operated by the machine language instruction read signal from the simulation control means 2b.
Reads the machine language instruction of the program under test stored in the program under test storage means 1 to be debugged and sends it to the instruction analysis execution means 7b, and the instruction analysis execution means 7b analyzes the machine language instruction. The operation in the process of execution is the same as in the first embodiment. Further, as the above-mentioned simulation operation proceeds, the operation in which the address value of the machine language instruction to be executed next is sent from the simulation control means 2b to the read address storage means 4 and stored is the same.

【0024】しかし、本実施例の場合は、シミュレーシ
ョン制御手段2bが次に実行される機械語命令のアドレ
ス値を読込アドレス格納手段4に送出したとき、アドレ
ス比較手段5に対しては、先頭アドレス値と読込アドレ
ス格納手段4に格納されているアドレス値とを比較させ
るためにアドレス比較指示信号を送出しない。アドレス
比較手段5が比較動作を行うのは、命令解析実行手段7
bで機械後命令の解析が行われ、機械語命令の中に埋め
込まれた特殊命令コードが検出されたときである。この
とき、命令解析実行手段7bは、シミュレーション制御
手段2bに先頭アドレス検出信号110を送出する。先
頭アドレス検出信号110を受け取ったシミュレーショ
ン制御手段2bは、アドレス比較手段5にアドレス比較
指示信号104を送出する。アドレス比較手段5は、先
頭アドレス値と読込アドレス格納手段4に格納されてい
る次に実行される機械語命令のアドレス値とを比較し、
一致したとき、すなわち先頭アドレスが検出されたと
き、シミュレーション制御手段2bおよびレジスタ情報
読出手段10に先頭アドレス検出信号105,106を
送出する。この後の動作は、第1の実施例の動作の場合
と同じである。
However, in the case of this embodiment, when the simulation control means 2b sends the address value of the machine language instruction to be executed next to the read address storage means 4, the start address is sent to the address comparison means 5. The address comparison instruction signal is not sent in order to compare the value with the address value stored in the read address storage means 4. The address comparison means 5 performs the comparison operation by the instruction analysis execution means 7.
This is when the post-machine instruction is analyzed in b and the special instruction code embedded in the machine language instruction is detected. At this time, the instruction analysis execution means 7b sends the start address detection signal 110 to the simulation control means 2b. The simulation control means 2b receiving the head address detection signal 110 sends the address comparison instruction signal 104 to the address comparison means 5. The address comparing means 5 compares the head address value with the address value of the machine language instruction to be executed next, which is stored in the read address storing means 4,
When they match, that is, when the leading address is detected, the leading address detection signals 105 and 106 are sent to the simulation control means 2b and the register information reading means 10. The subsequent operation is the same as the operation of the first embodiment.

【0025】第1の実施例の動作と上記第2の実施例の
動作の違いは、第1の実施例の場合が、先頭アドレスを
検出するまで、最初から逐一機械語命令のアドレスをア
ドレス比較手段5で比較していくのに対して、第2の実
施例の場合は、先頭アドレスと思われるアドレスを特殊
命令コードを利用してまず検出し、次にアドレス比較手
段5を動作させて、そのアドレスとあらかじめ登録して
おいた先頭アドレスとを比較し検出するようにしている
点である。第2の実施例の場合は、アドレス比較手段で
比較していく回数が少なくなるので、第1の実施例の場
合よりもよりシミュレーションを高速にすることができ
る。
The difference between the operation of the first embodiment and the operation of the second embodiment is that, in the case of the first embodiment, the addresses of the machine language instructions are compared one by one from the beginning until the start address is detected. On the other hand, in the case of the second embodiment, the address considered to be the start address is first detected by using the special instruction code, and then the address comparison means 5 is operated, The point is that the address is compared and detected with the head address registered in advance. In the case of the second embodiment, the number of comparisons made by the address comparing means is reduced, so that the simulation can be made faster than in the case of the first embodiment.

【0026】[0026]

【発明の効果】以上説明したように、本発明のシミュレ
ータは、プログラムの中のメッセージ出力動作を記述す
る部分のシミュレーションが必要ない場合はその部分を
シミュレーションを行わず、シミュレータがプログラム
に代って必要なメッセージを出力するようにすることに
より、シミュレーション時間を短縮してデバッグ効率を
上げることができるという効果を有している。
As described above, when the simulator of the present invention does not need to simulate the part describing the message output operation in the program, that part is not simulated, and the simulator replaces the program. By outputting the necessary message, the simulation time can be shortened and the debugging efficiency can be improved.

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

【図1】本発明のシミュレータの第1の実施例を示すブ
ロック図である。
FIG. 1 is a block diagram showing a first embodiment of a simulator of the present invention.

【図2】本発明のシミュレータの第2の実施例を示すブ
ロック図である。
FIG. 2 is a block diagram showing a second embodiment of the simulator of the present invention.

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

1 被テストプログラム格納手段 2a,b シミュレーション制御手段 3 アドレス登録手段 4 読込アドレス格納手段 5 アドレス比較手段 6a,b プログラム読込制御手段 7a,b 命令解析実行手段 8 メッセージ格納手段 9 アドレス情報レジスタ 10 レジスタ情報読出手段 11 メッセージ読出手段 12 メッセージ出力手段 13 シミュレーションアドレスレジスタ 14 特殊命令コード設定手段 1 test program storage means 2a, b simulation control means 3 address registration means 4 read address storage means 5 address comparison means 6a, b program read control means 7a, b instruction analysis execution means 8 message storage means 9 address information register 10 register information Reading means 11 Message reading means 12 Message output means 13 Simulation address register 14 Special instruction code setting means

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】(A)デバッグの対象となる被テストプロ
グラムを格納する被テストプログラム格納手段、(B)
アドレス比較指示信号,第1の機械語命令読込指示信
号,命令実行禁止信号および第2の機械語命令読込指示
信号を出力し前記被テストプログラムのシミュレーショ
ンを制御する第1のシミュレーション制御手段、(C)
前記被テストプログラムのメッセージ出力処理部分の先
頭アドレスを登録するアドレス登録手段、(D)前記第
1のシミュレーション制御手段からシミュレーションが
行われるアドレスを受け取り格納する読込アドレス格納
手段、(E)前記アドレス比較指示信号を受け取り、前
記読込アドレス格納手段から読み出したアドレス値と前
記アドレス登録手段から受け取り内部にあらかじめ登録
アドレスとして設定してある前記先頭アドレス値とを比
較し、一致したとき先頭アドレス検出信号を出力するア
ドレス比較手段、(F)前記第1の機械語命令読込指示
信号により、前記被テストプログラム格納手段に格納さ
れている被テストプログラムの機械語命令を一語ずつ読
み込み、前記シミュレーション制御手段が前記先頭アド
レス検出信号を受け取ったときは、先頭アドレス検出後
に前記被テストプログラム格納手段から最初に読み込む
機械語命令のアドレスとして前記第2の機械語命令読込
指示信号により指示されたアドレス格納手段からアドレ
スを読み込み、前記アドレスに基づいて前記被テストプ
ログラム格納手段に格納されている機械語命令を読み込
む第1のプログラム読込制御手段、(G)前記第1のプ
ログラム読込制御手段により読み込まれた前記被テスト
プログラムの機械語命令を解析し解析が終了したことを
前記第1のシミュレーション制御手段に報告し、前記解
析終了した機械語命令を実行し、前記機械語命令の解析
および実行の結果得られるメッセージ情報を出力し、前
記先頭アドレスの機械語命令を解析したときにはメッセ
ージ出力部分の最後のアドレスの次のアドレスを抽出し
てシミュレータ再開アドレス情報として出力し、前記先
頭アドレス検出信号を受け取った前記第1のシミュレー
ション制御手段から命令実行禁止信号が送出されてきた
ときは前記解析終了した機械語命令を実行しない第1の
命令解析実行手段、(H)前記メッセージ情報を格納す
るメッセージ格納手段、(I)前記メッセージ格納手段
のメッセージ情報が格納されているアドレス値と前記第
1の命令解析実行手段から受け取った前記シミュレータ
再開アドレス情報から得られる被テストプログラムのメ
ッセージ出力処理部分の最後のアドレス値の次のアドレ
ス値とを保持するアドレス情報レジスタ、(J)前記先
頭アドレス検出信号を受け取ったとき、前記メッセージ
格納手段のメッセージが格納されているアドレス値と前
記被テストプログラムのメッセージ出力処理部分の最後
のアドレス値の次のアドレス値とを前記アドレス情報レ
ジスタから読出すレジスタ情報読出手段、(K)前記レ
ジスタ情報読出手段から前記メッセージ格納手段のメッ
セージが格納されているアドレス値を受け取り前記メッ
セージ格納手段からメッセージを読み出すメッセージ読
出手段、(L)前記メッセージ読出手段に読み出された
メッセージを出力するメッセージ出力手段、(M)前記
第2の機械語命令読込指示信号により指示されたアドレ
ス格納手段として、前記アドレス情報レジスタから読み
出された前記被テストプログラムのメッセージ出力処理
部分の最後のアドレス値の次のアドレス値をセットする
シミュレーションアドレスレジスタ、を備えたことを特
徴とするシミュレータ。
1. A test program storage means for storing a test program to be debugged, (B)
First simulation control means for outputting an address comparison instruction signal, a first machine language instruction read instruction signal, an instruction execution prohibition signal, and a second machine language instruction read instruction signal to control the simulation of the program under test; )
Address registration means for registering the start address of the message output processing portion of the program under test, (D) Read address storage means for receiving and storing the address at which the simulation is performed from the first simulation control means, (E) Address comparison When an instruction signal is received, the address value read from the read address storage means is compared with the leading address value received from the address registering means and preset as a registered address internally, and a leading address detection signal is output when they match. Address comparing means, (F) the machine language instructions of the program under test stored in the program under test storage means are read word by word in response to the first machine language instruction read instruction signal, and the simulation control means is operable to read the machine language instructions. Receives the start address detection signal When the address is taken, the address is read from the address storage means designated by the second machine language instruction read instruction signal as the address of the machine language instruction to be read first from the test program storage means after detection of the head address, First program read control means for reading a machine language instruction stored in the tested program storage means based on the following: (G) a machine language instruction of the tested program read by the first program read control means Analyze and report that the analysis is completed to the first simulation control means, execute the analyzed machine language instruction, output message information obtained as a result of analysis and execution of the machine language instruction, and start the When the machine language instruction of the address is analyzed, next to the last address of the message output The address is extracted and output as simulator restart address information, and when the instruction execution prohibition signal is sent from the first simulation control means that has received the head address detection signal, the analysis-completed machine language instruction is not executed. First instruction analysis and execution means, (H) message storage means for storing the message information, (I) address value at which the message information of the message storage means is stored, and received from the first instruction analysis and execution means An address information register for holding the last address value and the next address value of the message output processing part of the program under test obtained from the simulator restart address information, (J) storing the message when the leading address detection signal is received The address value where the means message is stored and before Register information reading means for reading the address value next to the last address value of the message output processing portion of the test program from the address information register, (K) the message of the message storing means is stored from the register information reading means A message reading means for receiving a read address value from the message storing means, (L) message outputting means for outputting the read message to the message reading means, (M) reading the second machine language instruction A simulation address register for setting an address value next to the last address value of the message output processing part of the program under test read from the address information register, as the address storage means instructed by the instruction signal. Simule characterized by Data.
【請求項2】(A)デバッグ対象となる被テストプログ
ラムを格納する被テストプログラム格納手段、(B)ア
ドレス比較指示信号,第1の機械語命令読込指示信号,
命令実行禁止信号,第2の機械語命令読込指示信号およ
び第3の機械語命令読込指示信号を出力し前記被テスト
プログラムのシミュレーションを制御する第2のシミュ
レーション制御手段、(C)前記被テストプログラムの
メッセージ出力処理部分の先頭アドレスを登録するアド
レス登録手段、(D)前記先頭アドレスの命令の中に特
殊命令コードを埋め込む特殊命令コード設定手段、
(E)前記第2のシミュレーション制御手段からシミュ
レーションが行われるアドレスを受け取り格納する読込
アドレス格納手段、(F)前記アドレス比較指示信号を
受け取り、前記読込アドレス格納手段から読み出したア
ドレス値と前記アドレス登録手段から受け取り内部にあ
らかじめ登録アドレスとして設定してある前記先頭アド
レス値とを比較し、一致したとき先頭アドレス検出信号
を出力するアドレス比較手段、(G)前記第3の機械語
命令読込指示信号制御信号により、前記アドレス登録手
段に登録された先頭アドレスに格納されている機械語命
令を読み込み前記特殊命令コード設定手段に送出し、前
記第1の機械語命令読込指示信号により、前記被テスト
プログラム格納手段に格納されている被テストプログラ
ムの機械語命令を一語ずつ読み込み、前記第2のシミュ
レーション制御手段が前記先頭アドレス検出信号を受け
取ったときは、先頭アドレス検出後に前記被テストプロ
グラム格納手段から最初に読み込む機械語命令のアドレ
スとして前記第2の機械語命令読込指示信号により指示
されたアドレス格納手段からアドレスを読み込み、前記
アドレスに基づいて前記被テストプログラム格納手段に
格納されている機械語命令を読み込む第2のプログラム
読込制御手段、(H)前記第2のプログラム読込制御手
段により読み込まれた前記被テストプログラムの機械語
命令を解析し解析が終了したことを前記第2のシミュレ
ーション制御手段に報告し、前記解析が終了した機械語
命令を実行し、前記機械語命令の解析および実行の結果
得られるメッセージ情報を出力し、前記先頭アドレスの
機械語命令を解析したときにはメッセージ出力部分の最
後のアドレスの次のアドレスを抽出してシミュレータ再
開アドレス情報として出力し、解析の結果、読み込まれ
た前記被テストプログラムの機械語命令の中に前記特殊
命令コードが埋め込まれていたが検出されたとき、前記
アドレス比較手段を動作させるための前記アドレス比較
指示信号を前記第2のシミュレーション制御手段から出
力させ、前記先頭アドレス検出信号を受け取った前記第
2のシミュレーション制御手段から命令実行禁止信号が
送出されてきたときは前記解析終了した機械語命令を実
行しない第2の命令解析実行手段、(I)前記メッセー
ジ情報を格納するメッセージ格納手段、(J)前記メッ
セージ格納手段のメッセージが格納されているアドレス
値と前記第2の命令解析実行手段から受け取った前記シ
ミュレータ再開アドレス情報から得られる被テストプロ
グラムのメッセージ出力処理部分の最後のアドレス値の
次のアドレス値とを保持するアドレス情報レジスタ、
(K)前記先頭アドレス検出信号を受け取ったとき、前
記メッセージ格納手段のメッセージが格納されているア
ドレス値と前記被テストプログラムのメッセージ出力処
理部分の最後のアドレス値の次のアドレス値とを前記ア
ドレス情報レジスタから読出すレジスタ情報読出手段、
(L)前記レジスタ情報読出手段から前記メッセージ格
納手段のメッセージが格納されているアドレス値を受け
取り前記メッセージ格納手段からメッセージを読み出す
メッセージ読出手段、(M)前記メッセージ読出手段に
読み出されたメッセージを出力するメッセージ出力手
段、(N)前記第2の機械語命令読込指示信号により指
示されたアドレス格納手段として、前記アドレス情報レ
ジスタから読み出された前記被テストプログラムのメッ
セージ出力処理部分の最後のアドレス値の次のアドレス
値をセットするシミュレーションアドレスレジスタ、を
備えたことを特徴とするシミュレータ。
2. A test program storage means for storing a test program to be debugged, (B) an address comparison instruction signal, a first machine language instruction read instruction signal,
Second simulation control means for controlling the simulation of the program under test by outputting an instruction execution prohibition signal, a second machine language instruction read instruction signal and a third machine language instruction read instruction signal, (C) the program under test Address registration means for registering the start address of the message output processing part of (1), special command code setting means for embedding a special command code in the command of the start address,
(E) Read address storage means for receiving and storing an address to be simulated from the second simulation control means, (F) Address value read from the read address storage means and the address registration read from the read address storage means Address comparison means for receiving from the means and comparing the start address value which is preset inside as a registered address, and outputs a start address detection signal when they match, (G) the third machine language instruction read instruction signal control A signal reads the machine language instruction stored in the head address registered in the address registration means and sends it to the special instruction code setting means, and stores the program under test in response to the first machine language instruction read instruction signal. The machine language instructions of the program under test stored in the means When the second simulation control means reads the word by word and receives the head address detection signal, the second machine language instruction is used as the address of the machine language instruction that is first read from the program under test storage means after the head address is detected. Second program read control means for reading an address from the address storage means designated by the read instruction signal and reading a machine language instruction stored in the tested program storage means based on the address, (H) the second Analyzing the machine language instruction of the program under test read by the program reading control means, reporting to the second simulation control means that the analysis is finished, executing the machine language instruction after the analysis, Outputs message information obtained as a result of analysis and execution of machine language instructions, When the machine language instruction at the start address is analyzed, the address next to the last address of the message output portion is extracted and output as simulator restart address information. As a result of analysis, the machine language instruction of the program under test read in is read. When it is detected that the special instruction code is embedded therein, the address comparison instruction signal for operating the address comparison means is output from the second simulation control means, and the start address detection signal is received. Second instruction analysis executing means for not executing the analyzed machine language instruction when the instruction execution prohibition signal is sent from the second simulation control means, (I) message storing means for storing the message information , (J) Address where the message of the message storage means is stored An address information register for holding a value and an address value next to the last address value of the message output processing part of the program under test, which is obtained from the simulator restart address information received from the second instruction analysis execution means,
(K) When the head address detection signal is received, the address value in which the message of the message storage means is stored and the address value next to the last address value of the message output processing portion of the program under test are set to the address. Register information reading means for reading from the information register,
(L) a message reading means for receiving an address value in which the message of the message storing means is stored from the register information reading means, and reading the message from the message storing means, and (M) a message read to the message reading means. Message output means for outputting, (N) the last address of the message output processing portion of the program under test read from the address information register as the address storage means instructed by the second machine language instruction read instruction signal A simulator comprising a simulation address register for setting an address value next to a value.
JP6176365A 1994-07-28 1994-07-28 Simulator Expired - Fee Related JP2704117B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6176365A JP2704117B2 (en) 1994-07-28 1994-07-28 Simulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6176365A JP2704117B2 (en) 1994-07-28 1994-07-28 Simulator

Publications (2)

Publication Number Publication Date
JPH0844591A true JPH0844591A (en) 1996-02-16
JP2704117B2 JP2704117B2 (en) 1998-01-26

Family

ID=16012350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6176365A Expired - Fee Related JP2704117B2 (en) 1994-07-28 1994-07-28 Simulator

Country Status (1)

Country Link
JP (1) JP2704117B2 (en)

Also Published As

Publication number Publication date
JP2704117B2 (en) 1998-01-26

Similar Documents

Publication Publication Date Title
CN109101355B (en) Processor debugging method for extracting error site characteristic test excitation
JP2704117B2 (en) Simulator
JPH06282599A (en) Logic verifying method and device
JPS6123248A (en) Test system of data processor
JPH02294848A (en) Program evaluating system
JP4149047B2 (en) Simulator
JP2570119B2 (en) Software simulator
JPH02220145A (en) Program tracing system
JPH09288595A (en) Arithmetic processing unit
JP2812289B2 (en) Debugging device and debugging method thereof
JP2001051864A (en) Test conducting system for data processor
JPH07319730A (en) Test debugging method
JPH03222044A (en) Online work program test system
JPH06138911A (en) Programming device
JPH0581076A (en) Fault simulation system in software simulator
JPS61290543A (en) Error generating device
JP2006350676A (en) Program debugging method of built-in system
JPH07168609A (en) Method for debugging sequence program
JPH01292445A (en) Firmware debugging system
JPH04195549A (en) Debugging processing system
JPH08171506A (en) Automatic inspection device
JPH02238530A (en) Test system for working of program
JPH09185525A (en) Protocol debugging system
JPH09223039A (en) Debug device for on-line system
JPH0895817A (en) Method for testing information processor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19970909

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees