JPH0214332A - Executable break factor detecting device - Google Patents

Executable break factor detecting device

Info

Publication number
JPH0214332A
JPH0214332A JP63164254A JP16425488A JPH0214332A JP H0214332 A JPH0214332 A JP H0214332A JP 63164254 A JP63164254 A JP 63164254A JP 16425488 A JP16425488 A JP 16425488A JP H0214332 A JPH0214332 A JP H0214332A
Authority
JP
Japan
Prior art keywords
event
cpu
signal
break
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
JP63164254A
Other languages
Japanese (ja)
Inventor
Keiji Nishijima
西嶋 啓志
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.)
Anritsu Corp
Original Assignee
Anritsu 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 Anritsu Corp filed Critical Anritsu Corp
Priority to JP63164254A priority Critical patent/JPH0214332A/en
Publication of JPH0214332A publication Critical patent/JPH0214332A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To attain automatic debug by identifying a non-executable break factor and an executable break factor when a CPU breaks and specifying the set break factor when the break is based on the executable break factor. CONSTITUTION:An event detecting circuit 3 detects an execution type event and a non-executable even on the basis of information, which appear on the bus of the CPU, and executes a break request on the basis of this event. Each time the CPU is newly activated, flip-flops 9 and 10 hold the event signal of the first executable event. A branch detecting circuit 12 monitors cue status, which is outputted by the CPU, and when branch information are raised, a branch signal is outputted. The brake factor of the CPU is specified from a held signal pattern and the program of macro-function in a correspondent emulator is caused to be run. Thus, the automatic debug can be executed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、実行型ブレーク要因検出装置、特に予め設定
しておいた、複数個のイベントでCPUにブレークを掛
ける構成のエミュレータにおいて、どの実行型イベント
でCPUがブレークしたのかを特定可能ならしめる実行
型ブレーク要因検出装置に関するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention provides an execution type break cause detection device, particularly an emulator configured to break the CPU at a plurality of preset events. The present invention relates to an execution-type break factor detection device that allows it to be determined whether a CPU breaks due to a type event.

〔従来の技術〕[Conventional technology]

ソフトウェアプログラムのデパックを行うエミュレータ
においては、予め設定しておいた複数個のイベントでC
PUにブレークを掛け、そのトレース結果、CPUの内
部レジスタの状態或いはメモリの内容を参照し、これら
の状態やデータを基にそのデパックが行われる。
In an emulator that depacks a software program, C
A break is applied to the PU, the trace result, the state of internal registers of the CPU, or the contents of memory are referred to, and depacking is performed based on these states and data.

16ビツト以上のCPUでは通常、バスの空き時間を利
用して命令の先取りを行うブリフェッチがなされるため
、エミュレータではそのブレークの方法として、非実行
型ブレークと実行型ブレークとが用いられる。非実行型
ブレーク要求は、そのアドレスをアクセスした後、必ず
ブレークする。
Since a CPU of 16 bits or more usually uses a bus free time to pre-fetch an instruction, an emulator uses a non-execution type break and an execution type break as break methods. A non-executable break request always breaks after accessing the address.

そのためどのイベントでブレークが生じたかを容易に検
出するこ七ができる。
Therefore, it is possible to easily detect which event caused a break.

これに対して実行型ブレーク要求は、指定したアドレス
の命令をブリフェッチしてその命令を実行した後ブレー
クする。但しブリフェッチした後CPUが分岐命令等の
プログラムを行うと、ブリフェッチした命令の中に実行
型ブレークが含まれていても、分岐命令が実行されるこ
とにより、ブリフェッチされた命令が捨てられブレーク
しない場合がある。
On the other hand, an execution type break request prefetches the instruction at the specified address, executes that instruction, and then breaks. However, if the CPU executes a program such as a branch instruction after a brifetch, even if the brifetched instructions include an execution type break, the branch instruction will be executed and the brifetched instruction will be discarded and the break will not occur. There is.

第6図は従来のブレーク要因検出装置の構成を示してお
り、1はCPUであってターゲットシステムCPUの代
行をするもの、2はバス、3はイベント検出回路、4.
5はJKプリップフロツブ回路、6はオア回路、7は割
込み制御回路、8はメイン制御回路を表わしている。
FIG. 6 shows the configuration of a conventional break factor detection device, in which 1 is a CPU that acts as the target system CPU, 2 is a bus, 3 is an event detection circuit, 4.
5 represents a JK flip-flop circuit, 6 represents an OR circuit, 7 represents an interrupt control circuit, and 8 represents a main control circuit.

CPUIが起動する際、メイン制御回路8からクリア信
号(CL R)がJKフリップフロップ回路4.5へ出
され、該JKフリップフロップ回路4.5の内容がそれ
ぞれクリアされる。CPUIはバス2の空き時間を利用
して、図示されていないメモリから命令をブリフェッチ
し、CPUI内のキューバッファに次々取り込む。イベ
ント検出回路3にはメイン制御回路8から送られてきた
CPUIにブレークを掛けるための条件、例えば特定の
アドレスや特定のデータ等その条件が設定されている。
When the CPUI is activated, a clear signal (CLR) is sent from the main control circuit 8 to the JK flip-flop circuit 4.5, and the contents of the JK flip-flop circuit 4.5 are cleared. The CPU U utilizes the free time on the bus 2 to pre-fetch instructions from a memory (not shown) and sequentially fetch them into a queue buffer within the CPU. Conditions for applying a break to the CPUI sent from the main control circuit 8 are set in the event detection circuit 3, such as a specific address or specific data.

従ってバス2上に該条件の情報が現われると、すなわち
CPUIがブリフェッチすることにより該条件の情報が
バス2に乗せられると、イベント検出回路3は該条件の
種類に応じて、実行型ブレークのイベント信号(EVI
又はEV2)或いは非実行型ブレークのブレーク要求信
号(百RK)を出力する。CPUIをブレークさせる条
件はアドレスやデータ等に任意の数だけ掛けることがで
きる。第6図図示の場合は、実行型ブレークが2個、非
実行型ブレークが1個の例が示されており、以下この個
数の例で説明する。
Therefore, when the information on the condition appears on the bus 2, that is, when the information on the condition is placed on the bus 2 by the CPU Briefetch, the event detection circuit 3 detects an execution-type break event according to the type of the condition. Signal (EVI
or EV2) or outputs a break request signal (100RK) for a non-executable break. Conditions for breaking the CPUI can be multiplied by any number of addresses, data, etc. In the case shown in FIG. 6, an example is shown in which there are two execution type breaks and one non-execution type break, and an example of this number will be described below.

イベント検出回路3が非実行型ブレークの要求信号を出
力すると、割込み制御回路7は、直ちにCPUIに対し
て割込み信号(ノンマスカブル・インタラブド信号NM
I)を出し、CPUIに割込みを掛け、ブレークさせる
。またイベント検出回路3が実行型ブレークのイベント
信号(EV。
When the event detection circuit 3 outputs a request signal for a non-executable break, the interrupt control circuit 7 immediately sends an interrupt signal (non-maskable interwoven signal NM) to the CPUI.
I), interrupts the CPUI, and causes a break. Furthermore, the event detection circuit 3 receives an execution type break event signal (EV).

又はEV、)を出力すると、該イベント信号はオア回路
6を介し割込み制御回路7にトラップ(TRAP)を設
定させる。これにより割込み制御回路7は、CPUIが
キューバッファの命令を順次実行する際出力するキュー
ステータス(QSm)を監視し、CPUIのブリフェッ
チによる命令の先取りとCPUIの該命令の実行との時
間的ずれが解消した時点で、CPUIに対し割込み信号
を出力し、CPUIに割込みを掛ける。CPUIはある
が、この様なCPUであっても、ト記説明の動作が基本
的に行われCPUをブレークさせるようになっている。
or EV, ), the event signal causes the interrupt control circuit 7 to set a trap (TRAP) via the OR circuit 6. As a result, the interrupt control circuit 7 monitors the queue status (QSm) output when the CPU sequentially executes instructions in the queue buffer, and checks the time lag between the CPU's prefetching of an instruction and the CPU's execution of the instruction. When the problem is resolved, an interrupt signal is output to the CPU to interrupt the CPU. There is a CPU, but even with such a CPU, the operation described in the above is basically performed to break the CPU.

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

ところで、上記説明の第6図に示された従来の回路構成
では、ブリフェッチによる命伶の取込みと、該命令の実
行との間に時間的ずれがあるため、次のようなことが生
じる。すなわち、例えば第4図に示された様に分岐命令
A3があるとき、命令A4をCPUIがブリフェッチし
た時点でイベント回路3からイベント信号EV、を出力
するものする。
By the way, in the conventional circuit configuration shown in FIG. 6 described above, there is a time lag between the fetching of the instruction by the brief fetch and the execution of the instruction, so that the following problem occurs. That is, for example, when there is a branch instruction A3 as shown in FIG. 4, the event signal EV is output from the event circuit 3 at the time when the CPU pre-fetches the instruction A4.

一方、CPUIの命令の実行は該CPUI内のキューバ
ッファに取り込まれた命令順に従って該キューバッファ
から取り出され実行される。すなわち第4図に示された
命令AI、A2の順にその命令が実行される。そして命
令A3が分岐命令であるとき、ブリフェッチによりCP
UIのキューバッファに取り込まれたA4以下の命令は
捨てられる。そしてB系の命令がブリフェッチされ、命
令B1以下がCPUIによって実行されるが、CPUI
が、命令Btをブリフェッチした時点でイベント回路3
からイベント信号EV、が出力するものとすると、該イ
ベント信号EV、を受けたJKフリップフロップ回路5
は、その時点で論理rHJのQ!倍信号出力する。CP
UIが時間的ずれをもって該命令B2を実行したとき、
該cpU1は上記説明の如くブレークする。このCPU
1がブレークしたとき、JKフリップフロップ回路4.
5にはそのQl信号、QZ倍信号出力されているため、
メイン制御回路8はCPUIがA系のA4の命令でブレ
ークしたのか、B系のB2の命令でブレークしたのか識
別できない欠点があった。従ってイベント信号EV、又
はEVtによってCPUIがブレークしたとき、イベン
ト信号Ev1又はEVtに対応したマクロ機能、すなわ
ち操作者がキーボードでエミュレータを操作するのでは
なく、予め作、たマイク・フgのエミーレータコマンド
と条件判断コマンドにより、自動的にデパックを行う機
能を自動的に実行させることができない欠点があった。
On the other hand, the CPUI instructions are taken out from the queue buffer and executed in the order in which the instructions were taken into the queue buffer within the CPUI. That is, the instructions AI and A2 shown in FIG. 4 are executed in this order. When instruction A3 is a branch instruction, CP
Instructions of A4 size or smaller taken into the UI queue buffer are discarded. Then, the B-system instructions are pre-fetched, and instructions B1 and below are executed by the CPU, but the CPU
However, when the instruction Bt is pre-fetched, the event circuit 3
Assuming that an event signal EV is output from the JK flip-flop circuit 5 that receives the event signal EV,
is the Q! of logic rHJ at that point. Outputs double signal. C.P.
When the UI executes the instruction B2 with a time lag,
The cpU1 breaks as explained above. This CPU
1 breaks, the JK flip-flop circuit 4.
Since the Ql signal and QZ times signal are output to 5,
The main control circuit 8 has a drawback that it is not possible to determine whether the CPUI breaks due to the A4 instruction of the A system or the B2 instruction of the B system. Therefore, when the CPUI breaks due to the event signal EV or EVt, the macro function corresponding to the event signal Ev1 or EVt is activated. There was a drawback that the function of automatically depacking could not be executed automatically using commands and conditional judgment commands.

この様な欠点は実行型ブレークのブレーク信号の設定数
が多くなる程その欠点が顕著で十分なデパックを行うこ
とができない欠点があった。
These drawbacks become more noticeable as the number of break signals set for execution-type breaks increases, and sufficient depacking cannot be performed.

本発明は、上記の欠点を解決することを目的としており
、CPUIのブリフェッチによる命令の取込みと、該命
令の実行との間に時間的ずれが存在していても、どの実
行型ブレークのブレーク信号によってCPUIがブレー
クされたかを識別し、ブレーク信号に対応したマクロ機
能を実行することができる実行型ブレーク要因検出装置
を提供することを目的としている。
The present invention aims to solve the above-mentioned drawbacks, and even if there is a time lag between the fetching of an instruction by CPU brieffetch and the execution of the instruction, the break signal of any execution type break is An object of the present invention is to provide an execution-type break factor detection device that can identify whether a CPUI has been broken by a break signal and execute a macro function corresponding to the break signal.

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

上記目的を達成するために、本発明における実れる情報
を基に実行型イベント及び非実行型イベントを検出する
イベント検出回路とを備え、該イベント検出回路が検出
する実行型イベント又は舗非実行型イベントに基づいて
ブレーク要求を行い、それぞれのタイミングで前記CP
Uにブレークを掛ける構成のエミュレータにおいて、前
記CPUが新たに起動する毎に、イベント検出回路によ
って検出される最初の実行型イベントのイベント信号を
保持するイベント信号保持回路と、前記CPUが新たに
起動する毎に、イベント検出回路によって検出される最
初の実行型イベントにより、前記イベント保持回路に対
し該CPUが起動されている間イベント信号保持回路に
保持されたイベント信号を保持させるための制御信号を
出力するイベント信号制御回路と、該CP Uが出力す
るキューステータスを監視し、該キューステータス回路
から検出されるブランチ信号、該CPUの新たな起動毎
に出力されるクリア信号及びイベント検出回路が非実行
型イベントを検出したとき出力されるブレーク要求信号
のいずれかによって、前記イベント信号保持回路及びイ
ベント信号制御回路をクリアさせるオア回路とを備え、
イベント信号保持回路に保持されている信号パターンが
らCPUのブレーク要因を特定するようにしたことを特
徴としている。
In order to achieve the above object, the present invention includes an event detection circuit that detects an execution type event and a non-execution type event based on the information obtained, and the execution type event or the non-execution type detected by the event detection circuit. A break request is made based on the event, and the break request is made at each timing.
In an emulator configured to apply a break to U, each time the CPU is newly started, an event signal holding circuit that holds an event signal of the first execution type event detected by an event detection circuit, and an event signal holding circuit that holds an event signal of the first execution type event detected by the event detection circuit, and Each time, the first execution type event detected by the event detection circuit sends a control signal to the event holding circuit to cause the event signal holding circuit to hold the event signal held while the CPU is activated. The output event signal control circuit and the queue status output by the CPU are monitored, and the branch signal detected from the queue status circuit, the clear signal output every time the CPU is newly started, and the event detection circuit are an OR circuit that clears the event signal holding circuit and the event signal control circuit by one of the break request signals output when an execution type event is detected,
A feature of this system is that the cause of a break in the CPU is identified from the signal pattern held in the event signal holding circuit.

以下図面を参照しながら本発明の一実施例を説明する。An embodiment of the present invention will be described below with reference to the drawings.

〔実施例〕〔Example〕

第1図は本発明に係る実行型ブレーク要因検出装置の一
実施例構成、第2図は分岐命令が含まれていないときの
CPUのキューバッファに取り込まれる命令とcpuが
実行する命令との関係説明図、第3図は第2図に示され
たたプログラムをCPUが実行してCPUがブレークす
るときの実行型ブレーク要因検出のタイムチャート、第
4図は分岐命令が含まれているときのCPUのキューバ
ッファに取り込まれる命令とCPUが実行する命令との
関係説明図、第5図は第4図に示されたプログラムをC
,PUが実行してCPUがブレークするときの実行型ブ
レーク要因検出のタイムチャートを示している。
FIG. 1 shows the configuration of an embodiment of the execution-type break factor detection device according to the present invention, and FIG. 2 shows the relationship between instructions taken into the queue buffer of the CPU and instructions executed by the CPU when no branch instructions are included. Explanatory diagram: Figure 3 is a time chart of execution-type break cause detection when the CPU executes the program shown in Figure 2 and breaks, and Figure 4 is a time chart of detection of an execution-type break cause when a branch instruction is included. Figure 5 is an explanatory diagram of the relationship between instructions taken into the queue buffer of the CPU and instructions executed by the CPU.
, shows a time chart of execution-type break factor detection when the PU executes and the CPU breaks.

第1図において、1ないし3,6ないし8は第6図のも
のに対応し、9,10はD型フリップフロップ回路、1
1はJKフリップフロンプ回路、12はブランチ検出回
路、13はオア回路を表している。
In FIG. 1, 1 to 3 and 6 to 8 correspond to those in FIG. 6, 9 and 10 are D-type flip-flop circuits, 1
1 represents a JK flip-flop circuit, 12 represents a branch detection circuit, and 13 represents an OR circuit.

1ないし3及び6ないし8の動作の仕方は第6図のもの
と同一であるので、その説明は省略する。
The operations of 1 to 3 and 6 to 8 are the same as those shown in FIG. 6, so their explanation will be omitted.

D型フリップフロップ回路9,10はオア回路13の出
力信号によってそれぞれクリアされ、そしてCPUIが
起動される毎にイベント検出回路3が検出する最初の実
行型イベント信号、例えばイベント信号E V +が最
初の信号であれば対応したD型フリップフロップ回路9
に該イベント信号E V +が保持され、またイベント
信号EV、が最初の信号であれば対応したD型フリフプ
フロツプ回路10に該イベント信号EV2が保たれるよ
うになっている。
The D-type flip-flop circuits 9 and 10 are each cleared by the output signal of the OR circuit 13, and each time the CPUI is started, the first execution type event signal detected by the event detection circuit 3, such as the event signal E V +, is first If the signal is, the corresponding D-type flip-flop circuit 9
If the event signal EV is the first signal, the event signal EV2 is held in the corresponding D-type flip-flop circuit 10.

JKフリフプフロップ回路11はオア回路13の出力信
号によってクリアされ、そしてオア回路6から出力され
るトラップ信号を受け、上記り型フリップフロップ回路
9.lOの動作機能を停止させる。
The JK flip-flop circuit 11 is cleared by the output signal of the OR circuit 13, receives the trap signal output from the OR circuit 6, and operates the above-mentioned flip-flop circuit 9. The operating function of IO is stopped.

ブランチ検出回路12は、CPUIがそのキューバッフ
ァに取り込まれた命令を実行する毎に出力するキュース
テータス(QSm)を監視している。CPUIの分岐命
令実行の際キューステータスに立てられるブランチ情報
を該ブランチ検出回路12が検出したとき、ブランチ信
号(BLANCH)を出力する。
The branch detection circuit 12 monitors the queue status (QSm) output every time the CPUI executes an instruction taken into its queue buffer. When the branch detection circuit 12 detects branch information set in the queue status upon execution of a CPUI branch instruction, it outputs a branch signal (BLANCH).

第1図の回路構成においても、イベント検出回路3が検
出する非実行型ブレークのブレーク要求信号、及び実行
型ブレークのイベント信号E V +又はEV、に基づ
く割込み制御回路7のCPUIへブレークの掛は方は、
第6図のものと同様である。しかしながら、CPUIが
分岐命令を実行する毎に、ブランチ検出回路12からブ
ランチ信号が出力され、該ブランチ信号がオア回路13
を介してD型フリップフロップ回路9,10及びJKフ
リップフロフブ回路11の内容をそれぞれクリアする。
In the circuit configuration shown in FIG. 1 as well, the interrupt control circuit 7 issues a break to the CPUI based on the break request signal of the non-execution type break detected by the event detection circuit 3 and the event signal E V + or EV of the execution type break. The way is,
It is similar to that in FIG. However, every time the CPUI executes a branch instruction, a branch signal is output from the branch detection circuit 12, and the branch signal is sent to the OR circuit 13.
The contents of the D-type flip-flop circuits 9 and 10 and the JK flip-flop circuit 11 are cleared through the .

また非実行型ブレーク要求信号がイベント検出回路3か
ら出力されると、該非実行型ブレーク要求信号もオア回
路13を介してD型フリップフロップ回路9.IO及び
JKフリップフロップ回路11の内容をそれぞれクリア
する。
Further, when a non-execution type break request signal is output from the event detection circuit 3, the non-execution type break request signal is also passed through the OR circuit 13 to the D-type flip-flop circuit 9. The contents of the IO and JK flip-flop circuits 11 are cleared respectively.

