JPH02244342A - Trace for branch instruction - Google Patents

Trace for branch instruction

Info

Publication number
JPH02244342A
JPH02244342A JP1066824A JP6682489A JPH02244342A JP H02244342 A JPH02244342 A JP H02244342A JP 1066824 A JP1066824 A JP 1066824A JP 6682489 A JP6682489 A JP 6682489A JP H02244342 A JPH02244342 A JP H02244342A
Authority
JP
Japan
Prior art keywords
trace
value
register
address
data
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
JP1066824A
Other languages
Japanese (ja)
Inventor
Koji Sekimoto
幸治 関本
Hidenori Karibe
苅部 英則
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1066824A priority Critical patent/JPH02244342A/en
Publication of JPH02244342A publication Critical patent/JPH02244342A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve the storage efficiency of a buffer for tracing by gathering only effective information without storing the repetition of unnecessary data in the buffer for tracing. CONSTITUTION:Every time the branch instruction is executed, a comparator 17 compares the contents of a save address register 3 which are data to be traced with the contents of a trace copy register 6. When the comparison result of the comparator 17 shows a coincidence, '000' is set in a trace address low- order register 51. Consequently, the storage address of the buffer 4 for tracing is returned and next trace data is overwritten on trace data which is stored in this range. When the comparison result of the comparator 17 does not show the coincidence, the value of the save address register 3 is stored in the buffer 4 for tracing. Consequently, data is prevented from being stored repeatedly and the buffer for tracing can be used effectively.

Description

【発明の詳細な説明】 〔概 要〕 情報処理装置において分岐命令の分岐先をトレースする
トレーサーに関し、 必要のないデータの繰り返しをバッファに格納せずバッ
ファの格納効率を向上することを目的とし、 分岐命令が実行された時アドレスレジスタの値を複写し
保持するセーブアドレスレジスタと、トレースすべきデ
ータを格納するトレース用バッファと、トレース用バッ
ファの格納アドレスを保持するトレースアドレスレジス
タと、セーブアドレスレジスタの値を複写し保持するト
レース複写レジスタと、セーブアドレスレジスタの値と
トレース複写レジスタの値を比較する比較器Iと、トレ
ースアドレスレジスタの下位1桁の値と予め定めた基準
値の一つ前の値とを比較する比較器■と、を備え、トレ
ースアドレスレジスタの下位1桁の値が前記基準値の時
トレースすべきデータをトレース複写レジスタに複写し
て保持させ、分岐命令の実行毎に次にトレースすべきデ
ータを保持するセーブアドレスレジスタの値とトレース
複写レジスタの値を比較し、同一であれば、前記トレー
スアドレスレジスタの下位1桁に前記基準値をセットす
ることによりトレースアドレスを戻し、比較結果が同一
でなければセーブアドレスレジスタの内容をトレース用
バッファに格納するように構成する。
[Detailed Description of the Invention] [Summary] Regarding a tracer that traces the branch destination of a branch instruction in an information processing device, the present invention aims to improve the buffer storage efficiency by not storing unnecessary data repetitions in the buffer. A save address register that copies and holds the value of the address register when a branch instruction is executed, a trace buffer that stores the data to be traced, a trace address register that holds the storage address of the trace buffer, and a save address register. a trace copy register that copies and holds the value of the trace address register, a comparator I that compares the value of the save address register with the value of the trace copy register, and the value of the lower one digit of the trace address register and the value immediately before a predetermined reference value. and a comparator (2) for comparing the value of the trace address register with the value of the reference value, and when the value of the lower one digit of the trace address register is the reference value, the data to be traced is copied and held in the trace copy register, and each time a branch instruction is executed. Next, compare the value of the save address register that holds the data to be traced with the value of the trace copy register, and if they are the same, return the trace address by setting the reference value in the lower 1 digit of the trace address register. , if the comparison results are not the same, the contents of the save address register are stored in the trace buffer.

〔産業上の利用分野〕[Industrial application field]

本発明は、情報処理装置において分岐命令の分岐先をト
レースするトレーサーに関する。
The present invention relates to a tracer that traces a branch destination of a branch instruction in an information processing device.

〔従来の技術〕[Conventional technology]

情報処理装置において、分岐命令が実行されたとき分岐
命令の分岐先アドレスを格納しておいて、診断、デバッ
グ等に使用することが行われる。
In an information processing device, when a branch instruction is executed, the branch destination address of the branch instruction is stored and used for diagnosis, debugging, and the like.

