JPH01114945A - Tracing system for data processor - Google Patents

Tracing system for data processor

Info

Publication number
JPH01114945A
JPH01114945A JP62273837A JP27383787A JPH01114945A JP H01114945 A JPH01114945 A JP H01114945A JP 62273837 A JP62273837 A JP 62273837A JP 27383787 A JP27383787 A JP 27383787A JP H01114945 A JPH01114945 A JP H01114945A
Authority
JP
Japan
Prior art keywords
trace
instruction
address
memory
register
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
JP62273837A
Other languages
Japanese (ja)
Inventor
Mitsuo Ichinoseki
一関 光雄
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 Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP62273837A priority Critical patent/JPH01114945A/en
Publication of JPH01114945A publication Critical patent/JPH01114945A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To store only trace information necessary for a tracer memory by providing the title system with a trace start address storing means, an executing instruction address storing means, a comparing means, a gate means, a trace interruption signal output means, etc. CONSTITUTION:In case of storing trace information in the tracer memory 27, a CPU 1 outputs the address of an instruction to be tested as a trace start address 11 and stores the address 11 in the trace start address storing register 21. Then, the CPU 1 executes preparation for the execution of the instruction and stores a software instruction address 12 in a software instruction address storing register 22. When the contents of the register 22 coincide with that of the register 21, the comparator 24 outputs a trace start signal 25 to a gate circuit 26 and the contents of a firmware instruction address storing register 23 are sequentially stored in the memory 27. At the end of the execution of the instruction to be tested, the CPU 1 outputs a trace interruption signal 14 and the value of the register immediately after the execution of the instruction is stored in the memory 27, so that only necessary trace information can be stored in the memory 27.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータ処理装置のトレース方式に関し、特に必
要なトレース情報のみをトレースすることができるデー
タ処理装置のトレース方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a tracing method for a data processing device, and particularly to a tracing method for a data processing device that can trace only necessary trace information.

〔従来の技術〕[Conventional technology]

従来、この種のトレース方式は、トレース開始アドレス
を検出し、トレースを開始した後はトレーサメモリがい
っばいになるまでトレースを停止していなかった。
Conventionally, this type of tracing method detects a trace start address, starts tracing, and then does not stop tracing until the tracer memory becomes full.

〔発明が解決しよう・とする問題点〕[Problem that the invention attempts to solve]

従来は上述したように、トレースを開始した後はトレー
サメモリがいっばいになるまでトレースを停止していな
かったため、トレーサメモリに不買なトレース情報まで
格納されてしまう問題があった。
Conventionally, as described above, after starting tracing, tracing was not stopped until the tracer memory was full, which caused a problem in that even unsatisfactory trace information was stored in the tracer memory.

本発明はこのような問題点を解決したものであり、その
目的はトレーサメモリに必要なトレース情報のみを格納
できるようにすることにある。
The present invention solves these problems, and its purpose is to allow only necessary trace information to be stored in the tracer memory.

c問題点を解決するための手段〕 本発明は前述の如き問題点を解決するため、メモリに格
納された命令を逐次実行していくデータ処理装置のトレ
ース方式に於いて、被試験命令のアドレスを格納するト
レース開始アドレス格納手段と、 実行中の命令のアドレスを格納する実行中命令アドレス
格納手段と、 前記トレース開始アドレス格納手段の内容と前記実行中
命令アドレス格納手段の内容とが一致することによりト
レース開始信号を出力する比較手段と、 実行中のファームウェア命令のアドレスをトレーサメモ
リにトレースするか否かを制御するゲート手段と、 前記被試験命令の実行中或いは実行直後にトレース中断
信号を出力するトレース中断信号出力手段とを設け、 前記ゲート手段は前記トレース開始信号が出力されるこ
とによりトレースを開始し、前記トレース中断信号が出
力されることによりトレースを中断する。
Means for Solving Problem c] In order to solve the above-mentioned problems, the present invention provides a trace method for a data processing device that sequentially executes instructions stored in a memory. trace start address storage means for storing the address of the instruction being executed; execution instruction address storage means for storing the address of the instruction being executed; and the contents of the trace start address storage means and the contents of the execution instruction address storage means match. a comparison means for outputting a trace start signal according to the method; a gate means for controlling whether or not the address of the firmware instruction being executed is traced to the tracer memory; and a gate means for outputting a trace interrupt signal during or immediately after execution of the instruction under test. and a trace interrupt signal output means, wherein the gate means starts tracing when the trace start signal is output, and interrupts the trace when the trace interrupt signal is output.

