JPS60108938A - Program tracing system - Google Patents

Program tracing system

Info

Publication number
JPS60108938A
JPS60108938A JP58214948A JP21494883A JPS60108938A JP S60108938 A JPS60108938 A JP S60108938A JP 58214948 A JP58214948 A JP 58214948A JP 21494883 A JP21494883 A JP 21494883A JP S60108938 A JPS60108938 A JP S60108938A
Authority
JP
Japan
Prior art keywords
program
memory
trace
counter
value
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
JP58214948A
Other languages
Japanese (ja)
Inventor
Takeo Matsumoto
松本 建夫
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.)
Azbil Corp
Original Assignee
Azbil 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 Azbil Corp filed Critical Azbil Corp
Priority to JP58214948A priority Critical patent/JPS60108938A/en
Publication of JPS60108938A publication Critical patent/JPS60108938A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To debug easily a program and to reduce the capacity of a memory by adding a step specification signal to a program memory and storing only a step specification signal at a point suddenly changing the order of steps to a trace memory. CONSTITUTION:A program counter 1 in a program tracing system counts up clock pulses CLKs and outputs a step specification signal STP for values increasing sequentially and continuously. The signal STP is added as an address to a memory 2 in which a program is stored and a processor 3 is operated in accordance with respective read steps. The state of the counter 1 is changed by the processor 3 to output an address to be branched. A trace counter 4 counts up the CLKs and applies the counted output COT to a subtractor 5. The subtractor 5 finds out the difference between the specification signal STP and the output COT and a comparator 7 compares the difference with the preceding value. When both the values are dissident, the value of the trace memory 8 is updated to debug the program.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、プログラムのデバツギングを行なう際、逐次
実行されるプログラムのステップを指定するステップ指
定信号をトレースメモリへ格納し、プログラムの実行状
況を後から解析するために用いるプログラムトレース方
式に関するものである〇〔従来技術〕 プログラムのデバツギングを行なう際には、プログラム
の実行に応じ、プログラムの各ステップが逐次指定され
る状況を解析することが有効となっており、従来はトレ
ースメモリと称するメモリを設け、これへステップ指定
信号を全プログラムのすべてにわたり格納し、後からこ
れの内容を読み出して解析を行なうものとなっている。
[Detailed Description of the Invention] [Technical Field of the Invention] When debugging a program, the present invention stores step designation signals that designate steps of the program to be executed sequentially in a trace memory, and later records the execution status of the program. [Prior art] When debugging a program, it is effective to analyze the situation in which each step of the program is specified sequentially as the program is executed. Conventionally, a memory called a trace memory is provided, in which step designation signals are stored over the entire program, and the contents are read out and analyzed later.

しかし、プログラムのデバツギング上は、ジャンプまた
は分岐等によりステップ順位が急激に変化する点をめれ
ばよく、ステップ順位が逐次連続的に変化する範囲は重
要でないにもか\わらず、従来の手法におい゛ては、ス
テップ指定信号を全プログラムlこわたり格納していた
\め、トレースメモリに大容量を要すると共に、格納内
容からステップ順位の急激な変化点をめるのに手間を要
する等の欠点を生じている。
However, when debugging a program, it is only necessary to focus on sudden changes in the step order due to jumps, branches, etc., and the range in which the step order changes continuously is not important. In terms of the smell, the step designation signals were stored in the entire program, which required a large capacity in the trace memory, and it took time and effort to determine sudden changes in the step order from the stored contents. It has caused drawbacks.

〔発明の概要〕[Summary of the invention]