定規模以上の処理装置においては、サービスプロセッサ
等によりこれを行うのが一般である。
In a processing device of a certain size or larger, this is generally performed by a service processor or the like.

マイクロプログラムを格納するC3(コントロールスト
レージ)等において、分岐命令が実行されるときに、分
岐先をトレース用バッファに格納してトレースする方法
は従来の技術として行われている。
In a C3 (control storage) or the like that stores a microprogram, when a branch instruction is executed, a method of storing the branch destination in a trace buffer and tracing it is a conventional technique.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記のような従来のトレーサーにおいては、プログラム
の処理がループをなしている場合には、分岐命令が多用
されているため、トレース用のバッファは繰り返しの内
容ですぐ一杯になってしまい、トレーサーとしての機能
を充分果たすことができなくなるという問題がある。
In conventional tracers such as those mentioned above, when a program is in a loop, branch instructions are often used, so the trace buffer quickly fills up with repeated contents, making it difficult to use as a tracer. There is a problem that it becomes impossible to fully fulfill the function of

本発明が解決しようとする課題は、このような従来の問
題点を解消した分岐命令のトレーサーを提供することに
ある。
The problem to be solved by the present invention is to provide a branch instruction tracer that eliminates such conventional problems.

〔課題を解決するための手段] 第1図は、本発明の構成を示すブロック図である。[Means to solve the problem] FIG. 1 is a block diagram showing the configuration of the present invention.

図において、1はプログラムを格納するプログラムメモ
リである。
In the figure, 1 is a program memory that stores programs.

2はアドレスレジスタであり、次に実行すべき命令のア
ドレスを保持する。
2 is an address register that holds the address of the next instruction to be executed.

3はセーブアドレスレジスタであり、分岐命令が実行さ
れるとアドレスレジスタの値を複写し保持する。
3 is a save address register, which copies and holds the value of the address register when a branch instruction is executed.

4はトレース用バッファであり、トレースすべき分岐先
を格納する。
Reference numeral 4 is a trace buffer that stores branch destinations to be traced.

5はトレースアドレスレジスタであり、トレース用バッ
ファの格納アドレスを保持し分岐命令の実行毎にインク
リメントする。
A trace address register 5 holds the storage address of the trace buffer and is incremented every time a branch instruction is executed.

51はトレースアドレス下位レジスタであり、トレース
アドレスレジスタ5の下n桁部分のレジスタである。
Reference numeral 51 is a trace address lower register, which is a register for the lower n digits of the trace address register 5.

6はトレース複写レジスタであり、セーブアドレスレジ
スタ3の内容を複写し保持する。
A trace copy register 6 copies and holds the contents of the save address register 3.

7は比較器Iでありセーブアドレスレジスタ3の値とト
レース複写レジスタ6の値を比較する。
A comparator I 7 compares the value of the save address register 3 and the value of the trace copy register 6.

8は比較器■であり、トレースアドレス下位レジスタ5
1の値と予め定められた基準値の一つ前の値と比較する
8 is a comparator ■, and trace address lower register 5
The value of 1 is compared with the previous value of a predetermined reference value.

〔作 用〕[For production]

本発明では、トレースアドレスレジスタ5の下位1桁の
値に定めた基準値によって、トレース用バッファ4内に
一定の範囲を設定し、その範囲の先頭データと比較する
ことによってループの有無を検出する。
In the present invention, a certain range is set in the trace buffer 4 based on a reference value determined as the value of the lower one digit of the trace address register 5, and the presence or absence of a loop is detected by comparing it with the first data of the range. .

例えば、トレースアドレスレジスタの下位3桁の値が、
“’ooo’であった時(比較器■8によりトレースア
ドレスレジスタの下位3桁の値と“111”を比較して
一致が得られた次のタイミング)、トレースすべきデー
タ(分岐先アドレス)をトレース複写レジスタ6に複写
し、保持しておく。
For example, the value of the lower three digits of the trace address register is
When “ooo” (the next timing when comparator ■8 compares the lower three digits of the trace address register with “111” and a match is obtained), the data to be traced (branch destination address) is copied to the trace copy register 6 and held.

