JP2658342B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JP2658342B2
JP2658342B2 JP1009311A JP931189A JP2658342B2 JP 2658342 B2 JP2658342 B2 JP 2658342B2 JP 1009311 A JP1009311 A JP 1009311A JP 931189 A JP931189 A JP 931189A JP 2658342 B2 JP2658342 B2 JP 2658342B2
Authority
JP
Japan
Prior art keywords
address
instruction
branch
debug
signal line
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 - Fee Related
Application number
JP1009311A
Other languages
Japanese (ja)
Other versions
JPH02188840A (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.)
NEC Corp
Original Assignee
Nippon Electric 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 Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP1009311A priority Critical patent/JP2658342B2/en
Publication of JPH02188840A publication Critical patent/JPH02188840A/en
Application granted granted Critical
Publication of JP2658342B2 publication Critical patent/JP2658342B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータ処理装置に関し、特にハードウェア障
害を発見するためのデバグを命令アドレスの一致により
行うデータ処理装置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus, and more particularly, to a data processing apparatus that performs debugging for finding a hardware failure by matching instruction addresses.

〔従来の技術〕[Conventional technology]

従来、命令アドレスの一致によるデバグは、デバグし
たいアドレスをレジスタに保持させ、そのレジスタに保
持したアドレスと一致させたいアドレスを比較すること
によって行なわれていた。
Conventionally, debugging by matching instruction addresses has been performed by holding the address to be debugged in a register and comparing the address held in the register with the address to be matched.

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

上述した従来のアドレス一致によるデバグ方法は、レ
ジスタで保持しているため複数のアドレスに対して一致
検出をしたい場合、それだけレジスタが必要となるとい
う欠点があり、また繰返し実行している途中で止めたい
場合に止めることができないという欠点がある。
The conventional debug method based on address matching described above has a drawback that if a match is to be detected for a plurality of addresses because the data is held in a register, a corresponding register is required. There is a disadvantage that it cannot be stopped when it is desired.

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

本発明のデータ処理装置は、分岐命令のアドレスと該
分岐命令の分岐先アドレスを対にして記憶する分岐ヒス
トリテーブルを有し、命令の先取りを行なうデータ処理
装置において、命令取出しアドレスにより前記分岐ヒス
トリテーブルを索引する索引手段と、前記分岐ヒストリ
テーブルの各エントリに対応し該エントリには分岐命令
のアドレスのかわりにデバグ対象命令アドレスが記憶さ
れていることを示す情報を記憶する第1の記憶手段と、
前記分岐ヒストリテーブルの各エントリに対応して、前
記デバグ対象命令アドレスに対してデバグ割込みを発生
するまでアクセスできる残回数を記憶する第2の記憶手
段と、前記索引手段により命令先取りアドレスと前記分
岐ヒストリテーブルに記憶する命令アドレスが一致して
いることが検出され且つ第1の記憶手段によりデバグ対
象アドレスであることが判明した場合に前記第2の記憶
手段による残回数がある規定値であればデバグ割込みを
発生し前記第2の記憶手段による残回数がある規定値以
外であれば前記第2の記憶手段の残回数を更新する手段
を有する。
The data processing apparatus of the present invention has a branch history table for storing the address of a branch instruction and the branch destination address of the branch instruction in a pair. In the data processing apparatus for prefetching an instruction, the branch history is stored in accordance with an instruction fetch address. Index means for indexing a table, and first storage means for storing information corresponding to each entry of the branch history table, the information indicating that the address of the debug target instruction is stored in the entry instead of the address of the branch instruction When,
Second storage means for storing the remaining number of times that the debug target instruction address can be accessed until a debug interrupt is generated, corresponding to each entry of the branch history table; If it is detected that the instruction addresses stored in the history table match, and if the first storage unit determines that the address is a debug target address, if the remaining number of times by the second storage unit is a specified value, Means for updating the remaining number of the second storage means if a debug interrupt is generated and the remaining number of times by the second storage means is other than a certain specified value.

〔作 用〕(Operation)

分岐ヒストリテーブルにデバグ対象命令アドレスを格
納するので、複数のアドレスに対して一致検出をしたい
場合、ハードウェアの増加が少なくて済む。また、繰返
し実行している途中でデバグ割込を発生させることがで
きる。
Since the debug target instruction address is stored in the branch history table, an increase in hardware can be reduced when a match is to be detected for a plurality of addresses. In addition, a debug interrupt can be generated during repeated execution.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明す
る。
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明のデータ処理装置の一実施例のブロッ
ク図である。
FIG. 1 is a block diagram of an embodiment of the data processing device of the present invention.

