JPS63167940A - Multi-programming directional cpu - Google Patents

Multi-programming directional cpu

Info

Publication number
JPS63167940A
JPS63167940A JP62000674A JP67487A JPS63167940A JP S63167940 A JPS63167940 A JP S63167940A JP 62000674 A JP62000674 A JP 62000674A JP 67487 A JP67487 A JP 67487A JP S63167940 A JPS63167940 A JP S63167940A
Authority
JP
Japan
Prior art keywords
cpu
trace
multiprogramming
system call
data
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
JP62000674A
Other languages
Japanese (ja)
Inventor
Hajime Sakuma
肇 佐久間
Kaoru Matsuo
松尾 薫
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
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP62000674A priority Critical patent/JPS63167940A/en
Publication of JPS63167940A publication Critical patent/JPS63167940A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To realize a history trace of a system call instruction in a real time by providing a means for informing a fact that information is outputted onto an external data bus at the time of executing the system call instruction, to the outside of a CPU. CONSTITUTION:A CPU being an object is a multi-programming CPU 106, and realizes the execution of a system call in a program as an exclusive instruction by a microprogram of the CPU. A debug device (in a dotted line) has a host CPU 101, a host memory 102, and a display device 105, and provided with a trace memory address generating part 103 for generating an address to a trace memory 104, in order to store a data on a date bus in the trace memory 104 by synchronizing with a latch clock 109 outputted from the CPU 106. In such a way, the debug device can trace only information of a system call instruction by a timing of generation of the latch clock 109.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、複数のプログラムが同期をとりながら並列に
流れるマルチ・プログラミング・システムに対するデバ
ッグ機能をもったマルチプログラミング指向CPUに関
する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a multiprogramming-oriented CPU having a debugging function for a multiprogramming system in which a plurality of programs run in parallel while being synchronized.

〔従来の技術〕[Conventional technology]

従来の、遂次処理プログラムに対するデバッグ機能につ
いて、従来のCPUとそのデバッグ装置例の第6図を参
照しながら説明する。第6図に示すように、従来の遂次
処理プログラムに対するデバッグ装置は、デパック機能
をつかさどるためのCPU (以下、ホストCPUl0
Iと呼ぶ)、メモリ、周辺回路などを具備しており、デ
パックの対称となるCPU (以下、ターゲットCPU
601と呼ぶ)の動作をモニタしながら、デパック機能
を実現している。また、従来のデバッグ装置は、メモリ
操作やブレーク機能、プログラム命令のトレースなどの
、ターゲツトCPU601側のアプリケーションプログ
ラムに存在しない汎用性のある機能のみを実現している
A conventional debugging function for sequential processing programs will be explained with reference to FIG. 6, which shows an example of a conventional CPU and its debugging device. As shown in FIG. 6, the conventional debugging device for sequential processing programs uses a CPU (hereinafter referred to as host CPU10) for managing the depacking function.
It is equipped with a CPU (hereinafter referred to as target CPU), memory, peripheral circuits, etc.
The depacking function is realized while monitoring the operation of the device (referred to as 601). Furthermore, conventional debugging devices only implement versatile functions that do not exist in the application program on the target CPU 601 side, such as memory manipulation, break functions, and tracing of program instructions.

ここでの例は、ターゲツトCPU601側のアプリケー
ションプログラムをトレースする機能について、その動
作説明を行なう0本装置はターゲットCPU601及び
メモリ部とデパック装置部とに大きく別れ、デバッグ装
置部はデバッグ用の種々の機能を実現する為のホストC
PUl0Iと、ホストプログラムが常駐するホストプロ
グラムメモリ102と、ターゲットCPU601から発
生する読み取り信号(以下、RD信号604と呼ぶ)ま
たは書き込み信号(以下、WR信号605と呼ぶ)を受
信すると同時にその時点のアドレスバス上のアドレスと
、データバス上のデータを格納するトレースメモリ10
4と、該トレースメモリ104へのアドレス発生部10
3と、トレース結果などを表示する表示装置105を備
えている。
This example explains the operation of the function of tracing an application program on the target CPU 601 side. This device is broadly divided into the target CPU 601, a memory section, and a depacking device section, and the debugging device section has various debugging devices. Host C to realize the function
PUl0I, the host program memory 102 in which the host program resides, and the current address at the same time as receiving a read signal (hereinafter referred to as RD signal 604) or a write signal (hereinafter referred to as WR signal 605) generated from the target CPU 601. Trace memory 10 that stores addresses on the bus and data on the data bus
4, and an address generation unit 10 for the trace memory 104.
3, and a display device 105 for displaying trace results and the like.

次に、本装置に於けるトレース機能について、順を追っ
て説明していく事にする。本システムで、トレースメモ
リ104にトレースデータを格納するタイミングは、タ
ーゲットCPU601がバスアクセスを行ない、RD信
号604、またはWR信号605が出力された場合で、
トレースメモリアドレス発生部103は、これらのスト
ローブ信号を受け、このタイミングでトレースメモリ1
04にアドレスを発生する。同時にマルチプレクサ60
3へ制御信号を発生し、アドレスラッチ602に格納さ
れているアドレスデータかデータバス上のデータかを選
択する。以上の処理により、ターゲットCPU601が
バスアクセスしたタイミングを捉え、アドレス情報、デ
ータ情報をトレースメモリ104に格納する。トレース
メモリアドレス発生部103は、トレースメモリ104
がオーバーフローしたらトレース終了信号110をポス
トCPUl0Iへ送信し、ホストCPUl0Iからトレ
ース開始信号111が送信されて来るまでトレースを停
止する。
Next, we will explain the trace function of this device step by step. In this system, the timing at which trace data is stored in the trace memory 104 is when the target CPU 601 performs bus access and the RD signal 604 or WR signal 605 is output.
The trace memory address generation unit 103 receives these strobe signals and writes the trace memory 1 at this timing.
An address is generated at 04. 60 multiplexers at the same time
3 to select either the address data stored in the address latch 602 or the data on the data bus. Through the above processing, the timing at which the target CPU 601 accesses the bus is captured and address information and data information are stored in the trace memory 104. The trace memory address generation unit 103 generates a trace memory 104.
When overflow occurs, a trace end signal 110 is sent to the post CPU 10I, and tracing is stopped until a trace start signal 111 is sent from the host CPU 10I.

次に、ホストCPUl0Iはトレース終了信号110を
受信すると、トレースメモリ104に格納されているト
レースデータを読み出し、表示装置105へ送信し、表
示する。ホストCPUl01はトレースメモリ104に
格納されていたトレースデータを全部出力し終えたら、
トレースメモリアドレス発生部103へトレース開始信
号111を送信する。このトレース出力処理の間、ター
ゲットCPU601は、アプリケーションプログラムの
実行を継続している。トレースメモリアドレス発生部1
03は、上記トレース開始信号111を受信すると、ト
レース処理を再開する。以下、同様の処理を繰り返す0
以上、従来のデバッグ機能におけるトレース機能につい
て記述したが、従来のデバッグ機能では、アプリケーシ
ョンプログラムの命令のトレースを、RD信号604あ
るいはWR信号605の発生のタイミングで行なうもの
が一般的であり、トレースメモリ104の扱い方も本従
来例が一般的方法となっている。また、トレースされる
べきデータに関しては、アドレスバス、データバスの内
容以外に、ターゲットCPUの持つ機能に応じて、ボー
トの内容や、その他、端子状態をトレースするなどを機
能も存在するが、本従来例では、アドレスバス、データ
バズに限って言及した。
Next, upon receiving the trace end signal 110, the host CPU I0I reads the trace data stored in the trace memory 104, transmits it to the display device 105, and displays it. After the host CPU l01 finishes outputting all the trace data stored in the trace memory 104,
A trace start signal 111 is transmitted to the trace memory address generation section 103. During this trace output processing, the target CPU 601 continues to execute the application program. Trace memory address generator 1
03 restarts the trace process upon receiving the trace start signal 111. Hereafter, the same process is repeated0
The trace function in the conventional debug function has been described above, but in the conventional debug function, the instruction trace of the application program is generally performed at the timing of the generation of the RD signal 604 or the WR signal 605, and the trace memory 104 is also generally handled in this conventional example. Regarding the data to be traced, in addition to the contents of the address bus and data bus, there are also functions to trace the contents of the boat and other terminal states depending on the functions of the target CPU. In the conventional example, only the address bus and data buzz were mentioned.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

前記従来例で用いられたトレース処理機能は、アプリケ
ーションプログラムの実行時に、その命令を1つずつ追
跡していくデバッグ機能である。
The trace processing function used in the conventional example is a debug function that traces the instructions one by one when an application program is executed.

以下、従来例に示したアドレス及びデータバス上のトレ
ース機能を利用したデバッグ手法に関して、第7図で示
すマルチプログラミング例を用いて説明する。
Hereinafter, a debugging method using the trace function on the address and data buses shown in the conventional example will be explained using a multiprogramming example shown in FIG.

第7図で示すマルチプログラミングの例は、複数のプロ
グラムが同期を取りながら1つのプログラミングシステ
ムを構築していくものである。このマルチプログラミン
グシステムは、オペレーティングシステム(以下、O8
と呼ぶ)の種類によって多少違いはあるが、この例に於
けるO8は制御用のリアルタイムoSの中では一般的と
考えられる。マルチプログラミングシステムを構成して
いる個々のプログラムはタスクと呼ばれ、夫々優先順位
を持っており、1つのタスクがなんらかの事象の発生を
待つ間にできるCPUの空き時間を利用し、実行の起動
がかかるのを待っている他のタスクの中からタスクを1
つ選び出し、実行状態にする。この様にタスクを入れ替
える処理をデイスパッチングと呼び、ディスパッチング
は、割り込みやO8に対して発行されるシステムコール
と呼ばれる命令群を発行することによって起きる。
In the example of multiprogramming shown in FIG. 7, a plurality of programs synchronize to construct one programming system. This multiprogramming system is an operating system (hereinafter referred to as O8).
Although there are some differences depending on the type of OS (called OS), O8 in this example is considered to be common among real-time OS for control. The individual programs that make up a multiprogramming system are called tasks, and each has a priority, and execution can be started by using the CPU's free time that is created while one task is waiting for some event to occur. Select one task from among other tasks waiting to be executed.
Select one and put it into execution state. This process of replacing tasks is called dispatching, and dispatching occurs by issuing a group of instructions called system calls that are issued to interrupts and O8.

従って、こうしたマルチプログラミングシステムにおい
て、デバッグ上で特に重要になってくるのは、いかにこ
のタスクの状態遷移を実時間で監視していくか、という
点にある。
Therefore, in such a multiprogramming system, what is particularly important for debugging is how to monitor the state transition of this task in real time.