分岐命令の実行毎に、トレースすべきデータであるセー
ブアドレスレジスタ3の内容とトレース複写レジスタ6
の内容を比較器I7によって比較する。
Every time a branch instruction is executed, the contents of the save address register 3, which is the data to be traced, and the trace copy register 6
The contents of are compared by comparator I7.

比較器■7による比較の結果、一致すれば、トレースア
ドレス下位レジスタ51に“000”をセットする。こ
れによって、トレース用バッファ4の格納アドレスを戻
すことになり、この範囲に格納されていたトレースデー
タの上に次のトレースデータが上書きされる。
As a result of the comparison by the comparator 7, if they match, "000" is set in the trace address lower register 51. As a result, the storage address of the trace buffer 4 is returned, and the trace data stored in this range is overwritten with the next trace data.

比較器I7による比較の結果、一致しなければセーブア
ドレスレジスタ3の値をトレース用バッファ4に格納す
る。
As a result of the comparison by the comparator I7, if there is no match, the value of the save address register 3 is stored in the trace buffer 4.

次に、トレースアドレス下位レジスタ51の値を更新す
る。
Next, the value of the trace address lower register 51 is updated.

上記の構成により、重複データの格納を防ぎ、トレース
用バッファを有効に使用することができる。
With the above configuration, it is possible to prevent the storage of duplicate data and effectively use the trace buffer.

〔実施例〕〔Example〕

以下第2図〜第5図に示す実施例により本発明をさらに
具体的に説明する。
The present invention will be explained in more detail below with reference to embodiments shown in FIGS. 2 to 5.

第2図は、本発明の一実施例の構成を示す図である。FIG. 2 is a diagram showing the configuration of an embodiment of the present invention.

図において、1はコントロールストレージ(C8)であ
り、2はコントロールストレージアドレス・レジスタ(
CSA)である。3はセーブアドレス・レジスタ(SV
A)である。
In the figure, 1 is the control storage (C8) and 2 is the control storage address register (C8).
CSA). 3 is the save address register (SV
A).

4はローカルストレージ(LS)であり、トレースデー
タを格納する。
A local storage (LS) 4 stores trace data.

51はトレースアドレス下位レジスタ(TRAL)であ
り、52はトレースアドレス上位レジスタ(TRAL)
である。
51 is a trace address lower register (TRAL), 52 is a trace address upper register (TRAL)
It is.

6はトレース複写レジスタ(TRC)であり、制御信号
CLGによって5VA3の値を複写する。
A trace copy register (TRC) 6 copies the value of 5VA3 in response to a control signal CLG.

7は比較器Iであり、5VA3の値とTRC6の値を比
較する。一致すれば一致信号TRCを出力する。
7 is a comparator I, which compares the value of 5VA3 and the value of TRC6. If they match, a match signal TRC is output.

8は比較器■であり、TRAL51の値と加算器11の
出力を加算する。
8 is a comparator (2), which adds the value of TRAL51 and the output of adder 11.

9はトレースアドレスペース・レジスタ(、TRAB)
であり、トレースアドレスの下位n桁の基準となる値を
格納する。この基準となる値は可変であって、トレース
アドレス間隔レジスタTRA110に設定されたアドレ
ス間隔ごとに更新される。
9 is the trace address space register (,TRAB)
, and stores the reference value of the lower n digits of the trace address. This reference value is variable and is updated every address interval set in the trace address interval register TRA110.

10はトレースアドレス間隔レジスタ(TRAI)であ
り、プログラムのループ検出するトレースアドレス範囲
を設定する。
Reference numeral 10 denotes a trace address interval register (TRAI), which sets a trace address range for detecting program loops.

11は加算器であり、TRAB9の値とTRA 110
の値を加算する。
11 is an adder, which combines the value of TRAB9 and TRA110
Add the values of .

本実施例では、T、RAB9.TRAll0および加算
器I’llによって、TRAUIOの桁数で決まる数に
拘束されることなく、トレースアドレス間隔を任意に設
定することができるようになっている。
In this example, T, RAB9. TRAll0 and adder I'll allow the trace address interval to be set arbitrarily without being constrained by the number determined by the number of digits of TRAUIO.

12はトレースアドレス情報レジスタ(TRI)であり
、ループされた回数等の情報を格納する。
A trace address information register (TRI) 12 stores information such as the number of loops.

13は分岐成功フリ7プフロップであり、分岐成功信号
(BS)によりセットされ、分岐成功複写信号を出力す
る。
A branch success flip-flop 13 is set by a branch success signal (BS) and outputs a branch success copy signal.

図中の実線はデータ線を示し、破線は制御線を示す。The solid lines in the figure indicate data lines, and the broken lines indicate control lines.

LS4のデータ入力およびTRAL51の入力にある○
印は、マルチプレクス制御信号を示す。LS4のデータ
入力は、通常は5VA3からであるが、比較器■8の一
致信号TRACが出力されたとき、ループ回数等の情報
を格納するTRl12側に切り換えられる。TRAL5
1の入力は、+1加算器によってインクリメントされる
が、比較器I7から一致信号TRCによってTRABQ
側に切り換えられる。
○ in the data input of LS4 and the input of TRAL51
Marks indicate multiplex control signals. The data input of LS4 is normally from 5VA3, but when the match signal TRAC of comparator 8 is output, it is switched to the TR112 side that stores information such as the number of loops. TRAL5
The input of 1 is incremented by the +1 adder, but TRABQ is incremented by the match signal TRC from comparator I7.
can be switched to the side.

比較器■8の一致出力TRACとBSの論理積信号と、
クロックCLKとの論理積で信号CLGが出力され、T
RC6への複写が取られ、TRAB9の更新が行われる
The AND signal of the coincidence output TRAC and BS of the comparator ■8,
The signal CLG is output by ANDing with the clock CLK, and T
A copy is taken to RC6 and TRAB9 is updated.

以下、第2図に示す実施例装置の動作を説明する。The operation of the embodiment shown in FIG. 2 will be explained below.

(1)始めに、TRAll0、TRAL51、TRAB
9、TRll01TRC6、C3A2.5VA3の内容
をリセットする。
(1) First, TRAll0, TRAL51, TRAB
9. Reset the contents of TRll01TRC6 and C3A2.5VA3.

(2)T RA I 10には必要な値を固定的に与え
るか必要に応じて書き替えることも出来るが、本動作例
では“7′”とする。TRAB9は初期値は“0”であ
る。
(2) Although it is possible to give a fixed value to TRA I 10 or rewrite it as necessary, it is set to "7'" in this operation example. The initial value of TRAB9 is "0".

(3)コントロールストレージ(C3)1において分岐
命令が実行されると、C3A2の値は5VA3に複写さ
れる。また、分岐成功信号BSがオンとなるので、フリ
ップフロップ13がセットされ、次のタイミングで分岐
成功複写信号BSCがオンとなる。
(3) When a branch instruction is executed in control storage (C3) 1, the value of C3A2 is copied to 5VA3. Further, since the branch success signal BS is turned on, the flip-flop 13 is set, and the branch success copy signal BSC is turned on at the next timing.

(4)比較器I7によッテ、TRC6(7)内容と5V
A3の内容が比較される。比較した内容が同じであれば
、TRAL51にTRABIIの値を複写し、TRll
0を1だけインクリメントする。比較した内容が同じで
なければ、TRAL51は1だけインクリメントする。
(4) Comparator I7, TRC6 (7) contents and 5V
The contents of A3 are compared. If the compared contents are the same, copy the value of TRABII to TRAL51 and
Increment 0 by 1. If the compared contents are not the same, TRAL51 is incremented by one.

(5)ステップ(4)の次のタイミングで、ローカルス
トレージ(LS)4に5VA3の値が書き込まれる。
(5) At the next timing after step (4), the value of 5VA3 is written to the local storage (LS) 4.

(6)比較器■8による比較結果が一致であれば、次の
タイミングで、加算器11の出力に+1加算され、次の
タイミングでその値によってTRAB9の値が更新され
、また5VA3の内容がTRC6に複写される。
(6) If the comparison result by comparator ■8 is a match, +1 is added to the output of adder 11 at the next timing, the value of TRAB9 is updated with that value at the next timing, and the contents of 5VA3 are updated. Copied to TRC6.

第3図は、本発明の一実施例の動作例としてのプログラ
ムの流れを示す図である。
FIG. 3 is a diagram showing the flow of a program as an operation example of an embodiment of the present invention.

第4図は、本発明の一実施例により、第3図に示したプ
ログラムの流れを処理したときの動作を示すタイムチャ
ート2である。
FIG. 4 is a time chart 2 showing the operation when the program flow shown in FIG. 3 is processed according to an embodiment of the present invention.

第3図に示すように、■■■■■■■■■■という順番
で分岐が行われ、プログラムが実行されたときの各信号
(データ)のタイミングは第4図に示すようになる。
As shown in FIG. 3, branches are made in the order of ■■■■■■■■■■, and the timing of each signal (data) when the program is executed is as shown in FIG.

分岐成功信号(BS)より1タイミング遅れて分岐成功
複写信号(BSC)が出力される。
A branch success copy signal (BSC) is output one timing later than the branch success signal (BS).

セーブアドレスレジスタ(SVA)3の内容は、プログ
ラムの実行に従って、■■■■■■■■■■となる。
The contents of the save address register (SVA) 3 become ■■■■■■■■■■ as the program is executed.

TRAL51の内容は、最初はTR112側値“0°゛
であるから、5VA3の値■がTRC6に複写され(タ
イミング3)、LSのアドレスOにトレースデータ■が
格納される(タイミング4)。
Since the content of TRAL51 is initially the TR112 side value "0°", the value ■ of 5VA3 is copied to the TRC6 (timing 3), and the trace data ■ is stored at address O of LS (timing 4).

続いて、タイミング6で、アドレス1にトレースデータ
■が格納される。
Subsequently, at timing 6, trace data ■ is stored at address 1.

分岐成功ごとに5VA3の値とTRC6の値が比較され
ているが、タイミング7で、■と■で一致がとれ、TR
AL51の値は0″がセットされる。同時に、ループさ
れた回数の情報を格納するTR112の値が+1される
。。
The value of 5VA3 and the value of TRC6 are compared for each successful branch, and at timing 7, a match is found between ■ and ■, and TR
The value of AL51 is set to 0''. At the same time, the value of TR112, which stores information on the number of loops, is incremented by 1.

従って、タイミング8で、LS4のアドレス0にトレー
スデータ■が上書きされ、タイミング10でアドレス1
に■が上書きされる(アドレス1のデニタは■から■に
変更される)。
Therefore, at timing 8, trace data ■ is overwritten at address 0 of LS4, and at timing 10, address 1 is overwritten.
■ is overwritten (the monitor at address 1 is changed from ■ to ■).

以下、同様にトレースデータ■〜■が、LS4のアドレ
ス2〜6に格納される。
Thereafter, trace data (1) to (2) are similarly stored at addresses 2 to 6 of LS4.

本例では、TRAll0の値は“7”が設定してあり、
タイミング20において、TRAL51の値が“7”と
なると、比較器■8で一致がとれて一致信号TRACが
出力され、次のタイミングでLS4の入力がTR112
側に切り換わり、TR112の内容が格納される。
In this example, the value of TRAll0 is set to “7”,
At timing 20, when the value of TRAL51 becomes "7", a match is found in comparator ■8 and a match signal TRAC is output, and at the next timing, the input of LS4 becomes TR112.
The contents of TR112 are stored.

これと同時に、TRAB9に“8”がセットされ、これ
がTRAL51にセットされる。
At the same time, "8" is set in TRAB9, and this is set in TRAL51.

タイミング22で、トレースデータ■がLS4のアドレ
ス8に書き込まれる。
At timing 22, trace data ■ is written to address 8 of LS4.

第5図は、本発明の一実施例によるトレース結果を示す
図である。本図は、トレースアドレス間隔を7と設定し
た場合の例を示す。
FIG. 5 is a diagram showing trace results according to an embodiment of the present invention. This figure shows an example where the trace address interval is set to 7.

図に示すように、トレーサーのアドレス(LS4の格納
アドレス)xxxoには、基準となるトレースデータ(
第4図では■)1が記録され、アドレスXXX1〜XX
X6には通常のトレースデータii(第4図では■■■
■■■)が記録される。
As shown in the figure, the tracer address (LS4 storage address) xxxxo contains the reference trace data (
In Figure 4, ■) 1 is recorded, and addresses XXX1 to XX
X6 has normal trace data ii (in Fig. 4
■■■) are recorded.

トレーサーのアドレスXXX7には、先頭の1ビツトに
ループの有無を示すフラグ1:iと、データivが記録
される。
At address XXX7 of the tracer, a flag 1:i indicating the presence or absence of a loop and data iv are recorded in the first bit.

フラグ■が“0”のときは、トレースデータ11jiを
通してループの無かったことを示し、データivはトレ
ースデータであることを示す。
When the flag ■ is "0", it indicates that there is no loop through the trace data 11ji, and indicates that the data iv is trace data.

フラグ111が“1“°であるときは、トレースデータ
の繰り返しが有ったことを示し、データivはその繰り
返し回数を示し、トレースデータiiは、最後に繰り返
し状態から抜けたトレースデータを示す。
When the flag 111 is "1", it indicates that the trace data has been repeated, data iv indicates the number of repetitions, and trace data ii indicates the trace data that finally exited the repeating state.

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

以上の説明から明らかなように本発明によれば、必要の
ないデータの繰り返しをトレース用バッファに格納せず
有効な情報だけを収集することによってトレース用バッ
ファの格納効率を向上するという著しい工業的効果があ
る。
As is clear from the above description, according to the present invention, unnecessary data repetitions are not stored in the trace buffer, and only valid information is collected, thereby improving the storage efficiency of the trace buffer. effective.

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

第1図は本発明の構成を示すブロック図、第2図は本発
明の一実施例の構成を示す図、第3図は本発明の一実施
例の動作例としてのプログラムの流れを示す図、 第4図は本発明の一実施例による処理例を示すタイムチ
ャート、 第5図は本発明の一実施例によるトレース結果を示す図
である。 図において、 1はプログラムメモリ (コントロールストレージC3
)、 2はアドレスレジスタ(C3A)、 3はセーブアドレスレジスタ(SVA)、4はトレース
用バッファ(ローカルストレージLS)、 5はトレースアドレスレジスタ、 6はトレース複写レジスタ(TRC)、7.8は比較器
、    11は加算器、9はトレースアドレス基準レ
ジスタ(TRAB)、10はトレースアドレス間隔レジ
スタ(TRAI)、12はトレースアドレス情報レジス
タ(TRI)、13はフリップフロップ、 51はトレースアドレス下位レジスタ(TRAL)、5
2はトレースアドレス上位レジスタ(TRAU)、を示
す。 本発明の構成を示すプロ、り図 第  1  図 第 図 本発明の一実施例の動作例としてのプログラムの流れを
示す図第 図 トレーサの アドレス 本発明の一実施例によるトレース結果を示す図第 図
FIG. 1 is a block diagram showing the configuration of the present invention, FIG. 2 is a diagram showing the configuration of one embodiment of the present invention, and FIG. 3 is a diagram showing the flow of a program as an example of operation of one embodiment of the present invention. , FIG. 4 is a time chart showing a processing example according to an embodiment of the present invention, and FIG. 5 is a diagram showing trace results according to an embodiment of the present invention. In the figure, 1 is the program memory (control storage C3
), 2 is the address register (C3A), 3 is the save address register (SVA), 4 is the trace buffer (local storage LS), 5 is the trace address register, 6 is the trace copy register (TRC), 7.8 is the comparison 11 is an adder, 9 is a trace address reference register (TRAB), 10 is a trace address interval register (TRAI), 12 is a trace address information register (TRI), 13 is a flip-flop, 51 is a trace address lower register (TRAL) ), 5
2 indicates a trace address upper register (TRAU). 1 is a diagram showing the configuration of the present invention; FIG. 1 is a diagram showing the flow of a program as an example of the operation of an embodiment of the present invention; figure

Claims (1)