第2図は分岐命令がないプログラムのCPUの実行例で
あり、CPU1はプリフェッチにより命令A I、 A
2. ・、 A5. ・・・を該CPUI内のキューバ
ッファに取り込む。第3図のタイムチャートを参照しな
がら、CPUIが命令A3をフェッチしたとき、イベン
ト検出回路3に予め設定されている実行型イベントのブ
レーク条件EV、に合致したものとすれば、このとき該
イベント検出回路3はイベント信号EV、を出力する。
Figure 2 shows an example of CPU execution of a program without branch instructions, where CPU1 executes instructions A I, A by prefetching.
2.・, A5. ... into the queue buffer within the CPUI. Referring to the time chart of FIG. 3, if it is assumed that the break condition EV of the execution type event preset in the event detection circuit 3 is met when the CPUI fetches the instruction A3, then the event The detection circuit 3 outputs an event signal EV.

該イベント信号EV、はD型フリップフロップ回路9の
D端子に入力すると共に、オア回路6を介してJKフリ
ップフロップ回路11のJ端子に入力する。
The event signal EV is input to the D terminal of the D-type flip-flop circuit 9, and is also input to the J terminal of the JK flip-flop circuit 11 via the OR circuit 6.

#Φクロックの立上りで該JKフリップフロップ回路1
1の出力Qは論理「H」 (以下単にrHJ又はrLJ
の如く略記する)となり、該JKフリップフロップ回路
11のQ出力の立上りでサンプルされるD型フリップフ
ロップ回路9.10のうちD型フリップフロップ回路9
の出力QlだけがrHJとなる。
#JK flip-flop circuit 1 at the rising edge of the Φ clock
The output Q of 1 is logic “H” (hereinafter simply rHJ or rLJ
), and the D-type flip-flop circuit 9 of the D-type flip-flop circuits 9 and 10 sampled at the rising edge of the Q output of the JK flip-flop circuit 11
Only the output Ql becomes rHJ.

そして、CPUIが次の命令A4をフェッチしたとき、
イベント検出回路3に予め設定されている実行型イベン
トのブレーク条件EV2に合致したものとすれば、この
ときも該イベント検出回路3はイベント信号EV、を出
力する。該イベント信号E V tはD型フリップフロ
ップ回路10のD端子に入力すると共に、オア回路6を
介してJKフリップフロップ回路11のJ端子に入力す
るが、該JKフリップフロップ回路11の出力QはrH
Jが保持されており、従って#3クロックの立上りにお
いても該JKフリップフロップ回路11の出力Qは変化
なく「H」が保持され、D型フリップフロップ回路10
の出力Qtに変化を及ぼさない。
Then, when the CPUI fetches the next instruction A4,
If the break condition EV2 of the execution type event set in advance in the event detection circuit 3 is met, the event detection circuit 3 outputs the event signal EV at this time as well. The event signal E V t is input to the D terminal of the D-type flip-flop circuit 10 and also input to the J terminal of the JK flip-flop circuit 11 via the OR circuit 6, but the output Q of the JK flip-flop circuit 11 is rH
Therefore, even at the rising edge of the #3 clock, the output Q of the JK flip-flop circuit 11 remains "H" without any change, and the D-type flip-flop circuit 10
does not affect the output Qt of.

すなわち該り型フリップフロップ回路10の出力Q2は
rLJの状態が保持される。この様にCPU1の起動時
にメイン制御回路8から出力されるクリア信号が、オア
回路13を介してD型フリップフロップ回路9,10及
びJKフリソプフロフプ回路11をそれぞれクリアした
後において、イベント検出回路3によって最初に検出さ
れたイベント信号EV、だけが、D型フリップフロップ
回路9に保持され、rHJの出力Q、を出力し続ける。
That is, the output Q2 of the flip-flop circuit 10 is held in the rLJ state. In this way, the clear signal output from the main control circuit 8 at the time of starting the CPU 1 clears the D-type flip-flop circuits 9 and 10 and the JK flip-flop circuit 11 via the OR circuit 13, and then is cleared by the event detection circuit 3. Only the first detected event signal EV is held in the D-type flip-flop circuit 9 and continues to output the rHJ output Q.

一方、CPUIはバス2の空き時間を利用して命令AI
、 A2.・・・、A5.・・・をブリフェッチしてい
るため、該命令A1.A2.・・・、A5のフェッチ時
と時間的ずれを持って、CPUIは該命令AI、A2.
A3をこの順序で順次実行するが、命令A3の実行後に
第6図で説明した経過を径て、CPUIはブレークされ
る。該CPUIのブレーク後にメイン制御回路8がD型
フリップフロップ回路9,10の出力Q+ 、Qzの内
容を調べることにより、命令A3の実行型ブレークのイ
ベント信号EV、に基づいて、CPUIにブレークが掛
けられたことを該メイン制御回路8は識別する。
On the other hand, the CPU uses the free time on bus 2 to send instructions to AI.
, A2. ..., A5. . . , the instruction A1. A2. . . , with a time lag from the time of fetching A5, the CPU fetches the instructions AI, A2 .
The instructions A3 are sequentially executed in this order, but after the execution of the instruction A3, the CPUI is broken through the process described in FIG. 6. After the break of the CPUI, the main control circuit 8 examines the contents of the outputs Q+ and Qz of the D-type flip-flop circuits 9 and 10, and a break is applied to the CPUI based on the execution type break event signal EV of the instruction A3. The main control circuit 8 recognizes that this has occurred.