本発明は、従来のか\る欠点を根本的に解決する目的を
有し、ステップ指定信号により示される値と、ステップ
指定信号と同期してカウントを行なうトレースカウンタ
のカウント出力lこより示される値との差を逐次求め、
現在求めた差の値と今までlこめた差の値とを比較し、
不一致に応じて今までの差の値を更新すると共lこ、ス
テップ指定信号をトレースメモリへ格納し、ステップ順
位が急激に変化する点のステップ指定信号のみをトレー
スメモリへ格納するものとし′た極めて効果的な、プロ
グラムトレース方式を提供するもっである。
The present invention has the purpose of fundamentally solving the drawbacks of the conventional art, and aims to distinguish between a value indicated by a step designation signal and a count output of a trace counter that performs counting in synchronization with the step designation signal. Find the difference between
Compare the currently calculated difference value with the difference value calculated so far,
In addition to updating the previous difference value according to the discrepancy, the step designation signal is stored in the trace memory, and only the step designation signal at the point where the step order changes rapidly is stored in the trace memory. It also provides a highly effective program tracing method.

〔実施例〕〔Example〕

以下、実施例を示すブロック図により本発明の詳細な説
明する。
Hereinafter, the present invention will be explained in detail with reference to block diagrams showing embodiments.

同図においては、クロックパルスCLKをプログラムカ
ウンタ1がカウントし、逐次連続的lこ増加する値のス
テップ指定信号STPを送出し、プルグラムの格納され
たメモリ2に対しアドレス指定を行なっていると共に、
これにより読み出されたプルグラムの各ステップlこ応
じてプロセッサ3が動作し、ジャンプまたは分岐等の命
令が格納されていれば、これにしたがった指令がプロセ
ッサ3からブーグラムカウンタ1へ与えられ、これIこ
よってプログラムカウンタ1がカウント状況を変化させ
、ジャンプ先または分岐先のアドレスを示す値のステッ
プ指定信号STPを送出するものとなっている。
In the figure, a program counter 1 counts clock pulses CLK, sends out a step designation signal STP with a value that successively increases by l, and specifies an address for a memory 2 in which a program is stored.
The processor 3 operates in accordance with each step of the program that has been read out, and if instructions such as jump or branch are stored, the processor 3 gives instructions in accordance with this to the program counter 1. As a result, the program counter 1 changes its count status and sends out a step designation signal STP having a value indicating the jump destination or branch destination address.

また、同一のクロックパルスCLKあるいはこれと同期
させた信号がトレースカウンタ4にも与えられており、
ステップ指定信号STPと同期したカウントを行ない、
逐次連続的に増加するカウント出力COTを送出し、減
算器5の一方の入力へ与えていると共に、これの他方の
入力にはステップ指定信号STPが与えられているため
、減算器5においては、ステップ指定信号8TPにより
示される値と、カウント出力C0TJこより示される値
との差が逐次求められ、現在求めた差の値を示す信号D
BFRを送出するものとなっている。
Further, the same clock pulse CLK or a signal synchronized therewith is also given to the trace counter 4,
Performs counting in synchronization with step designation signal STP,
Since the count output COT which increases sequentially and continuously is sent out and given to one input of the subtracter 5, and the step designation signal STP is given to the other input of this, the subtracter 5 has the following: The difference between the value indicated by the step designation signal 8TP and the value indicated by the count output C0TJ is successively determined, and a signal D indicating the currently determined difference value is obtained.
It is designed to transmit BFR.

信号DPIPRは、レジスタ6と比較器7とへ与えられ
ており、レジスタ6の保持内容も比較器Tへ与えられて
いるため、両者の不一致に応じて比較器Tが比較出力を
ストローブ信号8TRとして送出すれば、これにしたが
って、レジスタ6が信号DBFRを内容更新のうえ保持
し、これを今までの差の値を示す信号DEFnとして送
出すると共Jこ、トレースメモリ8が書き込み状態とな
り、このときのステップ指定信号STPを各アドレスへ
ストローブ信号5TRI7)発生毎に順次格納するもの
となる。
The signal DPIPR is given to the register 6 and the comparator 7, and the contents held in the register 6 are also given to the comparator T, so the comparator T outputs the comparison output as the strobe signal 8TR depending on the mismatch between the two. Accordingly, the register 6 updates the contents of the signal DBFR and holds it, and sends it out as the signal DEFn indicating the difference value up to now. At this time, the trace memory 8 enters the writing state. The step designation signal STP is sequentially stored in each address every time the strobe signal 5TRI7) is generated.

この状況は、−例を次表に示すとおりである。This situation is illustrated in the table below.

すなわち、当初は、カウント出力COTの値とレジスタ
6の内容により示される48号DEFnの値とが共に0
”であり、このときステップ指定信号8TPの値を’1
000″とすれば、信号DEFBの値が”1000”と
なり、これと”O”との比較結果が不一致となるため、
ストローブ信号8 T R・が発生し、レジスタ6の内
容が’ 1000 ”に更新されると共に、このときの
ステップ指定信号8TPにより示される値”1000”
がトレースメモリ8へ洛納される。
That is, initially, both the value of count output COT and the value of No. 48 DEFn indicated by the contents of register 6 are 0.
”, and at this time, the value of the step designation signal 8TP is set to '1.
000'', the value of the signal DEFB will be ``1000'', and the comparison result between this and ``O'' will be inconsistent.
The strobe signal 8TR is generated, the contents of the register 6 are updated to '1000', and the value indicated by the step designation signal 8TP at this time is '1000'.
is stored in the trace memory 8.

ついで、レジスタ6の内容が更新され\ば、信号DEF
Bが1000 ”となり、信号DEF:aの” 100
0”と一致するため、ストローブ信号STRは発生せず
、ステップ指定信号STPが急激tこ変化し”2000
”となるまでこの状態を継続する。
Then, when the contents of register 6 are updated, the signal DEF
B becomes 1000", and signal DEF:a's" 100
0", the strobe signal STR is not generated and the step designation signal STP suddenly changes to "2000".
This state continues until ``.

ステップ指定信号STPが’2000″となれば、信号
DFiF Bが末だ10“00”であるのに対し、信号
DBFRが°“1997”きなり、両値の不一致により
ストローブ信号STRが再び発生し、レジスタ6の内容
が更新され、信号DEFn力(”1997”になると共
、に、ステップ指定信号STPめ示す”2000”がト
レ−スメモリ8へ格納される。
When the step designation signal STP becomes ``2000'', the signal DBFR becomes ``1997'' while the signal DFiF B is 10 ``00'', and the strobe signal STR is generated again due to the mismatch between the two values. The contents of the register 6 are updated, the signal DEFn becomes "1997", and the step designation signal STP "2000" is stored in the trace memory 8.

以降、同様の動作がなされ、ステップ指定信号STPの
1直が°’2008”から3000″へ、”3000″
から4527”へ急激に変化したときにのみストローブ
信号8TRがJら生し、レジスタ6の内容更新およびス
テップ指定16号8’l’Pのトレースメモリ8に対す
る格納が行なわれる。
After that, the same operation is performed, and the first shift of the step designation signal STP changes from °'2008" to "3000" and then "3000".
Only when there is a sudden change from 4527'' to 4527'', strobe signal 8TR is generated from J, and the contents of register 6 are updated and step designation No. 16 8'l'P is stored in trace memory 8.

したがって、トレースメモリtこは、1000”。Therefore, the trace memory t is 1000''.

2000”、”3000”、”4527”のステップ指
定信号s’rpのみが順次lこ各アドレスへ格納される
ものとなり、これの読み出しにより、プログラムの実行
上どのステップlこおいてジャンプまたは分岐等が行な
われたかを直ちlこめることができる。
Only the step designation signals s'rp of ``2000'', ``3000'', and ``4527'' are stored in each address sequentially, and by reading them, it is possible to determine whether to jump or branch at any step in the execution of the program. You can immediately record what has been done.

たゾし、トレースカウンタ4乃至比較器7等の機能は、
別途のプロセッサ等により実現してもよく、具体的構成
は種々の選定が自在である。
However, the functions of trace counter 4 to comparator 7, etc. are as follows.
It may be realized by a separate processor or the like, and various specific configurations can be selected.

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

以上の説明により明らかなみおり本発明によれば、プロ
グラムのデパツギングが容易になると共lこ、トレース
メモリの所要容撤が減少し、グログラムのデバッギング
上顕著な効果が得られる。
As is clear from the above description, according to the present invention, program depacking is facilitated, the amount of trace memory required is reduced, and a remarkable effect can be obtained in debugging programs.

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

図は本発明の実施例を示すブロック図である。 1・・・・プログラムカウンタ、4・・・・トレースカ
ウンタ、5・・・・減算器、6・・・・レジスタ、1・
・・・比較器、8・・・・トレースメモl)、8TP、
−−−ステップ指定信号、COT・・・・カウント出力
。 特許出願人 山武ハネウェル株式会社 代理人 山川数構(ほか1名)
The figure is a block diagram showing an embodiment of the present invention. 1...Program counter, 4...Trace counter, 5...Subtractor, 6...Register, 1...
...Comparator, 8...Trace memo l), 8TP,
---Step designation signal, COT...count output. Patent applicant: Yamatake Honeywell Co., Ltd. Agent: Kazuko Yamakawa (and one other person)