そこで従来の技術で問題になる点について、以下、第6
図の従来例の構成図と、第7図のマルチプログラミング
の状態遷移を参照しながら説明する。従来のトレース機
能では、トレースメモリ104に対して、デバッグ対象
となるアプリケーションプログラムの実行時に、メモリ
アクセス時の情報を遂次トレースメモリ104に蓄え、
メモリが一杯になると、トレース処理の中断する。トレ
ース処理中断中はトレースメモリ104の内容の表示処
理を行なう、また、アプリケーションプログラムは、ト
レース処理中断中も実行を継続している。トレースメモ
リ104の表示処理が終了すると、トレース処理を再開
する。従って、このトレース処理中断中のアプリケーシ
ョンプログラムの実行状態は把握出来ない、また、この
状態遷移を把握する為に、トレースメモリ104の許容
量を大きくすると、かえって表示処理に時間がががり、
トレース中断の間隔も広がってしまう為、トレースメモ
リ104の許容量には、自ずと適度な制限が加わる。こ
こで第7図で示したマルチプログラミングシステムを、
従来のトレース機能を用いてデバッグした場合について
説明する。この時、トレース処理はアドレスAから開始
することに設定し、トレースメモリ104が一杯になっ
て、トレースが中断したアドレスはアドレスBであり、
次に、表示処理が終了して、トレース処理が再開したア
ドレスはアドレスCとなった場合を想定する。このアド
レスBからアドレスC迄のトレース処理中断中の各シス
テムコール命令によって起きるタスクの状態遷移は、以
下の通りである。まず、タスク(B)から発行されるシ
ステムコールS[1S−TSKによって、タスク(B)
は自タスクを実行中止状態にし、タスク(C)へタスク
を切り換える。
Therefore, we will discuss the problems with the conventional technology in Section 6 below.
This will be explained with reference to the configuration diagram of the conventional example shown in the figure and the state transition of multiprogramming shown in FIG. In the conventional trace function, information on memory accesses is sequentially stored in the trace memory 104 when an application program to be debugged is executed.
When memory becomes full, trace processing is interrupted. While the trace processing is suspended, the content of the trace memory 104 is displayed, and the application program continues to be executed even during the suspension of the trace processing. When the display processing of the trace memory 104 is completed, the trace processing is restarted. Therefore, it is not possible to grasp the execution state of the application program while this trace processing is suspended.Moreover, if the capacity of the trace memory 104 is increased in order to grasp this state transition, the display processing will take more time.
Since the interval between trace interruptions also increases, the allowable capacity of the trace memory 104 is naturally subject to appropriate limitations. Here, the multiprogramming system shown in Figure 7 is
The case of debugging using the conventional trace function will be explained. At this time, the trace process is set to start from address A, and the address where the trace memory 104 is full and the trace is interrupted is address B.
Next, assume that the address at which the display process is finished and the trace process is restarted is address C. The state transition of the task caused by each system call instruction during the suspension of trace processing from address B to address C is as follows. First, by system call S[1S-TSK issued from task (B), task (B)
puts the self-task into an execution-suspended state and switches the task to task (C).

次に、タスク(C)はシステムコール5ND−111s
Gによってデータを他タスクに送信し、他タスクからの
データを受信待ちしていたタスク(A)へタスクを切り
換える。しかし、第7図で示した外部割り込みがタスク
(C)上のアドレスXで発生すると、外部割り込みの処
理ルーチン中で発行されるシステムコールに依って、そ
の間の状態遷移は変化する。即ち、タスク(B)の実行
中止状態を実行可能状態にするシステムコールRSM−
TSKが発行され、タスク(B)に制御が切り換わり、
そしてタスク(B)からデータを送信するシステムコー
ルSND−MSGが発行されることによって、他タスク
からデータ受信待ちしていたタスク(A)へとタスクが
切り換わる。このような割り込みによる制御の流れの変
更は、従来の技術がデバッグの対象としていた遂次処理
プログラムにおいても度々発生した。しかし、マルチプ
ログラミングでは、その構成上、特に割り込みやシステ
ムコールの発行を契機としてタスクの状態遷移は頻繁に
発生する為、単なる遂次的なトレースのみではなかなか
システム全体の流れを追うことは難しい、最近では、こ
うしたマルチプログラミングシステム形式のものが広く
浸透して来つつあるが、従来の技術によるデバッグ機能
は、通常の逐次処理のプログラムに間しては、一応の効
果を期待できるが、以上のような理由で、次々とタスク
を切り換えるマルチプログラミングシステムにおいては
、その実行状態を充分には掴み切れないという欠点を有
していた。
Next, task (C) calls system call 5ND-111s
The data is sent to another task by G, and the task is switched to the task (A) which was waiting to receive data from the other task. However, when the external interrupt shown in FIG. 7 occurs at address X on task (C), the state transition during that time changes depending on the system call issued in the external interrupt processing routine. That is, system call RSM- changes task (B) from a suspended state to an executable state.
TSK is issued, control is switched to task (B),
When task (B) issues a system call SND-MSG to transmit data, the task is switched to task (A) which has been waiting to receive data from another task. Such changes in the flow of control due to interrupts have frequently occurred even in sequential processing programs that were targeted for debugging in the prior art. However, due to the structure of multiprogramming, task state transitions occur frequently, especially when interrupts or system calls are issued, so it is difficult to follow the flow of the entire system by simply sequential tracing. Recently, these types of multiprogramming systems have become widespread, but debugging functions using conventional technology can be expected to be somewhat effective for normal sequential processing programs. For these reasons, multiprogramming systems that switch tasks one after another have the disadvantage that the execution status cannot be fully grasped.

本発明は、マルチプログラミングシステムを実現する為
、制御プログラムであるO8に数々備わった、システム
コール機能を専用命令として実現するCPUに於いて、
特にマルチプログラミングシステムのプログラミングデ
バッグを効率的に行なう事を考慮し、CPUにデバッグ
用の特別の機能を付加し、デバッグシステムを容易に構
築可能とした独創的内容を有している。
In order to realize a multiprogramming system, the present invention provides a CPU that implements various system call functions as dedicated instructions in the control program O8.
In particular, with consideration given to efficient programming debugging of multiprogramming systems, the book has original content that adds special functions for debugging to the CPU, making it possible to easily construct a debugging system.

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

本発明のマルチプログラミング指向CPUは、マルチプ
ログラミングを実現する為のオベレーテインクシステム
の処理を司どるマルチプログラミング指向CPUにおい
て、システムコール命令実行時にマルチプログラミング
システムに関する情報を、前記CPUの外部データバス
上に出力し、且つ、該外部データバス上に情報が出力さ
れたことを、前記CPUの外部に対して通知する為の手
段を有する。
The multiprogramming oriented CPU of the present invention manages the processing of an overwrite system for realizing multiprogramming, and transmits information regarding the multiprogramming system onto an external data bus of the CPU when executing a system call instruction. and means for notifying the outside of the CPU that the information has been output onto the external data bus.

〔実施例−1〕 マルチプログラミングシステムに於いて、各タスクの状
態遷移は、O8に対して発行されるプログラム中のシス
テムコールを実行することによって起こる。システムコ
ールの実行は、通常命令の組み合わせで実現されるが、
本発明の対象となるCPUは、プログラム中の前記シス
テムコールの実行を、命令の組み合わせで実現せず、専
用命令として、CPUのマイクロプログラムで実現する
事を前提としている。以下、専用命令をシステムコール
命令と呼び、このシステムコール命令を備えたCPUを
マルチプログラミングCPUと呼ぶ。
[Embodiment 1] In a multiprogramming system, the state transition of each task occurs by executing a system call in a program issued to O8. Execution of a system call is usually realized by a combination of instructions, but
The CPU to which the present invention is applied is based on the premise that the execution of the system calls in a program is not realized by a combination of instructions, but is executed by a microprogram of the CPU as a dedicated instruction. Hereinafter, the dedicated instruction will be referred to as a system call instruction, and a CPU equipped with this system call instruction will be referred to as a multiprogramming CPU.

本発明のマルチプログラミング指向CPUに対するデバ
ッグ機能に関し、第1図〜第4図を参照しながら説明す
る。
The debug function for the multiprogramming-oriented CPU of the present invention will be explained with reference to FIGS. 1 to 4.

第1図は本発明のマルチプログラミング指向CPUおよ
びそのデバッグ装置の第1の実施例を示す全体構成図で
ある。本発明の対象とするCPUはマルチプログラミン
グCPU106である。またこの実施例におけるマルチ
プログラミング・デバッグ装置は、従来のデバッグ装置
の持つホストCUP 101 、ホストメモリ102、
表示装置105に加えて、マルチプログラミングCPU
l06から出力されるラッチクロック109に同期して
データバス上のデータをトレースメモリ104に格納す
る為に、トレースメモリ104にアドレスを発生するト
レースメモリアドレス発生部103を備えている。
FIG. 1 is an overall configuration diagram showing a first embodiment of a multiprogramming-oriented CPU and a debugging device thereof according to the present invention. The CPU targeted by the present invention is the multiprogramming CPU 106. The multiprogramming/debugging device in this embodiment also includes a host CPU 101, a host memory 102, and
In addition to the display device 105, a multi-programming CPU
In order to store the data on the data bus in the trace memory 104 in synchronization with the latch clock 109 output from l06, a trace memory address generation section 103 is provided which generates an address in the trace memory 104.

第2図は、本発明のマルチプログラムCPUl06の内
部構造を示した図である。該マルチプログラミングCP
U106は、算術論理演算ユニット(以下、ALUと呼
ぶ)106−1、汎用のレジスタ群106−9、テンポ
ラリ・レジスタ群106−8と、この他に、アドレスバ
スやデータバスをi¥iIImするバスインタフェース
制御部106−2と、データバスを介して、取り込んだ
命令を一時蓄える命令レジスタ106−10と、該命令
をデコードする命令デコーダ106−3と、各命令に対
応する処理を実行するマイクロプログラムが格納されて
いるマイクロプログラムメモリ106−4と、マルチプ
ログラミングシステムでタスクの制御情報を管理するタ
スク管理部106−6を、タスク間の同期機構の1つと
してメールボックスを管理するメールボックス管理部1
06−5とを備えている。また、マイクロプログラムの
制御で、システムコール命令実行時にCPUの外部に対
して、通知信号を発生させるためのラッチクロック発生
部106−7を有する。
FIG. 2 is a diagram showing the internal structure of the multi-program CPU 106 of the present invention. The multiprogramming CP
U106 includes an arithmetic logic unit (hereinafter referred to as ALU) 106-1, a general-purpose register group 106-9, a temporary register group 106-8, and a bus for i\iIIm address bus and data bus. An interface control unit 106-2, an instruction register 106-10 that temporarily stores instructions taken in via a data bus, an instruction decoder 106-3 that decodes the instructions, and a microprogram that executes processing corresponding to each instruction. a microprogram memory 106-4 in which is stored, a task management unit 106-6 that manages task control information in a multiprogramming system, and a mailbox management unit that manages mailboxes as one of the synchronization mechanisms between tasks. 1
06-5. It also includes a latch clock generating section 106-7 for generating a notification signal to the outside of the CPU when a system call instruction is executed under the control of a microprogram.

第3図は、各種あるシステムコール命令中、メツセージ
をメールボックスから受信するRCV−MliG命令を
例に挙げて、その処理をフローチャートに表わした図で
ある0通常、タスク間でデータを授受を行なう場合、各
タスク間共有のバッファで管理し、データ送信タスクは
データを共有バッファに送信し、受信タスクはデータを
共有バッファから受信する方法を取る。O8の管理下、
では、このデータのことを特にメツセージ、共有バッフ
ァのことをメールボックスと呼ぶのが一般的である。
Figure 3 is a flowchart showing the processing of the RCV-MliG command, which receives a message from a mailbox, as an example of various system call commands.Normally, data is exchanged between tasks. In this case, the data is managed using a shared buffer between each task, with the data sending task sending data to the shared buffer and the receiving task receiving data from the shared buffer. Under the control of O8,
This data is generally referred to as a message, and the shared buffer is generally referred to as a mailbox.

処理の内容としては、まず、指定されたメールボックス
にメツセージが登録されているか調べ(ステップ201
)、登録メツセージが有ればこのメツセージ格納エリア
を指すポインタを受信要求タスクに渡しくステップ20
2) 、同時に同メツセージと登録を指定メールボック
スから削除するくステップ203)、指定されたメール
ボックスにメツセージが登録されていなければ、メツセ
ージ受信要求タスクのステータスを実行状態からメツセ
ージ待ち状態に変え(ステップ204)、同時に、指定
メールボックスにメツセージ待ちタスクとして登録する
(ステップ205)。以上の処理を終えた後、ディスパ
ッチングを行なう。デイスバッチグ処理では、上記処理
の結果、メツセージ受信要求タスクのステータス及び、
他のタスクのステータスや、各タスクの優先順位等を基
に、タスクの入れ替えを起こす。
The process first involves checking whether a message is registered in the specified mailbox (step 201).
), if there is a registered message, pass a pointer pointing to this message storage area to the reception request task (step 20).
2) At the same time, delete the same message and the registration from the specified mailbox (step 203), and if the message is not registered in the specified mailbox, change the status of the message reception request task from the execution state to the message waiting state (step 203). Step 204), and at the same time, register it as a message waiting task in the designated mailbox (Step 205). After completing the above processing, dispatching is performed. In the disk batching process, as a result of the above process, the status of the message reception request task and
Tasks are swapped based on the status of other tasks, the priority of each task, etc.

