JPH05241898A - Hard brake system - Google Patents

Hard brake system

Info

Publication number
JPH05241898A
JPH05241898A JP4075195A JP7519592A JPH05241898A JP H05241898 A JPH05241898 A JP H05241898A JP 4075195 A JP4075195 A JP 4075195A JP 7519592 A JP7519592 A JP 7519592A JP H05241898 A JPH05241898 A JP H05241898A
Authority
JP
Japan
Prior art keywords
address
break
processing unit
central processing
monitoring circuit
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
JP4075195A
Other languages
Japanese (ja)
Inventor
Akio Ito
昭男 伊藤
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
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP4075195A priority Critical patent/JPH05241898A/en
Publication of JPH05241898A publication Critical patent/JPH05241898A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To make it possible to set a breakpoint by dividing a case where condition is formed and a case where the condition is not formed in a condition branch instruction by providing two pairs of address coincidence detection circuits and time monitoring circuits and to apply a break only when the instruction just after the branch instruction is executed. CONSTITUTION:Address registers 7a, 7b are provided within address coincidence detection circuits 1a, 1b and the values to be set to the address registers 7a, 7b is the number for which a break is to be generated. When a coincidence is detected in the address coincidence detection circuits 1a, 1b, the information showing the generation of the coincidence is notified to a time monitoring circuit 2. The time monitoring circuit 2 is connected with two paris of the address coincidence detection circuits 1a, 1b and monitors the both notification time. The time monitoring circuit 2 is capable of generating an interruption at a central processing unit 3 when a prescribed event occurs. What case the interruption is generated in is preliminarily set to the monitoring circuit 2 from the central processing unit 3.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、プログラムをプログラ
ム格納メモリから順次読みだし処理を行なう中央処理装
置を有する情報処理装置において、ソフトウェア開発を
容易にするために用意されるハードウェア機構であるハ
ードブレーク方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a hardware mechanism, which is a hardware mechanism prepared for facilitating software development, in an information processing apparatus having a central processing unit for sequentially reading a program from a program storage memory. Regarding break method.

【0002】[0002]

【従来の技術】従来、この種の情報処理装置におけるソ
フトウェアデバッグでは、デバッグしたい特定番地で中
央処理装置の動作を止め、その時のレジスタ内容,メモ
リ内容等を確認する手法をとる。これをブレークと称す
るが、これにはソフトブレークとハードブレークが存在
する。
2. Description of the Related Art Conventionally, in software debugging in this type of information processing apparatus, the operation of the central processing unit is stopped at a specific address to be debugged, and the register contents and memory contents at that time are confirmed. This is called a break, and there are soft breaks and hard breaks.

【0003】ソフトブレークはブレークしたい番地の内
容を不正命令や決められた割り込み命令に置き換えその
番地を通った時に中央処理装置に割り込みを発生させる
ブレーク方式である。この方式は、プログラム格納メモ
リの内容を書き換える必要があり、ROM内のプログラ
ムには適用することができない。
The soft break is a break system in which the contents of an address to be broken are replaced with an illegal instruction or a predetermined interrupt instruction and an interrupt is generated in the central processing unit when the address is passed. This method requires rewriting the contents of the program storage memory and cannot be applied to the programs in the ROM.

【0004】一方、ハードブレーク方式は、図4に示す
ように中央処理装置3のアドレスバス5に接続されたア
ドレス一致検出回路1を持つ。このアドレス一致検出回
路1内のアドレスレジスタ7にはあらかじめブレークを
させたい番地の値を設定しておく。アドレスバス5とア
ドレスレジスタ7の値の比較をアドレス一致検出回路1
は常に行なっており、中央処理装置3がプログラム格納
メモリ4からその番地をプログラムを読み込んだことを
アドレス一致検出回路1で検出し、その瞬間アドレス一
致検出回路1は、中央処理装置3に対し割り込みを発生
しブレークする。
On the other hand, the hard break system has an address coincidence detection circuit 1 connected to the address bus 5 of the central processing unit 3 as shown in FIG. In the address register 7 in the address coincidence detection circuit 1, the value of the address at which the break is desired is set in advance. The address match detection circuit 1 compares the values of the address bus 5 and the address register 7.
The address coincidence detection circuit 1 detects that the central processing unit 3 has read the address from the program storage memory 4, and the instantaneous address coincidence detection circuit 1 interrupts the central processing unit 3. Occurs and breaks.

【0005】[0005]

【発明が解決しようとする課題】上述した従来のハード
ブレーク方式では、アドレス一致検出回路1を複数持つ
ことにより複数の場所に同時にブレークをかけることが
できるが、条件分岐命令においてその条件が成立した場
合にブレークさせる、あるいは条件が成立しない場合に
ブレークを発生させるということができない。
In the conventional hard break method described above, a plurality of address coincidence detection circuits 1 can be provided to break at a plurality of locations at the same time, but the condition is satisfied in the conditional branch instruction. It cannot be said that a break occurs in some cases, or a break occurs when the conditions are not met.

【0006】また、分岐命令直後の命令にブレークを設
定すると、中央処理装置3はプログラムの先読みを行な
うために実際にその命令を実行しないにも関わらず、ブ
レークを発生してしまい、実際にその番地を実行した時
にブレークをかけることができない。
Further, if a break is set to the instruction immediately after the branch instruction, the central processing unit 3 causes the break even though the instruction is not actually executed for prefetching the program, and the break actually occurs. Cannot break when the address is executed.

【0007】本発明の目的は、条件分岐命令で条件が成
立する場合と、成立しない場合に分けブレークポイント
を設定でき、かつ分岐命令直後の命令が実行された時に
のみブレークがかけられるハードブレーク方式を提供す
ることにある。
It is an object of the present invention to set a break point when a condition is satisfied in a conditional branch instruction and when the condition is not satisfied, and a break is set only when an instruction immediately after the branch instruction is executed. To provide.

【0008】[0008]

【課題を解決するための手段】前記目的を達成するた
め、本発明に係るハードブレーク方式は、プログラムを
順次読みだし処理を行なう中央処理装置を有する装置に
おいて、アドレスバスを監視し、その値の一致を検出す
る2組のアドレス一致検出回路と、2組のアドレス一致
検出回路間の時間を監視する時間監視回路とを有するも
のである。
In order to achieve the above object, the hard break method according to the present invention monitors the address bus in a device having a central processing unit for sequentially reading a program and monitors the value of the value. It has two sets of address match detection circuits for detecting a match and a time monitoring circuit for monitoring the time between the two sets of address match detection circuits.

【0009】また、前記時間監視回路は、一定時間内に
前記2組のアドレス一致検出回路両方でアドレス一致を
検出した場合に前記中央処理装置に割り込みを発生する
ものである。
Further, the time monitoring circuit generates an interrupt to the central processing unit when both of the two sets of address match detection circuits detect an address match within a fixed time.

【0010】また、前記時間監視回路は、一定時間内に
片方のアドレス一致検出回路のみでアドレス一致を検出
した場合に前記中央処理装置に割り込みを発生するもの
である。
The time monitoring circuit generates an interrupt to the central processing unit when an address match is detected by only one of the address match detection circuits within a fixed time.

【0011】[0011]

【作用】2組のアドレス一致検出回路と、2組のアドレ
ス一致検出回路間の時間を監視する時間監視回路とを有
し、2箇所でのアドレス一致と、その時間間隔を監視す
る。
The present invention has two sets of address coincidence detection circuits and a time monitoring circuit for monitoring the time between the two sets of address coincidence detection circuits, and monitors the address coincidence at two places and the time interval thereof.

【0012】[0012]

【実施例】次に本発明について図面を参照して説明す
る。図1は、本発明の一実施例を示すブロック図であ
る。
The present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention.

【0013】図1において、本実施例に係るハードブレ
ーク方式は、中央処理装置3と、プログラム格納メモリ
4と、2組のアドレス一致検出回路1a,1bと、時間
監視回路2と、アドレスバス5及びデータバス6から構
成される。
Referring to FIG. 1, the hard break system according to the present embodiment has a central processing unit 3, a program storage memory 4, two sets of address coincidence detection circuits 1a and 1b, a time monitoring circuit 2, and an address bus 5. And a data bus 6.

【0014】各アドレス一致検出回路1a,1b内に
は、アドレスレジスタ7a,7bをそれぞれ有してい
る。
Address register 7a, 7b is provided in each address match detection circuit 1a, 1b.

【0015】中央処理装置3は、アドレスバス5にアド
レスを出力し、プログラム格納メモリ4からそのアドレ
スのプログラムをデータバス6を通じ順次読みだし処理
を行なう。
The central processing unit 3 outputs the address to the address bus 5 and sequentially reads the program of the address from the program storage memory 4 through the data bus 6 to perform processing.

【0016】アドレス一致検出回路1a,1bは、アド
レスバス5に接続されており、あらかじめ中央処理装置
3からアドレスレジスタ7a,7bに設定されていた値
との比較を常に行なっている。
The address coincidence detection circuits 1a and 1b are connected to the address bus 5 and always compare with the values set in the address registers 7a and 7b by the central processing unit 3 in advance.