〔作 用〕[For production]

トレース開始アドレス格納手段には被試験命令のアドレ
スが格納され、実行中命令アドレス格納手段には実行中
の命令のアドレスが格納される。
The address of the instruction under test is stored in the trace start address storage means, and the address of the instruction being executed is stored in the execution instruction address storage means.

比較手段は被試験命令が実行され、トレース開始アドレ
ス格納手段の内容と実行中命令アドレス格納手段の内容
とが一致することにより、トレース開始信号を出力する
。ゲート手段はトレース開始信号が出力されることによ
り、実行中のファームウェア命令のアドレスを逐次トレ
ーサメモリに格納する。トレース中断信号出力手段は被
試験命令の実行中或いは実行直後にトレース中断信号を
出力し、ゲート手段はトレース中断信号が出力されるこ
とにより、トレースを中断する。
The comparison means outputs a trace start signal when the instruction under test is executed and the contents of the trace start address storage means match the contents of the currently executed instruction address storage means. When the trace start signal is output, the gate means sequentially stores the address of the firmware instruction being executed in the tracer memory. The trace interrupt signal output means outputs a trace interrupt signal during or immediately after execution of the instruction under test, and the gate means interrupts the trace by outputting the trace interrupt signal.

〔実施例〕〔Example〕

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

第1図は本発明の実施例のブロック図であり、中央処理
装置(CPU)1と、トレース制御部2と、中央処理装
置1が実行する命令が格納される主記憶装置3とを含ん
でいる。
FIG. 1 is a block diagram of an embodiment of the present invention, which includes a central processing unit (CPU) 1, a trace control unit 2, and a main memory 3 in which instructions executed by the central processing unit 1 are stored. There is.

トレース制御部2は中央処理装置1からのトレース開始
アドレス(被試験命令のアドレス)11を格納するトレ
ース開始アドレス格納レジスタ21と、中央処理装置1
からのソフトウェア命令アドレス12を格納するソフト
ウェア命令アドレス格納レジスタ22と、中央処理装置
1からのファームウェア命令アドレス13を格納するフ
ァームウェア命令アドレス格納レジスタ23と、比較回
路24と、ゲート回路26と、トレーサメモリ27とを
含んでいる。
The trace control unit 2 includes a trace start address storage register 21 that stores a trace start address (address of the instruction under test) 11 from the central processing unit 1;
A software instruction address storage register 22 that stores the software instruction address 12 from the central processing unit 1, a firmware instruction address storage register 23 that stores the firmware instruction address 13 from the central processing unit 1, a comparison circuit 24, a gate circuit 26, and a tracer memory. 27.

第2図はトレース情報をトレーサメモリ27に格納する
際の中央処理装置1の処理例を示すフローチャートであ
り、以下各図を参照して本実施例の動作を説明する。
FIG. 2 is a flowchart showing an example of processing performed by the central processing unit 1 when storing trace information in the tracer memory 27, and the operation of this embodiment will be described below with reference to each figure.

トレース情報をトレーサメモリ27に格納する場合、中
央処理装置1は先ず、被試験命令のアドレスをトレース
開始アドレス11として出力する(ステップ531)。
When storing trace information in the tracer memory 27, the central processing unit 1 first outputs the address of the instruction under test as the trace start address 11 (step 531).

このトレース開始アドレス11はトレース開始アドレス
格納レジスタ21に格納される。
This trace start address 11 is stored in the trace start address storage register 21.