第4図は、第3図で例に挙げたRCV−MSGシステム
コール命令を、マルチプログラミングCPU 106が
解読し、マイクロプログラムの指示に従い処理を行なう
過程で、内部データバス上に流れるデータを示した図で
ある0通常、外部データバスはメモリリード、またはラ
イトストローブ信号発生時のみドライブされ、CPU内
部動作にはフローディング状態となっている0本発明で
は、システムコール命令実行時のみ、処理の過程で内部
データバス上に流れるデータ中、マルチプログラミング
のデバッグ装置にとって有効なデータに限って外部デー
タバス上に乗せ、且つ外部に対して外部データバス上に
有効なデータが乗ったことを知らせる為の通知信号とし
てラッチクロック109を発生させる機能を有している
。マルチプログラミングCPU106は、システムコー
ル命令RCV−MSGe−検知し解読すると、マイクロ
プログラムメモリ106−4の、該当する命令の実行ル
ーチンの処理を開始する。処理の過程で、内部データバ
ス上に流れる有効データとしては、システムコール命令
識別子、メールボックス識別子、システムコール命令R
CV−MS(iの発行タスク識別子、同様に発行タスク
シテータス、ディスパッチング処理で選択されたタスク
の識別子などが有り、これらのデータを外部データバス
に乗せると同時に、このタイミングでラッチクロック発
生部106−7を制御し、外部に対してラッチクロック
109を発生する。これによってマルチプログラミング
CUP106は、第4図のタイムチャートで示したよう
なタイミングで、ラッチクロック109とトレースデー
タを発生する。
FIG. 4 shows the data flowing on the internal data bus in the process in which the multiprogramming CPU 106 decodes the RCV-MSG system call instruction taken as an example in FIG. 3 and processes it according to the instructions of the microprogram. Figure 0 Normally, the external data bus is driven only when a memory read or write strobe signal is generated, and is in a floating state for internal CPU operations. Among the data flowing on the internal data bus, only data that is valid for the multiprogramming debug device is placed on the external data bus, and also to notify the outside that valid data has been placed on the external data bus. It has a function of generating a latch clock 109 as a notification signal. When the multiprogramming CPU 106 detects and decodes the system call instruction RCV-MSGe, it starts processing the execution routine of the corresponding instruction in the microprogram memory 106-4. Valid data flowing on the internal data bus during processing includes a system call instruction identifier, a mailbox identifier, and a system call instruction R.
CV-MS (includes the issuing task identifier of i, the issuing task status, the identifier of the task selected in the dispatching process, etc.), and at the same time as these data are placed on the external data bus, the latch clock generator is activated at this timing. 106-7 and generates a latch clock 109 to the outside.The multi-programming CPU 106 thereby generates the latch clock 109 and trace data at the timing shown in the time chart of FIG.

以上説明したような形で、トレース用の情報を、CPU
106は発生し、これに対して、マルチプログラミング
・デバッグ装置はトレース処理を行なう。トレースメモ
リアドレス発生部103は、ラッチクロック109を受
け、トレースメモリ104に対してアドレスを発生する
ことで、前記マルチプログラミングCPU106がラッ
チクロックと同時に出力したデータバス上のトレースデ
ータが、トレースメモリ104へ格納される。
In the form explained above, trace information is sent to the CPU.
106 occurs, and the multiprogramming/debugging device performs tracing processing for this. The trace memory address generation unit 103 receives the latch clock 109 and generates an address for the trace memory 104, so that the trace data on the data bus that the multiprogramming CPU 106 outputs simultaneously with the latch clock is transferred to the trace memory 104. Stored.

こうして、トレースメモリ104はシステムコール命令
の処理に関係する情報をメモリ容量がオーバーフローす
るまで格納し続ける。トレースメモリ104がオーバー
フローすると、トレースメモリアドレス発生部103は
・トレース終了信号110をホストCPUl0Iへ送信
する。ホストCPUl0Iは、トレースメモリ104の
内容を読み出し、表示装置105ヘシステムコール命令
情報を表示する。トレースメモリ104のシステムコー
ル命令情報を表示し終えると、ホストCPUl01は、
トレースメモリアドレス発生部103へトレース開始信
号111を送信する。上記の一連の処理は、従来のトレ
ース表示処理と同様である。トレースメモリアドレス発
生部103は、上記I・レース開始信号111を受信す
ると、ラッチクロック信号109の受信時に発生する前
記システムコールトレース処理を再開する。以下、シス
テムコールトレース処理とトレース出力処理を同様に繰
り返す0以上、第1の実施例におけるシステムムコール
トレース機能は、ラッチクロック109の発生のタイミ
ングでシステムコール命令の情報のみトレースすること
を可能にするものである。
In this manner, trace memory 104 continues to store information related to the processing of system call instructions until the memory capacity overflows. When the trace memory 104 overflows, the trace memory address generation unit 103 sends a trace end signal 110 to the host CPU I0I. The host CPU I0I reads the contents of the trace memory 104 and displays the system call instruction information on the display device 105. After displaying the system call instruction information in the trace memory 104, the host CPU l01
A trace start signal 111 is transmitted to the trace memory address generation section 103. The above series of processing is similar to conventional trace display processing. When the trace memory address generation unit 103 receives the I/race start signal 111, it restarts the system call trace processing that occurs when the latch clock signal 109 is received. Hereinafter, system call trace processing and trace output processing will be repeated in the same way. It is something.

〔実施例−2〕 次に本発明のマルチプログラミング指向CPUに対する
デバッグ機能に関して第2の実施例について説明する。
[Embodiment 2] Next, a second embodiment of the debugging function for a multiprogramming-oriented CPU of the present invention will be described.

この第2の実施例では、アプリケーションプログラムの
処理に対して、実時間でシステムコール命令発行時の情
報をトレースすることを可能にするマルチプログラミン
グ・デバッグ。
In this second embodiment, multiprogramming debugging enables tracing of information at the time of issuing a system call instruction in real time for application program processing.

機能に関して説明する。第5図は第2の実施例を示す構
成図である。この実施例で対象とするCPUは、第1の
実施例でも説明したマルチプログラミングCPU106
である。また、従来のデバッグ装置の持つホストCPU
101.ホストメモリ102、表示装置105に加えて
、マルチプログラミングCPU106から出力されるラ
ッチクロック109と同期してデータバス上のデータを
うツチする為のデータラッチ(1)〜データラッチ(1
0)と、各データラッチにラッチ信号を発生するデータ
ラッチ制御部501とを備えている。
I will explain the functions. FIG. 5 is a block diagram showing the second embodiment. The CPU targeted in this embodiment is the multiprogramming CPU 106 described in the first embodiment.
It is. In addition, the host CPU of conventional debug equipment
101. In addition to the host memory 102 and the display device 105, there are data latches (1) to data latches (1) for loading data on the data bus in synchronization with the latch clock 109 output from the multiprogramming CPU 106.
0) and a data latch control unit 501 that generates a latch signal for each data latch.