なお、非実行型イベントのブレーク要求信号によってC
PUIにブレークが掛けられたときには、該CPU1が
ブレークするとき、オア回路13を介してD型フリップ
フロップ回路9.lOの内容がクリアされる。従ってC
PUIがブレークしたとき、メイン制御回路8がD型フ
リップフロップ回路9.10の出力Q、、Q、の内容、
すなわち該出力Q、、Q、が共にrLJであれば、非実
行型イベントのブレーク要求信号によるものとして識別
され、実行型イベント信号に基づくものと区別される。
Note that the break request signal of the non-executable event
When a break is applied to the PUI, when the CPU 1 breaks, the D-type flip-flop circuit 9. The contents of IO are cleared. Therefore C
When the PUI breaks, the main control circuit 8 changes the contents of the outputs Q, , Q, of the D-type flip-flop circuits 9 and 10,
That is, if the outputs Q, , Q are both rLJ, they are identified as being caused by a break request signal of a non-execution type event, and are distinguished from those based on an execution type event signal.

第4図は分岐命令があるプログラムのCPUの実行例で
あり、CPUIはブリフェッチによるA1、A2.・・
・、A6.を該CPUI内のキューバッファに取り込む
(フェッチ1)。第5図のタイムチャートを参照しなが
ら、CPUIが命令A4をフェッチしたとき、イベント
検出回路3に予め設定されている実行型イベントのブレ
ーク条件EV、に合致したものとすれば、前記第2図の
とき説明した様にD型フリップフロップ回路9の出力Q
IがrHJとなる。以下CPUIが命令A5゜A6.・
・・をフェッチしても、該り型フリップフロップ回路9
の出力Q、のrHJはこの状態が保持される。
FIG. 4 is an example of CPU execution of a program with a branch instruction, and the CPUI is A1, A2, .・・・
・, A6. is fetched into the queue buffer within the CPUI (fetch 1). Referring to the time chart in FIG. 5, if it is assumed that the break condition EV of the execution type event preset in the event detection circuit 3 is met when the CPUI fetches the instruction A4, then the timing chart shown in FIG. As explained above, the output Q of the D-type flip-flop circuit 9
I becomes rHJ. The following CPUI commands A5, A6.・
Even if you fetch..., the flip-flop circuit 9
The outputs Q and rHJ of are maintained in this state.

CPUIが時間的ずれを持って命令A1.A2を実行し
、次いで命令A3の分岐命令を実行するう と、CPUIの出力すつキューステータスを監視してい
るブランチ検出回路12はブランチ信号を#lOクロッ
クの立下りで出力し、該ブランチ信号はオア回路13を
介してD型フリップフロップ回路9.10及びJKフリ
ップフロップ回路11の各内容をそれぞれクリアする。
CPUI executes instruction A1. with a time lag. When A2 is executed and then the branch instruction of instruction A3 is executed, the branch detection circuit 12 that monitors the output queue status of the CPUI outputs a branch signal at the falling edge of the #lO clock, and the branch signal is The contents of the D-type flip-flop circuits 9 and 10 and the JK flip-flop circuit 11 are cleared through the OR circuit 13.

すなわちD型フリップフロップ回路9の出力Q、のrH
Jは「L」になり、またJKフリップフロップ回路11
の出力QのrHJはrLJとなる。すなわちCPU1を
起動する際、メイン制御回路8からクリア信号を出力し
たときと同様の状態となる。CPUIは該CPU1内の
キューバッファに取り込まれている命令A4以下の命令
を捨て、上記命令A3の指定する分岐命令を実行するた
め、CPUIはブリフェッチによりB1.B2.・・・
を該CPUIのキューバッファに取込む(フェッチ2)
。CPU1が命令B2をフェッチしたとき、イベント回
路3に予め設定されている実行型イベントのブレーク条
件EV、に合致したものとすれば、前記第2リップフロ
ップ回路10の出力QtがrHJとなる。以後該出力Q
2のrHJが保持される。
That is, rH of the output Q of the D-type flip-flop circuit 9
J becomes "L" and JK flip-flop circuit 11
rHJ of the output Q becomes rLJ. That is, when starting up the CPU 1, the same state as when the main control circuit 8 outputs a clear signal is created. The CPU discards the instructions below instruction A4 that have been taken into the queue buffer in the CPU1, and executes the branch instruction specified by the instruction A3, so the CPU uses B1. B2. ...
fetch into the queue buffer of the CPUI (fetch 2)
. When the CPU 1 fetches the instruction B2, assuming that the break condition EV of the execution type event preset in the event circuit 3 is met, the output Qt of the second flip-flop circuit 10 becomes rHJ. From now on, the output Q
An rHJ of 2 is retained.

一方、CPUIのプログラムの実行は命令のフェッチと
時間的ずれをもって、命令AI、A2A3が実行され(
実行1)、該命令A3の分岐命令により命令Bl、B2
を実行する(実行2)。
On the other hand, in the execution of the CPU program, instructions AI and A2A3 are executed with a time lag from the instruction fetch (
Execution 1), instructions B1 and B2 are executed by the branch instruction of the instruction A3.
(Execution 2).

CPUIの該命令B2の実行後に第6図で説明した経過
を経て、CPUIはブレークされる。該CPUIのブレ
ーク後にメイン制御回路8がD型フリップフロップ回路
9,100出力Qt 、Qzの内容を調べることにより
、命令B2の実行型ブレークのイベント信号に基づいて
、CPUIにブレークが掛けられたことを該メイン制御
回路8は識別する。
After the CPUI executes the instruction B2, the CPUI is broken through the process described in FIG. 6. After the CPUI breaks, the main control circuit 8 checks the contents of the outputs Qt and Qz of the D-type flip-flop circuits 9 and 100, and determines that a break has been applied to the CPUI based on the execution-type break event signal of instruction B2. The main control circuit 8 identifies.

