JP2005250821A - Emulator and microprocessor - Google Patents
Emulator and microprocessor Download PDFInfo
- Publication number
- JP2005250821A JP2005250821A JP2004060003A JP2004060003A JP2005250821A JP 2005250821 A JP2005250821 A JP 2005250821A JP 2004060003 A JP2004060003 A JP 2004060003A JP 2004060003 A JP2004060003 A JP 2004060003A JP 2005250821 A JP2005250821 A JP 2005250821A
- Authority
- JP
- Japan
- Prior art keywords
- task
- register
- circuit
- information
- microprocessor
- 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
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、ユーザプログラムのデバッグ技術に関し、例えばエミュレータに適用して有効な技術に関する。 The present invention relates to a debugging technique for a user program, for example, a technique effective when applied to an emulator.
リアルタイムオペレーティングシステムを用いてタスクを起動する制御装置は、例えば特許文献1に記載されているように公知の技術とされる。
A control device that activates a task using a real-time operating system is a known technique as described in
ところで、リアルタイムオペレーティングシステムにおいて、プログラム言語の1行毎の実行はステップ動作と称される。このステップ動作は次実行命令の種類により停止方法を変えることで実現している。ステップ動作の主な機能としては、ステップイン実行、ステップオーバー実行、ステップアウト実行が挙げられる。 By the way, in a real-time operating system, execution of a program language for each line is called a step operation. This step operation is realized by changing the stopping method according to the type of the next execution instruction. The main functions of the step operation include step-in execution, step over execution, and step out execution.
ステップイン実行は、現在の1命令が実行される動作とされる。関数にステップイン実行することを選択した場合には、デバッガは関数の行又は命令でコールが実行される。 Step-in execution is an operation in which the current one instruction is executed. If you choose to step into a function, the debugger executes the call at the function line or instruction.
ステップオーバー実行は、現在の行の1命令が実行される動作とされる。関数をステップオーバー実行することを選択した場合は、デバッガはコール及び関数内の全てのコード(及び関数が行う関数コールのすべて)を実行して、呼び出し関数の次の行又は命令で停止される。 Step over execution is an operation in which one instruction on the current line is executed. If you choose to step over the function, the debugger executes the call and all the code in the function (and all the function calls that the function makes) and stops at the next line or instruction of the calling function .
ステップアウト実行は、関数内の残りのコードステップ実行せずに呼び出して元の関数に戻る動作とされる。 Step-out execution is an operation that returns to the original function by calling without executing the remaining code steps in the function.
従来のタスク別ステップでは、タスク種別のチェックができないために、1行毎のステップ動作ではリアルタイムオペレーティングシステム内や、他のタスク内でステップ動作が停止され、所望のタスク内にのみ着目したステップ動作が不可能になることが、本願発明者によって見いだされた。例えば、タスク1からリアルタイムオペーティングシステムに遷移した後に、上記タスク1とは異なるタスク2に遷移され、さらにそこからリアルタイムオペーティングシステムに遷移した後に、再びタスク1に遷移するようなユーザプログラムにおいて、タスク1のみのデバッグを行いたいにもかかわらず、リアルタイムオペーティングシステムやタスク2においてステップ動作が停止され、その結果、上記リアルタイムオペーティングシステムから遷移されたタスク1についてのデバッグを行うことができなくなる。
In conventional task-specific steps, the task type cannot be checked, so in the step operation for each line, the step operation is stopped in the real-time operating system or in other tasks, and the step operation focused only on the desired task It has been found by the present inventors that this is impossible. For example, a user program that transits from
本発明の目的は、ユーザプログラムのデバッグにおいてタスク種別を取得することにより所望のタスクについてのデバッグを可能とするための技術を提供する。 An object of the present invention is to provide a technique for enabling debugging of a desired task by acquiring a task type in debugging a user program.
また本発明の別の目的は、ステップ動作、トレース情報取得、パフォーマンス測定、及びブレーク動作をそれぞれタスク種別で可能とするための技術を提供することにある。 Another object of the present invention is to provide a technique for enabling step operations, trace information acquisition, performance measurement, and break operations for each task type.
さらに本発明の別の目的はデバッグ効率の向上を図ることにある。 Another object of the present invention is to improve debugging efficiency.
本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。 The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。 The following is a brief description of an outline of typical inventions disclosed in the present application.
すなわち、タスク種別情報が組み込まれたユーザプログラムを実行可能なマイクロプロセッサと、ホストシステムによって設定されたタスク書き込み先アドレス情報を保持可能な第1レジスタと、上記マイクロプロセッサによって上記ユーザプログラムが実行された際に上記マイクロプロセッサから出力されるアドレス情報と、上記第1レジスタに保持されているアドレス情報とを比較可能な比較回路と、上記比較回路の比較結果に基づいてタスク種別情報を保持可能な第2レジスタと、を含んでエミュレータを構成する。このとき、上記第2レジスタは上記ホストシステムによって読み出し可能にされる。 That is, a microprocessor capable of executing a user program in which task type information is incorporated, a first register capable of holding task write destination address information set by a host system, and the user program being executed by the microprocessor A comparison circuit that can compare the address information output from the microprocessor with the address information held in the first register, and a task type information that can hold task type information based on the comparison result of the comparison circuit. The emulator includes two registers. At this time, the second register can be read by the host system.
上記の手段によれば、比較回路は、上記マイクロプロセッサによって上記ユーザプログラムが実行された際に上記マイクロプロセッサから出力されるアドレス情報と、上記第1レジスタに保持されているアドレス情報とを比較し、その比較結果が第2レジスタに保持される。この第2レジスタはホストシステムによって読み出し可能とされるため、ホストシステムは、上記第2レジスタの保持情報に基づいて特定タスクのみのステップ制御が可能とされる。このことが、ユーザプログラムのデバッグにおいてタスク種別を取得することにより所望のタスクについてのデバッグを可能にする。 According to the above means, the comparison circuit compares the address information output from the microprocessor when the user program is executed by the microprocessor and the address information held in the first register. The comparison result is held in the second register. Since the second register can be read by the host system, the host system can perform step control of only a specific task based on the information held in the second register. This makes it possible to debug a desired task by acquiring the task type in debugging the user program.
また、タスク種別情報が組み込まれたユーザプログラムを実行可能なマイクロプロセッサと、ホストシステムによって設定されたタスク書き込み先アドレス情報を保持可能な第1レジスタと、上記マイクロプロセッサによって上記ユーザプログラムが実行された際に上記マイクロプロセッサから出力されるアドレス情報と、上記第1レジスタに保持されているアドレス情報とを比較可能な第1比較回路と、上記比較回路の比較結果に基づいてタスク種別情報を保持可能な第2レジスタと、複数の観測対象タスク種別情報を設定可能な第3レジスタと、上記第2レジスタの保持情報と上記第3レジスタの保持情報とを比較可能な第2比較回路と、上記第2レジスタの保持情報と上記第3レジスタの保持情報とが一致した場合にタスク状態信号を生成可能なタスク状態信号生成回路と、上記タスク状態信号に基づいてエミュレーション条件を検出可能なエミュレーション条件検出回路と、を含んでエミュレータを構成する。このとき、上記エミュレーション条件検出回路での検出結果に基づいて特定タスクのみのエミュレーションが可能とされる。 Also, a microprocessor capable of executing a user program in which task type information is incorporated, a first register capable of holding task write destination address information set by the host system, and the user program being executed by the microprocessor The first comparison circuit that can compare the address information output from the microprocessor with the address information held in the first register, and the task type information can be held based on the comparison result of the comparison circuit A second register, a third register capable of setting a plurality of observation target task type information, a second comparison circuit capable of comparing the information held in the second register and the information held in the third register, and the second register When the holding information in the two registers matches the holding information in the third register, the task status signal is output. And the task state signal generation circuit capable formed, constituting the emulator include the emulation condition detection circuit capable of detecting emulation condition based on the task state signal. At this time, only a specific task can be emulated based on the detection result of the emulation condition detection circuit.
上記の手段によれば、第1比較回路は、上記マイクロプロセッサによって上記ユーザプログラムが実行された際に上記マイクロプロセッサから出力されるアドレス情報と、上記第1レジスタに保持されているアドレス情報とを比較し、第2比較回路は、上記第2レジスタの保持情報と上記第3レジスタの保持情報とを比較する。タスク状態信号生成回路は、上記第2レジスタの保持情報と上記第3レジスタの保持情報とが一致した場合にタスク状態信号を生成し、エミュレーション条件検出回路は、上記タスク状態信号に基づいてエミュレーション条件を検出することにより、上記エミュレーション条件検出回路での検出結果に基づいて特定タスクのみのエミュレーションが可能とされ、このことが、ユーザプログラムのデバッグにおいてタスク種別を取得することにより所望のタスクについてのデバッグを可能にする。 According to the above means, the first comparison circuit obtains the address information output from the microprocessor when the user program is executed by the microprocessor and the address information held in the first register. The second comparison circuit compares the information held in the second register with the information held in the third register. The task status signal generation circuit generates a task status signal when the information held in the second register matches the information held in the third register, and the emulation condition detection circuit detects the emulation condition based on the task status signal. By detecting this, it is possible to emulate only a specific task based on the detection result of the emulation condition detection circuit. This is because debugging the desired task by acquiring the task type in the debugging of the user program. Enable.
このとき、ステップ動作、トレース情報取得、パフォーマンス測定、及びブレーク動作をそれぞれタスク種別で可能とするには、上記エミュレーション条件検出回路の検出結果に基づいてパフォーマンス測定を行うパフォーマンス測定回路と、上記エミュレーション条件検出回路の検出結果に基づいてトレース処理を行うトレース回路と、上記エミュレーション条件検出回路の検出結果に基づいてブレーク処理を行うブレーク回路とを含めると良い。 At this time, in order to enable step operation, trace information acquisition, performance measurement, and break operation for each task type, a performance measurement circuit that performs performance measurement based on the detection result of the emulation condition detection circuit, and the emulation condition A trace circuit that performs trace processing based on the detection result of the detection circuit and a break circuit that performs break processing based on the detection result of the emulation condition detection circuit may be included.
さらには、タスク種別情報が組み込まれたユーザプログラムを実行可能な中央処理装置と、外部から設定されたタスク書き込み先アドレス情報を保持可能な第4レジスタと、上記中央署理装置によって上記ユーザプログラムが実行された際に上記中央署理装置から出力されるアドレス情報とステータス情報とをデコード可能なタスクID専用デコード回路と、上記タスクID専用デコード回路のデコード出力に基づいてタスクID情報を記憶可能な第5レジスタと、上記第4レジスタの出力と上記第5レジスタの出力とを比較することにより一致するタスクID情報を得るためのID比較回路と、上記ID比較回路比較結果に応じてタスク状態信号を生成するタスク状態信号生成回路とを含んでマイクロプロセッサを構成することができる。 Furthermore, the central processing unit capable of executing a user program incorporating task type information, a fourth register capable of holding task write destination address information set from the outside, and the user program being executed by the central signing unit And a task ID dedicated decode circuit capable of decoding the address information and status information output from the central signing device and a task ID information stored on the basis of the decode output of the task ID dedicated decode circuit. A register, an ID comparison circuit for obtaining matching task ID information by comparing the output of the fourth register and the output of the fifth register, and generating a task status signal in accordance with the ID comparison circuit comparison result A microprocessor including a task state signal generation circuit.
上記の手段によれば、ID比較回路は、上記第4レジスタの出力と上記第5レジスタの出力とを比較することにより一致するタスクID情報を得る。タスク状態信号生成回路は、上記ID比較回路比較結果に応じてタスク状態信号を生成する。このタスク状態信号はマイクロプロセッサの外部出力されるため、上記マイクロプロセッサから出力されたタスク状態信号をエミュレーション条件として検出し、それに基づいて特定タスクのみのエミュレーションが可能とされる。 According to the above means, the ID comparison circuit obtains matching task ID information by comparing the output of the fourth register and the output of the fifth register. The task state signal generation circuit generates a task state signal in accordance with the ID comparison circuit comparison result. Since this task status signal is output from the microprocessor, the task status signal output from the microprocessor is detected as an emulation condition, and based on this, only a specific task can be emulated.
本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。 The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.
すなわち、ユーザプログラムのデバッグにおいてタスク種別を取得することにより所望のタスクについてのデバッグが可能となる。 That is, it is possible to debug a desired task by acquiring the task type in debugging the user program.
また、ステップ動作、トレース情報取得、パフォーマンス測定、及びブレーク動作がそれぞれタスク種別で可能となり、それによって、デバッグ効率の向上を図ることができる。 In addition, step operation, trace information acquisition, performance measurement, and break operation can be performed for each task type, thereby improving debugging efficiency.
図1には、本発明にかかるエミュレータの構成例が示される。図1に示されるエミュレータ70は、特に制限されないが、エミュレータレジスタアクセス回路11、タスク検出回路12、メモリ19、及びマイクロプロセッサ20を含んで成り、ユーザプログラムのデバッグを行う場合には、パーソナルコンピュータなどのホストシステム71にコネクタなどを介して着脱自在に結合される。エミュレータ70と、上記ホストシステム71との間においては、データ、アドレス信号、及びコントロール信号など、ユーザプログラムのデバッグに必要とされる各種信号のやり取りが可能とされる。メモリ19は、上記マイクロプロセッサ20によってユーザプログラムが実行される場合のワーク領域として使用される。そしてこのワーク領域にはタスクID情報の保持領域(タスクID領域)が含まれる。タスクID情報は、ユーザプログラムにおけるタスク毎にその種別を示すものとして予めユーザプログラムに組み込まれている。
FIG. 1 shows a configuration example of an emulator according to the present invention. An emulator 70 shown in FIG. 1 includes, but is not limited to, an emulator register access circuit 11, a
上記タスク検出回路12は、上記マイクロプロセッサ20においてユーザプログラムが実行されるときに、ユーザプログラムにおけるタスクの検出を行う機能を有する。特に制限されないが、このタスク検出回路12は、タスクアドレスレジスタ13、2入力のアンドゲート14、アドレス比較回路15、ライト検出回路16、及びタスクIDレジスタ17とを含んで4成る。タスクアドレスレジスタ13には、上記エミュレータレジスタアクセス回路11を介して上記ホストシステム71によってタスク書き込み先アドレスが書き込まれる。アドレス比較回路15は、上記マイクロプロセッサ20から出力されるアドレス信号と上記タスクアドレスレジスタ13から出力されたアドレス信号とを比較する。この比較結果は2入力アンドゲートの一方の入力端子に伝達される。ライト検出回路16は、上記マイクロプロセッサ20でのユーザプログラムの実行状態を示すステータス信号のライト状態を検出する。この検出結果は2入力ナンドゲート14の他方の入力端子に伝達される。2入力のアンドゲート14は、上記アドレス比較回路15からのアドレス比較結果と、上記ライト検出回路16からのライト検出結果とのアンド論理を得る。このアンド論理はタスクIDレジスタ17のクロック入力端子CKに伝達される。タスクIDレジスタ17のデータ入力端子Dには、上記マイクロプロセッサ20から出力されたデータが伝達されるようになっており、上記マイクロプロセッサ20から出力されたタスクID情報(タスク種別情報)が、アンドゲート14の出力に同期してタスクIDレジスタ17に保持される。このタスクIDレジスタ17の記憶情報は、上記エミュレータレジスタアクセス回路11を介してホストシステム71によって読み出し可能とされる。
The
上記の構成において、ユーザプログラムにおける所望のタスク内にのみ着目したステップ動作を行う場合、ホストシステム71からエミュレータレジスタアクセス回路11を介してタスクアドレスレジスタ13に所望のタスク書き込み先アドレスを設定する。そして、マイクロプロセッサ20において、デバッグ対象とされるユーザプログラムの実行が開始されると、アドレスバスのアドレス信号がアドレス比較回路15に伝達され、ステータス信号がライト検出回路16の伝達される。マイクロプロセッサ20から伝達されたアドレス信号と、タスクアドレスレジスタ13から出力されたアドレス信号とが一致し、且つ、上記ステータス信号がライト状態のときに、アンドゲート14の出力信号がハイレベルになる。それに同期してマイクロプロセッサ20のデータ出力(タスクID情報)がタスクIDレジスタ17に書き込まれる。このタスクIDレジスタ17の保持情報は、エミュレータレジスタアクセス回路11を介してホストシステム71に伝達され、ホストシステム71においては、伝達されたタスクID情報を用いて所定タスクのみのステップ制御が行われる。
In the above configuration, when a step operation focusing on only a desired task in the user program is performed, a desired task write destination address is set from the
図2には、ホストシステム71で実行されるタスクステップ制御の一例が示される。
FIG. 2 shows an example of task step control executed by the
このタスクステップ制御は、デバッグ情報を持つタスクから開始され(S1)、スタート時点のタスクID情報が取得される。上記デバッグ情報とはコンパイラ(アセンブラ)がユーザプログラムのデバッグのために生成する情報とされる。尚、ステップ動作は高速性が要求されるため、タスクのデバッグ時には、ユーザプログラムであるタスクのみにデバッグ情報を生成し、リアルタイムオペレーティングの部分にはデバッグ情報を生成しないようにするのが望ましい。 This task step control is started from a task having debug information (S1), and task ID information at the start time is acquired. The debug information is information generated by a compiler (assembler) for debugging a user program. Since the step operation requires high speed, it is desirable to generate debug information only for a task that is a user program and not generate debug information for a real-time operating part when debugging a task.
次に、分岐の調査が行われる(S2)。この調査では、次に実行される命令が分岐か否かの判定が行われる。この判定において、次に実行される命令が分岐であると判断された場合には、リアルタイムオペレーティングシステム又は別のタスク種別への関数への分岐の可能性があることから、タスク種別判定付きのステップ動作に遷移する(S3)。このステップ動作は、タスク種別が一致するまで繰り返し行われ、タスク種別が一致した時点で終了される(S5)。また、上記の判定において、次に実行される命令が分岐ではないと判断された場合には、通常ステップ動作へ遷移され、1ステップ動作のみ行われた後に終了される(S4,S5)。 Next, a branch is investigated (S2). In this investigation, it is determined whether or not the next instruction to be executed is a branch. In this determination, if it is determined that the instruction to be executed next is a branch, there is a possibility of branching to a function to a real-time operating system or another task type. Transition to operation (S3). This step operation is repeated until the task types match, and ends when the task types match (S5). In the above determination, if it is determined that the instruction to be executed next is not a branch, the process proceeds to the normal step operation, and after only one step operation is performed (S4, S5).
上記例によれば、以下の作用効果を得ることができる。 According to the above example, the following operational effects can be obtained.
(1)ユーザプログラムのデバッグにおいて、タスク種別を取得することにより所望のタスクについてのデバッグを行うことができる。例えば図3及び図4に示されるように、タスク1からリアルタイムオペーティングシステムに遷移した後に、上記タスク1とは異なるタスク2に遷移され、さらにそこからリアルタイムオペーティングシステムに遷移した後に、再びタスク1に遷移するようなユーザプログラムにおいて、タスク1のみのデバッグを行いたいにもかかわらず、リアルタイムオペーティングシステムやタスク2においてステップ動作が停止された場合には、タスク1について実線31で示される部分についてはデバッグが可能とされるものの、実線32で示される部分についてのデバッグを行うことができない。これに対して上記の例によれば、タスク検出回路12においてタスク検出が行われ、その検出結果に基づいて所定タスクのみのステップ制御が行われることにより、図4における実線31で示される部分のみならず、実線32で示される部分についてのデバッグが可能になる。
(1) In debugging a user program, it is possible to debug a desired task by acquiring a task type. For example, as shown in FIG. 3 and FIG. 4, after transition from
(2)ホストシステム71によってタスクID情報の書き込みが可能とされるタスクIDレジスタ13と、このタスクIDレジスタ13から出力されたアドレス信号とマイクロプロセッサ20から出力されるアドレス信号とを比較するアドレス比較回路15と、マイクロプロセッサ20のステータス信号からライト状態を検出するライト検出回路16と、上記アドレス比較回路15での比較結果と上記ライト検出回路16での検出結果とに基づいてタスクIDを保持するタスクIDレジスタ17とを設けることで、上記タスク検出回路12を容易に構成することができる。
(2)
図5には、本発明にかかるエミュレータの別の構成例が示される。 FIG. 5 shows another configuration example of the emulator according to the present invention.
図5に示されるエミュレータ70が、図1に示されるのと大きく異なるのは、チェックIDレジスタ21、ID比較回路22、タスク状態信号生成回路23、エミュレーション条件検出回路54、パフォーマンス測定回路51、トレース回路52、及びブレーク回路53を備えている点である。
The emulator 70 shown in FIG. 5 is greatly different from that shown in FIG. 1 in that the
チェックIDレジスタ21には、観測対象とされる複数のタスクID情報が、エミュレータレジスタアクセス回路11を介してホストシステム71によって書き込まれる。ID比較回路22は、上記チェックIDレジスタ21に記憶された複数のタスクIDと、タスクIDレジスタ17に記憶されているタスクID情報との比較を行う。この比較において一致したタスクID情報がタスク状態信号生成回路23に伝達される。このタスク状態信号生成回路23は、上記ID比較回路22から伝達されたタスクID情報に基づいてタスク状態信号24を生成する。このタスク状態信号24はエミュレーション条件検出回路54に伝達される。
A plurality of task ID information to be observed is written into the
エミュレーション条件検出回路54は、伝達されたタスク状態信号24の値をエミュレーション条件のひとつとして検出する。パフォーマンス測定回路51は性能測定を行う。トレース回路52は、ユーザプログラムの実行状態をリアルタイムでトレースする。ブレーク回路53は、所望のブレーク条件でユーザプログラムの実行を停止する。パフォーマンス測定回路51、トレース回路52、及びブレーク回路53においては、それぞれ上記エミュレーション条件検出回路54で検出されたエミュレーション条件、すなわちタスク種別(タスクID)を条件として、パフォーマンス測定、リアルタイムトレース、及びブレーク処理が行われる。
The emulation
このように図5に示される構成によれば、タスク種別(タスクID)をエミュレーション条件とすることにより、ユーザリソースを使わずに、タスク種別のステップ動作に加えて、タスク種別のパフォーマンス測定結果、タスク種別のリアルタイムトレース結果、タスク種別のブレーク結果を得ることができるため、デバッグ効率の向上を図ることができる。 In this way, according to the configuration shown in FIG. 5, by setting the task type (task ID) as an emulation condition, in addition to the task type step operation, the task type performance measurement result, Since the task type real-time trace result and the task type break result can be obtained, the debugging efficiency can be improved.
図6には、デバッグ機能を備えたマイクロプロセッサ60を含むエミュレータが示される。 FIG. 6 shows an emulator including a microprocessor 60 having a debugging function.
このマイクロプロセッサ60は、バッファ44、タスクID専用レジスタデコード回路45、タスクID専用レジスタ47、及びタスク検出回路61を含んで、公知の半導体集積回路製造技術により例えばシリコン基板などのひとつの半導体基板に形成される。タスクID専用デコード回路45は、CPU(中央処理装置)50からのアドレス信号及びステータス信号をデコードすることにより、タスクID専用レジスタ47へのタスクID情報の書き込み制御信号CONT1、及び上記タスクID専用レジスタ47からのタスクID情報の読み出し制御信号CONT2を形成する。タスクID専用レジスタ47は、CPU50から出力されたタスクID情報を上記書き込み制御信号CONT1に同期して記憶する。バッファ44は、上記タスクID専用レジスタから出力されたタスクID情報をタスクID情報の読み出し制御信号CONT2に同期してCPU50に供給する。このタスクID情報は必要に応じて、図示しないメモリのワーク領域などに保存される。タスク検出回路61は、チェックIDレジスタ41、ID比較回路42、及びタスク状態信号生成回路43を含む。チェックIDレジスタ41には、観測対象とされる複数のタスクID情報が、エミュレータレジスタアクセス回路11を介してホストシステム71によって書き込まれる。ID比較回路42は、上記チェックIDレジスタ41に記憶された複数のタスクIDと、タスクID専用レジスタ47に記憶されているタスクID情報との比較を行う。この比較において一致したタスクID情報がタスク状態信号生成回路43に伝達される。このタスク状態信号生成回路43は、上記ID比較回路42から伝達されたタスクID情報に基づいてタスク状態信号24を生成する。このタスク状態信号24はエミュレーション条件検出回路54に伝達される。
The microprocessor 60 includes a buffer 44, a task ID dedicated
このようにデバッグ機能を備えたマイクロプロセッサ60を用いても、エミュレーション条件検出回路54において、伝達されたタスク状態信号24の値をエミュレーション条件のひとつとして検出することができる。また、デバッグ機能を備えたマイクロプロセッサ60を用いる場合には、バッファ44、タスクID専用レジスタデコード回路45、タスクID専用レジスタ47、及びタスク検出回路61がチップに内蔵されるため、マイクロプロセッサ60の周辺回路の簡素化を図ることができる。尚、図6に示されるエミュレータ70においても、図5に示されるのと同様に、パフォーマンス測定回路51、トレース回路52、及びブレーク回路53を設けることができる。
Even when the microprocessor 60 having the debugging function is used as described above, the emulation
以上本発明者によってなされた発明を具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。 Although the invention made by the present inventor has been specifically described above, the present invention is not limited thereto, and it goes without saying that various changes can be made without departing from the scope of the invention.
例えば、図1及び図5に示されるタスク検出回路12をマイクロプロセッサ20に内蔵することにより、当該マイクロプロセッサ20にデバッグ機能を持たせるようにしても良い。
For example, the
以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるエミュレータに適用した場合について説明したが、本発明はそれに限定されるものではなく、マイクロプロセッサ単体、若しくはそれを含むシステムに広く適用することができる。 In the above description, the case where the invention made mainly by the present inventor is applied to the emulator which is the field of use behind the invention has been described. However, the present invention is not limited thereto, and the microprocessor alone or the Can be widely applied to including systems.
本発明は、ユーザプログラムの実行を条件に適用することができる。 The present invention can be applied on condition that the user program is executed.
11 エミュレータレジスタアクセス回路
12,61 タスク検出回路
13 タスクアドレスレジスタ
14 アンドゲート
15 アドレス比較回路
16 ライト検出回路
17 タスクIDレジスタ
19 メモリ
20,60 マイクロプロセッサ
41 チェックIDレジスタ
42 ID比較回路
43 タスク状態信号生成回路
44 バッファ
45 タスクID専用デコード回路
47 タスクID専用レジスタ
50 CPU
51 パフォーマンス回路
52 トレース回路
53 ブレーク回路
54 エミュレーション条件検出回路
61 タスク検出回路
70 エミュレータ
71 ホストシステム
11 Emulator
51 Performance Circuit 52
Claims (5)
ホストシステムによって設定されたタスク書き込み先アドレス情報を保持可能な第1レジスタと、
上記マイクロプロセッサによって上記ユーザプログラムが実行された際に上記マイクロプロセッサから出力されるアドレス情報と、上記第1レジスタに保持されているアドレス情報とを比較可能な比較回路と、
上記比較回路の比較結果に基づいてタスク種別情報を保持可能な第2レジスタと、を含み、上記第2レジスタは上記ホストシステムによって読み出し可能にされたエミュレータ。 A microprocessor capable of executing a user program in which task type information is embedded;
A first register capable of holding task write destination address information set by the host system;
A comparison circuit capable of comparing the address information output from the microprocessor when the user program is executed by the microprocessor and the address information held in the first register;
A second register capable of holding task type information based on a comparison result of the comparison circuit, wherein the second register is readable by the host system.
ホストシステムによって設定されたタスク書き込み先アドレス情報を保持可能な第1レジスタと、
上記マイクロプロセッサによって上記ユーザプログラムが実行された際に上記マイクロプロセッサから出力されるアドレス情報と、上記第1レジスタに保持されているアドレス情報とを比較可能な第1比較回路と、
上記比較回路の比較結果に基づいてタスク種別情報を保持可能な第2レジスタと、
複数の観測対象タスク種別情報を設定可能な第3レジスタと、
上記第2レジスタの保持情報と上記第3レジスタの保持情報とを比較可能な第2比較回路と、
上記第2レジスタの保持情報と上記第3レジスタの保持情報とが一致した場合にタスク状態信号を生成可能なタスク状態信号生成回路と、
上記タスク状態信号に基づいてエミュレーション条件を検出可能なエミュレーション条件検出回路と、を含み、上記エミュレーション条件検出回路での検出結果に基づいて特定タスクのみのエミュレーションが可能とされたエミュレータ。 A microprocessor capable of executing a user program in which task type information is embedded;
A first register capable of holding task write destination address information set by the host system;
A first comparison circuit capable of comparing the address information output from the microprocessor when the user program is executed by the microprocessor and the address information held in the first register;
A second register capable of holding task type information based on the comparison result of the comparison circuit;
A third register capable of setting a plurality of observation target task type information;
A second comparison circuit capable of comparing the information held in the second register and the information held in the third register;
A task state signal generation circuit capable of generating a task state signal when the holding information of the second register matches the holding information of the third register;
And an emulation condition detection circuit capable of detecting an emulation condition based on the task status signal, and an emulator capable of emulating only a specific task based on a detection result of the emulation condition detection circuit.
上記エミュレーション条件検出回路の検出結果に基づいてトレース処理を行うトレース回路と、
上記エミュレーション条件検出回路の検出結果に基づいてブレーク処理を行うブレーク回路と、を含む請求項2記載のエミュレータ。 A performance measurement circuit for measuring performance based on the detection result of the emulation condition detection circuit;
A trace circuit that performs trace processing based on the detection result of the emulation condition detection circuit;
The emulator according to claim 2, further comprising: a break circuit that performs break processing based on a detection result of the emulation condition detection circuit.
外部から設定されたタスク書き込み先アドレス情報を保持可能な第4レジスタと、
上記中央署理装置によって上記ユーザプログラムが実行された際に上記中央署理装置から出力されるアドレス情報とステータス情報とをデコード可能なタスクID専用デコード回路と、
上記タスクID専用デコード回路のデコード出力に基づいてタスクID情報を記憶可能な第5レジスタと、
上記第4レジスタの出力と上記第5レジスタの出力とを比較することにより一致するタスクID情報を得るためのID比較回路と、
上記ID比較回路比較結果に応じてタスク状態信号を生成するタスク状態信号生成回路と、を含み、上記タスク状態信号が外部出力可能にされて成るマイクロプロセッサ。 A central processing unit capable of executing a user program in which task type information is embedded;
A fourth register capable of holding task write destination address information set externally;
A task ID dedicated decoding circuit capable of decoding address information and status information output from the central signing device when the user program is executed by the central signing device;
A fifth register capable of storing task ID information based on the decode output of the task ID dedicated decode circuit;
An ID comparison circuit for obtaining matching task ID information by comparing the output of the fourth register and the output of the fifth register;
And a task state signal generation circuit for generating a task state signal in accordance with the ID comparison circuit comparison result, wherein the task state signal can be externally output.
上記マイクロプロセッサから出力されたタスク状態信号をエミュレーション条件として検出可能なエミュレーション条件検出回路と、を含んで成るエミュレータ。 A microprocessor according to claim 4;
An emulator comprising: an emulation condition detection circuit capable of detecting a task status signal output from the microprocessor as an emulation condition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004060003A JP2005250821A (en) | 2004-03-04 | 2004-03-04 | Emulator and microprocessor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004060003A JP2005250821A (en) | 2004-03-04 | 2004-03-04 | Emulator and microprocessor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005250821A true JP2005250821A (en) | 2005-09-15 |
Family
ID=35031249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004060003A Pending JP2005250821A (en) | 2004-03-04 | 2004-03-04 | Emulator and microprocessor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005250821A (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5971555A (en) * | 1982-10-18 | 1984-04-23 | Hitachi Ltd | Performance monitoring system |
JPS63236142A (en) * | 1987-03-24 | 1988-10-03 | Yokogawa Electric Corp | Software monitoring device |
JPS6442745A (en) * | 1987-08-11 | 1989-02-15 | Nec Corp | Trapping system |
JPH01113841A (en) * | 1987-10-28 | 1989-05-02 | Hitachi Ltd | Multi-task debugging mechanism |
JPH01145740A (en) * | 1987-12-02 | 1989-06-07 | Hitachi Ltd | Emulator for multi-process |
JPH03113648A (en) * | 1989-09-28 | 1991-05-15 | Mitsubishi Electric Corp | Program debug system |
JPH05165672A (en) * | 1991-12-19 | 1993-07-02 | Mitsubishi Electric Corp | Processor |
JPH0612504A (en) * | 1992-01-27 | 1994-01-21 | Nec Corp | Emulation chip |
JPH09259002A (en) * | 1996-03-22 | 1997-10-03 | Hitachi Ltd | Debug support device |
JPH10177505A (en) * | 1996-12-16 | 1998-06-30 | Mitsubishi Electric Corp | Emulator device |
JPH10187480A (en) * | 1996-12-26 | 1998-07-21 | Hitachi Ltd | Emulator |
JPH10254738A (en) * | 1997-03-12 | 1998-09-25 | Mitsubishi Electric Corp | Emulator device and emulation method |
JPH11102306A (en) * | 1997-09-29 | 1999-04-13 | Hitachi Ltd | Emulator |
JP2001134463A (en) * | 1999-11-04 | 2001-05-18 | Fujitsu Ltd | Method for monitoring software running history |
JP2001350648A (en) * | 2000-06-08 | 2001-12-21 | Hitachi Ltd | Microcomputer |
-
2004
- 2004-03-04 JP JP2004060003A patent/JP2005250821A/en active Pending
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5971555A (en) * | 1982-10-18 | 1984-04-23 | Hitachi Ltd | Performance monitoring system |
JPS63236142A (en) * | 1987-03-24 | 1988-10-03 | Yokogawa Electric Corp | Software monitoring device |
JPS6442745A (en) * | 1987-08-11 | 1989-02-15 | Nec Corp | Trapping system |
JPH01113841A (en) * | 1987-10-28 | 1989-05-02 | Hitachi Ltd | Multi-task debugging mechanism |
JPH01145740A (en) * | 1987-12-02 | 1989-06-07 | Hitachi Ltd | Emulator for multi-process |
JPH03113648A (en) * | 1989-09-28 | 1991-05-15 | Mitsubishi Electric Corp | Program debug system |
JPH05165672A (en) * | 1991-12-19 | 1993-07-02 | Mitsubishi Electric Corp | Processor |
JPH0612504A (en) * | 1992-01-27 | 1994-01-21 | Nec Corp | Emulation chip |
JPH09259002A (en) * | 1996-03-22 | 1997-10-03 | Hitachi Ltd | Debug support device |
JPH10177505A (en) * | 1996-12-16 | 1998-06-30 | Mitsubishi Electric Corp | Emulator device |
JPH10187480A (en) * | 1996-12-26 | 1998-07-21 | Hitachi Ltd | Emulator |
JPH10254738A (en) * | 1997-03-12 | 1998-09-25 | Mitsubishi Electric Corp | Emulator device and emulation method |
JPH11102306A (en) * | 1997-09-29 | 1999-04-13 | Hitachi Ltd | Emulator |
JP2001134463A (en) * | 1999-11-04 | 2001-05-18 | Fujitsu Ltd | Method for monitoring software running history |
JP2001350648A (en) * | 2000-06-08 | 2001-12-21 | Hitachi Ltd | Microcomputer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7689867B2 (en) | Multiprocessor breakpoint | |
US7398419B2 (en) | Method and apparatus for seeding differences in lock-stepped processors | |
US11593241B2 (en) | Processor with debug pipeline | |
JPH113245A (en) | Smart debugging interface circuit | |
US11513804B2 (en) | Pipeline flattener with conditional triggers | |
EP0902367B1 (en) | Data processing unit with debug capabilities | |
JP2006507586A (en) | Apparatus and method for analyzing embedded system | |
US7428661B2 (en) | Test and debug processor and method | |
US6968410B2 (en) | Multi-threaded processing of system management interrupts | |
JP2001051874A (en) | Microcomputer | |
KR100825786B1 (en) | Memory card and debugging method for the same | |
JP2019204388A (en) | Semiconductor device and debug method | |
JP2005250821A (en) | Emulator and microprocessor | |
JP4600134B2 (en) | Multiprocessor system | |
JP2006146412A (en) | Multi-core processor and debugging method | |
JP5467172B1 (en) | Information processing system and information processing method | |
JP3068578B2 (en) | In-circuit emulator and saturation calculation processing method | |
JP2006318172A (en) | Microcomputer | |
KR100658485B1 (en) | Microprocessor development system | |
JP2005070951A (en) | Program processing apparatus | |
JP2005267349A (en) | Processing module and control method thereof | |
JPH0750446B2 (en) | Data processing device | |
JP2009223606A (en) | Debugging device and debugging method | |
JP2005292899A (en) | Microprocessor | |
JP2004206425A (en) | Tracing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070223 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090410 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090428 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090901 |