マルチプログラミングCPU106は、第1の実施例で
説明しなと同様の機能を持つ。また第3図のシステムコ
ール命令の処理の流れ、及び第4図で示したシステムコ
ール命令の処理中に出力される、データバス上のトレー
スデータと、ラッチクロック発生のタイミングも第1の
実施例に同じである。
The multiprogramming CPU 106 has the same functions as those described in the first embodiment. Furthermore, the flow of processing of the system call instruction shown in FIG. 3, the trace data on the data bus output during the processing of the system call instruction shown in FIG. 4, and the timing of latch clock generation are also similar to the first embodiment. is the same as

以下、第5図で示したマルチプログラミング・デバッグ
装置について、その処理概要を説明する。
An outline of the processing of the multiprogramming/debugging device shown in FIG. 5 will be explained below.

まず、マルチプログラミングCPU106はシステムコ
ール命令RCV−MSGを検知し、解読すると、マイク
ロプログラムメモリ106−4の該当する実行ルーチン
の処理を開始する。処理の過程で、内部データバス上に
流れる有効データとしては、システムコール命令識別子
、メールボックス識別子、システムコール命令RCV−
MSGの発行タスク識別子、同様に発行タスクステータ
ス、ディズパッチング処理で選択されたタスクの識別子
などが有り、これらのデータを外部データバスに乗せる
と同時に、このタイミングでラッチクロック発生部10
6−7を制御し、外部に対してラッチクロック109を
発生する。これによってマルチプログラミングCPU1
06は、第4図のタイムチャートで示したようなタイミ
ングで、ラッチクロック109とトレースデータを発生
する。以上説明したような形で、トレース用の情報を、
マルチプログラミングCPU106は発生し、これに対
して、マルチプログラミング・デバッグ装置はトレース
処理を行なう、以下のトレース処理を、第3図で示した
システムコール命令RCV−MSGを例に説明すると、
データラッチ制御部501は、上記マルチプログラミン
グCPU106の処理で発生するラッチクロック109
を受けて、前記マルチプログラミングCPU106がラ
ッチクロック109と同時に出力したデータバス上のト
レースデータを読み込み、これを判読する6判読の結果
、該システムコール識別子に付随するトレースデータの
数を判断する。データラッチ!lI御部501は、ラッ
チクロック109が発生する度に、トレースデータを異
なるデータラッチに格納していく、1つのシステムコー
ル命令の実行でマルチプログラミングCPU106より
出力されるトレースデータの数は、システムコールの機
能に対して異なってくるが、高々10個程である為、こ
れを格納できる小量のデータラッチを備えていればよい
、データラッチ制臀部501は、システムコール命令R
CV−MSGに付随するトレースデータを総てデータラ
ッチに格納した時点で、トレースデータを全部格納し終
えたことを知らせるトレース終了信号110をホストC
PUl0Iへ送信する。ホストCPU101は、トレー
ス終了信号110を受信すると、各システムコール命令
に応じたトレースデータを必要個数分、データラッチ(
1)〜デークラッチ(10)から受信する。上記の処理
を、デバッグ対象となるアプリケーションプログラムの
実行中にシステムコール命令が発行される度に繰り返す
First, the multiprogramming CPU 106 detects and decodes the system call instruction RCV-MSG, and starts processing the corresponding execution routine in the microprogram memory 106-4. Valid data flowing on the internal data bus during processing includes a system call command identifier, a mailbox identifier, and a system call command RCV-
There are the issuing task identifier of the MSG, the issuing task status, the identifier of the task selected in the dispatch processing, etc., and at the same time as these data are placed on the external data bus, the latch clock generator 10
6-7 and generates a latch clock 109 to the outside. This allows multiprogramming CPU1
06 generates the latch clock 109 and trace data at the timing shown in the time chart of FIG. In the form explained above, trace information is
The multiprogramming CPU 106 generates a message, and the multiprogramming/debug device performs a trace process.The following trace process will be explained using the system call instruction RCV-MSG shown in FIG. 3 as an example.
The data latch control unit 501 controls the latch clock 109 generated by the processing of the multiprogramming CPU 106.
In response to this, the multiprogramming CPU 106 reads the trace data on the data bus output at the same time as the latch clock 109, and as a result of six readings, the number of trace data associated with the system call identifier is determined. Data latch! The II control unit 501 stores trace data in a different data latch every time the latch clock 109 is generated.The number of trace data output from the multiprogramming CPU 106 by executing one system call instruction The data latch control unit 501 has a system call command R.
When all the trace data accompanying the CV-MSG is stored in the data latch, the host controller sends a trace end signal 110 to notify that all the trace data has been stored.
Send to PUl0I. Upon receiving the trace end signal 110, the host CPU 101 stores the necessary number of trace data corresponding to each system call instruction in the data latch (
1) ~Receive from data latch (10). The above process is repeated every time a system call instruction is issued during execution of the application program to be debugged.