命令のブリフェッチによる成る命令の実行と該命令のフ
ェッチとに時間的ずれが生じていても、CPUIがブレ
ークしたとき、D型フリフブフロフプ回路9.IOの内
容を調べることにより、CPUIをブレークさせた実行
型ブレークのイベント信号EV、又はE V tのブレ
ーク要因を特定することができる。また上記説明の如く
非実行型ブレークのブレーク要求信号に基づ<CPUI
のブレークなのか実行型ブレークのブレーク信号に基づ
<CPUIのブレークなのかを識別することができるの
は勿論のことである。
Even if there is a time lag between the execution of an instruction due to the instruction pre-fetch and the fetch of the instruction, when the CPU breaks, the D-type flip-flop circuit 9. By examining the contents of the IO, it is possible to identify the break cause of the execution-type break event signal EV or EVt that caused the CPUI to break. Also, as explained above, based on the break request signal of the non-executable break,
It goes without saying that it is possible to identify whether it is a CPUI break or an execution-type break based on the break signal.

以上の説明では実行型ブレーク要因は、ブレーク条件E
V+ 、EVzの2個の設定で説明したが、2個以上何
個でも設定することが可能である。このときの回路は、
イベント検出回路3の検出数、D型フリップフロップ回
路9.10の数及びオア回路6,13の入力信号数をそ
の設定される数に対応した回路構成にしておけばよい。
In the above explanation, the execution type break factor is the break condition E
Although the explanation has been made with two settings, V+ and EVz, it is possible to set two or more. The circuit at this time is
The number of detections by the event detection circuit 3, the number of D-type flip-flop circuits 9 and 10, and the number of input signals of the OR circuits 6 and 13 may be configured to correspond to the set numbers.

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

以上説明した如く、本発明によれば、CPUがブレーク
したときの非実行型ブレーク要因と実行型ブレーク要因
とを識別でき、実行型ブレーク要因に基づくときには設
定されたブレーク要因を特定することができる。この様
に実行ブレーク要因の特定ができるので、この特定され
る信号(FACTI、2)を用いて対応して設けられる
エミュレータのマクロ機能のプログラムを走らせること
が可能となり、自動デパックができる。
As explained above, according to the present invention, when the CPU breaks, it is possible to distinguish between non-execution type break causes and execution type break causes, and when based on execution type break causes, it is possible to specify the set break cause. . Since the execution break factor can be specified in this way, it becomes possible to run the macro function program of the emulator provided correspondingly using the specified signal (FACTI, 2), and automatic depacking is possible.

また、エミュレータをマクロ機能以外で普通に使用する
場合も、CPUがブレークしたとき、トレース結果を見
なくても、どのイベントでブレークしたかが検出されて
いるので、その表示ができ、エミュレータのデパック効
率が向上する。
Also, when using the emulator normally for purposes other than the macro function, when the CPU breaks, the event that caused the break is detected and displayed, without having to look at the trace results, so you can depack the emulator. Increased efficiency.

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

第1図は本発明に係る実行型ブレーク要因検出装置の一
実施例構成、第2図は分岐命令が含まれていないときの
CPUのキューバッファに取り込まれる命令とC,PU
が実行する命令との関係説明図、第3図は第2図に示さ
れたプログラムをCPUが実行してCPUがブレークす
るときの実行型ブレーク要因検出のタイムチャート、第
4図は分岐命令が含まれているときのCPUのキューバ
ッファに取り込まれる命令とCPUが実行する命令との
関係説明図、第5図は第4図に示されたプログラムをC
PUが実行してCPUがブレークするときの実行型ブレ
ーク要因検出のタイムチャート、第6図は従来のブレー
ク要因検出装置の回路構成図である。 図中、1はCPU、2はバス、3はイベント検出回路、
4,5はJKフリップフロップ回路、6はオア回路、7
は割込み制御回路、8はメイン制御回路、9,10はD
型フリップフロップ回路、11はJKフリップフロップ
回路、12はブランチ検出回路、13はオア回路である
。 第1 図 第2図 第3図 第4図 第5 図
Fig. 1 shows the configuration of an embodiment of the execution type break factor detection device according to the present invention, and Fig. 2 shows the instructions taken into the queue buffer of the CPU when no branch instructions are included, and the C, PU
Figure 3 is a time chart of execution-type break cause detection when the CPU executes the program shown in Figure 2 and breaks, and Figure 4 shows the relationship between branch instructions and instructions executed. An explanatory diagram of the relationship between instructions taken into the CPU's queue buffer and instructions executed by the CPU when they are included in the program.
FIG. 6 is a time chart of execution-type break factor detection when the PU executes and the CPU breaks. FIG. 6 is a circuit configuration diagram of a conventional break factor detection device. In the figure, 1 is the CPU, 2 is the bus, 3 is the event detection circuit,
4 and 5 are JK flip-flop circuits, 6 is an OR circuit, and 7
is an interrupt control circuit, 8 is a main control circuit, 9 and 10 are D
11 is a JK flip-flop circuit, 12 is a branch detection circuit, and 13 is an OR circuit. Figure 1 Figure 2 Figure 3 Figure 4 Figure 5

Claims (1)

【特許請求の範囲】 1、ターゲットシステムCPUの代行をするCPUと、
該CPUのバス上に現われる情報を基に実行型イベント
及び非実行型イベントを検出するイベント検出回路とを
備え、該イベント検出回路が検出する実行型イベント又
は非実行型イベントに基づいてブレーク要求を行い、そ
れぞれのタイミングで前記CPUにブレークを掛ける構
成のエミュレータにおいて、 前記CPUが新たに起動する毎に、イベント検出回路に
よって検出される最初の実行型イベントのイベント信号
を保持するイベント信号保持回路と、 前記CPUが新たに起動する毎に、イベント検出回路に
よって検出される最初の実行型イベントにより、前記イ
ベント信号保持回路に対し該CPUが起動されている間
イベント信号保持回路に保持されたイベント信号を保持
させるための制御信号を出力するイベント信号制御回路
と、 該CPUの出力するキューステータスを監視し、該キュ
ーステータスにブランチ情報が立てられたとき、ブラン
チ信号を出力するブランチ検出回路と、該ブランチ検出
回路から検出されるブランチ信号、該CPUの新たな起
動毎に出力されるクリア信号及びイベント検出回路が非
実行型イベントをしたとき出力されるブレーク要求信号
のいずれかによって、前記イベント信号保持回路及びイ
ベント信号制御回路をクリアさせるオア回路 とを備え、イベント信号保持回路に保持されている信号
パターンからCPUのブレーク要求を特定するようにし
たことを特徴とする実行型ブレーク要因検出装置。
[Claims] 1. A CPU acting as a target system CPU;
an event detection circuit that detects an execution type event and a non-execution type event based on information appearing on the bus of the CPU, and a break request is made based on the execution type event or the non-execution type event detected by the event detection circuit. an event signal holding circuit that holds an event signal of a first execution type event detected by an event detection circuit each time the CPU is newly started; , Each time the CPU is newly activated, the first execution type event detected by the event detection circuit causes the event signal holding circuit to transmit an event signal held in the event signal holding circuit while the CPU is activated. an event signal control circuit that outputs a control signal for holding the CPU; a branch detection circuit that monitors the queue status output from the CPU and outputs a branch signal when branch information is set in the queue status; The event signal is held by any one of a branch signal detected from the branch detection circuit, a clear signal output every time the CPU is newly activated, and a break request signal output when the event detection circuit performs a non-executable event. 1. An execution type break cause detection device, comprising: an OR circuit for clearing a circuit and an event signal control circuit, and identifying a CPU break request from a signal pattern held in an event signal holding circuit.
JP63164254A 1988-07-01 1988-07-01 Executable break factor detecting device Pending JPH0214332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63164254A JPH0214332A (en) 1988-07-01 1988-07-01 Executable break factor detecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63164254A JPH0214332A (en) 1988-07-01 1988-07-01 Executable break factor detecting device

Publications (1)

Publication Number Publication Date
JPH0214332A true JPH0214332A (en) 1990-01-18

Family

ID=15789603

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63164254A Pending JPH0214332A (en) 1988-07-01 1988-07-01 Executable break factor detecting device

Country Status (1)

Country Link
JP (1) JPH0214332A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6877113B2 (en) 2001-04-06 2005-04-05 Fujitsu Limited Break determining circuit for a debugging support unit in a semiconductor integrated circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6877113B2 (en) 2001-04-06 2005-04-05 Fujitsu Limited Break determining circuit for a debugging support unit in a semiconductor integrated circuit

Similar Documents

Publication Publication Date Title
US7178062B1 (en) Methods and apparatus for executing code while avoiding interference
US5721922A (en) Embedding a real-time multi-tasking kernel in a non-real-time operating system
US5903752A (en) Method and apparatus for embedding a real-time multi-tasking kernel in a non-real-time operating system
US7600155B1 (en) Apparatus and method for monitoring and debugging a graphics processing unit
US7992042B2 (en) Debug support device, and program for directing computer to perform debugging method
JP2000029737A (en) Processor having real-time outer instruction insertion for debugging functions
JP2003296136A (en) Trace device
JPH0728670A (en) Information processor
JP2011134162A (en) System and method for controlling switching of task
JPH0214332A (en) Executable break factor detecting device
JPH08171504A (en) Emulation device
JPH0922369A (en) Illicit operation detection method in kernel of multi-tasking system
JP4978914B2 (en) Method and system enabling expansion of multiple instruction streams / multiple data streams on a microprocessor
JPS6148181B2 (en)
JP2734382B2 (en) In-circuit emulator and debugging method thereof
JP2701799B2 (en) Microcomputer
JP2550708B2 (en) Debug method
JPH0528854B2 (en)
JPH06202907A (en) Debug support device
JPH11167500A (en) Event circuit and debug system for emulator device
JPS6029840A (en) Interruption system for execution program
JPS6029844A (en) Switching system for program mode
JPH01309138A (en) In-circuit emulator
JPS6382525A (en) Microprocessor with tracing function
JPH0895945A (en) Microprocessor with built-in trace memory and trace method