【0017】アドレスレジスタ7a,7bに設定されて
いる値は、ブレークを発生させたい番地である。アドレ
ス一致検出回路1a,1bで一致を検出したら一致が発
生したことを示す情報を時間監視回路2に通知する。以
降この通知をブレーク通知と称する。
The value set in the address registers 7a and 7b is the address where the break is desired to occur. When the address match detection circuits 1a and 1b detect a match, the time monitor circuit 2 is notified of information indicating that a match has occurred. Hereinafter, this notification will be referred to as a break notification.

【0018】時間監視回路2は、2組のアドレス一致検
出回路1a,1bと接続されており、両者の通知の時間
を監視する。時間監視回路2は、次の3つの場合の事象
が発生した時に割り込みを中央処理装置3に発生するこ
とができる。以下のどの場合に割り込みを発生させるか
はあらかじめ中央処理装置3から時間監視回路2に対し
設定しておく。
The time monitoring circuit 2 is connected to the two sets of address coincidence detection circuits 1a and 1b, and monitors the notification time of both. The time monitoring circuit 2 can generate an interrupt to the central processing unit 3 when the following three events occur. The central processing unit 3 sets in advance the time monitoring circuit 2 in which of the following cases the interrupt is generated.

【0019】2組のアドレス一致検出回路1a,1b
から通知されるブレーク通知の時間を監視しないでどち
らか一方でもブレーク通知がきた場合、中央処理装置3
に対し割り込みを発生する。
Two sets of address coincidence detection circuits 1a and 1b
If the break notification is received from either of them without monitoring the time of the break notification sent from the central processing unit 3
To generate an interrupt.

【0020】一方のアドレス一致検出回路1aからブ
レーク通知を受けてその後一定時間内に他方のアドレス
一致検出回路1bからブレーク通知を受けた場合、中央
処理装置3に対し割り込みを発生する。
When a break notification is received from one address match detection circuit 1a and then a break notification is received from the other address match detection circuit 1b within a fixed time, an interrupt is issued to the central processing unit 3.

【0021】一方のアドレス一致検出回路1aからブ
レーク通知を受けてその後一定時間内に他方のアドレス
一致検出回路1bからブレーク通知を受けなかった場
合、中央処理装置3に対し割り込みを発生する。
When a break notification is received from one address match detection circuit 1a and a break notification is not received from the other address match detection circuit 1b within a fixed time thereafter, an interrupt is issued to the central processing unit 3.

【0022】上記の場合は、従来の技術のところで説
明したハードブレーク方式であり、アドレスレジスタ7
a,7bにブレークさせたいアドレスの値をあらかじめ
中央処理装置3から設定しておき、その値とアドレスバ
ス5の値が一致した時、中央処理装置3に対し割り込み
を発生し、特定番地のブレークを実現することができ
る。
The above case is the hard break method described in the prior art, and the address register 7
The value of the address to be broken in a and 7b is set from the central processing unit 3 in advance, and when the value and the value of the address bus 5 match, an interrupt is generated to the central processing unit 3 and the break of the specific address is made. Can be realized.

【0023】上記の場合を図2を用いて説明する。図
2は中央処理装置のプログラムの一部を示しており、B
B番地にある条件分岐命令の前のAA番地に判断命令が
あり、その判断命令の結果により次の条件分岐命令でY
Y番地に分岐するか、分岐せず次のCC番地の命令を実
行する。
The above case will be described with reference to FIG. FIG. 2 shows a part of the program of the central processing unit.
There is a judgment instruction at the address AA before the conditional branch instruction at the address B, and if the result of the judgment instruction indicates that the next conditional branch instruction is Y
Branch to address Y or execute the instruction at the next address CC without branching.

【0024】YY番地への分岐が発生した場合にブレー
クを発生させたい場合は、アドレスレジスタ7aにB
B,アドレスレジスタ7bにYYの値を予め設定してお
く。アドレス一致検出回路1a,1bは、常にアドレス
バス5とアドレスレジスタ7a,7bとの値の一致を監
視している。
When it is desired to generate a break when a branch to the YY address occurs, B is set in the address register 7a.
B, YY value is set in advance in the address register 7b. The address match detection circuits 1a and 1b constantly monitor the match between the values of the address bus 5 and the address registers 7a and 7b.

【0025】時間監視回路2がアドレス一致検出回路1
aからブレーク通知を受け一定時間内にアドレス一致検
出回路1bからブレーク通知を受けた場合に、時間監視
回路2は中央処理装置3に対し割り込みを発生する。こ
こで一定時間とは中央処理装置3が分岐するのに必要と
する実行時間よりも大きく、なるべくその値に近い値で
ある。この値は、中央処理装置3から設定できるように
してもよいし、その値がハードウェア設計時決定できる
ならば、その固定値をハードウェアとして実現してもよ
い。尚、中央処理装置3は、時間監視回路2から割り込
みを受けたら直ちにブレーク処理に移る。
The time monitoring circuit 2 is the address match detection circuit 1
When the break notification is received from a and the break notification is received from the address coincidence detection circuit 1b within a fixed time, the time monitoring circuit 2 issues an interrupt to the central processing unit 3. Here, the fixed time is a value that is longer than the execution time required for the central processing unit 3 to branch and is as close as possible to that value. This value may be set by the central processing unit 3, or if the value can be determined at the time of hardware design, the fixed value may be realized as hardware. The central processing unit 3 immediately shifts to the break processing when it receives an interrupt from the time monitoring circuit 2.

【0026】上記の場合を図3を用いて説明する。図
3は図2と同様、中央処理装置のプログラムの一部であ
るが、SS番地は条件分岐命令ではなく単なる分岐命令
であり、ここを通る処理は必ずZZ番地に分岐する。
The above case will be described with reference to FIG. Similar to FIG. 2, FIG. 3 is a part of the program of the central processing unit, but the SS address is not a conditional branch instruction but a simple branch instruction, and the processing passing therethrough always branches to the ZZ address.

【0027】SS番地の次のTT番地を実行する場合
は、他の場所から分岐する場合である。TT番地を実行
した時にブレークさせたい時、の方式でアドレスレジ
スタ7aにTTの値を設定しておく方式ではSS番地を
実行した時も、中央処理装置3はプログラムの先読みを
行なうため、TT番地もプログラム格納メモリ4から読
んでしまうこととなり、実際にTT番地を実行しないに
も関わらず、ブレークが発生してしまう。
When the TT address next to the SS address is executed, it is a case of branching from another place. When it is desired to break when the TT address is executed, the method of setting the value of TT in the address register 7a by the method is that the central processing unit 3 pre-reads the program even when the SS address is executed. Also will be read from the program storage memory 4, and a break will occur even though the TT address is not actually executed.

【0028】これを避けるため、アドレスレジスタ7a
にはTT番地、アドレスレジスタ7bにはZZ番地を設
定しておき、時間監視回路2がアドレス一致検出回路1
aからブレーク通知を受け、一定時間内にアドレス一致
検出回路1bからブレーク通知を受けなかった場合に、
時間監視回路2は中央処理装置3に対し割り込みを発生
する。
To avoid this, the address register 7a
To the address register 7b and the address register 7b to ZZ.
When the break notification is received from a and the break notification is not received from the address match detection circuit 1b within a fixed time,
The time monitoring circuit 2 issues an interrupt to the central processing unit 3.

【0029】また図2で条件分岐命令で分岐しない場合
にブレークを発生したい場合にも、このの方式を使
う。アドレスレジスタ7aにBB、アドレスレジスタ7
bにYYの値を予め設定しておき、時間監視回路2がア
ドレス一致検出回路1aからブレーク通知を受け、一定
時間内にアドレス一致検出回路1bからブレーク通知を
受けなかった場合に、時間監視回路2が中央処理装置3
に対し割り込みを発生することにより、条件分岐しなか
った場合にブレークを発生させる。
This method is also used when it is desired to generate a break when the conditional branch instruction does not branch in FIG. BB in the address register 7a, address register 7
If the YY value is set in advance in b and the time monitoring circuit 2 receives a break notification from the address match detection circuit 1a and does not receive a break notification from the address match detection circuit 1b within a fixed time, the time monitoring circuit 2 is the central processing unit 3
A break is generated when a conditional branch is not generated by generating an interrupt for.

【0030】[0030]

【発明の効果】以上説明したように本発明のハードブレ
ーク方式は、2組のアドレス一致検出回路と時間監視回
路を設けることにより、条件分岐命令において分岐する
場合及び分岐しない場合、それぞれでブレークを発生さ
せることができる。
As described above, the hard break system of the present invention is provided with two sets of the address coincidence detection circuit and the time monitoring circuit, so that the break can be performed in the case of branching in the conditional branch instruction and in the case of not branching. Can be generated.

【0031】また、プログラムの先読みにより実際に実
行しないのにブレークが発生してしまう場合を回避する
ことができ、その番地の命令を実行した場合にのみブレ
ークを発生することができるという効果がある。
Further, it is possible to avoid a case where a break occurs even though the program is not actually executed due to the prefetch of the program, and it is possible to generate the break only when the instruction at the address is executed. ..

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

【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】条件分岐命令を含んだプログラムの一部を示す
図である。
FIG. 2 is a diagram showing a part of a program including a conditional branch instruction.

【図3】分岐命令を含んだプログラムの一部を示す図で
ある。
FIG. 3 is a diagram showing a part of a program including a branch instruction.

【図4】従来のハードブレーク方式を示すブロック図で
ある。
FIG. 4 is a block diagram showing a conventional hard break method.

【符号の説明】[Explanation of symbols]

1a,1b アドレス一致検出回路 2 時間監視回路 3 中央処理装置 4 プログラム格納メモリ 5 アドレスバス 6 データバス 7a,7b アドレスレジスタ 1a, 1b Address coincidence detection circuit 2 Time monitoring circuit 3 Central processing unit 4 Program storage memory 5 Address bus 6 Data bus 7a, 7b Address register

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 プログラムを順次読みだし処理を行なう
中央処理装置を有する装置において、 アドレスバスを監視し、その値の一致を検出する2組の
アドレス一致検出回路と、 2組のアドレス一致検出回路間の時間を監視する時間監
視回路とを有することを特徴とするハードブレーク方
式。
1. A device having a central processing unit for sequentially reading a program, wherein two sets of address match detection circuits for monitoring the address bus and detecting a match of the values, and two sets of address match detection circuits. A hard break system characterized by having a time monitoring circuit for monitoring the time between them.
【請求項2】 前記時間監視回路は、一定時間内に前記
2組のアドレス一致検出回路両方でアドレス一致を検出
した場合に前記中央処理装置に割り込みを発生すること
を特徴とする請求項1に記載のハードブレーク方式。
2. The time monitoring circuit generates an interrupt to the central processing unit when an address match is detected by both of the two sets of address match detection circuits within a fixed time. Hard break method described.
【請求項3】 前記時間監視回路は、一定時間内に片方
のアドレス一致検出回路のみでアドレス一致を検出した
場合に前記中央処理装置に割り込みを発生することを特
徴とする請求項1に記載のハードブレーク方式。
3. The time monitoring circuit generates an interrupt to the central processing unit when an address match is detected by only one of the address match detection circuits within a certain period of time. Hard break method.
JP4075195A 1992-02-26 1992-02-26 Hard brake system Pending JPH05241898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4075195A JPH05241898A (en) 1992-02-26 1992-02-26 Hard brake system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4075195A JPH05241898A (en) 1992-02-26 1992-02-26 Hard brake system

Publications (1)

Publication Number Publication Date
JPH05241898A true JPH05241898A (en) 1993-09-21

Family

ID=13569173

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4075195A Pending JPH05241898A (en) 1992-02-26 1992-02-26 Hard brake system

Country Status (1)

Country Link
JP (1) JPH05241898A (en)

Similar Documents

Publication Publication Date Title
US6598178B1 (en) Peripheral breakpoint signaler
EP0702297A1 (en) A data processor with breakpoint circuit and method therefor
JPH10333939A (en) Microprocessor
EP0530816A2 (en) Microprocessor with cache memory and trace analyzer therefor
JPH05241898A (en) Hard brake system
EP3507697B1 (en) An apparatus and method for controlling assertion of a trigger signal to processing circuitry
JPH08171504A (en) Emulation device
JPS6227831A (en) Checking circuit for computing element
JP2653412B2 (en) How to set breakpoints
JP3068578B2 (en) In-circuit emulator and saturation calculation processing method
JP2800577B2 (en) Debug device
JPH0432418B2 (en)
JPS6051744B2 (en) Simulated failure generation method
JPS59183443A (en) Debug device
JPS63155330A (en) Microprogram controller
JPS61294551A (en) Computer
JPH11167500A (en) Event circuit and debug system for emulator device
JPH02183346A (en) Pseudo fault generating system
JPH0314148A (en) Program breakdown detecting device
JPH0736735A (en) Debugging device
JPH05204680A (en) Malfunction preventing system for information processor
JPH04262474A (en) One-chip microcomputer
JPH02113345A (en) Pseudo machine error generation system
JPS63150732A (en) Program running supervisory equipment
JPH01184551A (en) System for debugging program

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080623

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20090623

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20090623

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100623

Year of fee payment: 10