以上の様に、第2の実施例のマルチプログラミング・デ
バッグ装置は、システムコール命令がアプリケーション
プログラムに現われる度に、トレースメモリを介さずに
、実時間処理と並行にシステムコール命令の情報のトレ
ースを行ない、これをシステムコール命令が発生した時
点で表示することを可能にするものである。
As described above, the multiprogramming/debugging device of the second embodiment traces the information of the system call instruction in parallel with real-time processing, without going through the trace memory, every time the system call instruction appears in the application program. This makes it possible to display this information at the time a system call instruction occurs.

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

以上説明したように本発明のマルチプログラミング指向
CPUを用いることによりマルチプログラミング・デバ
ッグ装置において、システムコール命令の履歴トレース
を実時間で実現することを可能にする。
As described above, by using the multiprogramming-oriented CPU of the present invention, it is possible to realize history tracing of system call instructions in real time in a multiprogramming/debugging device.

以下、第8Q?I(1)、(2)に示した表示例を参照
しながら、本発明の効果について説明する。
Below is the 8th Q? The effects of the present invention will be explained with reference to the display examples shown in I(1) and (2).

この表示例は第7図で示したマルチプログラミング例に
対しての表示例である。同図(1)における第1行目の
(A)は、システムコール命令を発行したタスクの識別
子を、RCV−MSGはシステムコール命令の識別子を
、Mlはシステムコール命令のパラメータを、→以降は
デイスバッチ後に制御が移ったタスクの識別子を夫々表
わしている0表示例から判断出来るように、アドレス情
報を主体とした遂次トレースでは充分に追いきれなかっ
た、プログラム全体の流れが把握できる。同図(1)の
例は、アドレスXで割り込みが発生しなかった場合、同
図(2)の例はアドレスXで割り込みが発生した場合を
示している。従って従来技術に於けるトレースでは分か
らなかった、アドレスBとアドレスCとの間の、各タス
ク状態遷移が明確になる。このようにマルチプログラミ
ング、各タスクの状態を追うことが最も重要であり、本
発明によるシステムコール命令の発行に着目した結果、
トレース処理が、プログラムをデバッグしていく上で非
常に有効となる。また、特に機器@併用のプログラムを
デパックする上では、従来のデパック機能のブレーク処
理を用いて、制御の流れを一旦中止し、その時点でプロ
グラムの実行状態を調べるという方法は採れず、プログ
ラムを走行させたまま、この実行状態をトレースするこ
とが要求される。こうした制限を受けるプログラムが、
本発明のCPUを対象とするマルチプログラミングシス
テムで構築されたプログラムであった場合、前記第1の
実施例と第2の実施例のデバッグ機能は、その制御の流
れを中止することなく、マルチプログラミングのデバッ
グとして重要なタスクの状態遷移のトレースを実現出来
るという点で特に優れている0本発明のCPUによるば
、これら2つの実施例のような技術を提供し、マルチプ
ログラミングのデバッグ効率を著しく向上するという効
果を有する。
This display example is for the multiprogramming example shown in FIG. The first line (A) in the same figure (1) is the identifier of the task that issued the system call instruction, RCV-MSG is the identifier of the system call instruction, Ml is the parameter of the system call instruction, → From here on, As can be determined from the example of displaying 0 indicating the identifiers of the tasks to which control has been transferred after the date batch, it is possible to grasp the flow of the entire program, which could not be sufficiently followed by sequential tracing based on address information. The example in (1) in the same figure shows the case where no interrupt occurs at address X, and the example in (2) in the same figure shows the case in which an interrupt occurs at address X. Therefore, each task state transition between address B and address C, which could not be seen by tracing in the prior art, becomes clear. In this way, tracking the status of each task is most important in multiprogramming, and as a result of focusing on issuing system call instructions according to the present invention,
Trace processing is very effective in debugging programs. In addition, especially when depacking a program that is used in conjunction with a device@, it is not possible to use the conventional break processing of the depack function to temporarily stop the control flow and check the program execution status at that point. It is required to trace the execution status while the machine is running. Programs that are subject to these restrictions are
If the program is constructed using a multiprogramming system targeting the CPU of the present invention, the debugging functions of the first and second embodiments can be used for multiprogramming without interrupting the flow of control. The CPU of the present invention is particularly excellent in that it can trace the state transitions of tasks, which is important for debugging.The CPU of the present invention provides technologies such as these two embodiments, and significantly improves the efficiency of debugging multiprogramming. It has the effect of

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

