JPH02234238A - Execution break control circuit - Google Patents
Execution break control circuitInfo
- Publication number
- JPH02234238A JPH02234238A JP1055831A JP5583189A JPH02234238A JP H02234238 A JPH02234238 A JP H02234238A JP 1055831 A JP1055831 A JP 1055831A JP 5583189 A JP5583189 A JP 5583189A JP H02234238 A JPH02234238 A JP H02234238A
- Authority
- JP
- Japan
- Prior art keywords
- break
- signal
- cpu
- comparator
- 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
Links
- 238000001514 detection method Methods 0.000 claims description 22
- 230000005764 inhibitory process Effects 0.000 abstract 1
- 238000003780 insertion Methods 0.000 description 9
- 230000037431 insertion Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 238000000034 method Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Description
【発明の詳細な説明】
(a)発明の技術分野
この発明は、被試験器上のマイクロプロセッサ(cpu
)の動きをエミュレートして、被試験器上のプログラム
《ターゲットプログラム》をデバーノグするインサーキ
ットエミュレータにおいて、特にターゲットプログラム
を実行開始直後の1命令だけを実行ブレーク禁止とする
ための制御回路に関するものである.
(b)従来技術と問題点
次に、第2図を参照して従来技術の構成を説明する.
インサーキットエミュレータの主要な機能の一つに実行
ブレーク機能がある.これは、第2図のように検出部1
がターゲットCPU3の命令フエッチアドレスをモニタ
し、これがあらかじめ設定されたブレークポイントアド
レスと一致した場合に、データパスバッファ4をデイセ
ーブルとしてターゲットCPU3のデータバス13を実
機5と切離すとともに、ブレーク命令挿入部2のバツフ
ァ2BをイネープルすることによってターゲットCPU
3に特定のブレーク命令2Aを読み込ませ、ブレークポ
イントの命令を実行しようとしたときにプレークさせる
機能である.
検出部1はブレークポイントを検出する.ブレーク命令
2Aとしては、ターゲットCPU3の種類によってIN
T命令、TRAP命令または未定義命令などが利用され
る.
ここで注意することは、実行ブレークによる夕一ゲット
プログラム停止時は、ブレークポイント上の命令を実行
する前にブレークすることである.すなわち、ターゲッ
トプログラム走行中にブレークポイントで停止した後、
再度ターゲットプログラムの続きを実行させようとして
も、ブレークポイントの設定されたアドレスからの再実
行となるため、ターゲットプログラムを何も実行しない
うちに再度ブレークしてしまうことになる.そのような
ことを防ぐため、プログラム実行直後の1命令に限り実
行ブレークを禁止する必要がある.
そのための従来技術の1つの例としてはターゲットプロ
グラム実行にあたり先頭の1命令だけステップ実行させ
、その後RUN実行させる方法がある.この方法はソフ
トウェアだけで簡単に実現できるメリットがあるが、次
のような問題がある.(ア)最初の命令実行から次の命
令実行までの時間が長く、リアルタイムに動作しない.
(イ)最初の命令実行分がリアルタイムトレースメモリ
に記憶されない.
他の従来技術として、第3図の回路構成のものがある.
ターゲットCPLl3のアドレス・ステータスバス11
をコンパレータIBでモニタし、ブレーク検出信号12
Aを出す.同時に、先頭命令検出部IA″c′RUN直
後の先頭命令フェックサイクルであることを示す先頭フ
ェッチ信号15を出す.コンパレータIBは、ブレーク
検出用である.信号12A・・l5をゲート回路ICに
入れることにより、先頭フェッチサイクルではマスクさ
れアクティブにならないブレーク挿入信号12Bが出る
.
信号12Bは、第2図のイネーブル/ディぷブル制御信
号12として、ブレーク命令挿入部2、データパスバッ
ファ4を制御する.
先頭命令検出部IAの例として、第4図の楕成が考えら
れる.すなわち、ターゲットプログラム開始指示用のR
UN信号14をフリップフ口ップ1Aでラッチする.
このときラッチクロックとして、CPU3がバスサイク
ルを実行中であることを示すデータストローブ信号DS
の後のエッジを使うことにより、RUN直後の1バスサ
イクルまでは先頭フェッチ信号がHとなり、2番目以降
のバスサイクルではLとすることができる.
しかし、このような構成とした場合、ブレーク検出コン
バレータIBの後に更にゲートが1段通ることになるな
め、ブレーク判定時間が10ns程度余分にかかること
になり第5図のタイムチャートのようにCPUの動作ク
ロックが高速になると処理が間に合わなくなるという問
題がある.第5図は第3図のタイムチャートである.第
5図イの時間T,はコンバレータIBの遅れ時間であり
、第5図ウの時間T2はゲート回路ICの遅れ時間であ
る.
第5図工の時間T3はブレーク命令挿入部2Aの遅れ時
間であり、第5図オの時間T4は第5図工の時間T3に
対し間に合わない時間である.(C)発明の目的
先頭フェッチ信号を、CPU3からのアドレス信号等と
同様にブレーク検出コンパレー夕の入力に接続すること
により、ゲート回路ICを省略しブレーク検出信号をそ
のままブレーク挿入信号として利用できるようにする.
これによりゲート回路ICでの遅延時間をなくすことが
できる.(d)発明の実施例
次に、第1図を参照してこの発明の実施例の楕成を説明
する.
先頭命令検出部IAは第3図のIAと同じものであり、
例えば第4図のような構成になっている.この検出部I
Aで生成された先頭フェッチ信号l5はコンバレータI
Bの入力の1本に接続される.
コンパレータIBの他の入力には、CPU3からのアド
レス・ステータスバス11が接続される.コンバレータ
IBはあらかじめ設定されたブレークポイント情報と入
力信号を比較し、一致した場合にブレーク検出信号12
Aを出す.
信号12Aは第2図のイネーブル/デイセーブル制御信
号12としてブレーク命令挿入部2のバッファ2Bとデ
ータパスバッファ4を制御する.第1図のコンパレータ
IBには、あらかじめブレークポイント情報を設定して
おくが、その際に先頭フェッチ信号15の接続された入
力端子は「L」で一致するように設定しておく.それに
より、RUN直後の最初の命令フェッチでは先頭フェッ
チ信号15がr H ,であるため、CPU3からのア
ドレス・ステータスバスがブレークポイント条件と一致
しても全体として不一致となり、ブレーク検出信号12
Aはアクティブにならない.
2回目のフェッチ以降では先頭フェッチ信号15はr
l, 」となるため、他のアドレス・ステータスバス1
lがブレークポイント条件と一致したときに全体として
一致となり、ブレーク検出信号12Aがアクティブとな
り、ブレーク動作が起こることになる.
このように第1図ではコンパレータIBの後に余分なゲ
ート回路をおくことなく、先頭命令の禁止制御ができる
ためブレーク検出を高速に行なうことができ、CPUの
動作クロツクの高速化に対しても追従することができる
.
(e)発明の効果
この発明によれば、ブレークポイント検出のための処理
時間がゲート回路分短くてすむため、処理時間に余裕が
でき、動作の安定が図れるとともに、CPUの動作クロ
ックが速くなってもICEが追従することができる.DETAILED DESCRIPTION OF THE INVENTION (a) Technical field of the invention This invention relates to a microprocessor (cpu) on a device under test.
) in an in-circuit emulator that emulates the program (target program) on the device under test, and in particular relates to a control circuit that prohibits an execution break of only one instruction immediately after the start of execution of the target program. It is. (b) Prior art and problems Next, the configuration of the prior art will be explained with reference to FIG. One of the main functions of in-circuit emulators is the execution break function. This is the detection part 1 as shown in Figure 2.
monitors the instruction fetch address of the target CPU 3, and if it matches a preset break point address, disables the data path buffer 4, disconnects the data bus 13 of the target CPU 3 from the actual machine 5, and executes the break instruction. By enabling the buffer 2B of the insertion section 2, the target CPU
This is a function that causes 3 to read a specific break instruction 2A and causes it to break when an attempt is made to execute the breakpoint instruction. Detection unit 1 detects breakpoints. The break instruction 2A may be IN depending on the type of target CPU 3.
T instructions, TRAP instructions, undefined instructions, etc. are used. Note here that when stopping the Yuichi get program by an execution break, break before executing the instruction at the breakpoint. In other words, after stopping at a breakpoint while running the target program,
Even if you try to run the target program again, it will be re-executed from the address where the breakpoint was set, so you will break again before the target program executes anything. To prevent this from happening, it is necessary to prohibit execution breaks only for one instruction immediately after program execution. One example of conventional techniques for this purpose is a method in which only the first instruction is step-executed when executing a target program, and then RUN is executed. This method has the advantage of being easily implemented using only software, but it has the following problems. (a) The time from the first command execution to the next command execution is long, and it does not operate in real time.
(b) The first executed instruction is not stored in the real-time trace memory. Another conventional technology is one with the circuit configuration shown in Figure 3. Target CPLl3 address/status bus 11
is monitored by comparator IB, and break detection signal 12 is detected.
Give an A. At the same time, the start fetch signal 15 indicating that it is the start instruction fetch cycle immediately after the start instruction detection unit IA"c'RUN is output. The comparator IB is for break detection. Signals 12A...l5 are sent to the gate circuit IC. By inserting the break insertion signal 12B, a break insertion signal 12B that is masked and does not become active in the first fetch cycle is output.The signal 12B controls the break instruction insertion unit 2 and the data path buffer 4 as the enable/dipble control signal 12 in FIG. As an example of the head instruction detection unit IA, the elliptical structure shown in Fig. 4 can be considered.
Latch the UN signal 14 with the flip-flop 1A. At this time, a data strobe signal DS, which indicates that the CPU 3 is executing a bus cycle, is used as a latch clock.
By using the edge after RUN, the first fetch signal can be high for up to one bus cycle immediately after RUN, and can be low for the second and subsequent bus cycles. However, in such a configuration, one more gate passes through the break detection converter IB, which increases the break judgment time by about 10 ns, which reduces the CPU time as shown in the time chart in Figure 5. There is a problem that when the operating clock becomes faster, processing cannot be done in time. Figure 5 is a time chart of Figure 3. Time T in FIG. 5A is the delay time of the converter IB, and time T2 in FIG. 5C is the delay time of the gate circuit IC. Time T3 in Figure 5 is a delay time of the break instruction insertion section 2A, and time T4 in Figure 5 O is a time that is not in time for time T3 in Figure 5. (C) Purpose of the Invention By connecting the head fetch signal to the input of the break detection comparator in the same way as the address signal from the CPU 3, it is possible to omit the gate circuit IC and use the break detection signal as it is as a break insertion signal. Make it.
This eliminates the delay time in the gate circuit IC. (d) Embodiment of the Invention Next, an embodiment of the invention will be explained with reference to FIG. The head instruction detection unit IA is the same as the IA in FIG.
For example, the configuration is as shown in Figure 4. This detection part I
The head fetch signal l5 generated at A is sent to the converter I
Connected to one of the inputs of B. An address/status bus 11 from the CPU 3 is connected to the other input of the comparator IB. Converter IB compares the input signal with breakpoint information set in advance, and if they match, break detection signal 12
Give an A. The signal 12A controls the buffer 2B of the break instruction insertion section 2 and the data path buffer 4 as the enable/disable control signal 12 in FIG. Breakpoint information is set in advance in the comparator IB of FIG. 1, and at that time, the input terminal to which the head fetch signal 15 is connected is set to match "L". As a result, in the first instruction fetch immediately after RUN, the head fetch signal 15 is r H , so even if the address/status bus from the CPU 3 matches the breakpoint condition, it does not match as a whole, and the break detection signal 12
A is not active. After the second fetch, the first fetch signal 15 is r.
l, ”, so the other address/status bus 1
When l matches the breakpoint condition, there is a match as a whole, the break detection signal 12A becomes active, and a break operation occurs. In this way, in Figure 1, the first instruction can be inhibited without placing an extra gate circuit after the comparator IB, so break detection can be performed at high speed, and it can also keep up with the speeding up of the CPU operating clock. can do. (e) Effects of the Invention According to the present invention, the processing time for detecting a breakpoint is shorter than that required for the gate circuit, which increases the processing time, stabilizes the operation, and speeds up the CPU operating clock. ICE can follow suit.
第1図はこの発明による実施例の構成図、第2図は従来
技術の構成説図、第3図は他の従来技術の構成説明図、
第4図は先頭命令検出部IAの構成図、第5図は第3図
のタイムチャートである.1・・・−・・検出部、IA
・・・・・・先頭命令検出部、1B・・−・−・コンパ
レータ、2・・・・・・ブレーク命令挿入部、3・−・
・・・ターゲットCPU、4・・・・・・データパスバ
ッファ、5−・・・・・実機、11・・・・・・アドレ
ス・ステータスバス、12・−・・−・イネーブル/デ
イセープル、12A・・・・・・ブレーク検出信、12
B・・−・・・ブレーク挿入信号、13・・・・・・デ
ータパス、14・・・・・・RUN信゜号、15・・・
・・・先頭フェッチ検出信号.第
図FIG. 1 is a configuration diagram of an embodiment according to the present invention, FIG. 2 is a configuration illustration of a prior art, and FIG. 3 is a configuration explanatory diagram of another prior art.
FIG. 4 is a block diagram of the head instruction detection unit IA, and FIG. 5 is a time chart of FIG. 3. 1...--Detection section, IA
......Top instruction detection section, 1B...--Comparator, 2...Break instruction insertion section, 3...-
...Target CPU, 4...Data path buffer, 5-...Actual machine, 11...Address/status bus, 12...Enable/day enable, 12A ...Break detection signal, 12
B...Break insertion signal, 13...Data path, 14...RUN signal, 15...
...Start fetch detection signal. Diagram
Claims (1)
行する際に、最初の命令フェッチであることを検出し、
先頭フェッチ信号(15)を出す先頭命令検出部(1A
)と、 先頭フェッチ信号(15)とCPUからのアドレス・ス
テータスバスを入れ、あらかじめ設定されたブレークポ
イント情報と比較し、ブレーク検出信号を出すコンパレ
ータ(1B)を備えることを特徴とする実行ブレーク制
御回路。[Claims] 1. When the CPU executes a target program according to an instruction from the ICE, detecting that it is the first instruction fetch;
A first instruction detection unit (1A) that outputs a first fetch signal (15)
), and a comparator (1B) that inputs a head fetch signal (15) and an address/status bus from the CPU, compares it with preset breakpoint information, and outputs a break detection signal. circuit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1055831A JPH02234238A (en) | 1989-03-08 | 1989-03-08 | Execution break control circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1055831A JPH02234238A (en) | 1989-03-08 | 1989-03-08 | Execution break control circuit |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02234238A true JPH02234238A (en) | 1990-09-17 |
Family
ID=13009921
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1055831A Pending JPH02234238A (en) | 1989-03-08 | 1989-03-08 | Execution break control circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02234238A (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59133655A (en) * | 1983-01-20 | 1984-08-01 | Toshiba Corp | Address stop control circuit |
-
1989
- 1989-03-08 JP JP1055831A patent/JPH02234238A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59133655A (en) * | 1983-01-20 | 1984-08-01 | Toshiba Corp | Address stop control circuit |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5383192A (en) | Minimizing the likelihood of slip between the instant a candidate for a break event is generated and the instant a microprocessor is instructed to perform a break, without missing breakpoints | |
| US5557762A (en) | Digital signal processor evaluation chip and debug method | |
| JPH06314213A (en) | Debugging device | |
| US4747045A (en) | Information processing apparatus having an instruction prefetch circuit | |
| US5758059A (en) | In-circuit emulator in which abrupt and deferred arming and disarming of several events on a microprocessor chip are controlled using a single-input pin | |
| JPS59202548A (en) | Debugging device | |
| JP2808757B2 (en) | Microprocessor for debugging | |
| JPS61112250A (en) | Data processing system | |
| JP2754899B2 (en) | Return address monitoring circuit of debug device | |
| JP2701799B2 (en) | Microcomputer | |
| JP2626119B2 (en) | Microcomputer development support equipment | |
| JPH0411895B2 (en) | ||
| JPH11167500A (en) | Event circuit and debug system for emulator device | |
| JPH0436418B2 (en) | ||
| JPH04255036A (en) | Microprocessor | |
| JPH0259828A (en) | Support device for development of microcomputer | |
| JPS5875256A (en) | Monitoring system for execution instruction processing state | |
| JPH0540660A (en) | Emulation chip | |
| JPS62264341A (en) | Microprogram debug device | |
| KR20050101839A (en) | In-circuit emulator | |
| JPH0750446B2 (en) | Data processing device | |
| JPS60209851A (en) | Program sequence stop system | |
| JPS62197834A (en) | Microprogram controller | |
| JPH03189834A (en) | In-circuit emulator | |
| JPS60164850A (en) | Stopping system of instruction executing operation in processor |