JPH0282344A - Program debugging method for multiprocessor system - Google Patents

Program debugging method for multiprocessor system

Info

Publication number
JPH0282344A
JPH0282344A JP63233704A JP23370488A JPH0282344A JP H0282344 A JPH0282344 A JP H0282344A JP 63233704 A JP63233704 A JP 63233704A JP 23370488 A JP23370488 A JP 23370488A JP H0282344 A JPH0282344 A JP H0282344A
Authority
JP
Japan
Prior art keywords
flag
semaphore
memory
trace information
processor
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
JP63233704A
Other languages
Japanese (ja)
Inventor
Masahiro Ikeda
昌弘 池田
Nobuyoshi Sato
信義 佐藤
Mitsuo Sakurai
櫻井 三男
Shigenori Koyata
小谷田 重則
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63233704A priority Critical patent/JPH0282344A/en
Publication of JPH0282344A publication Critical patent/JPH0282344A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain accurate trace information indicating the instruction execution order of plural processors by resetting a flag to release memory occupation after writing trace information in a memory area. CONSTITUTION:When the space number, the address, or the like of a test and set instruction of, for example, a processor 10a is detected at the time of system debugging, the processor 10a refers to a semaphore flag. When the flag is not detected, the processor 10a gets the occupation right of a memory device 12 by its own semaphore control part 16a. When the flag is detected, another processor 10b or 10c has the occupation right of the memory device 12, and therefore, the processor 10a gets the occupation right of the memory device 12 by its own semaphore control part 16a after release of the occupation right due to flag reset. When write of trace information to the memory area of the memory device 12 is terminated, an address pointer is updated, and the flag is reset to release the memory occupation right. Thus, accurate trace information for debugging which indicates the instruction execution order of plural processors is obtained.

Description

【発明の詳細な説明】 〔目 次〕 概要 産業上の利用分野 従来の技術 発明が解決しようとする課題 課題を解決するための手段 作用 実施例 発明の効果 〔概 要〕 マルチプロセッサシステムの情報処理装置におけるプロ
グラムのデバッグの際の命令実行中にテストアンドセッ
ト命令を実行するごとに得られるトレース情報をメモリ
のトレース領域に書き込むことによって行われるデバッ
ギングの方法に関し、複数のプロセッサによる命令実行
順を示す正確なトレース情報が求められるデバッグ方法
を得ることを目的とし、 メモリ装置のセマフォ領域に格納されたデータにリード
・モディファイ・ライト動作を実行するセマフォ制御部
を有するマルチプロセッサシステムにおけるプログラム
のデバッギングの方法であって、プロセッサで実行され
た命令のうち、テストアンドセット命令についてトレー
ス情報を検出し、該情報の検出後にセマフォフラグを参
照し、フラグ非検出時にはフラグを立ててメモリ占有を
行い、フラグ検出時にはフラグリセットを待ってフラグ
を立ててメモリ占有を行い、メモリ領域にトレース情報
を書き込み、その後フラグをリセットし、メモリ占有を
開放するように構成する。
[Detailed Description of the Invention] [Table of Contents] Overview Industrial Application Fields Conventional Technology Problems to be Solved by the Invention Means for Solving the Problems Action Examples Effects of the Invention [Summary] Information processing in multiprocessor systems Regarding a debugging method that is performed by writing trace information obtained each time a test and set instruction is executed during instruction execution when debugging a program in a device to a trace area of memory, the order in which instructions are executed by multiple processors is shown. A method for debugging programs in a multiprocessor system having a semaphore control unit that performs read, modify, and write operations on data stored in a semaphore area of a memory device, with the aim of obtaining a debugging method that requires accurate trace information. Among the instructions executed by the processor, trace information is detected for the test and set instruction, and after detecting the information, the semaphore flag is referred to, and when the flag is not detected, the flag is set and memory is occupied, and the flag is detected. Sometimes, it is configured to wait for a flag reset, set a flag, occupy the memory, write trace information in the memory area, and then reset the flag and release the memory occupation.

〔産業上の利用分野〕[Industrial application field]

本発明は、マルチプロセッサシステムの情報処理装置に
おけるプログラムのデハ・7グの際の命令実行中にテス
トアンドセット命令を実行するごとに得られるトレース
情報をメモリのトレース領域に書き込むことによって行
われるマルチプロセッサシステムにおけるプログラムの
デバッギングの方法に関する。
The present invention provides a multiprocessor system that performs multiprocessing by writing trace information obtained each time a test and set instruction is executed during instruction execution during debugging and debugging of a program in an information processing device of a multiprocessor system to a trace area of a memory. This invention relates to a method for debugging programs in processor systems.

マルチプロセッサシステムにおけるシステムプログラム
、ユーザプログラムとしてのマクロコードをデバッグす
る際に、セマフォ制御を利用して共有メモリをアクセス
するプログラムにおいて、−度に指定された数のプロセ
ッサまでしかその領域をアクセスできない領域であると
、待ち合わせやアクセスエラーが生じて、時としてはデ
ッドロックを生ずることがある。この場合、いかにして
デッドロック等が生じるかを解析するために、テストア
ンドセット命令のトレース情報をメモリ装置に書き込ん
でトレース終了後にデイスプレィ装置か印刷機等に出力
して、テストアンドセット命令の実行順を調べるように
している。
When debugging macro code as a system program or user program in a multiprocessor system, in a program that accesses shared memory using semaphore control, the area can only be accessed by a specified number of processors at a time. If this happens, waiting and access errors may occur, and sometimes deadlocks may occur. In this case, in order to analyze how deadlocks etc. occur, the trace information of the test and set instruction is written to a memory device, and after the trace is completed, it is output to a display device or printer, etc. I am trying to check the execution order.

〔従来の技術〕[Conventional technology]

第7図は、従来型のマルチプロセッサシステムのブロッ
ク図である。システムスト−レージ(SS)としてのメ
モリ装置12に対して複数のインストラクションプロセ
ッサ(IPU)、例えば3台のプロセッサ10a 、 
10b 、 10cが接続され、さらにインタフェース
用のシステムプロセッサ(SPtl) 13を介してデ
ィスク、磁気テープ等の外部装置が接続される。
FIG. 7 is a block diagram of a conventional multiprocessor system. A plurality of instruction processors (IPUs), for example, three processors 10a, for a memory device 12 as a system storage (SS),
10b and 10c are connected, and external devices such as disks and magnetic tapes are further connected via a system processor (SPtl) 13 for interface.

このようなマルチプロセッサシステムに従来のシングル
プロセッサのデバッグ方法を適用すると次のようになる
When a conventional single-processor debugging method is applied to such a multiprocessor system, the result is as follows.

まず、メモリ装置12のメモリ領域は、例えば第8図の
メモリマツプに示すように、トレース対象マクロプログ
ラム(上段に表示)、データ領域(下段)、およびアド
レスポインタで指定されるトレースデータ領域で構成さ
れる。ここで、MOV等の記号は命令を示し、rTS命
」はテストアンドセット命令を示す。斜線部はオペコー
ドアドレスを図解する。下段の3個のブロックはそれぞ
れ獲得される領域が示される。
First, as shown in the memory map of FIG. 8, for example, the memory area of the memory device 12 is composed of a macro program to be traced (displayed in the upper row), a data area (lower row), and a trace data area specified by an address pointer. Ru. Here, symbols such as MOV indicate commands, and "rTS command" indicates a test and set command. The shaded area illustrates the opcode address. The three blocks at the bottom indicate areas to be acquired.

特定のプロセッサ、例えばプロセッサ10aで最初のテ
ストアンドセット命令を実行することにより、そのマク
ロ命令のマクロコードの空間番号およびアドレスが得ら
れると、アドレスポインタで示す最初のトレースデータ
領域に例えば空間番号1、アドレス1としてトレース情
報が書き込まれ、次に同じプロセッサ10a、他のプロ
セッサ10bまたは10cによるテストアンドセット命
令の実行で得られたトレース情報はアドレスポインタの
更新で示され、次のトレースデータ領域、例えば空間番
号2、アドレス2に順次書き込まれる。
When the space number and address of the macro code of the macro instruction are obtained by executing the first test and set instruction in a specific processor, for example, the processor 10a, the space number 1, for example, is stored in the first trace data area indicated by the address pointer. , trace information is written as address 1, and then trace information obtained by execution of a test and set instruction by the same processor 10a, another processor 10b or 10c is indicated by updating the address pointer, and the next trace data area, For example, it is sequentially written to space number 2 and address 2.

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

しかしながら、前述の従来のマルチプロセッサシステム
のデバッグ方法においては、複数のプロセッサが同じト
レースデータ領域にトレース情報を書き込むようになる
ため、成るプロセッサがアドレスポインタで示すメモリ
領域に空間番号およびアドレスから成るトレース情報を
書き込んでいる最中に、またはアドレスポインタを更新
している最中に、別のプロセッサが同じアドレスポイン
タに割り込みによりトレース情報を書き込んだり、アド
レスポインタを更新してしまう場合があり、このため異
なる複数のプロセッサによるマクロ命令の実行順を示す
トレース情報が得られなくなるという課題がある。
However, in the conventional debugging method for multiprocessor systems described above, multiple processors write trace information to the same trace data area, so each processor writes a trace consisting of a space number and address to the memory area indicated by the address pointer. While writing information or updating the address pointer, another processor may write trace information or update the address pointer by interrupting the same address pointer. There is a problem in that trace information indicating the order in which macro instructions are executed by different processors cannot be obtained.

もちろん、複数のプロセッサごとに別々のメモリ領域を
確保してトレース情報を書き込むことも考えられるが、
プロセッサ相互の実行順がわからなくなる。
Of course, it is possible to allocate separate memory areas for multiple processors and write trace information, but
The mutual execution order of processors becomes unclear.

さらに、テストアンドセットされる領域のアドレスがイ
ンデックスレジスタの内容によって変化するインデック
ス修飾であれば、トレース情報からは、どの共有領域へ
のアクセスか不明である。
Furthermore, if the address of the area to be tested and set is an index modification that changes depending on the contents of the index register, it is unclear from the trace information which shared area is being accessed.

本発明の目的は前述の課題にかんがみてなされたもので
、マイクロプロセッサ等にハードウェアとして設けられ
ているセマフォ制御機能を有効に利用して、複数のプロ
セッサによる命令実行順を示す正確なトレース情報が求
められるマルチプロセッサシステムのデバッグ方法を得
ることにある。
An object of the present invention has been made in view of the above-mentioned problems, and it is an object of the present invention to effectively utilize a semaphore control function provided as hardware in a microprocessor, etc., to obtain accurate trace information indicating the order of instruction execution by a plurality of processors. The objective is to obtain a debugging method for multiprocessor systems that requires

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

第1図の本発明の処理過程を例示する流れ図および第2
図の本発明を適用する装置のブロック図を参照して説明
する。本発明の方法が用いられるシステムはメモリ装置
12と複数のプロセッサ10a、10b、および10c
を具備し、各プロセッサにはマイクロ命令により実行さ
れるハードウェアとしてのセマフォ制御部16a、16
b、および16Cが設けられる。各セマフォ制御部は、
メモリ装置12の特定アドレスとなるセマフォ領域14
に格納されたデータを読み取った後に特定のビットにフ
ラグを立てて書き込むリード・モディファイ・ライト動
作をマイクロ命令により実行する機能を備えており、こ
のリード・モディファイ・ライト動作中は他のプロセッ
サからの読み出し、書き込み、および割り込みが禁止さ
れる。
A flowchart illustrating the process of the present invention in FIG. 1 and FIG.
Description will be made with reference to a block diagram of a device to which the present invention is applied. A system in which the method of the invention is used includes a memory device 12 and a plurality of processors 10a, 10b, and 10c.
Each processor has semaphore control units 16a and 16 as hardware executed by microinstructions.
b, and 16C are provided. Each semaphore control unit is
Semaphore area 14 serving as a specific address of memory device 12
It has the ability to use microinstructions to execute a read/modify/write operation that flags and writes to specific bits after reading data stored in the processor. Reads, writes, and interrupts are disabled.

本発明は、上記セマフォ制御機能を利用して、システム
デバッグ時に、特定のプロセッサの実行命令のうちテス
トアンドセット命令の空間番号、アドレス、オペランド
のアドレス、およびプロセッサ番号を検出すると(Sl
)該プロセンサでセマフォフラグを参照する(S2)。
The present invention makes use of the above semaphore control function to detect the space number, address, operand address, and processor number of a test and set instruction among the execution instructions of a specific processor during system debugging (Sl
) The processor refers to the semaphore flag (S2).

該フラグの非検出時には自己のセマフォ制御によりメモ
リ装置12の占有権を獲得した後に(S3)、フラグ検
出時には他のプロセッサがメモリ装置12の占有権をも
っているのでフラグリセットによる占有権の開放を待っ
て自己のセマフォ制御によりメモリ装置12の占有権を
獲得した後に(s3)、トレース情報をアドレスポイン
タで示すメモリ装置12のメモリ領域に書き込む(S4
)。I・レース情報の書き込みが終了するとアドレスポ
インタを更新(S5:Iした後にフラグをリセット(S
6)してメモリ占有権を開放する。
When the flag is not detected, the processor acquires the exclusive right to the memory device 12 through its own semaphore control (S3), and when the flag is detected, since another processor has the exclusive right to the memory device 12, it waits for the exclusive right to be released by resetting the flag. After acquiring the exclusive right to the memory device 12 through its own semaphore control (S3), trace information is written to the memory area of the memory device 12 indicated by the address pointer (S4).
). I. When the writing of race information is completed, the address pointer is updated (S5: After I, the flag is reset (S
6) Release the memory exclusive right.

〔作 用〕[For production]

成るプロセッサがトレース情報をメモリ装置12に書き
込む際には自己のセマフォ制御によりセマフォフラグを
立ててメモリ装置の占有権を獲得するから、セマフォ制
御耳中ばもちろん、トレース情報の書き込みおよび書き
込み後のアドレスポインタの更新中に他のプロセッサに
よるメモリアクセスは禁止され、同じアドレスポインタ
で示すメモリ領域に他のプロセッサのトレース情報が書
き込まれたり、アドレスポインタの更新が行われてしま
うことを確実に防止でき、複数のプロセッサによるマク
ロ命令の実行順を示す正確なトレース情報を得ることが
できる。
When a processor writes trace information to the memory device 12, it sets a semaphore flag under its own semaphore control and acquires exclusive rights to the memory device. Memory access by other processors is prohibited while the pointer is being updated, and it is possible to reliably prevent trace information of other processors from being written to the memory area indicated by the same address pointer or from updating the address pointer. Accurate trace information indicating the order in which macro instructions are executed by multiple processors can be obtained.

一方、セマフォフラグを参照した時に、フラグが立って
いれば、他のプロセッサによるトレースく10) 情報の書き込みまたはアドレスポインタの更新中である
ことがわかり、セマフォフラグのリセットを待って自己
のセマフォ制御およびトレース情報の書き込みを行うた
め、同様に複数のプロセッサによるマクロ命令の実行順
を正確に示すトレース情報を得ることができる。
On the other hand, if the flag is set when the semaphore flag is referenced, other processors can trace it.10) It is found that information is being written or the address pointer is being updated, and it waits for the semaphore flag to be reset and then controls its own semaphore. Also, since trace information is written, it is possible to obtain trace information that accurately indicates the order in which macro instructions are executed by a plurality of processors.

なお、メモリ装置のトレース情報格納領域には限界があ
ることから、記憶領域が一杯になるとサイクリック指定
であればアドレスポインタを初期化して最初からトレー
ス情報の書き込みを行い、サイクリック指定でなければ
デバッグを停止する。
Note that there is a limit to the trace information storage area of the memory device, so when the storage area becomes full, if cyclic specification is specified, the address pointer is initialized and trace information is written from the beginning, and if cyclic specification is not specified, trace information is written from the beginning. Stop debugging.

〔実施例〕〔Example〕

第3図には、本発明のマルチプロセッサシステムにおけ
るプログラムのデバッギングの方法に用いられるプロセ
ッサ側のセマフォ制御部のハードウェアを示した一実施
例のブロック図が示される。
FIG. 3 is a block diagram of an embodiment showing the hardware of a semaphore control unit on the processor side used in the method of debugging a program in a multiprocessor system of the present invention.

第3図において、プロセッサ10aは第4図に示される
システムストレージ(SS)としてのメモリ装置12に
対し、メモリデータバスおよびメモリアドレスバスをも
って接続されている。メモリ装置12に対しては他の複
数のブロモ・ノサも同様に接続される。プロセッサ10
aからメモリバスに対するライト(書き込み)ハス系に
はライトブタレジスタ20およびECC(エラー訂正)
回路24のECCコード作成回路26が設りられる。
In FIG. 3, a processor 10a is connected to a memory device 12 as a system storage (SS) shown in FIG. 4 through a memory data bus and a memory address bus. A plurality of other bromo nosas are similarly connected to the memory device 12. processor 10
Write (write) from a to the memory bus Has write register 20 and ECC (error correction)
An ECC code generation circuit 26 of circuit 24 is provided.

一方、メモリデータバスからブロモ・ノサ10aに対す
るリード(読み出し)バス系には、メモリデータレジス
タ28、ECC回路24のエラー検出修正回路30およ
びリードデータレジスタ32が設けられる。
On the other hand, a memory data register 28, an error detection and correction circuit 30 of the ECC circuit 24, and a read data register 32 are provided in a read bus system from the memory data bus to the Bromo Nosa 10a.

前述のようなリード系およびライト系の構成はECC回
路24を備えた通常のブロモ・ノサのノ\−ドウェアと
同様であるが、これに加えて本発明のデバッギング方法
を実現するため、ブロモ・ノサ10aに対してはデータ
モディファイ回路34、データ選択器36およびリード
データレジスタ32に格納したリードデータの特定ビッ
トからセマフォフラグを検出して格納するフラグレジス
タ38が設けられる。
The configuration of the read system and write system as described above is the same as that of normal Bromo Nosa node hardware equipped with the ECC circuit 24, but in addition to this, in order to realize the debugging method of the present invention, Bromo A data modify circuit 34, a data selector 36, and a flag register 38 for detecting and storing a semaphore flag from specific bits of read data stored in the read data register 32 are provided for the nose 10a.

すなわち、データモディファイ回路34はECC回路2
4のエラー検出修正回路30を介して得られたり一ドデ
ータをECCコード作成回路26を備えたライト系にバ
イパスする回路として設けられ、プロセッサ10aより
セマフォ制御信号を受けた時に、メモリ装置12のセマ
フォ領域14からリードされた特定ビット、例えば最上
位ビットをセマフォピントとしてフラグ「1」を立てて
データ修正を行い、同じくデータモディファイ回路34
を介して与えられるセマフォ制御信号によるデータ選択
器36のデータモディファイ回路34の出力選択をもっ
て′ECC回路24を経由してメモリのセマフォ領域に
修正データを書き込むようになる。また、データモディ
ファイ回路34で最上位ビットにセマフォフラグ「1j
を立てた修正データは、メモリ装置のセマフォ領域に書
き込まれると同時にメモリデータレジスタ28、エラー
検出修正回路30を介してリードデータレジスタ32に
格納され、リードデータレジスタ32の最上位ビットの
セマフォフラグを検出してフラグレジスタ38に格納で
きるようにしている。
That is, the data modification circuit 34 is the ECC circuit 2.
The circuit is provided as a circuit that bypasses the code data obtained through the error detection and correction circuit 30 of No. 4 to the write system equipped with the ECC code creation circuit 26, and when it receives the semaphore control signal from the processor 10a, the semaphore of the memory device 12 is A specific bit read from the area 14, for example, the most significant bit, is set as a semaphore pin and a flag "1" is set to modify the data.
Upon selection of the output of the data modifying circuit 34 of the data selector 36 by the semaphore control signal applied via the 'ECC circuit 24, modified data is written into the semaphore area of the memory. In addition, the data modification circuit 34 sets the semaphore flag “1j” to the most significant bit.
The correction data that has been set is written to the semaphore area of the memory device, and at the same time is stored in the read data register 32 via the memory data register 28 and the error detection correction circuit 30, and the semaphore flag of the most significant bit of the read data register 32 is set. It is configured so that it can be detected and stored in the flag register 38.

このようなハードウェアで構成されたセマフォ制御部を
使用したセマフォ制御、すなわち、メモリ装置のセマフ
ォ領域に格納されたデータをリードして最上位ビットに
フラグ「1」を立てて再度書き込むリード・モディファ
イ・ライト動作は、デバッグ時に成るマクロ命令を実行
してトレース情報が得られた時にセマフォ制御を行うマ
イクロ命令の実行で行うことができる。
Semaphore control using a semaphore control unit configured with such hardware, that is, read modification that reads data stored in the semaphore area of a memory device, sets a flag "1" to the most significant bit, and writes it again. - Write operations can be performed by executing microinstructions that perform semaphore control when trace information is obtained by executing macroinstructions during debugging.

第4図は第3図のプロセッサ10aによるトレース情報
が書き込まれるメモリ装置12のメモリマツプ説明図で
あり、トレース対象マクロプログラムおよびデータ領域
、セマフォデータを格納したセマフォ領域14、および
アドレスポインタで指定されるトレースデータ領域で構
成されている。
FIG. 4 is an explanatory diagram of a memory map of the memory device 12 into which trace information by the processor 10a of FIG. Consists of trace data area.

第5図は第3図に示したハードウェアによるセマフォ制
御のタイミング説明図である。時刻t。
FIG. 5 is a timing explanatory diagram of semaphore control by the hardware shown in FIG. 3. Time t.

までのステップでプログラム10aが成るテストアンド
セット命令を実行して、そのマクロ命令の空間番号、ア
ドレス、オペランドのアドレス、およびプロセッサ番号
より成るトレース情報が得られると、時刻1.のタイミ
ングでメモリ装?lf 12に対するバスリクエストお
よびセマフォ制御のためのセマフォアクセスを出力する
。この時刻t、のセマフォアクセスを受けてプロセッサ
10aは、第4図に示すセマフォ領域14のアドレスを
時刻t2以降のタイミングに指定し、その結果、時刻t
4からセマフォ領域14のリードデータが得られ、次の
時刻t5のタイミングで、もしセマフォデータの上位ビ
ットのフラグが「0」であればフラグ「1」を立てて時
刻t6のタイミングでメモリ装置12のセマフォ領域1
4に修正データを書き込むライトデータのメモリ転送を
行い、時刻t、のタイミングでセマフォアクセスを終了
する。そして、時刻t2〜t7におけるセマフォ制御の
リード・モディファイ・ライト動作中はメモリバスが占
有され、この間は他のプロセッサからのハード的または
ソフト的な割り込みは禁止されるようになる。
When the program 10a executes the test and set instruction in the steps up to and the trace information consisting of the space number, address, operand address, and processor number of the macro instruction is obtained, time 1. Memory installation at the timing of? Outputs bus requests for lf 12 and semaphore access for semaphore control. In response to this semaphore access at time t, the processor 10a specifies the address of the semaphore area 14 shown in FIG.
The read data of the semaphore area 14 is obtained from 4, and at the next time t5, if the flag of the upper bit of the semaphore data is "0", the flag is set to "1" and the memory device 12 is read at the timing of time t6. semaphore area 1
The write data for writing the modified data is transferred to the memory at time t, and the semaphore access is completed at time t. During the semaphore-controlled read/modify/write operations from time t2 to t7, the memory bus is occupied, and during this time, hardware or software interrupts from other processors are prohibited.

次に第6図の動作流れ図を参照して実施例におけるデパ
ッギングの方法を説明する。まず、第3図に示すプロセ
ッサloaで実行されるマクロ命令がテストアンドセッ
ト命令であり、マクロ命令の空間番号、アドレス、およ
びプロセッサ番号でなるトレース情報が検出されると、
第6図の動作過程が実行される。すなわち、動作過程に
おけるステップSllでまずテストアンドセット命令か
判断し、テストアンドセット命令であればステップS1
2へ進み、テストアンドセット命令でなげれば、ステッ
プ319へ進む。ステップ12では、メモリバスが他の
プロセッサにより占有されているか否か判別し、バス開
放状態にあれば、ステップS13に進み、リード・モデ
ィファイ・ライト動作を行うセマフォ制御を実行する。
Next, the depacking method in the embodiment will be explained with reference to the operation flowchart of FIG. First, the macro instruction executed by processor loa shown in FIG. 3 is a test and set instruction, and when trace information consisting of the space number, address, and processor number of the macro instruction is detected,
The operating process of FIG. 6 is executed. That is, in step Sll in the operation process, it is first determined whether it is a test and set instruction, and if it is a test and set instruction, it is determined in step S1.
If the test and set command is successful, the process proceeds to step 319. In step S12, it is determined whether or not the memory bus is occupied by another processor. If the bus is in an open state, the process proceeds to step S13, where semaphore control for performing read/modify/write operations is executed.

プロセッサ10aはメモリアドレスバスを利用してメモ
リ装置12のセマフォ領域14(第4図参照)のアドレ
スを指定してセマフォデータをメモリデータレジスタ2
8に読み出し、ECC回路24のエラー検出修正回路3
0を介して得られたリードデータをリードデータレジス
タ32に格納すると同時にデータモディファイ回路34
に格納する。この時エラー検出修正回路30で1ビツト
エラーが検出されれば1ビツトエラーを修正した正しい
リードデータが与えられる。
The processor 10a specifies the address of the semaphore area 14 (see FIG. 4) of the memory device 12 using the memory address bus, and transfers the semaphore data to the memory data register 2.
8, error detection correction circuit 3 of ECC circuit 24
0 is stored in the read data register 32, and at the same time the data modifying circuit 34
Store in. At this time, if the error detection and correction circuit 30 detects a 1-bit error, correct read data with the 1-bit error corrected is provided.

データモディファイ回路34にはプロセッサlOaより
セマフォ制御信号がセマフォアクセスによって与えられ
ていることから、リードデータの特定ビット、例えば最
上位ビットにセマフォフラグが立っているか判別する。
Since the data modifying circuit 34 is given a semaphore control signal by the processor lOa through semaphore access, it is determined whether a semaphore flag is set in a specific bit of the read data, for example, the most significant bit.

この時最上位ビットにフラグ「1」が立っていれば、他
のプロセンサによるトレースデータの更新中であること
から第6図のステップS14に示すようにトレースデー
タの更新中であることが判別されて再びステップSll
に戻る。
If the flag "1" is set in the most significant bit at this time, it is determined that the trace data is being updated as shown in step S14 in FIG. 6, since the trace data is being updated by another processor. Step Sll again
Return to

セマフォフラグが「0」であるか他のプロセッサによる
トレースデータの更新が終了してセマフォフラグが「0
」にリセットされた時は、データモディファイ回路34
で最上位ビットにセマフォフラグ「1」を立てて修正し
たデータをセマフォ制御信号により選択状態にあるデー
タ選択器36およびECC回路24のECCコード作成
回路26を介してメモリ装置12のセマフォ領域14に
書き込むセマフォ制御を行う。
The semaphore flag is "0" or the update of trace data by another processor has finished and the semaphore flag is "0".
”, the data modify circuit 34
The semaphore flag is set to "1" in the most significant bit and the modified data is sent to the semaphore area 14 of the memory device 12 via the data selector 36 selected by the semaphore control signal and the ECC code creation circuit 26 of the ECC circuit 24. Performs writing semaphore control.

ステップS14における他のプロセッサによるトレース
データの更新中の有無の判別は、リードデータレジスタ
32に格納されたセマフォ領域14のリードデータの最
上位ビットをフラグレジスタ38に格納し、このフラグ
レジスタ38のビット「1」または「0」をプロセッサ
10aが見ることで自己のセマフォ制御を行うか、他の
プロセッサのトレースデータ更新の終了を待ってセマフ
ォ制御を行うか否か判別する。
To determine whether the trace data is being updated by another processor in step S14, the most significant bit of the read data of the semaphore area 14 stored in the read data register 32 is stored in the flag register 38, and the bits of this flag register 38 are By looking at "1" or "0", the processor 10a determines whether to perform its own semaphore control or wait for the completion of update of trace data of other processors to perform semaphore control.

ステップS14までの処理で自己のセマフォ制御により
メモリ装置のセマフォ領域14にセマフォフラグ「1」
を立てたデータ書き込みが終了すると、次のステップS
15でトレース情報として検出されているマクロ命令の
空間番号、アドレス、対象とするアドレス、およびプロ
セッサ番号をアドレスポインタで指定されるメモリ領域
に書き込む。
In the process up to step S14, the semaphore flag is set to "1" in the semaphore area 14 of the memory device by its own semaphore control.
When data writing is completed, the next step S
15, the space number, address, target address, and processor number of the macro instruction detected as trace information are written into the memory area specified by the address pointer.

続いて、ステップS16に示ずように、アドレスボイン
クを次のトレース情報のメモリ領域を指定するよう再セ
ント(更新)し、ステップS17に進み、トレース情報
の書き込み領域が一杯か否か判別する。トレース情報の
書き込み領域に空きがあればステップ318に進んでス
テップS13のセマフォ制御で立てたセマフォフラグ「
1」を「0」にリセフトし、トレース情報更新のための
パス占有権を開放する。ステップ318でバス占有権を
開放するとステップS19で次の命令コードをフェッチ
し、ステップS20でフェッチした命令コートをデコー
ドしてステップS21で命令コードを実行し、これによ
って次のトレース情報が得られることから再びステップ
S12の処理に戻る。
Next, as shown in step S16, the address blank is re-sent (updated) to specify the memory area for the next trace information, and the process proceeds to step S17, where it is determined whether the write area for trace information is full or not. . If there is space in the write area for trace information, the process advances to step 318 and the semaphore flag set by the semaphore control in step S13 is set.
1" to "0" and release the path exclusive right for updating trace information. When the bus exclusive right is released in step 318, the next instruction code is fetched in step S19, the instruction code fetched in step S20 is decoded, and the instruction code is executed in step S21, thereby obtaining the next trace information. Then, the process returns to step S12 again.

ステップS17でトレース情報の書き込み領域が一杯の
時には、ステップS31に進んでトレース情報の書き込
みがサイクリック指定モードか否か判別する。サイクリ
ック指定モードの時には、ステップS32でアドレスポ
インタを初期化した後、ステップ31Bでセマフォ制御
のフラグリセットでメモリ占有権を開放し、ステップ3
19〜S21で次の命令のフェッチ、デコード、および
実行を行う。
When the trace information writing area is full in step S17, the process advances to step S31 and it is determined whether the trace information writing is in the cyclic designation mode. In the cyclic specification mode, after initializing the address pointer in step S32, the memory exclusive right is released by resetting the semaphore control flag in step 31B, and in step S3
In steps 19 to S21, the next instruction is fetched, decoded, and executed.

すなわち、サイクリック指定モードの時には、トレース
情報書き込み領域が一杯になると、次のマクロ命令の実
行によるl・レース情報はアドレスポインタの初期化で
指定される最初の領域を書き換える形で格納される。
That is, in the cyclic specification mode, when the trace information write area becomes full, the l/race information resulting from the execution of the next macro instruction is stored by rewriting the first area specified by address pointer initialization.

ステップS31でサイクリック指定モードでなかった場
合には、ステップS33でトレース情報更新のためのメ
モリ占有権を開放し、ステップS34で停止命令により
デバッグを停止し、その旨をオペレータに通知する。
If it is not the cyclic designation mode in step S31, the memory exclusive right for updating trace information is released in step S33, and debugging is stopped by a stop command in step S34, and the operator is notified of this fact.

前述の実施例は複数のプロセッサ側にセマフォ制御を行
うハードウェアを設けた場合について記載されているが
、他の実施例としてメモリ装置側にセマフォ制御機能を
実現するためのハードウェアを設けるようにしてもよい
。このように、メモリ装置にセマフォ制御のためのハー
ドウェアを設けた場合には、セマフォ制御のハードウェ
アが1つですみ、プロセッサごとに設けた場合に比較し
、ハードウェアの構成を簡単にすることができる。
The above-mentioned embodiment describes a case in which hardware for performing semaphore control is provided on the side of a plurality of processors, but in another embodiment, hardware for realizing the semaphore control function is provided on the memory device side. You can. In this way, when hardware for semaphore control is provided in the memory device, only one semaphore control hardware is required, which simplifies the hardware configuration compared to when hardware is provided for each processor. be able to.

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

本発明によれば、セマフォ制御機能を利用して特定のプ
ロセッサによるトレース情報の更新中は他のプロセッサ
によるメモリアクセスが禁止され、複数のプロセッサの
命令実行順を示す正確なデバッグのためのトレース情報
を得ることができる。
According to the present invention, memory access by other processors is prohibited while trace information is being updated by a specific processor using a semaphore control function, and trace information for accurate debugging that indicates the instruction execution order of multiple processors is used. can be obtained.

すなわちテストアンドセット命令である領域を獲得した
プロセッサ番号、その命令の存在するアドレス、または
何回目に獲得したか、テストアンドセットによるループ
回数を知ることができる。
That is, it is possible to know the processor number that acquired the area that is the test and set instruction, the address where the instruction exists, the number of times the area was acquired, and the number of loops due to the test and set.

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

第1図は本発明の処理過程の流れ図、 第2図は本発明を適用するシステムのブロック図、 第3図は本発明の一実施例の方法を行うシステムのセマ
フォ制御部のハードウェアのブロック図、第4図は実施
例のデバッグによるメモリマツプを説明する図、 第5図は実施例のセマフォ制御のタイミングを説明する
図、 第6図は実施例の方法の動作流れ図、 第7図は従来のマルチプロセッサシステムを説明するブ
ロック図、および 第8図はメモリ装置のメモリ領域を説明する図である。 図において、 10a 、 10b 、 10cm−−プロセッサ、1
2・・・メモリ装置、 13・・・システムプロセッサ、 14・・・セマフォ領域、 16a 、 16b 、 16cm−−セマフォ制御部
、20・・・ライトデータレジスタ、 24・・・E C、C回路、 26・・・ECCコード作成回路、 28・・・メモリデータレジスタ、 30・・・エラー検出修正回路、 32・・・リードデータレジスタ、 34・・・データモディファイ回路、 36・・・データ選択器、 38・・・フラグレジスタ、 である。
Fig. 1 is a flowchart of the processing process of the present invention, Fig. 2 is a block diagram of a system to which the present invention is applied, and Fig. 3 is a block diagram of the hardware of the semaphore control unit of the system that performs the method of one embodiment of the present invention. Figure 4 is a diagram explaining the memory map by debugging of the embodiment, Figure 5 is a diagram explaining the timing of semaphore control in the embodiment, Figure 6 is an operation flowchart of the method of the embodiment, and Figure 7 is the conventional method. FIG. 8 is a block diagram illustrating a multiprocessor system, and FIG. 8 is a diagram illustrating a memory area of a memory device. In the figure: 10a, 10b, 10cm--processor, 1
2...Memory device, 13...System processor, 14...Semaphore area, 16a, 16b, 16cm--semaphore control unit, 20...Write data register, 24...EC, C circuit, 26... ECC code creation circuit, 28... Memory data register, 30... Error detection correction circuit, 32... Read data register, 34... Data modify circuit, 36... Data selector, 38...Flag register.

Claims (1)

【特許請求の範囲】 複数のプロセッサ(10a、10b、10c)のそれぞ
れに、メモリ装置(12)のセマフォ領域(14)に格
納されたデータを読み出した後に特定のビットにフラグ
を立てて書き込むリード・モディファイ・ライト動作を
マイクロ命令により実行するセマフォ制御部(16a、
16b、16c)を備え、該セマフォ制御部によるリー
ド・モディファイ・ライト動作中は他のプロセッサから
の割り込みが禁止されるマルチプロセッサシステムにお
けるプログラムのデバッギングの方法であって、 システムデバッグに際し、任意のプロセッサで実行され
た命令のうち、テストアンドセット命令のみについてあ
らかじめ定められた条件に従って、該命令の存在する空
間番号、アドレス、該命令の対象とするアドレスおよび
プロセッサ番号を含むトレース情報を検出し(S1)、 該トレース情報の検出後に前記セマフォフラグを参照し
、フラグ非検出時には前記セマフォ制御によりフラグを
立ててメモリ占有権を獲得した後に、フラグ検出時には
フラグリセットを待って前記セマフォ制御によりフラグ
を立ててメモリ占有権を獲得した後に、アドレスポイン
タで示されるメモリ領域に前記トレース情報を書き込み
(S2、S3、S4)、 該書き込み後に前記アドレスポインタを更新する(S5
)と共に、前記セマフォフラグをリセットして(S6)
、メモリ占有権を開放するようにしたことを特徴とする
マルチプロセッサにおけるプログラムのデバッギングの
方法。
[Claims] A read method for each of a plurality of processors (10a, 10b, 10c) that reads data stored in a semaphore area (14) of a memory device (12) and then sets a flag and writes to a specific bit. - Semaphore control unit (16a,
16b, 16c), and in which interrupts from other processors are prohibited during read/modify/write operations by the semaphore control unit, the method includes: Among the instructions executed in S1, trace information including the space number and address where the instruction exists, the address targeted by the instruction, and the processor number is detected according to predetermined conditions for only the test and set instruction (S1 ), refers to the semaphore flag after detecting the trace information, and when the flag is not detected, sets the flag using the semaphore control to acquire memory exclusive rights, and when the flag is detected, waits for the flag to be reset and sets the flag using the semaphore control. After acquiring the memory exclusive right, the trace information is written in the memory area indicated by the address pointer (S2, S3, S4), and after the writing, the address pointer is updated (S5).
) and reset the semaphore flag (S6).
, a method for debugging a program on a multiprocessor, characterized in that memory ownership is released.
JP63233704A 1988-09-20 1988-09-20 Program debugging method for multiprocessor system Pending JPH0282344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63233704A JPH0282344A (en) 1988-09-20 1988-09-20 Program debugging method for multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63233704A JPH0282344A (en) 1988-09-20 1988-09-20 Program debugging method for multiprocessor system

Publications (1)

Publication Number Publication Date
JPH0282344A true JPH0282344A (en) 1990-03-22

Family

ID=16959241

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63233704A Pending JPH0282344A (en) 1988-09-20 1988-09-20 Program debugging method for multiprocessor system

Country Status (1)

Country Link
JP (1) JPH0282344A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0566972A (en) * 1991-09-06 1993-03-19 Nippon Telegr & Teleph Corp <Ntt> Automatic lock section analyzing method for lock section and calculating method for average instruction executing time
JPH05165675A (en) * 1991-12-12 1993-07-02 Agency Of Ind Science & Technol Debug supporting device
WO2000017756A1 (en) * 1998-09-18 2000-03-30 Matsushita Electric Industrial Co., Ltd. Signal processor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5533288A (en) * 1978-08-31 1980-03-08 Fujitsu Ltd Hysteresis recording control system of multi-processor system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5533288A (en) * 1978-08-31 1980-03-08 Fujitsu Ltd Hysteresis recording control system of multi-processor system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0566972A (en) * 1991-09-06 1993-03-19 Nippon Telegr & Teleph Corp <Ntt> Automatic lock section analyzing method for lock section and calculating method for average instruction executing time
JPH05165675A (en) * 1991-12-12 1993-07-02 Agency Of Ind Science & Technol Debug supporting device
WO2000017756A1 (en) * 1998-09-18 2000-03-30 Matsushita Electric Industrial Co., Ltd. Signal processor
US6484243B1 (en) 1998-09-18 2002-11-19 Matsushita Electric Industrial Co., Ltd. Shared memory tracing apparatus

Similar Documents

Publication Publication Date Title
JP2610821B2 (en) Multi-processor system
JPS59502159A (en) virtual machine data processor
GB2570161A (en) Simulation of exclusive instructions
JPH0810437B2 (en) Guest execution control method for virtual machine system
JPH0282344A (en) Program debugging method for multiprocessor system
JPH01125633A (en) System for debugging multi-processing system
JPS60159951A (en) Tracing system in information processing device
JPS6319058A (en) Memory device
KR20210087431A (en) Devices and data processing methods for transactional memory
JP2587468B2 (en) Lock data setting device
JP3130798B2 (en) Bus transfer device
JPS60262251A (en) Backup device for development of microprocessor
TW201734821A (en) Register access control
JP3171615B2 (en) Data transfer retry control method
JP2674873B2 (en) Step execution operation method of program development support device
SU849218A1 (en) Device for debugging programs
JPS5842891B2 (en) Meirei Seigiyohoushiki
JPS5834856B2 (en) Kiokuseigiyosouchi
JPH03103924A (en) Data processor
JPH03232051A (en) Semaphore access control method
JPS60193046A (en) Detecting system for instruction exception
JPS6158049A (en) Error detection
JPS60124747A (en) Debug control system of computer
JP2000222243A (en) Device and method for debugging
JPH02143337A (en) Microprogram controller for data processor