命令アドレスレジスタ1は命令先取りのアドレスを受
けるレジスタであり、信号線101を介してアドレス生成
回路(図示せず)より送出される命令先取りアドレスを
受け、信号線103を介し命令アドレスの下位ビットをア
ドレスとして分岐アドレスメモリ2、分岐先アドレスメ
モリ3、デバグ情報メモリ4およびデバグ回数メモリ5
に送出し、その上位ビット信号線102を介し分岐アドレ
ス比較回路6に送出する。分岐アドレスメモリ2は、分
岐命令のアドレスおよびデバグで一致させたいアドレス
を記憶するメモリであり、信号線103を介し命令アドレ
スレジスタ1より送出される命令アドレスの下位ビット
をアドレスとして、記憶している命令アドレスの上位ビ
ットを信号線104を介し分岐アドレス比較回路6に送出
する。分岐先アドレスメモリ3は、分岐アドレスメモリ
2に対応して分岐先アドレスを保持するメモリであり、
信号線103を介して命令アドレスレジスタ1より送出さ
れる命令アドレスの下位ビットをアドレスとして、予測
分岐先アドレスを信号線105を介し予測分岐先アドレス
レジスタ8に送出する。デバグ情報メモリ4は、分岐ア
ドレスメモリ2に対応してそのアドレスがデバグ対象で
あるかどうかを示すメモリであり、命令アドレスレジス
タ1より信号線103を介して送出される命令アドレスの
下位ビットをアドレスとして、そのアドレスがデバグ対
象であるかどうかを信号線106を介しアンド回路11とナ
ット回路10に送出する。デバグ回数メモリ5は、デバグ
対象アドレスに対してデバグ割込みを発生するまでアク
セスできる残回数を示すメモリであり、命令アドレスレ
ジスタ1より信号線103を介して送出される命令アドレ
スの下位ビットをアドレスとして残回数を信号線107を
介してゼロチェック回路12および残回数カウンタ13に送
出し、信号線114を介し残回数カウンタ13の出力を受け
る。分岐アドレス比較回路6は、分岐アドレスメモリ2
に記憶されているアドレスと命令アドレスレジスタ1に
ある命令アドレスが一致しているかどうかを調べる比較
器であり、命令アドレスレジスタ1より信号線102を介
して送出された命令アドレスの上位ビットと分岐アドレ
スメモリ2より信号線104を介し送出された命令アドレ
スの上位ビットを比較し、その結果を信号線114を介し
アンド回路14および11に送出する。予測分岐先検出フラ
グ7は命令先取りで予測分岐先を検出したかどうかを示
すF/Fであり、アンド回路14より送出される比較結果を
受け信号線111を介しアドレス生成回路に送出する。予
測分岐先アドレスレジスタ8は予測分岐先アドレスを受
けるレジスタであり、予測分岐先検出フラグ7と同期し
て信号線105を介し分岐先アドレスメモリ3より送出さ
れる予測分岐先アドレスを受け、信号線112を介してア
ドレス生成回路に送出する。擬似フォルトフラグ9はデ
バグ対象アドレスの命令が先取られたことを示すF/Fで
あり、信号線109を介しアンド回路11より送出されるデ
バグ対象アドレスとの一致信号を受け、信号線113を介
して先行制御回路(図示せず)に送出する。ナット回路
10は、命令アドレスレジスタ1に保持されているアドレ
スがデバグ対象アドレスでないことを示すためのもので
あり、信号線106を介しデバグ情報メモリ4より送出さ
れるデバグ情報の否定を信号線115を介しアンド回路14
に送出する。アンド回路11はデバグ対象アドレスの先取
りが行なわれ、それにより擬示フォルトが発生すること
を示す回路であり、信号線114を介し分岐アドレス比較
回路6より送出されるアドレスの一致情報で信号線106
を介しデバグ情報メモリ4より送出されるデバグ情報
と、信号線115を介しゼロチェック回路12より送出され
る残回数0の情報より、擬示フォルト情報を生成し、信
号線109を介し擬似フォルトフラグ9に送出する。ゼロ
チェック回路12は擬示フォルト発生までの残回数が0で
あることをチェックする回路であり、デバグ回数メモリ
5より信号線107を介し送出される残回数を受け、それ
が“0"であるかどうかの情報を信号線115を介しアンド
回路11に送出する。残回数カウンタ13は、残回数を1つ
減らす回路であり、信号線107を介しデバグ回数メモリ
5より送出される残回数を受け、それを1つ減して信号
線114を介して再びデバク情報メモリ4に送出する。ア
ンド回路14は予測分岐先アドレスが検出されたことを示
す回路であり、信号線114を介して命令アドレスレジス
タ1のアドレスと分岐アドレスメモリ2のアドレスが一
致している情報が伝えられ、かつ信号線115よりそのア
ドレスがデバグ対象でない場合に信号線108を介して予
測分岐先アドレスが検出されたことを予測分岐先検出フ
ラグ7に送出する。
The instruction address register 1 receives an instruction prefetch address. The instruction address register 1 receives an instruction prefetch address sent from an address generation circuit (not shown) via a signal line 101, and outputs the lower bits of the instruction address via a signal line 103. As addresses, branch address memory 2, branch destination address memory 3, debug information memory 4, and debug number memory 5
And to the branch address comparison circuit 6 via the upper bit signal line 102. The branch address memory 2 is a memory for storing the address of the branch instruction and the address to be matched by debugging, and stores the lower bits of the instruction address sent from the instruction address register 1 via the signal line 103 as an address. The upper bits of the instruction address are sent to the branch address comparison circuit 6 via the signal line 104. The branch destination address memory 3 is a memory that holds a branch destination address corresponding to the branch address memory 2.
Using the lower bits of the instruction address sent from the instruction address register 1 via the signal line 103 as an address, the predicted branch destination address is sent to the predicted branch destination address register 8 via the signal line 105. The debug information memory 4 is a memory that indicates whether or not the address is to be debugged, corresponding to the branch address memory 2, and stores the lower bits of the instruction address sent from the instruction address register 1 via the signal line 103 as an address. As a result, whether the address is to be debugged is transmitted to the AND circuit 11 and the nut circuit 10 via the signal line 106. The debug number memory 5 is a memory indicating the remaining number of times the debug target address can be accessed until a debug interrupt occurs, and the lower bit of the instruction address sent from the instruction address register 1 via the signal line 103 is used as the address. The remaining number is sent to the zero check circuit 12 and the remaining number counter 13 via the signal line 107, and the output of the remaining number counter 13 is received via the signal line 114. The branch address comparison circuit 6 stores the branch address memory 2
Is a comparator for checking whether or not the address stored in the instruction address matches the instruction address in the instruction address register 1. The upper bit of the instruction address sent from the instruction address register 1 via the signal line 102 and the branch address The upper bits of the instruction address sent from the memory 2 via the signal line 104 are compared, and the result is sent to the AND circuits 14 and 11 via the signal line 114. The predicted branch destination detection flag 7 is an F / F indicating whether a predicted branch destination has been detected by instruction prefetching, and sends the comparison result sent from the AND circuit 14 to the address generation circuit via the signal line 111. The predicted branch destination address register 8 receives the predicted branch destination address sent from the branch destination address memory 3 via the signal line 105 in synchronization with the predicted branch destination detection flag 7, and receives the predicted branch destination address. It is sent to the address generation circuit via 112. The pseudo fault flag 9 is an F / F indicating that the instruction of the debug target address has been prefetched, receives a match signal with the debug target address sent from the AND circuit 11 via the signal line 109, and receives the signal via the signal line 113. To a preceding control circuit (not shown). Nut circuit
Numeral 10 indicates that the address held in the instruction address register 1 is not a debug target address, and the negation of the debug information sent from the debug information memory 4 via the signal line 106 is performed via the signal line 115. AND circuit 14
To send to. The AND circuit 11 is a circuit for indicating that a debug target address is prefetched, thereby causing a false fault. The AND circuit 11 uses the signal coincidence information sent from the branch address comparison circuit 6 via the signal line 114 to generate a signal line 106.
From the debug information transmitted from the debug information memory 4 via the signal line 115 and the information on the remaining number of times 0 transmitted from the zero check circuit 12 via the signal line 115, and generates a pseudo fault flag via the signal line 109. 9 The zero check circuit 12 is a circuit for checking that the remaining number of times until the occurrence of the false fault is 0, receives the remaining number of times transmitted via the signal line 107 from the debug number memory 5, and it is "0". Information on whether or not is sent to the AND circuit 11 via the signal line 115. The remaining number counter 13 is a circuit for reducing the remaining number by one. The remaining number counter 13 receives the remaining number sent from the debug number memory 5 via the signal line 107, reduces the received number by one, and returns the debug information again via the signal line 114. Send it to memory 4. The AND circuit 14 is a circuit for indicating that a predicted branch destination address has been detected. Information indicating that the address of the instruction address register 1 matches the address of the branch address memory 2 is transmitted via a signal line 114. If the address is not a debug target from the line 115, the fact that the predicted branch destination address has been detected is sent to the predicted branch destination detection flag 7 via the signal line 108.