Claims (1)

【特許請求の範囲】[Claims] プログラムのステップを指定するステップ指定信号によ
り示される値と、該ステップ指定信号と同期してカウン
トを行なうトレースカウンタのカウント出力により示さ
れる値との差を逐次求め、現在求めた差の値と今までの
差の値とを比較し、前記両値の不一致に応じて前記今ま
での差の値を前記現在求めた差の値に更新し、かつ、前
記ステップ指定信号をトレースメモリへ格納することを
特徴としたプログラムトレース方式。
The difference between the value indicated by the step designation signal that specifies a program step and the value indicated by the count output of the trace counter that counts in synchronization with the step designation signal is successively determined, and the currently determined difference value is compared to the current value. and updating the previous difference value to the currently determined difference value according to the mismatch between the two values, and storing the step designation signal in a trace memory. A program tracing method featuring
JP58214948A 1983-11-17 1983-11-17 Program tracing system Pending JPS60108938A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58214948A JPS60108938A (en) 1983-11-17 1983-11-17 Program tracing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58214948A JPS60108938A (en) 1983-11-17 1983-11-17 Program tracing system

Publications (1)

Publication Number Publication Date
JPS60108938A true JPS60108938A (en) 1985-06-14

Family

ID=16664209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58214948A Pending JPS60108938A (en) 1983-11-17 1983-11-17 Program tracing system

Country Status (1)

Country Link
JP (1) JPS60108938A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5528182A (en) * 1978-08-22 1980-02-28 Nec Corp Information processing unit
JPS5672748A (en) * 1979-11-20 1981-06-17 Hitachi Ltd Program test system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5528182A (en) * 1978-08-22 1980-02-28 Nec Corp Information processing unit
JPS5672748A (en) * 1979-11-20 1981-06-17 Hitachi Ltd Program test system

Similar Documents

Publication Publication Date Title
JPS59146345A (en) Control flow parallel computer system
US4453093A (en) Multiple comparison circuitry for providing a software error trace signal
JPS6364674A (en) Signal processor
JPS60108938A (en) Program tracing system
JPS62279438A (en) Tracking circuit
JPS635442A (en) Program loop detecting and storing device
JPH0264828A (en) Address trace circuit
JPH01273132A (en) Microprocessor
JPS6216691Y2 (en)
JPH08161196A (en) Instruction tracing device
JPH0690679B2 (en) Program address trace device
JP2894106B2 (en) Delay analysis method
JPS63642A (en) Program debugging system
JPH02205937A (en) Information processing system
JPH04130932A (en) Address tracing memory
JPH04195552A (en) Address tracer
JPS6184746A (en) Tracer memory data recording circuit
JPH03131926A (en) Data processing circuit
JPH0642265B2 (en) Module for subroutine of data flow type machine
JPH01255041A (en) Microcomputer
JPH05120080A (en) Firmware execution history storage system
JPS63103336A (en) Debug back-up device
JPH04310138A (en) Debugging method for data transmitter
JPH04147350A (en) Microprogram step appearance frequency counting method
JPH07111353B2 (en) Moving average device