第1図は本発明のマルチプログラミング指向CPUおよ
び、そのマルチプログラミング・デバッグ装置の第1の
実施例の全体構成図、第2図は本発明のマルチプログラ
ミング指向CPUの構成図、第3図はメツセージ受信シ
ステムコールの処理を表わすフローチャート、第4図は
メツセージ受信システムコールの処理中のデータバス上
のデータ、およびラッチクロック発生のタイミングチャ
ート、第5図は本発明のマルチプログラミング指向CP
Uおよびそのマルチプログラミング・デパック装置の第
2の実施例の全体構成図、第6図は従来例のCPUに対
するデパック装置の全体構成図、第7図はマルチプログ
ラミングシステムの状態遷移図、第8図(1)、(2)
は本発明のトレース処理の表示例を示す図である。 101はホストCPU、102はホストメモリ、103
はトレースメモリアドレス発生部、104はトレースメ
モリ、105は表示装置、106はマルチプログラミン
グCPU、107はターゲットメモリ、108はマルチ
プレクサ、109はラッチクロック、110はトレース
終了信号、111はトレース開始信号、106はALU
、106−2はバスインタフェース制御部、106−3
は命令デコーダ、106−4はマイクロプログロムメモ
リ、106−5はメールボックス管理部、106−6は
タスク管理部、106−7はラッチクロック発生部、1
06−8はテンポラリレジスタ群、106−9は汎用レ
ジスタ群、106−10は命令レジスタ、501はデー
タラッチ制御部、502〜511はデータラッチ(1)
〜(10)、601はターゲットCPU、602はアド
レスラッチ、603はマルチプレクサ。
FIG. 1 is an overall configuration diagram of a first embodiment of a multiprogramming-oriented CPU and its multiprogramming/debugging device according to the present invention, FIG. 2 is a configuration diagram of a multiprogramming-oriented CPU according to the present invention, and FIG. 3 is a message FIG. 4 is a flowchart showing the processing of the receiving system call. FIG. 4 is a timing chart of data on the data bus and latch clock generation during processing of the message receiving system call. FIG.
FIG. 6 is an overall configuration diagram of a second embodiment of U and its multiprogramming/depacking device; FIG. 6 is an overall configuration diagram of a conventional depacking device for a CPU; FIG. 7 is a state transition diagram of the multiprogramming system; FIG. 8 (1), (2)
FIG. 3 is a diagram showing an example of displaying trace processing according to the present invention. 101 is a host CPU, 102 is a host memory, 103
104 is a trace memory address generator, 104 is a trace memory, 105 is a display device, 106 is a multiprogramming CPU, 107 is a target memory, 108 is a multiplexer, 109 is a latch clock, 110 is a trace end signal, 111 is a trace start signal, 106 is ALU
, 106-2 is a bus interface control unit, 106-3
1 is an instruction decoder, 106-4 is a microprogram memory, 106-5 is a mailbox management section, 106-6 is a task management section, 106-7 is a latch clock generation section, 1
06-8 is a temporary register group, 106-9 is a general-purpose register group, 106-10 is an instruction register, 501 is a data latch control unit, and 502 to 511 are data latches (1)
~(10), 601 is a target CPU, 602 is an address latch, and 603 is a multiplexer.

