JPS5829057A - Trace device for register - Google Patents

Trace device for register

Info

Publication number
JPS5829057A
JPS5829057A JP56128035A JP12803581A JPS5829057A JP S5829057 A JPS5829057 A JP S5829057A JP 56128035 A JP56128035 A JP 56128035A JP 12803581 A JP12803581 A JP 12803581A JP S5829057 A JPS5829057 A JP S5829057A
Authority
JP
Japan
Prior art keywords
register
trace
instruction
microprogram
control
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
JP56128035A
Other languages
Japanese (ja)
Inventor
Katsumi Katagiri
片桐 克己
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.)
Nippon Signal Co Ltd
Original Assignee
Nippon Signal 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 Nippon Signal Co Ltd filed Critical Nippon Signal Co Ltd
Priority to JP56128035A priority Critical patent/JPS5829057A/en
Publication of JPS5829057A publication Critical patent/JPS5829057A/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 collect data required for debugging only, by preparing a memory, a trace register and a microprogram and setting a trace mode to the trace register. CONSTITUTION:An instruction is fetched in a control section 2 from a main storage section 1 through the pickup of the instruction and control is moved to the microprogram corresponding to each instruction via a mapping register of the control section 2. The mapping register decides whether or not the control is moved to be microprogram having the trace function of the register with the trace signal on a trace signal line 8 from a trace register 3. Further, the instruction is executed and the control is given to the pickup of the next instruction, and after the execution of instruction, the control is given to the trace microprogram of the register for the tracing of the register. The tracing of the register is made by storing the content of an operation section 4 to be recoded to a career storage memory of the storage section 1 when the execution instruction satisfies the trace condition.

Description

【発明の詳細な説明】 本発明は、マイクロプログラムによって制御を行なう情
報処理装置において、プログラムが使用するレジスタの
トレース装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a register tracing device used by a program in an information processing device controlled by a microprogram.

従来、プログラムのトレースは、主としてメモリとプロ
セッサとを接続するパス上のデータをトレース回路の入
力データとしたもので、次のような欠点があり、プログ
ラムのトレース情報として十分なものではなかった。す
なわち、従来のトレース情報は、プログラムのロケーシ
ョンカウンタやメモリへアクセスした時のパス上のデー
タの内容だけであるため、パスにのらないレジスタの内
容を十分に把握することかで基ない、また、トレースレ
ジスタで指定するトレースの条件が、トレースの開始、
トレースの停止3よびトレースする命令の種類だけであ
りて、トレースしているデバッグプログラムが呼んでい
るサブルーチンなどのトレースも実行してしまい、トレ
ース情報を格納する履歴保存メモリの中に目的とする内
容が人っていないことがある。さらに、デバッグプログ
ラムがループしていると、履歴保存メモリにループして
いる箇所の内容が多く格納され、目的とする情報を収集
することができない。
Conventionally, program tracing has mainly used data on a path connecting a memory and a processor as input data to a trace circuit, which has the following drawbacks and is not sufficient as program trace information. In other words, conventional trace information consists only of the program's location counter and the contents of data on the path when memory is accessed, so it is not based on fully understanding the contents of registers that are not on the path. , the trace conditions specified in the trace register are the start of trace,
Not only stopping tracing 3 and the type of instruction to be traced, but also tracing of subroutines called by the debug program being traced, and the desired contents are stored in the history storage memory that stores trace information. There are times when there is no one there. Furthermore, if the debug program is looping, much of the content of the loop is stored in the history storage memory, making it impossible to collect the desired information.

不発明の目的は、このような問題を解決し、デバッグプ
ログラムを修正することなくデバッグ4:必要な情報を
マイクロプログラムで提供することC二ある。
The object of the present invention is to solve such problems and provide necessary information in a microprogram without modifying the debug program.

以下不発明を図面に示す代表的な実施例により説明する
。第19は本発明の情報処理装置のトレースレジスタ3
に関連する構成を示して3す、この情報処理装置に3い
ては、主記憶部1と制御部2と演算部4とは、アドレス
バス5、コントロールバス6およびデータバス7によっ
て接続されている。またトレースレジスタ3は、制御部
2に対し、コン)cr−ルパス6.データバス7gよび
トレース信号線8により接続されている。
The invention will be explained below with reference to typical embodiments shown in the drawings. No. 19 is the trace register 3 of the information processing device of the present invention.
In this information processing device 3, a main memory section 1, a control section 2, and an arithmetic section 4 are connected by an address bus 5, a control bus 6, and a data bus 7. . The trace register 3 also provides a control path 6. It is connected by a data bus 7g and a trace signal line 8.

1e2図は主記憶部1内にある履歴保存メモリ11とト
レースレジスタ3との関係を示すもので。
1e2 shows the relationship between the history storage memory 11 and the trace register 3 in the main storage unit 1.

トレースレジスタ3に履歴保存メモリ1mのアトv ス
情報を有しているので、主記憶部1−の任意のエリアに
任意の大きさの履歴保存メモリ1mを確保することが可
能である。トレースレジスタ6の履歴保存メモリアドレ
ス3bは、主記憶部1内の履歴保存メモlaの先頭アド
レスを示し、最大ポインタ3Cはその先頭アドレスから
履歴保存メモリ1mの終了アドレスまでのmiを示す、
゛実行ポインタ3dは、履歴保存メモリ1a内のどこに
レジスタ内容を格納すべきかを示すポインタであり、レ
ジスタの内容を格納する都度該ポインタ3dの内容を史
新し、該ポインタ6dの内容が最大ポインタ6Cの内容
よりも大きくなる時は、履歴保存メモリアドレス6bの
先頭を示すようにゼロが設定される。
Since the trace register 3 has the attribution information of the history storage memory 1m, it is possible to secure the history storage memory 1m of any size in any area of the main storage section 1-. The history storage memory address 3b of the trace register 6 indicates the start address of the history storage memory la in the main storage unit 1, and the maximum pointer 3C indicates mi from the start address to the end address of the history storage memory 1m.
゛The execution pointer 3d is a pointer that indicates where in the history storage memory 1a the contents of the register should be stored, and each time the contents of the register are stored, the contents of the pointer 3d are updated, and the contents of the pointer 6d are the maximum pointer. When the value is larger than the contents of 6C, zero is set to indicate the beginning of the history storage memory address 6b.

第6図は前記トレースレジスタ6の構成例を示すもので
、該トレースレジスタ6には、レジスタをル−スするた
めに必要な情報と、レジスタの履歴を保存する履歴保存
メモ91aの情報が全て記憶されている。そして該トレ
ースレジスタ6が記憶している情報はオペレーティング
システムで自由に書き換えができ、レジスタをトレース
するプログラム毎に任意の履歴保存メモ91日二任意の
レジスタ情報を収集することが可能である。
FIG. 6 shows an example of the configuration of the trace register 6. The trace register 6 contains all the information necessary for loosing the register and the information of the history save memo 91a that saves the history of the register. remembered. The information stored in the trace register 6 can be freely rewritten by the operating system, and it is possible to collect any history storage memo and any register information for each program that traces the register.

トレースモード31のTは、レジスタのトレース開始、
トレースの停止を示すものであり、これは第1因のトレ
ース信号線8にのせられるトレース信号として、制御部
2のマツピングレジスタに通知される。TOはレジスタ
をトレースすべき命令の種類を示す。
T in trace mode 31 starts register tracing;
This indicates that the trace has stopped, and this is notified to the mapping register of the control unit 2 as a trace signal placed on the trace signal line 8 which is the first cause. TO indicates the type of instruction whose register is to be traced.

T)Lm)(1≦D≦13)はビット対応にトレースし
て履歴保存メモリ16二記録すべきレジスタの種類を示
し、例えばT)Llが“1′″ならば演算部4内の1番
のレジスタ、TR2が“1′″ならば演算部4内の2番
のレジスタ、TRIと置2が共に“1″″ならば演算部
4内の1番と2番のレジスタの状態が履歴保存メモリ1
aに記録されるものである。
T)Lm) (1≦D≦13) indicates the type of register to be traced bit-wise and recorded in the history storage memory 16. For example, if T)Ll is “1′”, the first register in the arithmetic unit 4 is If TR2 is "1", the state of the register No. 2 in the calculation unit 4 is saved, and if both TRI and position 2 are "1", the status of the registers No. 1 and 2 in the calculation unit 4 is saved as history. memory 1
This is what is recorded in a.

3e、3fの上限PO1下限PCはレジスタトレースの
対象となるプログラム実行カウンタの上限値、下限値を
それぞれ示す。また、3g、3hの上限EA、下限Ff
&はレジスタトレースの対象となるプログラム実行アド
レスの上限値、下限値をそれぞれ示す。
Upper limit PO1 lower limit PC of 3e and 3f respectively indicate the upper limit value and lower limit value of the program execution counter that is the target of register tracing. Also, the upper limit EA and lower limit Ff of 3g and 3h
& indicates the upper and lower limits of the program execution address to be traced, respectively.

ここで1例えばTOにトレースすべき命令の種類として
1分岐命令を表示するものをセットしておけば、プログ
ラム実行カウンタとプログラム実行アドレスがトレース
レジスタに記憶されている条件を満足する全ての分岐命
令実行時のレジスタの状態が履歴保存メモリ1mに記憶
されることになる。また、このプログラム実行カウンタ
(P C)、プログラム実行アドレス(gA)の条件は
、前記6e〜3hに記憶されてSす、これらの範囲内の
実行PO1実行EAの命令のみをレジスタトレースを対
象とするので、必要とする情報を適確に履歴保存メモリ
1mに記録しうろことになる。また、TkLnで指定さ
れるレジスタの状態が履歴保存メモリ1aにg記録され
る、 第4因は前記制御部2内に8ける機能ブロック図であり
、まず命令の取出し11により前記主記憶部1から制御
部2内に命令を取込み、マツピングレジスタ12を介し
て各命令に対応したマイクロブログラムに制御が移る。
For example, if you set TO to display 1 branch instruction as the type of instruction to be traced, all branch instructions that satisfy the condition that the program execution counter and program execution address are stored in the trace register The state of the register at the time of execution is stored in the history storage memory 1m. In addition, the conditions of the program execution counter (PC) and program execution address (gA) are stored in the above-mentioned 6e to 3h, and only the instructions of execution PO1 execution EA within these ranges are targeted for register tracing. Therefore, the necessary information must be accurately recorded in the history storage memory 1m. In addition, the state of the register specified by TkLn is recorded in the history storage memory 1a. The instructions are taken into the control unit 2 from the microcontroller 2, and control is transferred to the microprogram corresponding to each instruction via the mapping register 12.

マツピングレジスタ12は、前記トレースレジスタ6か
らのトレース信号Tにより、レジスタのトレース機能を
備えているマイクロプログラムに制御を移すかどうかを
決める。命令の実行113は、命令を実行して次命令の
取出しへ制御を渡す通常動作をするが、命令の実行l1
14では命令実行後レジスタのトレースマイクロプログ
ラムに制御を渡し、レジスタのトレース15を行う。
The mapping register 12 uses the trace signal T from the trace register 6 to decide whether to transfer control to a microprogram having a register trace function. The instruction execution 113 performs the normal operation of executing the instruction and passing control to the next instruction fetch, but the instruction execution l1
At step 14, after the instruction is executed, control is passed to the register trace microprogram to perform register tracing step 15.

このレジスタのトレースは、第5図に示すトレースマイ
クロプログラムのフローに従りて行われる。まず、実行
命令が前記トレースレジスタのトレースモード3aのT
Oで示される条件を満足するかどうかを判定しく16)
 、満足する時は1次の実行POの条件を調べ(17)
 、実行PO力鴇1」紀上限POと下限POの範囲内に
あれば1次に実行8人が前記上限EAと下限HAの範囲
内にあるかを判定しく1B)、範囲内であれば、次にト
レースレジスタの履歴保存メモリアドレス3b、最大ポ
インタ3(!、W行ポインタ5dからレジスタの状態を
記録すべき履歴保存メモリ1鳳内のアドレスを求める(
19)。次にM’+j記’rttnの条件に従りて記録
すべき演算部4内のレジスタ番号を求め、その内容を前
記ステップ19で求めた履歴保存メモリ1aに格納する
This register tracing is performed according to the flow of the trace microprogram shown in FIG. First, the execution instruction is T in trace mode 3a of the trace register.
Determine whether the condition indicated by O is satisfied16)
, when it is satisfied, check the conditions of the first execution PO (17)
, If the execution PO force 1 is within the range of the upper limit PO and lower limit PO, then it is determined whether the 8 executioners are within the range of the upper limit EA and lower limit HA 1B), and if within the range, Next, from the trace register history storage memory address 3b, the maximum pointer 3 (!, and the W line pointer 5d), find the address in the history storage memory 10 where the register state should be recorded (
19). Next, the register number in the arithmetic unit 4 to be recorded is determined according to the condition M'+j'rttn, and its contents are stored in the history storage memory 1a determined in step 19 above.

一方、前記’ro、p○、HAのいずれか1つでも満足
しない場合は何らトレースのための処理を行わず1次命
令取出しのマイクロプログラムに制御を渡す。
On the other hand, if any one of 'ro, p○, and HA is not satisfied, no trace processing is performed and control is passed to the primary instruction fetching microprogram.

以上述べたように、本発明のレジスタのトレース装置は
、デバッグプログラムを収容するためのメモリと、プロ
グラム使用レジスタの種類を含むトレースモードを指定
するトレースレジスタと、該トレースレジスタにより指
定された条件によりトレースした情報を記憶するメモリ
と、トレース動作の制御な行うマイクロプログラムを備
えたものであり、トレースレジスタにトレースモードを
設定することにより、デバッグに必要なデータのみを収
集することができ、かつプログラムのデバッグ用ルーチ
ンをプログラム内に組込むことな(デパνグを実施する
ことができるa
As described above, the register tracing device of the present invention includes a memory for accommodating a debug program, a trace register that specifies a trace mode including the type of register used by the program, and a condition specified by the trace register. It is equipped with a memory that stores traced information and a microprogram that controls tracing operations. By setting the trace mode in the trace register, only the data necessary for debugging can be collected, and the program Do not incorporate debugging routines into the program (a that can perform debugging).

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

図面は本発明の一実施例を示すもので、第1図は情報処
理装置の本発明関連部の構成図、第2図1は主記憶部内
にある履歴保存メモリとトレースレジスタとの関係を示
す図、第3図はトレースレジスタの構成例を示す図、第
4図は制御部内の機能ブロック図、第5図はトレースマ
イクロプログラムのフロー図である0 5 ・・・ アドレスバス 6 ・・・ コントロールバス 7・・・ データバス T・・・ トレース信号 TO・・・命令の種類 TRn  ・・・ レジスタ種類 第3図 第411 第5M
The drawings show one embodiment of the present invention, and FIG. 1 is a configuration diagram of the parts related to the present invention of an information processing device, and FIG. 2 shows the relationship between the history storage memory and the trace register in the main storage section. 3 is a diagram showing an example of the configuration of a trace register, FIG. 4 is a functional block diagram in the control section, and FIG. 5 is a flow diagram of a trace microprogram. Bus 7... Data bus T... Trace signal TO... Instruction type TRn... Register type Figure 3, Figure 411, 5M

Claims (2)

【特許請求の範囲】[Claims] (1)マイクロプログラムによって制御を行う情報処理
装置において、デバッグプログラムを収容スルメモリと
、プログラムで使用するレジスタのトレース開始、停止
、命令の種類およびレジスタの種類を含むトレース条件
を指定するトレースレジスタと、該トレースレジスタに
より指定された条件によりトレースした情報を収容する
メモリと、トレース動作の制御を行うマイクロプログラ
ムとを備えていることを特徴とするレジスタのトレース
装置。
(1) In an information processing device controlled by a microprogram, a main memory that accommodates a debug program, a trace register that specifies trace conditions including starting and stopping tracing of registers used in the program, types of instructions, and types of registers; A register tracing device comprising: a memory that stores information traced under conditions specified by the trace register; and a microprogram that controls tracing operations.
(2)  前記トレースレジスタにて指定されるトレー
ス条件が、さらにプログラム実行カウンタ、プログラム
実行アドレスの範囲を含むことを特徴とする特許請求の
範囲第1項記載のレジスタのトレース装置。
(2) The register tracing device according to claim 1, wherein the trace conditions specified by the trace register further include a program execution counter and a range of program execution addresses.
JP56128035A 1981-08-14 1981-08-14 Trace device for register Pending JPS5829057A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56128035A JPS5829057A (en) 1981-08-14 1981-08-14 Trace device for register

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56128035A JPS5829057A (en) 1981-08-14 1981-08-14 Trace device for register

Publications (1)

Publication Number Publication Date
JPS5829057A true JPS5829057A (en) 1983-02-21

Family

ID=14974902

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56128035A Pending JPS5829057A (en) 1981-08-14 1981-08-14 Trace device for register

Country Status (1)

Country Link
JP (1) JPS5829057A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6073756A (en) * 1983-09-29 1985-04-25 Fujitsu Ltd Program tracer
JPH08263324A (en) * 1995-03-22 1996-10-11 Nec Ibaraki Ltd Debug facilitation device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6073756A (en) * 1983-09-29 1985-04-25 Fujitsu Ltd Program tracer
JPH0326416B2 (en) * 1983-09-29 1991-04-10 Fujitsu Ltd
JPH08263324A (en) * 1995-03-22 1996-10-11 Nec Ibaraki Ltd Debug facilitation device

Similar Documents

Publication Publication Date Title
JPS5829057A (en) Trace device for register
JPS60159951A (en) Tracing system in information processing device
JP2597409B2 (en) Microcomputer
JP2760228B2 (en) Microprocessor with built-in cache memory and its trace analyzer
JPH0222413B2 (en)
JPS62197831A (en) Data processor
JP2509244B2 (en) Branch instruction processor
JPH0795288B2 (en) Microcomputer
JP2674873B2 (en) Step execution operation method of program development support device
JPH0250495B2 (en)
JPS60193046A (en) Detecting system for instruction exception
JPS6052449B2 (en) Interrupt processing method
JPH03252731A (en) Microprocessor
JPS58151659A (en) Measuring device of logical analysis of data processing device
JPH04167146A (en) Address tracing system for information processor
JP3210171B2 (en) Data processing device
JP2742306B2 (en) emulator
JPH02133833A (en) Controller for in-circuit emulator
JPS6358552A (en) Microprocessor
JPS6240550A (en) Program debug device
JPH04140852A (en) Diagnostic system for information processor
JPS6229813B2 (en)
JPH02207340A (en) Emulation system and emulator
JPS6222153A (en) Method and apparatus for analyzing operation of microprocessor
JPS6250854B2 (en)