JPH0690679B2 - Program address trace device - Google Patents

Program address trace device

Info

Publication number
JPH0690679B2
JPH0690679B2 JP61143267A JP14326786A JPH0690679B2 JP H0690679 B2 JPH0690679 B2 JP H0690679B2 JP 61143267 A JP61143267 A JP 61143267A JP 14326786 A JP14326786 A JP 14326786A JP H0690679 B2 JPH0690679 B2 JP H0690679B2
Authority
JP
Japan
Prior art keywords
register
address
data
counter
subtractor
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.)
Expired - Lifetime
Application number
JP61143267A
Other languages
Japanese (ja)
Other versions
JPS62298843A (en
Inventor
和美 山田
雅也 宮崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP61143267A priority Critical patent/JPH0690679B2/en
Publication of JPS62298843A publication Critical patent/JPS62298843A/en
Publication of JPH0690679B2 publication Critical patent/JPH0690679B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、プログラムのデバック等を行なう際に使用し
てプログラムの走行軌跡を記憶するプログラムアドレス
トレース装置に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program address trace device that is used when debugging a program and stores the running locus of the program.

従来の技術 従来のプログラムアドレストレース装置は、例えば特開
昭59−99557号公報に示されている。
2. Description of the Related Art A conventional program address trace device is disclosed in, for example, Japanese Patent Laid-Open No. 59-99557.

第9図はこの従来のアドレストレース装置のブロック図
を示すものであり、1はトレースすべきアドレスの入力
線、2はサンプリング信号、3はアドレスをセットする
第一のレジスタ、4は前記サンプリング信号2がアクテ
ィブになる時、第一のレジスタ3のデータを記憶する第
二のレジスタである。5は第一のレジスタ3,第二のレジ
スタ4の内容を減算する減算器、14はメモリ回路、12は
メモリ回路14に書込む内容を選択する選択回路、13はメ
モリ回路14のアドレスを決めるアドレスカウンタ、28は
第一の減算器5の出力信号、11は出力信号28により各エ
ントロール信号を出力するコントロール信号生成回路で
ある。
FIG. 9 is a block diagram of this conventional address tracing device, in which 1 is an input line for an address to be traced, 2 is a sampling signal, 3 is a first register for setting an address, and 4 is the sampling signal. A second register that stores the data in the first register 3 when 2 becomes active. 5 is a subtracter for subtracting the contents of the first register 3 and the second register 4, 14 is a memory circuit, 12 is a selection circuit for selecting the contents to be written in the memory circuit 14, and 13 is an address of the memory circuit 14. An address counter, 28 is an output signal of the first subtractor 5, and 11 is a control signal generation circuit which outputs each enroll signal by the output signal 28.

以上のように構成された従来のアドレストレース装置に
ついて以下その動作を説明する。尚この従来例では命令
は2バイト単位で読み込まれる。
The operation of the conventional address trace device configured as described above will be described below. In this conventional example, the instruction is read in units of 2 bytes.

まずサンプリング信号2によりアドレス入力線1に供給
されていたアドレスが第一のレジスタ3にセットされ
る。これと同時に、第一のレジスタ3にセットされてい
た直前の内容は第二のレジスタ4に移送される。この第
一のレジスタ3の内容と第二のレジスタ4の内容は減算
器5に入力され、この減算器5において、第二のレジス
タ4の内容から第一のレジスタ3の内容が減算され、そ
の結果が2の場合は、トレースしていたアドレスは連続
している事になり2以外であった場合は第二のレジスタ
4にセットされているアドレスにおいて、分岐が発生し
た事になり減算器5の出力信号28が出力される。この
時、第一のレジスタの内容は分岐先のアドレスで、第二
のレジスタの内容は分岐命令のアドレスである。減算器
5の出力信号28が出力された時、コントロール信号生成
回路11は、選択回路12とメモリ回路14とアドレスカウン
タ13にインクリメント信号24を出力し、まず選択回路12
に第二のレジスタ4を選ばせてその内容をメモリ回路14
に書き込ませ次に選択回路12に第一のレジスタ3を選ば
せてその内容をメモリ回路4に書き込ませていた。
First, the address supplied to the address input line 1 by the sampling signal 2 is set in the first register 3. At the same time, the contents immediately before being set in the first register 3 are transferred to the second register 4. The contents of the first register 3 and the contents of the second register 4 are input to the subtractor 5, which subtracts the contents of the first register 3 from the contents of the second register 4, If the result is 2, it means that the traced addresses are continuous, and if it is other than 2, it means that a branch has occurred at the address set in the second register 4, and the subtracter 5 Output signal 28 is output. At this time, the content of the first register is the address of the branch destination, and the content of the second register is the address of the branch instruction. When the output signal 28 of the subtractor 5 is output, the control signal generation circuit 11 outputs the increment signal 24 to the selection circuit 12, the memory circuit 14, and the address counter 13, and first, the selection circuit 12
Select the second register 4 and set its contents to memory circuit 14
Then, the selection circuit 12 was made to select the first register 3 and its contents were written in the memory circuit 4.

発明が解決しようとする問題点 しかしながら上記の様な構成では、ループが多く含まれ
る大規模なプログラムのアドレスを実行するためには、
大容量のメモリを必要とするという問題点を有してい
た。
Problems to be Solved by the Invention However, in the above configuration, in order to execute the address of a large-scale program including many loops,
There is a problem that a large capacity memory is required.

本発明はかかる点に鑑み、トレースしているプログラム
においてある特定のループ、すなわち、第10図に示すよ
うないくつかの命令によって構成される命令群を複数回
くり返して実行するプログラムにおいて、くり返し実行
される命令群中に別の分岐命令を含まないようなループ
(以後このループを“局所的ループ”と呼ぶ。)が存在
した場合は、そのループの分岐命令アドレスと分岐先ア
ドレス及びループ回数をメモリに書き込む。そしてその
他の分岐の場合は分岐命令アドレスと分岐先アドレスの
みを書き込むよう構成することにより、メモリ容量の増
大を招くことなく大規模なプログラムのアドレストレー
スを可能にするプログラムアドレストレース装置を提供
することを目的とする。
In view of such a point, the present invention repeatedly executes a specific loop in a traced program, that is, a program that repeatedly executes an instruction group composed of several instructions as shown in FIG. 10 a plurality of times. If there is a loop that does not include another branch instruction in the instruction group (hereinafter, this loop is referred to as “local loop”), the branch instruction address and branch destination address of the loop and the loop count are set. Write to memory. Further, in the case of other branches, by providing only a branch instruction address and a branch destination address, it is possible to provide a program address trace device that enables address tracing of a large-scale program without increasing the memory capacity. With the goal.

問題点を解決するための手段 本発明は、一定周期のサンプル時間に外部データをセッ
トする第一のレジスタと、前記第一のレジスタに接続さ
れ前記サンプル時間に第一のレジスタのデータを移送し
てセットする第二のレジスタと、前記第一・第二のレジ
スタに接続され前記第二のレジスタから前記第一のレジ
スタを減算する二個の減算器と、前記第一の減算器の出
力により前記第二のレジスタの内容を移送セットする第
三のレジスタと、前記第二のレジスタと第三のレジスタ
の内容を比較する第一の比較器と、前記第一の減算器,
第二の減算器,第一の比較器の内容によりカウントアッ
プするカウンタと、前記カウンタの内容を比較する第二
の比較器及び複数語からなるメモリ回路を備えたプログ
ラムアドレストレース装置である。
Means for Solving the Problems The present invention relates to a first register for setting external data at a sample time of a fixed cycle, and a data transfer of the first register connected to the first register for transferring the data of the first register at the sample time. A second register to be set, two subtractors connected to the first and second registers and subtracting the first register from the second register, and an output of the first subtractor. A third register for transferring and setting the contents of the second register, a first comparator for comparing the contents of the second register and the third register, the first subtractor,
A program address trace device is provided with a counter that counts up according to the contents of a second subtractor and a first comparator, a second comparator that compares the contents of the counter, and a memory circuit composed of a plurality of words.

作用 本発明は前記した構成により、第一のレジスタと第二の
レジスタの差を第一の減算器,第二の減算器で判定し、
実行された命令のアドレスが連続しているかあるいは、
正方向分岐したか、負方向分岐したかを判定し、カウン
タの値が0かどうかで以前に局所的ループが存在したか
を判定し、第三のレジスタと第二のレジスタを比較して
前回と同じアドレスにおける分岐かを判定して状態を次
に記す六種類の状態に分ける。(1) アドレスが連続
している状態。(2) アドレスが不連続で正方向分岐
して、以前に局所的ループが存在している状態。(3)
アドレスが不連続で正方向分岐して、以前に局所的ル
ープが存在していない状態。(4) アドレスが不連続
で負方向分岐して、前回と異なる分岐命令で分岐してお
り以前に局所的ループが存在していない状態。(5)
アドレスが不連続で負方向分岐して、前回と異なる分岐
命令で分岐しており以前に局所的ループが存在する状
態。(6) アドレスが不連続で負方向分岐して、前回
と同じ分岐命令で分岐している状態。
Action The present invention has the above-described configuration, and determines the difference between the first register and the second register by the first subtractor and the second subtractor,
The addresses of the executed instructions are consecutive, or
It is determined whether the branch is in the positive direction or the negative direction, and whether the local loop existed before is determined by the value of the counter being 0. The third register and the second register are compared and the previous time is compared. The state is divided into the following six states by determining whether the branch is at the same address as. (1) A state where addresses are continuous. (2) A state where addresses are discontinuous and branched in the forward direction, and a local loop previously existed. (3)
The address is discontinuous and branches in the forward direction, and there is no previous local loop. (4) A state in which addresses are discontinuous and branches in the negative direction, and the branch instruction is a branch instruction different from the previous one, and there is no local loop before. (5)
A state in which addresses are discontinuous and branch in the negative direction, a branch instruction different from the previous time is used, and a local loop exists before. (6) A state where the addresses are discontinuous and branch in the negative direction, and the branch is performed with the same branch instruction as the previous time.

以上の状態により、メモリ回路に書き込むデータを選択
する事により、メモリには分岐命令のアドレス,分岐先
のアドレス,局所的ループが起った時はその回数を書き
込むだけになり、メモリ容量の節約になる。
By selecting the data to be written to the memory circuit according to the above conditions, the address of the branch instruction, the address of the branch destination, and the number of times when a local loop occurs in the memory can be written only, saving the memory capacity. become.

実 施 例 第1図は本発明の一実施例におけるプログラムアドレス
トレース装置のブロック図を示すものである。第1図に
おいて、3は現アドレスを記憶する第一のレジスタ、4
は一つ前のアドレスを記憶する第二のレジスタ、5は第
一のレジスタ3の内容と第二のレジスタ4の値の差を調
べアドレス不連続かどうか判定する第一の減算器、6は
第一のレジスタ3の内容と第二のレジスタ4の値の差が
負かどうか安定する第二の減算器、7はアドレス不連続
が起った時第二のレジスタ4の内容を記憶する第三のレ
ジスタ、8は前の分岐アドレスと現分岐アドレスが同一
かどうか調べる第一の比較器、9は局所的ループのルー
プ回数をカウントするカウンタ、10はカウンタ9の内容
が0かどうか比較する第二の比較器、11は各ブロックの
制御信号を生成するコントロール信号生成回路、12はメ
モリに書き込む内容を選択する選択回路、13はメモリ回
路にデータが書書込まれる毎にインクリメントされるア
ドレスカウンタ回路、14はメモリ回路である。
Practical Example FIG. 1 is a block diagram of a program address trace device according to an embodiment of the present invention. In FIG. 1, 3 is a first register for storing the current address, 4
Is a second register for storing the previous address, 5 is a first subtracter for checking the difference between the contents of the first register 3 and the value of the second register 4 to determine whether there is an address discontinuity, and 6 is A second subtractor which stabilizes whether the difference between the contents of the first register 3 and the value of the second register 4 is negative, and 7 is a first subtractor which stores the contents of the second register 4 when an address discontinuity occurs. Three registers, 8 is a first comparator for checking whether the previous branch address and the current branch address are the same, 9 is a counter for counting the number of loops of the local loop, and 10 is for comparing whether the content of the counter 9 is 0 or not. Second comparator, 11 is a control signal generation circuit that generates control signals for each block, 12 is a selection circuit that selects the contents to be written in the memory, and 13 is an address that is incremented each time data is written in the memory circuit. Counter circuit 14 is a memory circuit.

以上のように構成された本実施例のプログラムアドレス
トレース装置について、以下その動作を説明する。
The operation of the program address trace device of this embodiment configured as described above will be described below.

第一のレジスタ3にサンプリング信号2が供給されると
アドレス入力線1に供給されていたアドレスが第一のレ
ジスタ3にセットされ、同時に第一のレジスタ3の内容
は第二のレジスタ4に移送される。さらに第一の減算器
5で、第一のレジスタ3と第二のレジスタ4の差をと
り、その差が1回の命令フェッチで読み込まれるバイト
数と異なった場合、すなわち分岐命令を実行したことに
よってアドレスの不連続が生じた時信号線15がアクティ
ブになる。アドレス不連続が生じた時第二の減算器6は
同様に第一のレジスタと第二のレジスタの差を仰り、そ
の正負により正方向分岐か負方向分岐か判定して負方向
分岐なら信号線16がアクティブになる。また、アドレス
不連続が生じた時第二のレジスタ4の内容と前回の分岐
命令のアドレスを記憶している第三のレジスタ7の内容
を第一の比較器8で比較してその値が同一なら信号線17
がアクティブになる。また局所的ループの回数をカウン
トするカウンタ9の内容が0かどうか第二の比較器10で
判定し前にループが存在するか調べ、カウンタ9の内容
が1以上なら信号線18がアクティブになる。
When the sampling signal 2 is supplied to the first register 3, the address supplied to the address input line 1 is set in the first register 3, and at the same time, the contents of the first register 3 are transferred to the second register 4. To be done. Furthermore, the first subtracter 5 takes the difference between the first register 3 and the second register 4, and when the difference is different from the number of bytes read by one instruction fetch, that is, the branch instruction is executed. Causes signal line 15 to become active when an address discontinuity occurs. When an address discontinuity occurs, the second subtracter 6 similarly looks up the difference between the first register and the second register, and determines whether the branch is a positive direction branch or a negative direction branch depending on whether the address is a negative direction branch. 16 becomes active. When an address discontinuity occurs, the contents of the second register 4 and the contents of the third register 7 storing the address of the previous branch instruction are compared by the first comparator 8 and their values are the same. Nara signal line 17
Becomes active. Further, the second comparator 10 determines whether the content of the counter 9 for counting the number of local loops is 0 or not, and checks whether a loop exists before it. If the content of the counter 9 is 1 or more, the signal line 18 becomes active. .

以上の4つの信号線15,16,17,18により第2図に示す6
つの状態を識別することができる。状態Iはアドレスが
連続している時で分岐を生じていないので、メモリ回路
14には何も書き込まない。そのためコントロール信号生
成回路の出力信号は第3図に示す様に何も出力しない。
状態IIはアドレスが不連線で正方向に分岐して以前にル
ープが存在する場合で、メモリ回路14にはアドレスカウ
ンタ13の示すアドレスに各々カウンタ9のデータ27,第
二のレジスタのデータ26,第一のレジスタのデータ25の
順に書き込み、第三のレジスタ7のデータを新たに記憶
させ、カウンタ9をクリアする。状態IIのコントロール
信号生成回路11の出力信号を第4図に示す。出力信号22
により選択回路にカウンタのデータを選択させて、メモ
リ回路14への書込み信号である出力信号23を出力し、ア
ドレスカウンタをインクリメントさせる出力信号24を出
力する。次にメモリ回路14へ第二のレジスタのデータ26
を書込むため同じ様に出力信号22,出力信号23,出力信号
24を出力する。さらにメモリ回路14へ同一レジスタのデ
ータ25を書込ませるため同様に出力信号22,出力信号23,
出力信号24を出力する。そして三個のデータをメモリ回
路14に書込む間に、第三のレジスタ7の内容を新たに記
憶させる出力信号19を出力する。又メモリ回路14にカウ
ンタ9のデータを書込ませた後カウンタ9をクリアする
出力信号20を出力する。状態IIIはアドレスが不連続で
正方向分岐して前にループが存在しない場合で、メモリ
回路14にはアドレスカウンタ13の示すアドレスに各々第
二のレジスタのデータ26,第一のレジスタのデータ25の
順に書き込む。状態IIIのコントロール生成回路11の出
力信号を第5図に示す。出力信号22により選択回路に第
二のレジスタのデータを選択させて、メモリ回路14への
書込み信号である出力信号23を出力し、アドレスカウン
タをインクリメントさせる出力信号24を出力する。次に
メモリ回路14へ第一のレジスタのデータ25を書込むため
同様に出力信号22,出力信号23,出力信号24を出力する。
そしてデータをメモリ回路14に書込む間に、第三のレジ
スタ7の内容を新たに記憶させる出力信号19を出力す
る。状態IVはアドレスが不連続で負方向分岐、そして前
回の分岐とは違った命令で分岐を生じ前にループが存在
していない場合で、メモリ回路14にはアドレスカウンタ
13の示すアドレスに各々第二のレジスタのデータ26,第
一のレジスタのデータ25の順に書込み、さらにカウンタ
をインクリメントする。状態IVのコントロール信号生成
回路11の出力信号を第6図に示す。状態IIIの時と同様
に、メモリ回路14に第二のレジスタのデータと第一のレ
ジスタのデータを書き込ませ第三のレジスタのデータを
新たに書き込ませる様に出力信号22,出力信号23,出力信
号24,出力信号19を出力する。但しカウンタ9をインク
リメントするため出力信号21を出力する。状態Vはアド
レスが不連続で負方向分岐、そして前回の分岐とは違っ
た命令で分岐を生じ前にループが存在した場合で、メモ
リ回路14にはアドレスカウンタ13の示すアドレスに各々
カウンタ9のデータ27,第二のレジスタのデータ26,第一
のレジスタのデータ25の順に書き込み、カウンタ9をク
リアした後インクリメントする。状態Vのコントロール
信号生成回路11の出力信号を第7図に示す。状態IIと同
じ様に、メモリ回路14にカウンタのデータと、第二のレ
ジスタのデータと第一のレジスタのデータを書き込ませ
第三のレジスタのデータを新たに書き込ませ、さらにカ
ウンタをクリアする様に出力信号22,出力信号23,出力信
号24,出力信号19,出力信号20を出力する。但しカウンタ
9をクリアした後インクリメントするため出力信号21を
出力する。状態VIはアドレス不連続で負方向分岐、そし
て前回の分岐と同じ命令で分岐を生じた場合で、この場
合はカウンタ9をインクリメントするのみである。状態
VIのコントロール信号生成回路11の出力信号を第8図に
示す。この場合は、カウンタをインクリメントするため
出力信号21が出力される。
The four signal lines 15, 16, 17 and 18 described above are used to provide the 6 shown in FIG.
Two states can be identified. Since the state I does not branch when addresses are continuous, the memory circuit
Nothing is written to 14. Therefore, the output signal of the control signal generation circuit does not output anything as shown in FIG.
In the state II, the address is branched in the forward direction due to the discontinuous line and there is a loop before. In the memory circuit 14, the data 27 of the counter 9 and the data 26 of the second register are set to the addresses indicated by the address counter 13 respectively. Then, the data 25 of the first register is written in order, the data of the third register 7 is newly stored, and the counter 9 is cleared. The output signal of the control signal generation circuit 11 in the state II is shown in FIG. Output signal 22
Thus, the selection circuit is caused to select the counter data, the output signal 23 which is a write signal to the memory circuit 14 is output, and the output signal 24 which increments the address counter is output. Next, the data 26 of the second register is sent to the memory circuit 14.
To write the same output signal 22, output signal 23, output signal
Outputs 24. Further, in order to write the data 25 of the same register to the memory circuit 14, similarly, the output signal 22, the output signal 23,
The output signal 24 is output. Then, while writing the three pieces of data in the memory circuit 14, the output signal 19 for newly storing the contents of the third register 7 is output. Further, after the data of the counter 9 is written in the memory circuit 14, the output signal 20 for clearing the counter 9 is output. The state III is a case where the addresses are discontinuous and branched in the forward direction and there is no loop before. In the memory circuit 14, the data 26 of the second register and the data 25 of the first register are stored at the address indicated by the address counter 13, respectively. Write in order. The output signal of the control generation circuit 11 in the state III is shown in FIG. The output signal 22 causes the selection circuit to select the data in the second register, outputs the output signal 23 which is a write signal to the memory circuit 14, and outputs the output signal 24 which increments the address counter. Next, in order to write the data 25 of the first register to the memory circuit 14, the output signal 22, the output signal 23, and the output signal 24 are similarly output.
Then, while writing the data in the memory circuit 14, the output signal 19 for newly storing the contents of the third register 7 is output. State IV is a case where addresses are discontinuous and branches in the negative direction, and when a branch occurs due to an instruction different from the previous branch and there is no loop before the branch.
The data 26 of the second register and the data 25 of the first register are written in this order at the address indicated by 13, and the counter is further incremented. The output signal of the control signal generation circuit 11 in the state IV is shown in FIG. As in the state III, the output signal 22, the output signal 23, and the output signal 23 are output so that the data of the second register and the data of the first register are written to the memory circuit 14 and the data of the third register is newly written. The signal 24 and the output signal 19 are output. However, the output signal 21 is output to increment the counter 9. State V is a case in which addresses are discontinuous and branches in the negative direction, and a branch occurs due to an instruction different from the previous branch, and a loop exists before the branch. The data 27, the second register data 26, and the first register data 25 are written in this order, and the counter 9 is cleared and then incremented. The output signal of the control signal generation circuit 11 in the state V is shown in FIG. As in the state II, the counter data, the data of the second register and the data of the first register are written to the memory circuit 14, the data of the third register is newly written, and the counter is further cleared. The output signal 22, the output signal 23, the output signal 24, the output signal 19, and the output signal 20 are output to. However, the output signal 21 is output to increment after clearing the counter 9. State VI is a case where a branch is made in the negative direction due to address discontinuity and the same instruction as the previous branch, and in this case, only the counter 9 is incremented. Status
The output signal of the VI control signal generation circuit 11 is shown in FIG. In this case, the output signal 21 is output to increment the counter.

尚第4図から第7図の出力信号22のA,B,Cの意味は、A
は選択回路12にカウンタのデータを選択させるデータ、
Bは第二のレジスタを選択させるデータ、Cは第一のレ
ジスタを選択させるデータである。
The meaning of A, B, C of the output signal 22 in FIGS. 4 to 7 is A
Is data that causes the selection circuit 12 to select counter data,
B is data for selecting the second register, and C is data for selecting the first register.

この様に本実施例によれば、メモリ回路には分岐命令の
アドレス及び飛び先のアドレス、そしてその分岐がルー
プを形成している時はそのループ回数のみを書き込むだ
けになり、メモリ容量の節約になる。
As described above, according to the present embodiment, only the address of the branch instruction, the address of the jump destination, and the number of loops are written to the memory circuit when the branch forms a loop, which saves the memory capacity. become.

発明の効果 以上説明した様に、本発明によれば、プログラムアドレ
ストレース装置のメモリ容量の節約となり大規模なプロ
グラムをトレースする際にメモリの増加をふせぎ、その
実用的効果は大きい。
EFFECTS OF THE INVENTION As described above, according to the present invention, the memory capacity of the program address tracing device is saved, the increase of the memory is suppressed when tracing a large-scale program, and its practical effect is large.

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

第1図は本発明における一実施例のプログラムアドレス
トレース装置のブロック図、第2図は同実施例の状態と
入力の関係図、第3図から第8図は、同実施例の状態I
からVIまでのコントロール信号生成回路の出力波形図、
第9図は従来のプログラムアドレストレース装置のブロ
ック図、第10図は「局所的ループ」の説明図である。 1……アドレス入力線、2……サンプル信号、3……第
一のレジスタ、4……第二のレジスタ、5……第一の減
算器、6……第二の減算器、7……第三のレジスタ、8
……第一の比較器、9……カウンタ、10……第二の比較
器、11……コントロール信号生成回路、12……選択回
路、13……アドレスカウンタ、14……メモリ回路。
FIG. 1 is a block diagram of a program address trace device according to an embodiment of the present invention, FIG. 2 is a relational diagram of the state and input of the same embodiment, and FIGS. 3 to 8 are states I of the same embodiment.
Output waveform diagram of the control signal generation circuit from VI to VI,
FIG. 9 is a block diagram of a conventional program address tracing device, and FIG. 10 is an explanatory diagram of “local loop”. 1 ... Address input line, 2 ... Sample signal, 3 ... First register, 4 ... Second register, 5 ... First subtractor, 6 ... Second subtractor, 7 ... Third register, 8
...... First comparator, 9 ... Counter, 10 ... Second comparator, 11 ... Control signal generation circuit, 12 ... Selection circuit, 13 ... Address counter, 14 ... Memory circuit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】一定周期のサンプル時間毎に、外部データ
を記憶する第一のレジスタと、前記第一のレジスタに接
続され前記サンプル時間に第一のレジスタのデータを記
憶する第二のレジスタと、前記第二のレジスタのデータ
から前記第一のレジスタのデータを減算してその結果が
一定値以上の時出力がアクティブになる第一の減算器
と、結果が負の時出力がアクティブになる第二の減算器
と、前記第一の減算器の減算器の出力がアクティブの時
前記第二のレジスタのデータを記憶する第三のレジスタ
と、前記第二のレジスタと前記第三のレジスタの内容を
比較する第一の比較器と、前記第一の減算器,前記第二
の減算器及び前記第一の比較器の出力によりカウントア
ップするカウンタと、前記カウンタのデータと0を比較
する第二の比較器と、複数語からなるメモリ回路と、前
記メモリ回路のアドレスを決めるアドレスカウンタと、
前記第一のレジスタ、前記第二のレジスタ及び前記カウ
ンタに接続され、前記メモリに書き込むデータを選択す
る選択回路と、前記第一の減算器,前記第二の減算器,
前記第一の比較器及び前記第二の比較器の出力結果によ
り前記第三のレジスタ,前記カウンタ,前記選択回路,
前記メモリ,前記アドレスカウンタに制御信号を出力す
るコントロール信号生成回路を有し、前記第一の減算
器,前記第二の減算器,前記第一の比較器,前記第二の
比較器の出力結果により、前記カウンタ,前記第一のレ
ジスタ,前記第二のレジスタのデータを前記メモリ回路
に書き込むよう構成したことを特徴とするプログラムア
ドレストレース装置。
1. A first register for storing external data at every sample time of a fixed cycle, and a second register connected to the first register for storing data of the first register at the sample time. , A first subtractor that subtracts the data in the first register from the data in the second register and makes the output active when the result is a certain value or more, and the output becomes active when the result is negative A second subtractor, a third register for storing the data of the second register when the output of the subtractor of the first subtractor is active, a second register and a third register A first comparator for comparing contents; a counter for counting up by the outputs of the first subtractor, the second subtractor and the first comparator; and a counter for comparing 0 with the data of the counter. With a second comparator A memory circuit comprising a plurality of words, an address counter that determines the address of the memory circuit,
A selection circuit connected to the first register, the second register and the counter, for selecting data to be written in the memory, the first subtractor, the second subtractor,
According to the output results of the first comparator and the second comparator, the third register, the counter, the selection circuit,
An output result of the first subtractor, the second subtractor, the first comparator, and the second comparator, which has a control signal generation circuit that outputs a control signal to the memory and the address counter. According to the above, the program address trace device is configured to write the data of the counter, the first register, and the second register to the memory circuit.
JP61143267A 1986-06-19 1986-06-19 Program address trace device Expired - Lifetime JPH0690679B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61143267A JPH0690679B2 (en) 1986-06-19 1986-06-19 Program address trace device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61143267A JPH0690679B2 (en) 1986-06-19 1986-06-19 Program address trace device

Publications (2)

Publication Number Publication Date
JPS62298843A JPS62298843A (en) 1987-12-25
JPH0690679B2 true JPH0690679B2 (en) 1994-11-14

Family

ID=15334772

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61143267A Expired - Lifetime JPH0690679B2 (en) 1986-06-19 1986-06-19 Program address trace device

Country Status (1)

Country Link
JP (1) JPH0690679B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02244342A (en) * 1989-03-17 1990-09-28 Fujitsu Ltd Trace for branch instruction

Also Published As

Publication number Publication date
JPS62298843A (en) 1987-12-25

Similar Documents

Publication Publication Date Title
US3781810A (en) Scheme for saving and restoring register contents in a data processor
US4056847A (en) Priority vector interrupt system
US4385365A (en) Data shunting and recovering device
JPH0368429B2 (en)
US4453093A (en) Multiple comparison circuitry for providing a software error trace signal
JPH0690679B2 (en) Program address trace device
US3373407A (en) Scratch pad computer system
JPS62279438A (en) Tracking circuit
JPH03113646A (en) Trace circuit
JPH0324640A (en) Debugging system for information processor
SU1387000A1 (en) Device for generating instruction flag
JPH0362233A (en) Address match timing tracing mechanism
JPS61145653A (en) Trace control circuit
JPS63155330A (en) Microprogram controller
JPS63165931A (en) Storing system for information on discontinuous instruction fetch address
SU1339569A1 (en) Device for forming interruption signal in program debugging
SU886000A1 (en) Device for interrupt processing
JPH01169639A (en) Memory
JPS6270947A (en) Control system for debug interruption
JPS59163653A (en) Debug device
JPH03196339A (en) Real time tracer
JPS59200356A (en) Program tracing system
JPS62135939A (en) Condition history storage control system
JPS60169946A (en) Task control system
JPH02287732A (en) Register address generating device