次に、中央処理装置1は上記被試験命令を実行するため
の環境を設定する前準備を行ないくステップ532)、
その後、被試験命令を実行する(ステップ333) 、
中央処理装置1はステップ332の処理を開始した後は
、ソフトウェア命令を実行する度に実行中のソフトウェ
ア命令のアドレスを示すソフトウェア命令アドレス12
をソフトウェア命令アドレス格納レジスタ22に加え、
ファームウェア命令を実行する度に実行中のファームウ
ェア命令のアドレスを示すファームウェア命令アドレス
13をファームウェア命令アドレス格納レジスタ23に
加える。
Next, the central processing unit 1 performs preliminary preparations to set up an environment for executing the instruction under test (step 532),
After that, execute the instruction under test (step 333),
After the central processing unit 1 starts the process of step 332, every time the central processing unit 1 executes a software instruction, the software instruction address 12 indicating the address of the software instruction being executed is
is added to the software instruction address storage register 22,
Every time a firmware instruction is executed, a firmware instruction address 13 indicating the address of the firmware instruction being executed is added to a firmware instruction address storage register 23.

比較回路24はソフトウェア命令アドレス格納レジスタ
22の内容とトレース開始アドレス格納レジスタ21の
内容とが一致すると、即ち被試験命令が実行されると、
トレース開始信号25を出力する。
When the contents of the software instruction address storage register 22 and the contents of the trace start address storage register 21 match, that is, when the instruction under test is executed, the comparison circuit 24 detects
A trace start signal 25 is output.

トレース開始信号25が出力されると、ゲート回路26
が開いてファームウェア命令アドレス格納レジスタ23
の内容がトレーサメモリ27に逐次格納される。
When the trace start signal 25 is output, the gate circuit 26
is opened and the firmware instruction address storage register 23
The contents of are sequentially stored in the tracer memory 27.

被試験命令の実行が終了すると、中央処理装置1は後処
理を行なう (ステップ534) 、ステップS34で
は、中央処理装置1は被試験命令の実行結果の正常性を
確認するのに必要となる被試験命令実行直後のレジスタ
値を記憶装置に保存させるためのサブルーチンコールを
行なう、このサブルーチンコールはいわゆるトラップを
用いたモニタコールであり、中央処理装置1はトラップ
を検出すると、トレース中断信号14を出力する。但し
、試験命令の実行がプログラムエラー検出を目的として
おり、被試験命令の実行中にプログラムエラーが検出さ
れた場合は、被試験命令の実行中にトラップが発生する
ので、中央処理装置1はサブルーチンコールを行なう前
にトレース中断信号14を出力し、その後サブルーチン
コールを行なうことになる。トレース中断信号14が出
力されると、ゲート回路26が閉じ、次にトレース開始
信号25が有効になるまでトレースは中断される。
When the execution of the instruction under test is completed, the central processing unit 1 performs post-processing (step 534). In step S34, the central processing unit 1 performs post-processing that is necessary to confirm the normality of the execution result of the instruction under test. A subroutine call is made to save the register value in the storage device immediately after the test instruction is executed. This subroutine call is a monitor call using a trap, and when the central processing unit 1 detects a trap, it outputs a trace interruption signal 14. do. However, the purpose of the execution of the test instruction is to detect program errors, and if a program error is detected during the execution of the instruction under test, a trap will occur during the execution of the instruction under test, so the central processing unit 1 Before making the call, a trace interrupt signal 14 is output, and then a subroutine call is made. When the trace interrupt signal 14 is output, the gate circuit 26 is closed and tracing is interrupted until the next trace start signal 25 becomes valid.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明は、トレース開始アドレス
と実行中の命令のアドレスとが一致することによりトレ
ース開始信号を出力する比較手段と、被試験命令の実行
中或いは実行直後にトレース中断信号を出力するトレー
ス中断信号出力手段とを設け、トレース開始信号が出力
されてからトレース中断信号が出力されるまでの間に実
行されたファームウェア命令のアドレスをトレースする
ようにしたものであるから、必要なトレース情報のみを
トレーサメモリに記憶させることができる効果がある。
As described above, the present invention provides a comparison means that outputs a trace start signal when a trace start address matches the address of an instruction being executed, and a comparison means that outputs a trace stop signal during or immediately after execution of the instruction under test. A trace interrupt signal output means is provided to trace the address of the firmware instruction executed between the output of the trace start signal and the output of the trace interrupt signal. This has the advantage that only trace information can be stored in the tracer memory.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の実施例のブロック図及び、第2図はト
レース情報をトレーサメモリ27に格納する際の中央処
理装置1の処理例を示すフローチャートである。 図に於いて、1・・・中央処理装置、2・・・トレース
制御部、3・・・主記憶装置、21・・・トレース開始
アドレス格納レジスタ、22・・・ソフトウェア命令ア
ドレス格納レジスタ、23・・・ファームウェア命令ア
ドレス格納レジスタ、24・・・比較回路、26・・・
ゲート回路、27・・・トレーサメモリ。
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a flowchart showing an example of processing of the central processing unit 1 when storing trace information in the tracer memory 27. In the figure, 1...Central processing unit, 2...Trace control unit, 3...Main storage device, 21...Trace start address storage register, 22...Software instruction address storage register, 23 ... Firmware instruction address storage register, 24... Comparison circuit, 26...
Gate circuit, 27... tracer memory.