次に、本実施例の動作について簡単に説明する。 Next, the operation of this embodiment will be briefly described.

まず、通常の分岐予測時には、デバグ情報メモリ4が
“0"となっているので命令アドレスレジスタ1と分岐ア
ドレスメモリ2が一致すると信号線114が“1"となり、
信号線106が“0"なので信号線115が“1"となり、予測分
岐先検出フラグ7が“1"、擬似フォルトフラグ9が“0"
となり、予測分岐先アドレスが検出されたことがわか
る。
First, during normal branch prediction, since the debug information memory 4 is "0", when the instruction address register 1 and the branch address memory 2 match, the signal line 114 becomes "1".
Since the signal line 106 is "0", the signal line 115 becomes "1", the predicted branch destination detection flag 7 is "1", and the pseudo fault flag 9 is "0".
It can be seen that the predicted branch destination address has been detected.

次に、デバグ対象アドレスである時にはデバグ情報メ
モリ4が“1"となっているので命令アドレスレジスタ1
と分岐アドレスメモリ2が一致すると、同様に信号線11
4が“1"となり信号線106が“1"であることより、信号線
115は“0"となり予測分岐先検出フラグ7は点燈しな
い。この時デバグ回数メモリ5で示される残回数が“0"
でない場合は、信号線115が“0"となり、擬似フォルト
フラグ9も点燈しないが、この時残回数カウンタ13によ
り残回数が−1され、その値がデバグ回数メモリ5に格
納される。そしてデバグ回数メモリ5が“0"になると、
ゼロチェック回路12の出力115が“1"となり擬似フォル
トフラグ9が点燈する。
Next, since the debug information memory 4 is "1" when the address is the debug target address, the instruction address register 1
And the branch address memory 2 match, the signal line 11
4 is “1” and the signal line 106 is “1”,
115 becomes "0" and the predicted branch destination detection flag 7 is not turned on. At this time, the remaining number of times indicated by the debug number memory 5 is “0”.
If not, the signal line 115 becomes "0" and the pseudo fault flag 9 is not turned on. At this time, the remaining count is decremented by -1 by the remaining count counter 13 and the value is stored in the debug count memory 5. When the debug count memory 5 becomes “0”,
The output 115 of the zero check circuit 12 becomes "1", and the pseudo fault flag 9 is turned on.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明は、分岐ヒストリテーブル
の構成を利用することにより、少ないハードウェア量の
増加で複数のデバグ用アドレスを設定することができ、
また繰返し実行する場合の途中でデバグ割込を発生させ
ることができるという効果がある。
As described above, according to the present invention, by using the configuration of the branch history table, a plurality of debug addresses can be set with a small increase in the amount of hardware,
Also, there is an effect that a debug interrupt can be generated in the middle of repeated execution.

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

第1図は本発明のデータ処理装置の一実施例のブロック
図である。 1……命令アドレスレジスタ、 2……分岐アドレスメモリ、 3……分岐先アドレスメモリ、 4……デバグ情報メモリ、 5……デバグ回数メモリ、 6……分岐アドレス比較回路、 7……予測分岐先検出フラグ、 8……予測分岐先アドレスレジスタ、 9……擬似フォルトフラグ、 10……ナット回路、 11,14……アンド回路、 12……ゼロチェック回路、 13……残回数カウンタ。
FIG. 1 is a block diagram of an embodiment of the data processing device of the present invention. 1 ... instruction address register, 2 ... branch address memory, 3 ... branch destination address memory, 4 ... debug information memory, 5 ... debug number memory, 6 ... branch address comparison circuit, 7 ... predicted branch destination Detection flag, 8: Predictive branch destination address register, 9: Pseudo fault flag, 10: Nut circuit, 11, 14: AND circuit, 12: Zero check circuit, 13: Remaining counter.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】分岐命令のアドレスと該分岐命令の分岐先
アドレスを対にして記憶する分岐ヒストリテーブルを有
し、命令の先取りを行なうデータ処理装置において、 命令取出しアドレスにより前記分岐ヒストリテーブルを
索引する索引手段と、 前記分岐ヒストリテーブルの各エントリに対応し該エン
トリには分岐命令のアドレスのかわりにデバグ対象命令
アドレスが記憶されていることを示す情報を記憶する第
1の記憶手段と、 前記分岐ヒストリテーブルの各エントリに対応して、前
記デバグ対象命令アドレスに対してデバグ割込みを発生
するまでアクセスできる残回数を記憶する第2の記憶手
段と、 前記索引手段により命令先取りアドレスと前記分岐ヒス
トリテーブルに記憶する命令アドレスが一致しているこ
とが検出され、かつ、第1の記憶手段によりデバグ対象
アドレスであることが判明した場合、前記第2の記憶手
段による残回数がある規定値であればデバグ割込みを発
生し、前記第2の記憶手段による残回数がある規定値以
外であれば前記第2の記憶手段の残回数を更新する手段
を有することを特徴とするデータ処理装置。
1. A data processing apparatus for prefetching an instruction, comprising: a branch history table for storing an address of a branch instruction and a branch destination address of the branch instruction in a pair, wherein the branch history table is indexed by an instruction fetch address. Index storage means for storing information indicating that the instruction address corresponding to each entry of the branch history table is stored in place of the address of the branch instruction instead of the address of the branch instruction; Second storage means for storing the remaining number of times that the debug target instruction address can be accessed until a debug interrupt is generated, corresponding to each entry of the branch history table; an instruction prefetch address and the branch history by the index means; It is detected that the instruction addresses stored in the table match, and the first If it is determined by the storage means that the address is a debug target address, a debug interrupt is generated if the remaining number of times by the second storage means is a specified value, and the remaining number of times by the second storage means is a specified value. A data processing apparatus comprising means for updating the remaining number of times in the second storage means if the status is other than the above.
JP1009311A 1989-01-17 1989-01-17 Data processing device Expired - Fee Related JP2658342B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1009311A JP2658342B2 (en) 1989-01-17 1989-01-17 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1009311A JP2658342B2 (en) 1989-01-17 1989-01-17 Data processing device

