JPH0315949A - Debugging system - Google Patents
Debugging systemInfo
- Publication number
- JPH0315949A JPH0315949A JP1151659A JP15165989A JPH0315949A JP H0315949 A JPH0315949 A JP H0315949A JP 1151659 A JP1151659 A JP 1151659A JP 15165989 A JP15165989 A JP 15165989A JP H0315949 A JPH0315949 A JP H0315949A
- Authority
- JP
- Japan
- Prior art keywords
- bus
- debug
- processor
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 claims description 9
- 238000000034 method Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は複数のプロセッサが共通バスを介して共有資源
にアクセスするマルチプロセッサ・システムにおけるデ
バッグ方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a debugging method in a multiprocessor system in which a plurality of processors access shared resources via a common bus.
プログラムの実行を任意の条件により停止させて資源の
参照を行うという手法は、プ四グラム・デバッグにおけ
る有力な手法である。特にデバッグ対象プログラム中に
ブレーク・ポイント命令を埋め込み、その命令をプロセ
ッサが実行した時にデバッグ例外を発生させ、デバッグ
用プログラムにプログラムの制御を移すという方法は一
般的なものである。The method of halting program execution under arbitrary conditions and referencing resources is an effective method for programmatic debugging. In particular, a common method is to embed a breakpoint instruction in a program to be debugged, generate a debugging exception when the processor executes the instruction, and transfer control of the program to the debugging program.
上記で述べたようなデバッグ方式は単一のプロセッサ上
でのプログラム・デバッグには有効であるが、マルチプ
ロセッサにおいて利用した場合には、システム中の1つ
のプロセッサのみがプログラムの実行を停止することに
なり、他のプロセッサではプログラムの実行を継続して
いるので、デバッグ中にシステムの有する資源が変更さ
れ、デバッグが困難になるという問題点がある。The debugging methods described above are effective for debugging programs on a single processor, but when used on multiple processors, only one processor in the system may stop program execution. Since the program continues to be executed on other processors, the resources of the system are changed during debugging, making debugging difficult.
複数のプロセッサが共通バスを介して共有資源にアクセ
スするマルチプロセッサ・システムにおいて、バス獲得
中のプロセッサを記憶する回路とデバッグ例外用ベクタ
読み出しを検出する回路を用いれば、デバッグ例外が発
生したプロセッサに独占的なバス使用権を与えるバス調
停回路を構戒でき、システム上に存在するすべてのデバ
ッグ対象プログラムを一斉停止させることができる。デ
バッグ例外が発生したプロセッサではデバッグ対象プロ
グラムの実行が中断され、代わりにデバッグ用プログラ
ムの実行が開始されるが、この時点ではすべてのデバッ
グ対象プログラムが停止しているので、共有資源が凍結
された状態でのデバッグが可能となる。デバッグ完了後
デバッグ対象プログラムを再開させるためには、デバッ
グ用プログラム実行中のプロセッサからバスの独占的な
使用状態を解除するための命令をバス調停回路に対して
発行し、その後、デバッグ用プログラムからデバッグ例
外が発生したデバッグ対象プログラムの中断点へ制御を
戻す。上記の一連の手順により、システムの有する資源
が変更されない状態でのデバッグが可能となる。In a multiprocessor system where multiple processors access shared resources via a common bus, by using a circuit that remembers which processor is acquiring the bus and a circuit that detects vector reads for debug exceptions, it is possible to The bus arbitration circuit that gives exclusive bus usage rights can be ignored, and all debug target programs existing on the system can be stopped all at once. In the processor where the debug exception occurred, execution of the debug target program is interrupted and execution of the debug program is started instead, but at this point all debug target programs have stopped, so the shared resources are frozen. It is possible to debug in the current state. In order to restart the debug target program after debugging is complete, the processor running the debug program issues an instruction to the bus arbitration circuit to release the bus from exclusive use, and then the debug program Returns control to the suspension point of the debug target program where the debug exception occurred. The above series of procedures enables debugging without changing the resources of the system.
第1図は本発明の一実施例を示すブロック図である。プ
ロセッサ1〜3は共通バスラを介して共有メモリ6及び
入出力装置7をアクセスすることによりプログラムの実
行を行う。プロセッサエ〜3は共通バス5をアクセスす
る場合、まずバス獲得要求信号をバス調停回路4に送り
、バス調停回路4からバス使用許可信号を受け取ること
により、共通バスラを利用することが可能となる。通常
のプログラム実行時には、バス使用権決定回路41はプ
ロセッサ1〜3に対して均等または優先度付きですべて
のプロセッサを対象にバスの使用権を決定する。FIG. 1 is a block diagram showing one embodiment of the present invention. The processors 1 to 3 execute programs by accessing the shared memory 6 and the input/output device 7 via a common bus router. When processor E~3 accesses the common bus 5, it first sends a bus acquisition request signal to the bus arbitration circuit 4, and receives a bus use permission signal from the bus arbitration circuit 4, thereby making it possible to use the common bus. . During normal program execution, the bus right determining circuit 41 determines the bus right to use the bus for all processors 1 to 3, either equally or with priority.
次に第2図のフローチャートを用いて、デバッグ例外発
生時に第1図の回路がどのように動作するかを説明する
。プログラムステップ(以下PSと呼ぶ)100〜10
2,PS200〜202,PS300〜PS302はそ
れぞれプロセッサ1〜3で動作するデバッグ対象プログ
ラムであり、PS303〜308はプルセッサ3で発生
したデバッグ例外により、実行を開始するデバッグ用プ
ログラムである。Next, using the flowchart of FIG. 2, it will be explained how the circuit of FIG. 1 operates when a debug exception occurs. Program steps (hereinafter referred to as PS) 100 to 10
2, PS200-202 and PS300-PS302 are programs to be debugged that run on the processors 1-3, respectively, and PS303-308 are debug programs that start execution when a debug exception occurs in the processor 3.
プロセッサ3で実行されているデバッグ対象プログラム
のP S 3’0 1においてデバッグ例外が発生した
とする。この場合、プロセッサ3はデバッグ例外処理ル
ーチンの先頭アドレスを獲得するために、共通バス5を
獲得した後、共有メモリ6上に存在するデバッグ例外用
ベクタの読み出しを行うが、この時、共通バスラ上には
このデバッグ例外用ベクタの読み出しに必要なアドレス
とステータスが出力されるので、デバッグ例外用ベクタ
読み出し検出回路43はこの共通バスラ上の信号により
、システム上のいずれかのプロセッサでデバッグ例外が
発生したことを検出する。Assume that a debug exception occurs in P S 3'0 1 of the debug target program being executed by processor 3. In this case, in order to acquire the start address of the debug exception handling routine, the processor 3 acquires the common bus 5 and then reads the debug exception vector existing on the shared memory 6. Since the address and status necessary for reading this debug exception vector are output to the debug exception vector read detection circuit 43, the debug exception vector read detection circuit 43 detects when a debug exception occurs in any processor on the system using the signal on this common bus. Detect what happened.
一方、バス使用権決定回路41はバス使用プロセッサを
決定するたびに、そのプロセッサ番号をバス獲得中プロ
セッサ記憶回路42に書き込んでいるので、デバッグ例
外用ベクタ読み出し検出回路43がデバッグ例外用ベク
タ読み出しを検出した時には、バス獲得中プロセッサ記
憶回路42の内容はプロセッサ3を示している。バス使
用権決定回路41はデバッグ例外用ベクタ読み出し検出
回路43の出力とバス獲得中プロセッサ記憶回路42の
出力により、プロセッサ3でデバッグ例外が発生したこ
とを知る。バス使用権決定回路41では、このデバッグ
例外発生時以降、プロセッサ3からのバス獲得要求に対
してのみバスの使用許可を行う。On the other hand, each time the bus usage right determination circuit 41 determines a processor to use the bus, it writes the processor number to the bus acquisition processor memory circuit 42, so the debug exception vector read detection circuit 43 detects the debug exception vector read. When detected, the contents of processor storage circuit 42 indicate processor 3 while acquiring the bus. The bus right determining circuit 41 learns that a debug exception has occurred in the processor 3 from the output of the debug exception vector read detection circuit 43 and the output of the bus acquisition processor memory circuit 42. After the occurrence of this debug exception, the bus right determining circuit 41 grants permission to use the bus only in response to a bus acquisition request from the processor 3.
これにより、プロセッサ1,2ではそれぞれPSIOI
,PS201においてバス獲得待ちが発生し、プロセッ
サ1.2上のデバッグ対象プログラムの実行は停止する
。プロセッサ3では、デバッグ例外により制御がデバッ
グ用プログラムに移り、PS304でデバッグ対象プロ
グラムのレジスタ・セーブを行い、PS305において
デバック操作を行うが、この状態ではプロセッサ3しが
プログラム実行をされておらず、システムの有する資源
が変更されない状態でのデバッグが可能となる。As a result, processors 1 and 2 each have PSIOI
, a bus acquisition wait occurs in the PS 201, and the execution of the debug target program on the processor 1.2 is stopped. In the processor 3, control is transferred to the debug program due to a debug exception, the registers of the debug target program are saved in the PS 304, and the debug operation is performed in the PS 305, but in this state, the processor 3 is not executing the program, It becomes possible to debug without changing the resources of the system.
デバック操作が完了した後、PS306において独占的
なバスの使用を自ら解除する命令をバス調停回路4に対
して行う。バス調停回路内に存在する独占的バス使用解
除命令検出回路44では、PS306から発行された命
令を検出し、バス使用権決定回路41に対して通常状態
のバス調停動作をするように要求する。After the debug operation is completed, the PS 306 issues a command to the bus arbitration circuit 4 to release the exclusive use of the bus. An exclusive bus release command detection circuit 44 existing in the bus arbitration circuit detects the command issued from the PS 306 and requests the bus right determination circuit 41 to perform bus arbitration operation in the normal state.
この後、バス使用権決定回路41は、プロセッサ1およ
びプロセッサ2に対してもバスの使用許可を行うように
なるので、PSIOIおよびPS201で動作を停止し
ていたデバッグ対象プログラムは動作を再開する。また
、デバッグ用プログラムが実行されていたプロセッサ3
では、PS307においてデバッグ対象プログラムのレ
ジスタをリストアし、PS308のリターン命令を行う
ことによりPS301以降のプログラム実行を再開する
。After this, the bus right determining circuit 41 also grants permission to the processor 1 and the processor 2 to use the bus, so the debug target program whose operation has been stopped at the PSIOI and the PS 201 resumes operation. In addition, the processor 3 on which the debugging program was being executed
Then, PS307 restores the registers of the program to be debugged, and PS308 executes a return instruction to resume program execution starting from PS301.
上記の一連の手順により、システムの有する資源が変更
されない状態でのデバッグが可能となる。上記の実施例
では、プロセッサ内部から発生するデバック例外を対象
にしたが、プロセッサ外部から発生するデバッグ例外に
対しても同様の方式が適用可能である。The above series of procedures enables debugging without changing the resources of the system. In the above embodiment, the target is a debug exception that occurs from inside the processor, but a similar method can be applied to a debug exception that occurs from outside the processor.
以上説明したように本発明は、デバッグ例外が発生した
プロセッサに対して独占的なバス使用権を与えることに
より、デバッグ例外発生後すみやかにシステム全体に存
在するデバッグ対象プログラムを停止させることができ
る。これによりシステムの共有資源が変化しないことを
前提にしたデバッグが可能となり、困難なマルチプロセ
ッサにおけるプログラム・デバッグを効率的に行えると
いう効果がある。As described above, the present invention allows programs to be debugged in the entire system to be stopped immediately after the debug exception occurs by giving exclusive bus usage rights to the processor in which the debug exception occurs. This enables debugging on the assumption that the system's shared resources do not change, and has the effect of efficiently debugging programs on multiprocessors, which is difficult to do.
第1図は本発明の一実施例を示すブロック図、第2図は
動作を示すフローチャートである。
1〜3・・・プロセッサ、4・・・バス調停回路、4l
・・・バス使用権決定回路、42・・・バス獲得中プロ
セッサ記憶回路、43・・・デバッグ例外用ベクタ読み
出し検出回路、44・・・独占的バス使用権解除命令検
出回路、5・・・共通バス、6・・・共有メモリ、7・
・・入出力装置。FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG. 2 is a flow chart showing the operation. 1 to 3... Processor, 4... Bus arbitration circuit, 4l
. . . Bus usage right determination circuit, 42 . . . Bus acquisition processor storage circuit, 43 . . . Debug exception vector read detection circuit, 44 . common bus, 6... shared memory, 7.
...I/O device.
Claims (1)
スするマルチプロセッサ・システムにおいて、バス獲得
中プロセッサ記憶回路とデバッグ例外用ベクタ読み出し
検出回路とを含み、前記バス獲得中プロセッサ記憶回路
と前記デバッグ例外用ベクタ読み出し検出回路の出力に
基づきデバッグ例外が発生したプロセッサに独占的なバ
ス使用権を与え、プロセッサからの命令によりバスの独
占的な使用状態を解除するバス調停回路を有することを
特徴とするデバッグ方式。A multiprocessor system in which a plurality of processors access a shared resource via a common bus, the system including a bus acquisition processor storage circuit and a debug exception vector read detection circuit, the bus acquisition processor storage circuit and the debug exception vector read detection circuit. Debugging characterized by having a bus arbitration circuit that grants exclusive bus usage rights to a processor in which a debugging exception has occurred based on the output of the vector read detection circuit, and releases the exclusive use of the bus based on an instruction from the processor. method.
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 true JPH0315949A (en) | 1991-01-24 |
JP2550708B2 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01146978A (en) * | 1987-12-02 | 1989-06-08 | Yokohama Rubber Co Ltd:The | Adhesive composition |
Citations (1)
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 |
-
1989
- 1989-06-13 JP JP1151659A patent/JP2550708B2/en not_active Expired - Fee Related
Patent Citations (1)
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 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01146978A (en) * | 1987-12-02 | 1989-06-08 | Yokohama Rubber Co Ltd:The | Adhesive composition |
Also Published As
Publication number | Publication date |
---|---|
JP2550708B2 (en) | 1996-11-06 |
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 | |
US8370841B2 (en) | Optimizing deterministic event record and replay operations | |
US7768518B2 (en) | Enabling multiple instruction stream/multiple data stream extensions on microprocessors | |
JPH06110740A (en) | Method and means for measuring channel-using time | |
EP0431326A2 (en) | Inter-processor interrupts in an n-element multi-processor | |
IE56792B1 (en) | Method and apparatus for self-testing of floating point accelerator processors | |
US4974147A (en) | Programmable quiesce apparatus for retry, recovery and debug | |
JPS58197553A (en) | Program monitor | |
JPH0315949A (en) | Debugging system | |
JP2653412B2 (en) | How to set breakpoints | |
JPH0552535B2 (en) | ||
JPS6336023B2 (en) | ||
JP2009104259A (en) | Method and system for extending a plurality of command streams/a plurality of data streams on microprocessor | |
JP2575025B2 (en) | In-circuit emulator | |
JP2632891B2 (en) | System development equipment | |
JP2825589B2 (en) | Bus control method | |
JPH11167500A (en) | Event circuit and debug system for emulator device | |
JP2665173B2 (en) | Processor trap circuit | |
JPS62125437A (en) | Control method for additional processor | |
JP2654105B2 (en) | Microprocessor | |
JPH0772874B2 (en) | Interrupt receiving device | |
JPH0149975B2 (en) | ||
JPH03232051A (en) | Semaphore access control method | |
JPS6349249B2 (en) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |