JP2550708B2 - Debug method - Google Patents

Debug method

Info

Publication number
JP2550708B2
JP2550708B2 JP1151659A JP15165989A JP2550708B2 JP 2550708 B2 JP2550708 B2 JP 2550708B2 JP 1151659 A JP1151659 A JP 1151659A JP 15165989 A JP15165989 A JP 15165989A JP 2550708 B2 JP2550708 B2 JP 2550708B2
Authority
JP
Japan
Prior art keywords
bus
processor
debug
detection circuit
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP1151659A
Other languages
Japanese (ja)
Other versions
JPH0315949A (en
Inventor
修一 廣屋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP1151659A priority Critical patent/JP2550708B2/en
Publication of JPH0315949A publication Critical patent/JPH0315949A/en
Application granted granted Critical
Publication of JP2550708B2 publication Critical patent/JP2550708B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は複数のプロセッサが共通バスを介して共有資
源にアクセスするマルチプロセッサ・システムにおける
デバッグ方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a debugging method in a multiprocessor system in which a plurality of processors access a shared resource via a common bus.

〔従来の技術〕[Conventional technology]

プログラムの実行を任意の条件により停止させて資源
の参照を行うという手法は、プログラム・デバッグにお
ける有力な手法である。特にデバッグ対象プログラム中
にブレーク・ポイント命令を埋め込み、その命令をプロ
セッサが実行した時にデバッグ例外を発生させ、デバッ
グ用プログラムにプログラムの制御を移すという方法は
一般的なものである。
The technique of stopping the execution of a program under arbitrary conditions and referring to resources is a powerful technique in program debugging. In particular, it is common to embed a break point instruction in a program to be debugged, generate a debug exception when the processor executes the instruction, and transfer control of the program to the debug program.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上記で述べたようなデバッグ方式は単一のプロセッサ
上でのプログラム・デバッグには有効であるが、マルチ
プロセッサにおいて利用した場合には、システム中の1
つのプロセッサのみがプログラムの実行を停止すること
になり、他のプロセッサではプログラムの実行を継続し
ているので、デバッグ中にシステムの有する資源が変更
され、デバッグが困難になるという問題点がある。
The debug method as described above is effective for program debugging on a single processor, but when it is used in a multiprocessor, it is
Since only one processor stops the execution of the program and the other processors continue the execution of the program, there is a problem that the resources of the system are changed during debugging, which makes debugging difficult.

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

複数のプロセッサが共通バスを介して共有資源にアク
セスするマルチプロセッサ・システムにおいて、バス獲
得中のプロセッサを記憶する回路とデバッグ例外用ベク
タ読み出しを検出する回路を用いれば、デバッグ例外が
発生したプロセッサに独占的なバス使用権を与えるバス
調停回路を構成でき、システム上に存在するすべてのデ
バッグ対象プログラムを一斉停止させることができる。
デバッグ例外が発生したプロセッサではデバッグ対象プ
ログラムの実行が中断され、代わりにデバッグ用プログ
ラムの実行が開始されるが、この時点ではすべてのデバ
ッグ対象プログラムが停止しているので、共有資源が凍
結された状態でのデバッグが可能となる。デバッグ完了
後デバッグ対象プログラムを再開させるためには、デバ
ッグ用プログラム実行中のプロセッサからバスの独占的
な使用状態を解除するための命令をバス調停回路に対し
て発行し、その後、デバッグ用プログラムからデバッグ
例外が発生したデバッグ対象プログラムの中断点へ制御
を戻す。上記の一連の手順により、システムの有する資
源が変更されない状態でのデバッグが可能となる。
In a multiprocessor system in which multiple processors access shared resources via a common bus, if a circuit that stores the processor that is acquiring the bus and a circuit that detects the vector read for debug exception are used, the processor in which the debug exception occurred can be A bus arbitration circuit that gives an exclusive right to use a bus can be configured, and all debug target programs existing on the system can be stopped all at once.
Execution of the debug target program is interrupted on the processor where the debug exception occurred, and the debug program starts executing instead, but at this point all the debug target programs are stopped, so the shared resources were frozen. It is possible to debug in the state. To restart the program to be debugged after completion of debugging, issue a command to the bus arbitration circuit to release the exclusive use state of the bus from the processor that is executing the debugging program, and then from the debugging program. Return control to the point at which the debug target program where the debug exception occurred. The series of procedures described above enables debugging without changing the resources of the system.

〔実施例〕〔Example〕

第1図は本発明の一実施例を示すブロック図である。
プロセッサ1〜3は共通バス5を介して共有メモリ6及
び入出力装置7をアクセスすることによりプログラムの
実行を行う。プロセッサ1〜3は共通バス5をアクセス
する場合、まずバス獲得要求信号をバス調停回路4に送
り、バス調停回路4からバス使用許可信号を受け取るこ
とにより、共通バス5を利用することが可能となる。通
常のプログラム実行時には、バス使用権決定回路41はプ
ロセッサ1〜3に対して均等または優先度付きですべて
のプロセッサを対象にバスの使用権を決定する。
FIG. 1 is a block diagram showing an embodiment of the present invention.
The processors 1 to 3 execute the program by accessing the shared memory 6 and the input / output device 7 via the common bus 5. When accessing the common bus 5, the processors 1 to 3 can use the common bus 5 by first sending a bus acquisition request signal to the bus arbitration circuit 4 and receiving a bus use permission signal from the bus arbitration circuit 4. Become. During normal program execution, the bus use right decision circuit 41 decides the bus use right for all processors with equality or priority to the processors 1 to 3.

次に第2図のフローチャートを用いて、デバッグ例外
発生時に第1図の回路がどのように動作するかを説明す
る。プログラムステップ(以下PSと呼ぶ)100〜102,PS2
00〜202,PS300〜PS302はそれぞれプロセッサ1〜3で動
作するデバッグ対象プログラムであり、PS303〜308はプ
ロセッサ3で発生したデバッグ例外により、実行を開始
するデバッグ用プログラムである。
Next, how the circuit of FIG. 1 operates when a debug exception occurs will be described with reference to the flowchart of FIG. Program step (hereinafter referred to as PS) 100 to 102, PS2
00 to 202 and PS300 to PS302 are debug target programs that operate on the processors 1 to 3, and PS303 to 308 are debug programs that start execution due to a debug exception that has occurred on the processor 3.

プロセッサ3で実行されているデバッグ対象プログラ
ムのPS301においてデバッグ例外が発生したとする。こ
の場合、プロセッサ3はデバッグ例外処理ルーチンの先
頭アドレスを獲得するために、共通バス5を獲得した
後、共有メモリ6上に存在するデバッグ例外用ベクタの
読み出しを行うが、この時、共通バス5上にはこのデバ
ッグ例外用ベクタの読み出しに必要なアドレスとステー
タスが出力されるので、デバッグ例外用ベクタ読み出し
検出回路43はこの共通バス5上の信号により、システム
上のいずれかのプロセッサでデバッグ例外が発生したこ
とを検出する。
It is assumed that a debug exception occurs in PS301 of the debug target program executed by the processor 3. In this case, the processor 3 reads the debug exception vector existing in the shared memory 6 after acquiring the common bus 5 in order to acquire the start address of the debug exception handling routine. Since the address and status necessary for reading this debug exception vector are output above, the debug exception vector read detection circuit 43 receives a debug exception in any processor in the system by the signal on this common bus 5. Is detected.

一方、バス使用権決定回路41はバス使用プロセッサを
決定するたびに、そのプロセッサ番号をバス獲得中プロ
セッサ記憶回路42に書き込んでいるので、デバッグ例外
用ベクタ読み出し検出回路43がデバッグ例外用ベクタ読
み出しを検出した時には、バス獲得中プロセッサ記憶回
路42の内容はプロセッサ3を示している。バス使用権決
定回路41はデバッグ例外用ベクタ読み出し検出回路43の
出力とバス獲得中プロセッサ記憶回路42の出力により、
プロセッサ3でデバッグ例外が発生したことを知る。バ
ス使用権決定回路41では、このデバッグ例外発生時以
降、プロセッサ3からのバス獲得要求に対してのみバス
の使用許可を行う。
On the other hand, since the bus use right decision circuit 41 writes the processor number to the processor memory circuit 42 during bus acquisition every time the bus use processor is decided, the debug exception vector read detection circuit 43 reads the debug exception vector. When detected, the contents of the bus acquiring processor memory circuit 42 indicate the processor 3. The bus right-of-use decision circuit 41 uses the output of the debug exception vector read detection circuit 43 and the output of the bus acquisition processor memory circuit 42 to
Know that a debug exception has occurred in processor 3. The bus use right decision circuit 41 permits the use of the bus only for the bus acquisition request from the processor 3 after the occurrence of this debug exception.

これにより、プロセッサ1,2ではそれぞれPS101,PS201
においてバス獲得待ちが発生し、プロセッサ1,2上のデ
バッグ対象プログラムの実行は停止する。プロセッサ3
では、デバッグ例外により制御がデバッグ用プログラム
に移り、PS304でデバッグ対象プログラムのレジスタ・
セーブを行い、PS305においてデバック操作を行うが、
この状態ではプロセッサ3しかプログラム実行をされて
おらず、システムの有する資源が変更されない状態での
デバッグが可能となる。
As a result, PS101 and PS201 in processors 1 and 2 respectively
At, a bus acquisition wait occurs, and the execution of the debug target program on processors 1 and 2 stops. Processor 3
Then, the control is transferred to the debug program due to the debug exception, and the PS304 registers / registers of the debug target program.
Save and perform debug operation on PS305,
In this state, only the processor 3 is executing the program, and debugging can be performed in a state where the resources of the system are not changed.

デバッグ操作が完了した後、PS306において独占的な
バスの使用を自ら解除する命令をバス調停回路4に対し
て行う。バス調停回路内に存在する独占的バス使用解除
命令検出回路44では、PS306から発行された命令を検出
し、バス使用権決定回路41に対して通常状態のバス調停
動作をするように要求する。
After the debug operation is completed, the PS 306 issues an instruction to the bus arbitration circuit 4 to cancel the exclusive use of the bus. The exclusive bus release instruction detection circuit 44 existing in the bus arbitration circuit detects the instruction issued from the PS 306 and requests the bus use right decision circuit 41 to perform the bus arbitration operation in the normal state.

この後、バス使用権決定回路41は、プロセッサ1およ
びプロセッサ2に対してもバスの使用許可を行うように
なるので、PS101およびPS201で動作を停止していたデバ
ッグ対象プログラムは動作を再開する。また、デバッグ
用プログラムが実行されていたプロセッサ3では、PS30
7においてデバッグ対象プログラムのレジスタをリスト
アし、PS308のリターン命令を行うことによりPS301以降
のプログラム実行を再開する。
After that, the bus use right decision circuit 41 also permits the use of the bus to the processor 1 and the processor 2, so that the debug target program, which has been stopped in PS101 and PS201, restarts its operation. In the processor 3 where the debug program was executed, PS30
In 7 the registers of the program to be debugged are restored and the PS308 and subsequent programs are resumed by issuing the PS308 return instruction.

上記の一連の手順により、システムの有する資源が変
更されない状態でのデバッグが可能となる。上記の実施
例では、プロセッサ内部から発生するデバック例外を対
象にしたが、プロセッサ外部から発生するデバッグ例外
に対しても同様の方式が適用可能である。
The series of procedures described above enables debugging without changing the resources of the system. In the above-described embodiment, the debug exception generated from the inside of the processor is targeted, but the same method can be applied to the debug exception generated from the outside of the processor.

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

以上説明したように本発明は、デバッグ例外が発生し
たプロセッサに対して独占的なバス使用権を与えること
により、デバッグ例外発生後すみやかにシステム全体に
存在するデバッグ対象プログラムを停止させることがで
きる。これによりシステムの共有資源が変化しないこと
を前提にしたデバッグが可能となり、困難なマルチプロ
セッサにおけるプログラム・デバッグを効率的に行える
という効果がある。
As described above, according to the present invention, by giving an exclusive right to use a bus to a processor in which a debug exception has occurred, a debug target program existing in the entire system can be stopped immediately after the debug exception occurs. This enables debugging on the assumption that the shared resources of the system do not change, and has an effect of efficiently performing program debugging on a difficult multiprocessor.

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

第1図は本発明の一実施例を示すブロック図、第2図は
動作を示すフローチャートである。 1〜3……プロセッサ、4……バス調停回路、41……バ
ス使用権決定回路、42……バス獲得中プロセッサ記憶回
路、43……デバッグ例外用ベクタ読み出し検出回路、44
……独占的バス使用権解除命令検出回路、5……共通バ
ス、6……共有メモリ、7……入出力装置。
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a flow chart showing the operation. 1 to 3 ... Processor, 4 ... Bus arbitration circuit, 41 ... Bus usage right decision circuit, 42 ... Processor memory circuit during bus acquisition, 43 ... Debug exception vector read detection circuit, 44
...... Exclusive bus right release instruction detection circuit, 5 Common bus, 6 Shared memory, 7 I / O device.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数のプロセッサが共通バスを介して共有
資源にアクセスするマルチプロセッサ・システムにおい
て、 デバッグ例外が発生したとき該当するプロセッサが獲得
した前記共通バスに生成されたデバッグ例外用ベクタ読
み出し信号を検知する第一検出回路と、デバッグ例外の
処理が終了したとき前記共通バスに生成された独占的バ
ス使用解除信号を検知する第二検出回路と、通常の動作
時には各プロセッサのバス獲得要求に対して均等または
優先度付でバス使用権を決定し,前記第一検出回路から
の信号およびバス獲得中プロセッサ記憶回路からの信号
に従って該当するプロセッサに前記共通バスの独占的バ
ス使用権を決定し,前記第二検出回路からの信号に従っ
て前記プロセッサの独占的バス使用権を解除し前記通常
の動作時に復するバス使用権決定回路と、前記バス使用
権決定回路が前記共通バスを使用するプロセッサを決定
するたびにそのプロセッサ番号を書き込むバス獲得中プ
ロセッサ記憶回路とを含むバス調停部を有することを特
徴とするデバッグ方式。
1. In a multiprocessor system in which a plurality of processors access a shared resource through a common bus, a debug exception vector read signal generated by the corresponding processor when a debug exception occurs is generated on the common bus. A first detection circuit for detecting the above, a second detection circuit for detecting the exclusive bus release signal generated on the common bus when the processing of the debug exception is completed, and a bus acquisition request of each processor during normal operation. On the other hand, the bus use right is determined with equality or priority, and the exclusive bus use right of the common bus is determined for the corresponding processor according to the signal from the first detection circuit and the signal from the processor memory circuit during bus acquisition. , Releasing the exclusive bus right of the processor according to the signal from the second detection circuit and restoring it during the normal operation. And a bus arbitration unit for writing a processor number each time the bus usage right determining circuit determines a processor that uses the common bus. Debug method.
JP1151659A 1989-06-13 1989-06-13 Debug method Expired - Fee Related JP2550708B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1151659A JP2550708B2 (en) 1989-06-13 1989-06-13 Debug method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1151659A JP2550708B2 (en) 1989-06-13 1989-06-13 Debug method

Publications (2)

Publication Number Publication Date
JPH0315949A JPH0315949A (en) 1991-01-24
JP2550708B2 true JP2550708B2 (en) 1996-11-06

Family

ID=15523409

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1151659A Expired - Fee Related JP2550708B2 (en) 1989-06-13 1989-06-13 Debug method

Country Status (1)

Country Link
JP (1) JP2550708B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01146978A (en) * 1987-12-02 1989-06-08 Yokohama Rubber Co Ltd:The Adhesive composition

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59100966A (en) * 1982-12-01 1984-06-11 Fujitsu Ltd Shared bus control system of multiprocessor system

Also Published As

Publication number Publication date
JPH0315949A (en) 1991-01-24

Similar Documents

Publication Publication Date Title
US9690603B2 (en) Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method
US5511217A (en) Computer system of virtual machines sharing a vector processor
US7020871B2 (en) Breakpoint method for parallel hardware threads in multithreaded processor
US5257354A (en) System for monitoring and undoing execution of instructions beyond a serialization point upon occurrence of in-correct results
US8370841B2 (en) Optimizing deterministic event record and replay operations
JPH06110740A (en) Method and means for measuring channel-using time
US20040205719A1 (en) Hop method for stepping parallel hardware threads
JPH0430053B2 (en)
RU2137182C1 (en) Execution of data processing instruction
JPH0679307B2 (en) Coprocessor parallel operation control method
EP0431326A2 (en) Inter-processor interrupts in an n-element multi-processor
JP2550708B2 (en) Debug method
JP2823230B2 (en) How to continue processing
JP2713124B2 (en) In-circuit emulator
JPH0552535B2 (en)
JPH0769825B2 (en) Parallel processor
JP2825589B2 (en) Bus control method
JPH11312102A (en) Reset system for information processor
JP2632891B2 (en) System development equipment
JPH08305607A (en) Program debugging method and debugger for multiprocessor system
JPH07234850A (en) Device and method for multiprocessor system
JP2665173B2 (en) Processor trap circuit
JPH0772874B2 (en) Interrupt receiving device
JPH0149975B2 (en)
JPH03110637A (en) Instruction trace system

Legal Events

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