Publications (2)

Publication Number Publication Date
JPH02188840A JPH02188840A (en) 1990-07-24
JP2658342B2 true JP2658342B2 (en) 1997-09-30

Family

ID=11716931

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1009311A Expired - Fee Related JP2658342B2 (en) 1989-01-17 1989-01-17 Data processing device

Country Status (1)

Country Link
JP (1) JP2658342B2 (en)

Also Published As

Publication number Publication date
JPH02188840A (en) 1990-07-24

Similar Documents

Publication Publication Date Title
EP0706128B1 (en) Fast comparison method and apparatus for errors corrected cache tags
US4483003A (en) Fast parity checking in cache tag memory
US5961633A (en) Execution of data processing instructions
US5987585A (en) One-chip microprocessor with error detection on the chip
KR870001307B1 (en) System for treatment of single bit error in buffer storage unit
KR930016880A (en) Electronic device and its fixing information
JP3397230B2 (en) Debug system
JP2570859B2 (en) Data processing device
JP2658342B2 (en) Data processing device
US7484069B2 (en) Watchpointing unaligned data accesses
JPS60207935A (en) Detecting system of illegal instruction
JPH0277853A (en) Data processor
JP3168489B2 (en) TLB control method and device
KR960003052B1 (en) Microprocessor having cashe memory unit
JP2000305840A (en) Cache memory and its fault detection method
JP3047992B2 (en) Main memory key control method
JPS6282439A (en) False trouble generating system
JP2793409B2 (en) Branch history table failure handling method
JPS6115235A (en) Central processor
JPH08286977A (en) System for processing fault of in-store cache
JPS59207080A (en) Control device of cache memory
JPH01296341A (en) Data processor
JPH10333936A (en) Abnormal branching detection method for processor
JPH06110783A (en) Cache memory device
JPS60225941A (en) Microprogram control device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees