JPS6286442A - Data processor - Google Patents

Data processor

Info

Publication number
JPS6286442A
JPS6286442A JP60226775A JP22677585A JPS6286442A JP S6286442 A JPS6286442 A JP S6286442A JP 60226775 A JP60226775 A JP 60226775A JP 22677585 A JP22677585 A JP 22677585A JP S6286442 A JPS6286442 A JP S6286442A
Authority
JP
Japan
Prior art keywords
bit
trace
memory
jump
instruction
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
JP60226775A
Other languages
Japanese (ja)
Inventor
Mamoru Sueoka
末岡 守
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60226775A priority Critical patent/JPS6286442A/en
Publication of JPS6286442A publication Critical patent/JPS6286442A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To minimize a hardware by recording the low-order 16-bit of an instruction head address just after branching to a trace memory and storing the high/low order 16-bit of the address of the instruction head into the trace memory in case of a 32-bit branch instruction. CONSTITUTION:A PC tracer consists of a jump flag 71, a 32-bit jump flag 72, a trace address counter 73, a memory 74, a 32-bit register 174 storing the content of a program counter, a selector 175 selecting whether low-order 16-bit or high- order 16-bit and a bit 176 reflecting a 32-bit jump flag 72. The level of the 32-bit jump flag reflection bit 176 is 0 at 16-bit jump and 1 at 32-bit jump. Since the storage capacity of a trace memory is decreased without losing effective trace information, the program counter trace device capable of wide range trace is formed without increasing the hardware.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明はデータ処理装置係り、−チップLSI化に好適
なプログラムカウンタトレース機構に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a data processing device, and more particularly to a program counter tracing mechanism suitable for chip LSI implementation.

〔発明の背景〕[Background of the invention]

ソフトウェアのデパックの際に、プログラムの(]) 実行状態をモニタリングすることがよく行われる。 (]) of the program when depacking the software. Monitoring execution status is often done.

このモニタリングには、命令語先頭アドレスの内容を順
次メモリに格納する方法と、分岐した先の命令先頭アド
レス記憶する方法とがある。前者の公知例としてHID
ICV90シリーズ命令語アーキテクチャマニュアル1
4−19.20ページ、後者の公知例として特開昭60
−20251号公報が挙げられる。
This monitoring includes a method of sequentially storing the contents of the instruction word start address in memory and a method of storing the instruction start address of the branch destination. A known example of the former is HID
ICV90 series instruction language architecture manual 1
Pages 4-19 and 20, as a publicly known example of the latter, JP-A-60
-20251 publication is mentioned.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、有効なプログラムカウンタのトレース
情報を格納しつつ、ハードウェア量を最小化した、プロ
グラムカウンタトレース機構をもつデータ処理装置を提
供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a data processing device having a program counter trace mechanism that minimizes the amount of hardware while storing effective program counter trace information.

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

本発明者は、分岐命令には、十六ビット分岐と三十二ビ
ット分岐とがあり、三十二ビット分岐の時にはプログラ
ムカウンタの上位下位十六ビットづつトレースし、十六
ビット分岐の時にはプログラムカウンタの下位十六ビッ
トの内容をトレースすればプログラムの実行状態を確認
できることに着目した。本発明によれば、有効なトレー
ス情報を格納しつつ、トレースメモリ容量を小さくでき
る。
The inventor discovered that there are two types of branch instructions: 16-bit branches and 32-bit branches. In the case of a 32-bit branch, the upper and lower 16 bits of the program counter are traced, and in the case of a 16-bit branch, the program counter is traced. We focused on the fact that the execution status of a program can be confirmed by tracing the contents of the lower 16 bits of the counter. According to the present invention, it is possible to reduce the trace memory capacity while storing effective trace information.

前者の場合、プログラムの実行状態を全て把握すること
ができるが、不当な分岐が行われてるから、トレース容
量以上のステップ数を実行した後に、エラーが発生した
場合、その原因を究明することができない。このため、
トレース容量は大きくする必要があり、そのためのハー
ドウェア量は大きくなる。
In the former case, it is possible to know all the execution status of the program, but since an illegal branch is taken, if an error occurs after executing more steps than the trace capacity, it is difficult to investigate the cause. Can not. For this reason,
The trace capacity needs to be increased, which requires a large amount of hardware.

後者の場合、分岐の発生したアドレスと、分岐した先の
先頭アドレスを記録しているが、分岐命令の種類に無関
係なトレーサ機構となっており、メモリの無駄使いとな
り、ハード構成に無駄が多かった。
In the latter case, the address where the branch occurred and the start address of the branch destination are recorded, but this is a tracer mechanism that is unrelated to the type of branch instruction, which results in wasted memory and a lot of waste in the hardware configuration. Ta.

データ処理装置をLSI化する場合、ゲート数の制約か
ら、プログラムカウンタトレーサの様な本来の機能でな
い二次的な機能のゲート数を削減することが必要となる
。この場合、前者の方法も後者の方法もどちらも不適当
となる。
When converting a data processing device into an LSI, it is necessary to reduce the number of gates for a secondary function such as a program counter tracer, which is not an original function, due to restrictions on the number of gates. In this case, both the former method and the latter method are inappropriate.

〔発明の実施例〕[Embodiments of the invention]

第1図に本発明のデータ処理装置の全体構成を示す。各
データ処理装置は、命令を読み出し解読する命令フェッ
チ・デコート部10と、命令毎の制御情報を記憶し演算
部30に対し制御情報205を与える演算制御部20と
、演算を実行する演算部30と、命令やデータを記憶す
るメモリ40と、メモリへのアクセスを行なうメモリイ
ンターフェース部90、クロック生成部80とから構成
されている。メモリインターフェース部は、命令のアド
レスを格納するプログラムカウンタ50、メモリへのア
クセスアドレスを格納するメモリアドレスレジスタ60
とプログラムカウンタの内容をトレースするPCトレー
サ70と、プログラムカウンタの内容をインクリメント
する加算器52と、演算部30から与えられるジャンプ
先アドレス504と加算器52の出力503とを選択す
るセレクタ51と、演算部30から与えられるオペラン
ドアドレス206とプログラムカウンタ50の出力50
2とを選択するセレクタ61とから構成される。
FIG. 1 shows the overall configuration of a data processing apparatus according to the present invention. Each data processing device includes an instruction fetch/decode unit 10 that reads and decodes instructions, an arithmetic control unit 20 that stores control information for each instruction and provides control information 205 to the arithmetic unit 30, and an arithmetic unit 30 that executes arithmetic operations. , a memory 40 for storing instructions and data, a memory interface section 90 for accessing the memory, and a clock generation section 80. The memory interface unit includes a program counter 50 that stores instruction addresses and a memory address register 60 that stores memory access addresses.
and a PC tracer 70 that traces the contents of the program counter, an adder 52 that increments the contents of the program counter, and a selector 51 that selects the jump destination address 504 given from the arithmetic unit 30 and the output 503 of the adder 52. Operand address 206 given from arithmetic unit 30 and output 50 of program counter 50
2 and a selector 61 for selecting.

第2図は演算制御部20の構成を示す。演算制御部20
は、制御記憶21と、マイクロ命令レジスタ22と、制
御記憶アドレスレジスタ23と、制御記憶アドレスをイ
ンクリメントする加算器24と、加算器24の出力12
4と命令フェッチデコード部10から与えられるマイク
ロ命令先頭アドレス204を選択するセレクタ25から
構成されている。ある命令を実行する場合は、まずその
命令のマイクロプログラム先頭アドレスを命令フェッチ
デコード部10から受取り、以後は順次そのアドレスを
インクリメントしながら制御記憶21から、制御情報1
21を読み出す。制御情報121のうち一ビツトは、E
ND信号101に割付けられ、−ビットはJMP信号1
02に割付けられている。END信号は、命令の最終サ
イクルであることを意味している。第1図に示す様に、
JMP信号102はセレクタ51に接続されており、本
信号がオンの時は、ジャンプ先アドレス504が選択さ
れ、その内容がプログラムカランり50にセットされる
FIG. 2 shows the configuration of the calculation control section 20. Arithmetic control unit 20
is a control memory 21, a microinstruction register 22, a control memory address register 23, an adder 24 for incrementing the control memory address, and an output 12 of the adder 24.
4 and a selector 25 for selecting the microinstruction start address 204 given from the instruction fetch decoding section 10. When executing a certain instruction, first the microprogram start address of the instruction is received from the instruction fetch decoding unit 10, and thereafter, the address is sequentially incremented and the control information 1 is retrieved from the control memory 21.
Read out 21. One bit of the control information 121 is E
The - bit is assigned to the ND signal 101, and the - bit is assigned to the JMP signal 1.
It is assigned to 02. The END signal signifies the final cycle of the instruction. As shown in Figure 1,
The JMP signal 102 is connected to the selector 51, and when this signal is on, the jump destination address 504 is selected and its contents are set in the program run 50.

第3図はPCトレーサ70の構成を示している。FIG. 3 shows the configuration of the PC tracer 70.

PCトレーサ70は、ジャンプフラグ71と、三十二ビ
ットジャンプフラグ72と、トレースアドレスカウンタ
73と、メモリ74と、プログラムカウンタの内容を保
持する三十二ビットレジスタ174と、三十二ビットレ
ジスタ174の内容を下位十六ビットか、上位十六ビッ
トかを選択するセレクタ】75と、三十二ビットジャン
プフラグ72を反映するビット176とから構成されて
いる。
The PC tracer 70 includes a jump flag 71, a 32-bit jump flag 72, a trace address counter 73, a memory 74, a 32-bit register 174 that holds the contents of the program counter, and a 32-bit register 174. The bit 176 reflects the 32-bit jump flag 72.

ジャンプフラグ71は、JMP信号がオンでJMP32
信号がオフでEND信号がオンの時セットされ、ジャン
プフラグがオンでEND信号がオンの時クリアされる。
The jump flag 71 indicates that JMP32 is activated when the JMP signal is on.
It is set when the signal is off and the END signal is on, and cleared when the jump flag is on and the END signal is on.

トレースアドレスカウンタ73はアップダウンカウンタ
であり、JMP信号がオンでJMP32信号がオフで、
END信号がオンの時と、ジャンプフラグがオンでEN
D信号がオンの時と、JMP32信号がオンでEND信
号がオンの時と、三十二ビットジャンプフラグ反映ビッ
ト176がオンの時と、JMP32信号とEND信号が
同時にオンの時にカウントアツプされTRCRD信号が
オンの時、カウントダウンされる。三十二ビットジャン
プフラグ72は、JMP32信号とEND信号が同時に
オンの時と、三十二ビットジャンプフラグがオンの時セ
ットされ、JMP32信号とEND信号が同時にオンの
時クリアされる。プログラムカウンタの内容を保持する
レジスタ174は、プログラムカウンタの内容三十二ビ
ットを保持するレジスタで、三十二ビットジャンプフラ
グがオンの時反映されるピッ174の下位十六ビットを
選択しメモリ74に出力し、三十二ビットジャンプの時
、三十二ビットジャンプフラグがセットされた最初のク
ロックでレジスタ174の下位十六ビットをメモリ74
に出力し、次のクロックでレジスタ174の上位十六ビ
ットをメモリ74に出力する。メモリ74は、セレクタ
175からの出力575が入力に接続され、同時に三十
二ビットジャンプ反映フラグ176が入力される十六ビ
ットのメモリで、WE信号780がオンの時書込まれる
。WE倍信号、JMP信号がオンでJMP32信号がオ
フでEND信号がオンの時と、ジャンプフラグとEND
信号が同時にオンの時と、JMP32信号とEND信号
がオンの時と、三十二ビットジャンジャンプフラグ反映
ビット176は、十六ビットジャンプの時Oで、三十二
ビットジャンプの時1となる。
The trace address counter 73 is an up/down counter, and when the JMP signal is on and the JMP32 signal is off,
EN when the END signal is on and the jump flag is on
TRCRD is counted up when the D signal is on, when the JMP32 signal is on and the END signal is on, when the 32-bit jump flag reflection bit 176 is on, and when the JMP32 signal and the END signal are on at the same time. When the signal is on, it will count down. The 32-bit jump flag 72 is set when the JMP32 signal and the END signal are on at the same time, and when the 32-bit jump flag is on, and is cleared when the JMP32 signal and the END signal are on at the same time. The register 174 that holds the contents of the program counter is a register that holds 32 bits of the contents of the program counter, and selects the lower 16 bits of the bit 174 reflected when the 32-bit jump flag is on. At the time of a 32-bit jump, the lower 16 bits of the register 174 are transferred to the memory 74 at the first clock when the 32-bit jump flag is set.
The upper 16 bits of the register 174 are output to the memory 74 at the next clock. The memory 74 is a 16-bit memory to which the output 575 from the selector 175 is connected and a 32-bit jump reflection flag 176 is input at the same time, and is written when the WE signal 780 is on. When the WE double signal, JMP signal is on, JMP32 signal is off and END signal is on, jump flag and END
When the signals are on at the same time, when the JMP32 signal and the END signal are on, the 32-bit jump jump flag reflection bit 176 is O for a 16-bit jump and 1 for a 32-bit jump. .

第4図はトレースメモリに記憶された内容を示している
。十六ビットジャンプの時(1)、(3)のようになり
、三十二ビットジャンプの時(2)のように記憶される
FIG. 4 shows the contents stored in the trace memory. When there is a 16-bit jump, it is stored as (1) and (3), and when there is a 32-bit jump, it is stored as (2).

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

本発明によれば、有効なトレース情報を損なわずにトレ
ースメモリの記憶容量を小さくできるので、ハードウェ
ア量を増加せずに、広範囲のトレースが可能なプログラ
ムカウンタトレース機構を構築することができる。
According to the present invention, the storage capacity of the trace memory can be reduced without losing effective trace information, so it is possible to construct a program counter trace mechanism capable of tracing over a wide range without increasing the amount of hardware.

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

