JPH01185738A - Address trace circuit - Google Patents

Address trace circuit

Info

Publication number
JPH01185738A
JPH01185738A JP63009505A JP950588A JPH01185738A JP H01185738 A JPH01185738 A JP H01185738A JP 63009505 A JP63009505 A JP 63009505A JP 950588 A JP950588 A JP 950588A JP H01185738 A JPH01185738 A JP H01185738A
Authority
JP
Japan
Prior art keywords
instruction
address
instruction address
circuit
address holding
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
JP63009505A
Other languages
Japanese (ja)
Inventor
Shinichi Tamada
玉田 眞一
Hidetoshi Tominaga
富永 英俊
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.)
NEC Corp
NEC Engineering Ltd
Original Assignee
NEC Corp
NEC Engineering 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 NEC Corp, NEC Engineering Ltd filed Critical NEC Corp
Priority to JP63009505A priority Critical patent/JPH01185738A/en
Publication of JPH01185738A publication Critical patent/JPH01185738A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To effectively collect address trace information by common hardware for a processor whose instruction set is differently by detecting the generation of branch by comparing an address just before execution with a value on which 1 is added on the address. CONSTITUTION:An adder 14 adds 1 on an instruction address 30 under execution held at a first instruction address holding register 11, and the signal 13 is sent to a second instruction address holding register 20. Meanwhile, a third instruction address holding register 16 holds the instruction address 30 which is held at the first instruction address holding register 11 and executed just before holding time. Therefore, the contents of the first and second instruction address holding registers 11 and 20 are equal when no branch is performed, and they go to different values when the branch is performed. Then, a comparator 15 compares the content of the instruction address holding register 11 with that of the register 20, and sends the result to a stack control circuit 24. In such a way, it is possible to obtain address information with simple constitution.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、情報処理装置に関し、特に実行した一連の命
令アドレスを格納してお(アドレストレース回路に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an information processing device, and more particularly to an address trace circuit that stores a series of executed instruction addresses.

〔従来の技術〕[Conventional technology]

最近のマイクロコンピュータの発展は目覚ましく、その
応用システムの開発も盛んになされている。短期間に効
率のよいプログラムの開発が現在重要な課題となってお
り、その際アドレストレーサを含む種々の開発用ツール
もコスト、効率などの点から一層の進展が期待されてい
る。
The recent development of microcomputers is remarkable, and the development of application systems for them is also active. The development of efficient programs in a short period of time is currently an important issue, and further progress is expected in various development tools including address tracers in terms of cost and efficiency.

従来、この種のアドレストレース回路には次のような2
種類のものが知られている。第1のものは、実行した一
連の命令の全てのアドレスを格納するように構成されて
いる。一方、第2のものは、分岐命令の発生を検知する
ように構成され、すなわち、分岐命令を判別する手段と
、割り込み発生を判別する手段と、さらに分岐前後の命
令のアドレスを格納する手段とを有している。
Conventionally, this type of address trace circuit has the following two types.
types are known. The first one is configured to store all the addresses of the executed series of instructions. On the other hand, the second one is configured to detect the occurrence of a branch instruction, that is, means for determining a branch instruction, means for determining the occurrence of an interrupt, and means for storing the addresses of instructions before and after the branch. have.

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

しかしながら、これらの従来のアドレストレース回路に
は次のような欠点があった。
However, these conventional address trace circuits have the following drawbacks.

前者の場合は、実行した一連の命令のうち、最新の複数
ステップ分の命令のアドレスを全て格納しなければなら
ない。従って、実行結果の解析に必要なステップの記憶
も考慮すると、ハードウェアlが大きくなるという欠点
があった。
In the former case, it is necessary to store all the addresses of the most recent multiple steps of a series of executed instructions. Therefore, if the storage of steps required for analysis of execution results is also taken into consideration, there is a drawback that the hardware l becomes large.

後者の場合は、前者のような欠点はないが、分岐発生を
検出するための制御回路などを考慮しなければならず、
回路が複雑になるという欠点があった。
In the latter case, there are no drawbacks like the former, but it is necessary to consider a control circuit for detecting the occurrence of a branch, etc.
The disadvantage was that the circuit became complicated.

そこで本発明の目的は、実行される命令のアドレスを比
較して分岐の発生を検出することにより、簡単な構成で
アドレス情報を得ることができるアドレストレース回路
を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an address trace circuit that can obtain address information with a simple configuration by comparing the addresses of executed instructions and detecting the occurrence of a branch.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のアドレストレース回路は、中央処理装置に設け
られ、実行した一連の命令のアドレスを格納しておく回
路であって、実行直前の命令のアドレスを保持する第1
命令アドレス保持回路と、この−第1保持回路の保持内
容に1を加算する加算回路と、この加算回路による加算
結果である上記実行直前の命令のアドレスに1を加算し
た値をセットする第2命令アドレス保持回路と、上記第
1命令アドレス保持回路に保持された実行直前の命令ア
ドレスをセットする第3命令アドレス保持回路と、上記
第1および第2命令アドレス保持回路に保持された上記
実行直前の命令のアドレスと上記実行直前の命令のアド
レスに1を加算した値とを比較する比較回路と、この比
較回路による比較結果が不一致のとき、上記第1および
第3命令アドレス保持回路の内容を格納する、複数ワー
ド分のスタックおよびスタック制御回路とを具備するも
のである。
The address trace circuit of the present invention is a circuit that is provided in a central processing unit and stores the addresses of a series of executed instructions.
an instruction address holding circuit; an adder circuit that adds 1 to the content held in the first holding circuit; and a second adder circuit that sets a value obtained by adding 1 to the address of the instruction immediately before execution, which is the addition result by the adder circuit. an instruction address holding circuit; a third instruction address holding circuit that sets the instruction address immediately before execution held in the first instruction address holding circuit; and a third instruction address holding circuit that sets the instruction address immediately before execution held in the first and second instruction address holding circuits; A comparison circuit compares the address of the instruction with the value obtained by adding 1 to the address of the instruction immediately before execution, and when the comparison result by this comparison circuit does not match, the contents of the first and third instruction address holding circuits are The device is equipped with a stack for storing a plurality of words and a stack control circuit.

従って、本発明によるアドレストレース回路を用いると
、実行直前の命令のアドレスと、この実行直前の命令の
アドレスに1を加算した値とを比較するので、分岐の発
生を容易に検出することができる。また、異なるプロセ
ッサからの命令に対しても共通の簡単なハードウェアに
よりアドレストレース情報を集めることができる。
Therefore, when the address trace circuit according to the present invention is used, the address of the instruction immediately before execution is compared with the value obtained by adding 1 to the address of the instruction immediately before execution, so the occurrence of a branch can be easily detected. . Furthermore, address trace information can be collected using common and simple hardware even for instructions from different processors.

〔実施例〕〔Example〕

以下実施例につき本発明の詳細な説明する。 The present invention will be described in detail below with reference to Examples.

第1図は、本発明によるアドレストレース回路の一実施
例を示すブロック図、第2図は命令の実行が分岐すると
きの動作を示すタイミング図である。
FIG. 1 is a block diagram showing an embodiment of an address trace circuit according to the present invention, and FIG. 2 is a timing diagram showing operations when execution of an instruction branches.

第1図において、第1命令アドレス保持レジスタ11は
、信号線12を介して図示しない中央処理装置から命令
アドレスを受信する。さらに、信号線13を介して、こ
の受信した命令アドレスを+1加算器14、比較器15
、第3命令アドレス保持レジスタ16、スタックメモリ
17に送出する。+1加算器14は、信号線19を介し
て第2命令・アドレスレジスタ20に上記命令アドレス
を送出する。この第2命令アドレスレジスタ20からの
出力は信号線22を介して比較器15に入力される。比
較器15の出力は、信号線23を介してスタック制御回
路24に送られ、このスタック′5i制御回路24はそ
の出力を信0号線25を介してスタックメモリ26に格
納する。
In FIG. 1, a first instruction address holding register 11 receives an instruction address from a central processing unit (not shown) via a signal line 12. Further, via the signal line 13, the received instruction address is sent to the adder 14 and the comparator 15.
, the third instruction address holding register 16, and the stack memory 17. The +1 adder 14 sends the instruction address to the second instruction/address register 20 via the signal line 19. The output from the second instruction address register 20 is input to the comparator 15 via the signal line 22. The output of the comparator 15 is sent to the stack control circuit 24 via the signal line 23, and the stack '5i control circuit 24 stores the output in the stack memory 26 via the signal 0 line 25.

次に動作につき説明する。Next, the operation will be explained.

図示しない中央処理装置から命令アドレス28(第2図
a)が第1命令アドレス保持レジスタ11に送られる。
An instruction address 28 (FIG. 2a) is sent to the first instruction address holding register 11 from a central processing unit (not shown).

この第1命令アドレス保持レジスタ11は、実行中の命
令アドレス29(同図b)を保持する1ワードのレジス
タである。この実行中の命令アドレス29(同図b)は
、+1加算器14、比較器15、第3命令アドレス保持
レジスタ16に送出される。加算器14は、上記の第1
命令アドレス保持レジスタ11に保持された実行中の命
令アドレス、すなわち直前に実行した命令アドレス30
(第2図d)に1を加算する。この加算器14の直前に
実行した命令アドレス30に1を加えた信号31(第2
図C)は、第2命令アドレス保持レジスタ20に送出さ
れる。この第2命令アドレス保持レジスタ20は、上記
直前に実行した命令アドレスに1を加えた信号31の値
で、分岐がなかったとき実行される命令アドレスを予測
して保持する1ワードのレジスタである。一方、第3命
令アドレス保持レジスタ16は、第1命令アドレス保持
レジスタ11に保持された直前に実行した命令アドレス
30(第2図d)を保持するlワードのレジスタである
。ここで、第1命令アドレス保持レジスタ11の内容が
更新されると、第2命令アドレスレジスタ20は、この
更新前の第1命令アドレス保持レジスタ11の内容に1
を足した値を保持している。従って、第1および第2命
令アドレス保持レジスタ20の内容は、分岐しなかった
ときは等しく、分岐したときは異なる値になる。比較器
15は、上記の第1および第2命令アドレス保持レジス
タ11.20の内容を比較し、その結果をスタック制御
回路24に送出する。第2図eは、比較器15が不一致
を検出した検出信号32を示したものである。第2図の
各信号28〜32の信号A−A+ 3.B、B+ 1は
命令アドレスを示す。以上により、命令アドレスA+2
とBが分岐前後の命令アドレスとしてスタックメモリ1
7に格納される。
The first instruction address holding register 11 is a one-word register that holds the instruction address 29 (b in the figure) that is being executed. This instruction address 29 (b in the figure) being executed is sent to the +1 adder 14, the comparator 15, and the third instruction address holding register 16. The adder 14 has the first
The address of the currently executed instruction held in the instruction address holding register 11, that is, the instruction address 30 that was executed immediately before.
Add 1 to (Fig. 2 d). A signal 31 (second
C) is sent to the second instruction address holding register 20. This second instruction address holding register 20 is a 1-word register that predicts and holds the instruction address to be executed when there is no branch, based on the value of the signal 31 which is the value of the signal 31 that is obtained by adding 1 to the instruction address executed immediately above. . On the other hand, the third instruction address holding register 16 is a 1-word register that holds the most recently executed instruction address 30 (FIG. 2 d) held in the first instruction address holding register 11. Here, when the contents of the first instruction address holding register 11 are updated, the second instruction address register 20 is updated to the contents of the first instruction address holding register 11 before this update.
The value obtained by adding . Therefore, the contents of the first and second instruction address holding registers 20 are the same when no branch is taken, and have different values when a branch is taken. The comparator 15 compares the contents of the first and second instruction address holding registers 11.20 and sends the result to the stack control circuit 24. FIG. 2e shows the detection signal 32 in which the comparator 15 detects a mismatch. Signals A-A+ of each signal 28 to 32 in FIG. 2 3. B, B+1 indicates an instruction address. As a result of the above, the instruction address A+2
and B are stack memory 1 as instruction addresses before and after the branch.
7 is stored.

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

以上説明したように本発明は、実行直前のアドレスとこ
れに1を加算した値とを比較することにより分岐の発生
を検出するので、分岐命令を解読しなくて済む効果があ
り、また命令セットが異なるプロセッサに対して共通の
ハードウェアで効果的なアドレストレース情報を収集で
きる効果がある。
As explained above, the present invention detects the occurrence of a branch by comparing the address immediately before execution with the value obtained by adding 1 to this address, so there is an effect that there is no need to decode the branch instruction, and the instruction set This has the advantage that address trace information can be collected effectively using common hardware for different processors.

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

第1図は本発明によるアドレストレース回路の一実施例
を示すブロック図、第2図は命令アドレスが分岐すると
きの装置の動作を示すタイミング図である。 11・・・・・・第1命令アドレス保持レジスタ、14
・・・・・・+1加算器、 15・・・・・・比較器、 16・・・・・・第3命令アドレス保持レジスタ、17
・・・・・・スタックメモリ、 20・・・・・・第2命令アドレス保持レジスタ、24
・・・・・・スタック制御回路。
FIG. 1 is a block diagram showing an embodiment of an address trace circuit according to the present invention, and FIG. 2 is a timing diagram showing the operation of the device when an instruction address branches. 11...First instruction address holding register, 14
......+1 adder, 15...Comparator, 16...Third instruction address holding register, 17
...Stack memory, 20...Second instruction address holding register, 24
...Stack control circuit.

Claims (1)

【特許請求の範囲】  中央処理装置に設けられる、実行した一連の命令のア
ドレスを格納しておくアドレストレース回路において、 実行直前の命令のアドレスを保持する第1命令アドレス
保持回路と、 この第1命令アドレス保持回路の保持内容に1を加算す
る加算回路と、 この加算回路による加算結果である前記実行直前の命令
のアドレスに1を加算した値をセットする第2命令アド
レス保持回路と、 前記第1命令アドレス保持回路に保持された実行直前の
命令アドレスをセットする第3の命令アドレス保持回路
と、 前記第1および第2命令アドレス保持回路に保持された
前記実行直前の命令のアドレスと前記実行直前の命令の
アドレスに1を加算した値とを比較する比較回路と、 この比較回路による比較結果が不一致のとき、前記第1
および第3命令アドレス保持回路の内容を格納する、複
数のワード分のスタックおよびスタック制御回路 とを具備することを特徴とするアドレストレース回路。
[Claims] An address trace circuit provided in a central processing unit and storing addresses of a series of executed instructions, comprising: a first instruction address holding circuit that holds an address of an instruction immediately before execution; an addition circuit that adds 1 to the content held in the instruction address holding circuit; a second instruction address holding circuit that sets a value obtained by adding 1 to the address of the instruction immediately before execution, which is the addition result by the addition circuit; a third instruction address holding circuit that sets an instruction address immediately before execution held in the first instruction address holding circuit; and a third instruction address holding circuit that sets the address of the instruction immediately before execution held in the first and second instruction address holding circuits, and A comparator circuit that compares the value obtained by adding 1 to the address of the immediately previous instruction, and when the comparison result by this comparator circuit does not match, the first
and a stack for a plurality of words and a stack control circuit for storing the contents of a third instruction address holding circuit.
JP63009505A 1988-01-21 1988-01-21 Address trace circuit Pending JPH01185738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63009505A JPH01185738A (en) 1988-01-21 1988-01-21 Address trace circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63009505A JPH01185738A (en) 1988-01-21 1988-01-21 Address trace circuit

Publications (1)

Publication Number Publication Date
JPH01185738A true JPH01185738A (en) 1989-07-25

Family

ID=11722103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63009505A Pending JPH01185738A (en) 1988-01-21 1988-01-21 Address trace circuit

Country Status (1)

Country Link
JP (1) JPH01185738A (en)

Similar Documents

Publication Publication Date Title
US5812868A (en) Method and apparatus for selecting a register file in a data processing system
JPS5886648A (en) Tracing device
JP3076044B2 (en) Error information storage method for pipeline
JPH01185738A (en) Address trace circuit
JPH01286029A (en) Microprogram patching system
JPS6270947A (en) Control system for debug interruption
JPS6282439A (en) False trouble generating system
JPH02127731A (en) Bypass check system for arithmetic register
JPH11167500A (en) Event circuit and debug system for emulator device
JPS59188900A (en) Data processor
JPS61187044A (en) Information processor
JPH01226031A (en) Control system for pipe line of information processor
JPH03208132A (en) Single chip microcomputer
JPH04140851A (en) Diagnostic system for information processor
JPS5977553A (en) Data gathering system
JPS6217837A (en) Data processing system
JPH0281142A (en) Information processor
JPS6349946A (en) Arithmetic processing unit
JPH04245333A (en) Information processor
JPH0362233A (en) Address match timing tracing mechanism
JPH05204638A (en) Pipeline processor
JPH04192037A (en) Semiconductor integrated circuit
JPH0353370A (en) Parallel processor for information processor
JPH08263324A (en) Debug facilitation device
JPH04138532A (en) Runaway detecting circuit