【特許請求の範囲】 分岐命令が実行された時、分岐先のプログラムメモリ(
1)内アドレスをトレース用バッファ(4)に格納する
分岐命令のトレーサーであって、分岐命令が実行された
時アドレスレジスタ(2)の値を複写し保持するセーブ
アドレスレジスタ(3)と、 トレースすべきデータを格納するトレース用バッファ(
4)と、 トレース用バッファの格納アドレスを保持し分岐命令が
実行される毎にインクリメントするトレースアドレスレ
ジスタ(5)と、 セーブアドレスレジスタ(3)の値を複写し保持するト
レース複写レジスタ(6)と、 セーブアドレスレジスタ(3)の値とトレース複写レジ
スタ(6)の値を比較する比較器 I (7)と、トレー
スアドレスレジスタ(5)の下位n桁の値と予め定めた
基準値の一つ前の値とを比較する比較器II(8)と、を
備え、 トレースアドレスレジスタ(5)の下位n桁の値が前記
基準値の時トレースすべきデータをトレース複写レジス
タ(6)に複写して保持させ、分岐命令の実行毎に次に
トレースすべきデータを保持するセーブアドレスレジス
タ(3)の値とトレース複写レジスタ(6)の値を比較
し、同一であれば、前記トレースアドレスレジスタ(5
)の下位n桁に前記基準値をセットすることによりトレ
ースアドレスを戻し、比較結果が同一でなければセーブ
アドレスレジスタ(3)の内容をトレース用バッファ(
4)に格納するよう構成したことを特徴とする分岐命令
のトレーサー。
[Claims] When a branch instruction is executed, the branch destination program memory (
1) A branch instruction tracer that stores the internal address in a trace buffer (4), and a save address register (3) that copies and holds the value of the address register (2) when a branch instruction is executed; Trace buffer (
4), a trace address register (5) that holds the storage address of the trace buffer and increments each time a branch instruction is executed, and a trace copy register (6) that copies and holds the value of the save address register (3). , a comparator I (7) that compares the value of the save address register (3) and the value of the trace copy register (6), and a comparator I (7) that compares the value of the lower n digits of the trace address register (5) with a predetermined reference value. a comparator II (8) that compares the previous value with the previous value, and copies the data to be traced to the trace copy register (6) when the value of the lower n digits of the trace address register (5) is the reference value. The value of the save address register (3) which holds the next data to be traced is compared with the value of the trace copy register (6) each time a branch instruction is executed, and if they are the same, the trace address register is (5
) by setting the reference value in the lower n digits of the trace address, and if the comparison results are not the same, the contents of the save address register (3) are saved in the trace buffer (
4) A branch instruction tracer characterized in that it is configured to be stored in a branch instruction tracer.
JP1066824A 1989-03-17 1989-03-17 Trace for branch instruction Pending JPH02244342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1066824A JPH02244342A (en) 1989-03-17 1989-03-17 Trace for branch instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1066824A JPH02244342A (en) 1989-03-17 1989-03-17 Trace for branch instruction

Publications (1)

Publication Number Publication Date
JPH02244342A true JPH02244342A (en) 1990-09-28

Family

ID=13326974

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1066824A Pending JPH02244342A (en) 1989-03-17 1989-03-17 Trace for branch instruction

Country Status (1)

Country Link
JP (1) JPH02244342A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100407548B1 (en) * 2000-11-27 2003-11-28 미쓰비시덴키 가부시키가이샤 Trace control circuit

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62288946A (en) * 1986-06-09 1987-12-15 Fujitsu Ltd Jump log recording system
JPS62298843A (en) * 1986-06-19 1987-12-25 Matsushita Electric Ind Co Ltd Program address trace device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62288946A (en) * 1986-06-09 1987-12-15 Fujitsu Ltd Jump log recording system
JPS62298843A (en) * 1986-06-19 1987-12-25 Matsushita Electric Ind Co Ltd Program address trace device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100407548B1 (en) * 2000-11-27 2003-11-28 미쓰비시덴키 가부시키가이샤 Trace control circuit
US6839869B2 (en) 2000-11-27 2005-01-04 Renesas Technology Corp. Trace control circuit for tracing CPU operation in real time

Similar Documents

Publication Publication Date Title
US3673573A (en) Computer with program tracing facility
US4453093A (en) Multiple comparison circuitry for providing a software error trace signal
JPH02244342A (en) Trace for branch instruction
JPH0748183B2 (en) Trace circuit
JPH0581087A (en) Processor monitoring system
JPS62241044A (en) History information collecting device
JPH04195552A (en) Address tracer
JPS62119643A (en) System for storing history information
JPS62121556A (en) Information processor contained in trace memory
JPH03163626A (en) Microcomputer
JPS6270947A (en) Control system for debug interruption
JPS62111334A (en) Compressing device for recording information in computer program tracer
JPS63639A (en) Program debugging system
JPS6368924A (en) System for controlling data processing of microprocessor
JPS626341A (en) Information processor
JPS6022253A (en) State record storage device
JPH02110741A (en) Microprogram controller
JPS62298843A (en) Program address trace device
KR920003187A (en) Improved apparatus and method for interface register handshake to control apparatus
JPS62111336A (en) Debugging system
JPS60178543A (en) Interruption control system
JPS62241043A (en) History information collecting device
JPH01147605A (en) Microprogram sequence controller
JPH04160655A (en) Execution detecting system
JPH02103642A (en) History information storing system