第1図は本発明の一実施例のプログラムカウンタトレー
ス機構をもつデータ処理装置の構成図、第2図は演算制
御部の構成図、第3図はプログラムカウンタトレーサの
構成図、第4図はトレースメモリに記憶されるパターン
図である。 10・・・命令フェッチ・デコード部、20・・・演算
制御部、30・・・演算部、40・・・メモリ部、50
・・・プログラムカウンタ、60・・・メモリアドレス
レジスタ、70・・・プログラムカウンタトレーサ、7
1・・・ジャンプフラグ、72・・・32ビツトジヤン
プフラグ、73・・・トレースアドレスカウンタ、74
・・・トレースメモリ。
Fig. 1 is a block diagram of a data processing device having a program counter trace mechanism according to an embodiment of the present invention, Fig. 2 is a block diagram of an arithmetic control section, Fig. 3 is a block diagram of a program counter tracer, and Fig. FIG. 3 is a pattern diagram stored in a trace memory. DESCRIPTION OF SYMBOLS 10... Instruction fetch/decode unit, 20... Arithmetic control unit, 30... Arithmetic unit, 40... Memory unit, 50
...Program counter, 60...Memory address register, 70...Program counter tracer, 7
1... Jump flag, 72... 32 bit jump flag, 73... Trace address counter, 74
...Trace memory.

Claims (1)

【特許請求の範囲】 1、プログラムカウンタの内容を記憶するトレースメモ
リをもつデータ処理装置において、 現在実行中の命令が分岐したことの識別手段と、分岐し
なかつたことを識別する手段と前記、識別手段により、
十六ビット分岐命令の場合、分岐直後の命令先頭アドレ
スの下位十六ビットをトレースメモリに記録し、三十二
ビット分岐命令の場合、分岐命令直後の命令先頭をアド
レスの上位、下位両方の十六ビットをトレースメモリに
記憶することを特徴とするデータ処理装置。
[Scope of Claims] 1. In a data processing device having a trace memory that stores the contents of a program counter, means for identifying that the currently executed instruction has branched, means for identifying that the instruction that is currently being executed has not branched; By means of identification,
In the case of a 16-bit branch instruction, the lower 16 bits of the instruction start address immediately after the branch are recorded in the trace memory, and in the case of a 32-bit branch instruction, the instruction start immediately after the branch instruction is recorded in both the upper and lower 10 bits of the address. A data processing device characterized in that six bits are stored in a trace memory.
JP60226775A 1985-10-14 1985-10-14 Data processor Pending JPS6286442A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60226775A JPS6286442A (en) 1985-10-14 1985-10-14 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60226775A JPS6286442A (en) 1985-10-14 1985-10-14 Data processor

Publications (1)

Publication Number Publication Date
JPS6286442A true JPS6286442A (en) 1987-04-20

Family

ID=16850415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60226775A Pending JPS6286442A (en) 1985-10-14 1985-10-14 Data processor

Country Status (1)

Country Link
JP (1) JPS6286442A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02146650A (en) * 1988-11-29 1990-06-05 Yokogawa Electric Corp Bus analyzer
US6594782B1 (en) 1998-12-28 2003-07-15 Fujitsu Limited Information processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02146650A (en) * 1988-11-29 1990-06-05 Yokogawa Electric Corp Bus analyzer
US6594782B1 (en) 1998-12-28 2003-07-15 Fujitsu Limited Information processing apparatus

Similar Documents

Publication Publication Date Title
US4879646A (en) Data processing system with a pipelined structure for editing trace memory contents and tracing operations during system debugging
JP2003510682A5 (en)
US5689694A (en) Data processing apparatus providing bus attribute information for system debugging
JPH0248931B2 (en)
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
JPH03204737A (en) Debug circuit of signal processing processor
JPS6286442A (en) Data processor
JPH0330917Y2 (en)
JP2915680B2 (en) RISC processor
JPS6255738A (en) Data processor having program counter tracing mechanism
JPH0795288B2 (en) Microcomputer
JPH0546389A (en) Parallel processor
JPH0241770B2 (en)
JPH03113659A (en) Cache memory testing method
JPH0323938B2 (en)
JPS61161509A (en) System and device for operating high speed sequence
JPH04328644A (en) Debug back-up device
JPH07191879A (en) Microprocessor provided with executing function of instruction for debugging and debugging method
JPH0752402B2 (en) Data processing device
JPH0131218B2 (en)
JPS61217833A (en) Arithmetic processor
JPH01169639A (en) Memory
JPH0427575B2 (en)
JP2002007154A (en) Information processor
JPH0435779B2 (en)