Claims (1)

【特許請求の範囲】[Claims] マルチプログラミングを実現する為のオペレーティング
システムの処理を司どるマルチプログラミング指向CP
Uにおいて、システムコール命令実行時にマルチプログ
ラミングシステムに関する情報を、前記CPUの外部デ
ータバス上に出力し、且つ、該外部データバス上に情報
が出力されたことを、前記CPUの外部に対して通知す
る為の手段を備えたことを特徴とするマルチプログラミ
ング指向CPU。
A multiprogramming-oriented CP that controls operating system processing to realize multiprogramming.
U outputs information regarding the multiprogramming system onto an external data bus of the CPU when executing a system call instruction, and notifies the outside of the CPU that the information has been output onto the external data bus. A multiprogramming-oriented CPU characterized by being equipped with means for.
JP62000674A 1987-01-05 1987-01-05 Multi-programming directional cpu Pending JPS63167940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62000674A JPS63167940A (en) 1987-01-05 1987-01-05 Multi-programming directional cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62000674A JPS63167940A (en) 1987-01-05 1987-01-05 Multi-programming directional cpu

Publications (1)

Publication Number Publication Date
JPS63167940A true JPS63167940A (en) 1988-07-12

Family

ID=11480291

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62000674A Pending JPS63167940A (en) 1987-01-05 1987-01-05 Multi-programming directional cpu

Country Status (1)

Country Link
JP (1) JPS63167940A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04286035A (en) * 1991-03-15 1992-10-12 Nec Corp Process tracing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04286035A (en) * 1991-03-15 1992-10-12 Nec Corp Process tracing system

Similar Documents

Publication Publication Date Title
US6343338B1 (en) System and method for synchronizing disparate processing modes and for controlling access to shared resources
EP2787444A2 (en) Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method
JPS6252655A (en) Common interrupt system
US4725946A (en) P and V instructions for semaphore architecture in a multiprogramming/multiprocessing environment
GB1511281A (en) Trap semaphore in computer
JPH0594317A (en) Input output interrupt processing system of virtual machine
JPS63310051A (en) Method and apparatus for executing input/output process containing program input/output instruction
EP0290942B1 (en) Guest machine execution control system for virtual machine system
JPS58197553A (en) Program monitor
JPS63167940A (en) Multi-programming directional cpu
JP2003006173A (en) Information processing apparatus
JPH08137703A (en) Task switching device
JP2553526B2 (en) Multitasking processor
JPS63118969A (en) Information processor
JPS62219058A (en) Exclusive control system for shared memory
JP3102380B2 (en) Online control storage exchange
JPS638947A (en) Program debug supporting system
CN117909042A (en) Method and system for managing system interrupt and task switching based on Cortex-R core
JPH07234850A (en) Device and method for multiprocessor system
JPH0535507A (en) Central processing unit
JPS638946A (en) Program debug supporting system
JPH027099B2 (en)
JPH02132548A (en) Debug back-up system for parallel processor
JPH1091458A (en) Interruption factor control circuit
JPS62217326A (en) Computer capable of storing and switching plural os