Claims (1)

【特許請求の範囲】 メモリに格納された命令を逐次実行していくデータ処理
装置のトレース方式に於いて、 被試験命令のアドレスを格納するトレース開始アドレス
格納手段と、 実行中の命令のアドレスを格納する実行中命令アドレス
格納手段と、 前記トレース開始アドレス格納手段の内容と前記実行中
命令アドレス格納手段の内容とが一致することによりト
レース開始信号を出力する比較手段と、 実行中のファームウェア命令のアドレスをトレーサメモ
リにトレースするか否かを制御するゲート手段と、 前記被試験命令の実行中或いは実行直後にトレース中断
信号を出力するトレース中断信号出力手段とを設け、 前記ゲート手段は前記トレース開始信号が出力されるこ
とによりトレースを開始し、前記トレース中断信号が出
力されることによりトレースを中断することを特徴とす
るデータ処理装置のトレース方式。
[Claims] In a tracing method for a data processing device that sequentially executes instructions stored in a memory, there is provided a trace start address storage means for storing an address of an instruction under test, and an address of an instruction being executed. a comparison means for outputting a trace start signal when the contents of the trace start address storage means match the contents of the execution instruction address storage means; Gate means for controlling whether or not to trace an address to a tracer memory; and trace interrupt signal output means for outputting a trace interrupt signal during or immediately after execution of the instruction under test; A tracing method for a data processing device, characterized in that tracing is started when a signal is output, and tracing is interrupted when the trace interruption signal is output.
JP62273837A 1987-10-29 1987-10-29 Tracing system for data processor Pending JPH01114945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62273837A JPH01114945A (en) 1987-10-29 1987-10-29 Tracing system for data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62273837A JPH01114945A (en) 1987-10-29 1987-10-29 Tracing system for data processor

Publications (1)

Publication Number Publication Date
JPH01114945A true JPH01114945A (en) 1989-05-08

Family

ID=17533236

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62273837A Pending JPH01114945A (en) 1987-10-29 1987-10-29 Tracing system for data processor

Country Status (1)

Country Link
JP (1) JPH01114945A (en)

Similar Documents

Publication Publication Date Title
JP2526688B2 (en) Programmable controller and partial execution method of sequence program
US4652997A (en) Method and apparatus for minimizing overhead when executing nested do loops
JPH03204737A (en) Debug circuit of signal processing processor
JPH01114945A (en) Tracing system for data processor
JPH01114947A (en) Tracing system for data processor
JP2754899B2 (en) Return address monitoring circuit of debug device
JPH0581087A (en) Processor monitoring system
JPS6128144A (en) Executing device of tracing
JPS6142301B2 (en)
JP2684966B2 (en) I / O processor debug device
WO2019136852A1 (en) Method and system for saving starting log of application program, and storage medium and electronic device
JP2624798B2 (en) Processing unit debugging mechanism
JPS59183443A (en) Debug device
JPH06103110A (en) Breakpoint setting system
JPH0253148A (en) Debugging method for test program for input/output device
JPH0149975B2 (en)
JPS63143636A (en) Break point controller
JPH0573347A (en) Emulation device
JPH0695915A (en) Method for debugging processing
JPS5968067A (en) Specifying system for number of run steps
JPH03282633A (en) Information processor
JPS58175062A (en) Debugging processing method
JPH04284544A (en) Micro-controller
JPH0398132A (en) Debugging system
JPS6257035A (en) Microprogram processor