JP2000122882A - Multi-thread processor and debugging device - Google Patents

Multi-thread processor and debugging device

Info

Publication number
JP2000122882A
JP2000122882A JP10297942A JP29794298A JP2000122882A JP 2000122882 A JP2000122882 A JP 2000122882A JP 10297942 A JP10297942 A JP 10297942A JP 29794298 A JP29794298 A JP 29794298A JP 2000122882 A JP2000122882 A JP 2000122882A
Authority
JP
Japan
Prior art keywords
thread
data
register
register file
arithmetic processing
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
JP10297942A
Other languages
Japanese (ja)
Inventor
Tetsuji Kishi
哲司 貴志
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP10297942A priority Critical patent/JP2000122882A/en
Publication of JP2000122882A publication Critical patent/JP2000122882A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a multi-thread processor for performing multi-thread processing capable of easily performing debug and a debugging device capable of debugging the multi-thread processor. SOLUTION: This processor is provided with an operation processing means 101 which performs data operation processing in a thread unit, a register file 102 which consists of plural registers 20 and stores data obtained through the operation processing of the thread unit by the means 101 in any of the plural registers 20 in a thread unit, a thread information holding means 107 which holds thread information corresponding to data stored by each register 20 of the file 102 in accordance with each register 20 and a debug controlling means 108 which performs read control of the thread information stored by the means 107.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、複数のスレッド
単位での処理を行うマルチスレッドプロセッサ及びマル
チスレッドプロセッサのデバッグ装置に関し、特に、デ
バッグのための支援機能を備えたマルチスレッドプロセ
ッサ及びマルチスレッドプロセッサのデバッグ装置に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multi-thread processor for performing processing in units of a plurality of threads and a multi-thread processor debugging apparatus, and more particularly, to a multi-thread processor having a debugging support function and a multi-thread processor. Related to a debugging device.

【0002】[0002]

【従来の技術】近年、所定時間内に複数のタスクを実時
間で同時処理するリアルタイム処理を必要とした機器が
増加の一途をたどっている。上記のような複数のタスク
処理を効率的に実行するための技術としては、複数の処
理を小規模な実行処理単位である“スレッド" と呼ぶ単
位でデータ処理を行うマルチスレッド処理があげられ
る。複数のスレッドを単位にしたマルチスレッドの処理
に関しては、例えば、「マルチスレッドプログラミン
グ」MIX Software,Inc著,ブランテイスホール出版に紹
介されているような技術がある。
2. Description of the Related Art In recent years, the number of devices that require real-time processing for simultaneously processing a plurality of tasks in real time within a predetermined time has been increasing. As a technique for efficiently executing a plurality of task processes as described above, there is a multi-thread process in which a plurality of processes perform data processing in units called "threads" which are small-scale execution processing units. Regarding multi-thread processing in units of a plurality of threads, for example, there is a technique introduced in “Multi-thread Programming” by MIX Software, Inc., published by Brandeis Hall.

【0003】マルチスレッド処理では、処理を実行する
プロセッサでレジスタの内容を複数のスレッド単位で切
り替えて使用したり、演算器のリソースを時分割で切り
替えて処理を実行したりする。この事をコンテキストス
イッチングと呼んでいる。マルチスレッド処理を行うプ
ロセッサでは、前記コンテキストスイッチングを効率的
におこない複数のスレッドを切り替えて処理の実行を進
めていくリアルタイム処理において、外部割り込みなど
による例外スレッドの発生など多くの例外処理も含めて
処理を進めていかなければならない。
In the multi-thread processing, the processor that executes the processing uses the contents of the registers by switching them in units of a plurality of threads, or executes the processing by switching the resources of the arithmetic units in a time-division manner. This is called context switching. In a processor that performs multi-thread processing, in real-time processing in which context switching is efficiently performed and a plurality of threads are switched to advance execution of processing, processing including many exception processing such as occurrence of an exception thread due to an external interrupt or the like is performed. Must be advanced.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、前述し
たようなマルチスレッドの各スレッド制御処理におい
て、微少時間で複数の処理単位を切り替える手続きを効
率よく制御し、さらに処理を実行するプロセッサのリソ
ースを効率よく管理する事は大変難しい。例えば、マル
チスレッド処理を行うプロセッサでは、レジスタファイ
ルや特定のスレッド間でのデータ共有を行う共有レジス
タへの内容は特定時間にそのデータを保証できなけれ
ば、後の処理を正常に続ける事が出来なくなる。
However, in each of the thread control processes of the multi-thread as described above, the procedure for switching a plurality of processing units in a very short time is efficiently controlled, and the resources of the processor executing the process are efficiently used. It is very difficult to manage well. For example, in a processor that performs multi-thread processing, if the contents of a register file or a shared register that shares data between specific threads cannot be guaranteed at a specific time, subsequent processing can continue normally. Disappears.

【0005】このようなデータの保護を行うための手段
として、スレッドにデータの保護を施してデータを保護
する方法などがあるが、これもプログラムレベルで保護
しなければならない事が多く、さらに割り込みに起因す
る非同期処理などを多く伴う場合には、予期せぬデータ
アクセス、資源アクセスが発生する事により、所定のレ
ジスタの内容を保護できない事によって所定の処理を正
常に実行することができなくなる。特にスレッド間の処
理に強い相関関係がある場合や、スレッド間でデータを
共有してデータ通信する場合や、高いリアルタイム性を
必要とするマルチスレッドプログラムの初期開発段階で
は、そのような問題が発生する可能性が高くなる。
[0005] As a means for protecting such data, there is a method of protecting data by protecting data in a thread. However, in many cases, it is necessary to protect the data at a program level, and furthermore, an interrupt is required. When a large number of asynchronous processes or the like are involved, unexpected data access and resource access occur, and the contents of a predetermined register cannot be protected, so that the predetermined process cannot be executed normally. Such problems occur especially when there is a strong correlation between the processes between threads, when data is shared between threads, and when data is communicated, or in the initial development stage of a multi-thread program that requires high real-time performance. Is more likely to do so.

【0006】このようなエラーに対するデバッグは、通
常のシングルスレッドレベルの処理とは異なり、複数の
スレッドが関与する事から、デバッグをより困難なもの
にする。特に近年複数の処理をリアルタイムで実行する
マルチメデイアシステムでは、特定の時間内に関連する
スレッドが多くなる傾向にあるため、益々上記のような
プログラムデバッグは困難な傾向になっている。特に、
マルチスレッドプログラムでは、処理を実行するプロセ
ッサのレジスタやリソースを複数のスレッドが共有して
いるため、単純にICE(In Circuit Emulator) などの
通常のデバッグシステムを利用したステップ実行による
問題特定を行う事が大変困難である。このように従来の
マルチスレッド処理を行うプロセッサにおいては、プロ
グラムのデバッグが非常に困難であるという問題があっ
た。
[0006] Unlike ordinary single thread level processing, debugging for such an error involves a plurality of threads, making debugging more difficult. In particular, in recent years, in a multimedia system that executes a plurality of processes in real time, the number of threads related to a specific time tends to increase, and thus, the above-described program debugging is increasingly difficult. In particular,
In a multi-threaded program, because multiple threads share the registers and resources of the processor that executes the process, simply specify the problem by step execution using a normal debugging system such as ICE (In Circuit Emulator). Is very difficult. As described above, the conventional processor that performs multi-thread processing has a problem that it is very difficult to debug a program.

【0007】本発明は、上記のような問題点を解決する
ためになされたものであり、デバッグを容易に行うこと
が可能な、マルチスレッド処理を実行するマルチスレッ
ドプロセッサ、及びこのマルチスレッドプロセッサのデ
バッグが可能なデバッグ装置を提供することを課題とす
る。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and a multi-thread processor for executing multi-thread processing capable of easily performing debugging. It is an object to provide a debugging device capable of debugging.

【0008】[0008]

【課題を解決するための手段】この発明に係るマルチス
レッドプロセッサは、スレッド単位でデータの演算処理
を行う演算処理手段と、複数のレジスタからなり、上記
演算処理手段によるスレッド単位の演算処理により得ら
れたデータを、上記複数のレジスタのいずれかにスレッ
ド単位で保持するレジスタファイルと、上記レジスタフ
ァイルの各レジスタに保持されたデータに対応したスレ
ッドの情報を、各レジスタに対応して保持するスレッド
情報保持手段と、上記スレッド情報保持手段に保持され
たスレッドの情報の読みだし制御を行うデバッグ制御手
段とを備えるようにしたものである。
A multi-thread processor according to the present invention comprises an arithmetic processing means for performing data arithmetic processing in units of threads, and a plurality of registers, and is obtained by the arithmetic processing in units of threads by the arithmetic processing means. A register file for holding the obtained data in one of the plurality of registers in a thread unit, and a thread for holding information of a thread corresponding to the data held in each register of the register file in correspondence with each register An information holding means and a debug control means for controlling reading of the thread information held in the thread information holding means are provided.

【0009】また、上記レジスタファイルの各レジスタ
に保持されたデータに対応したプログラムカウンタ値
を、各レジスタに対応して保持するプログラムカウンタ
保持手段を備え、上記デバッグ制御手段は、プログラム
カウンタ保持手段に保持されたプログラムカウンタ値の
読み出し制御を行うようにしたものである。
[0009] The program counter holding means for holding a program counter value corresponding to data held in each register of the register file corresponding to each register is provided, and the debug control means is provided in the program counter holding means. The reading control of the held program counter value is performed.

【0010】また、スレッド単位で上記レジスタファイ
ルの複数のレジスタを切り替え、スレッド単位の処理に
より得られたデータの上記レジスタファイルのレジスタ
への書きこみを制御するとともに、各スレッドの情報を
上記スレッド情報保持手段に出力するスレッド制御手段
を備えるようにしたものである。
[0010] In addition, a plurality of registers of the register file are switched in units of threads to control writing of data obtained by processing in units of threads to the registers of the register file, and information of each thread is stored in the thread information. A thread control means for outputting to the holding means is provided.

【0011】また、上記スレッド情報保持手段は、上記
レジスタファイルの各レジスタと対をなす複数のスレッ
ドレジスタからなり、上記スレッド制御手段は、複数の
レジスタを切り替えると同時に、スレッド情報保持手段
のスレッドレジスタを切り替えて、上記スレッド情報保
持手段の、上記レジスタファイルのデータが書き込まれ
るレジスタに対となるスレッドレジスタにデータを書き
こむようにしたものである。
The thread information holding means comprises a plurality of thread registers paired with the respective registers of the register file. The thread control means switches between the plurality of registers and simultaneously executes a thread register of the thread information holding means. And writes the data in a thread register of the thread information holding means that is paired with the register in which the data of the register file is written.

【0012】また、上記演算処理手段とレジスタファイ
ルとの間のデータ転送に用いられるとともに、上記スレ
ッド情報保持手段からのデータの読み出しの際のデータ
転送に用いられるデータバスを備えるようにしたもので
ある。
[0012] The present invention further comprises a data bus used for data transfer between the arithmetic processing means and the register file, and used for data transfer when reading data from the thread information holding means. is there.

【0013】また、この発明にかかるデバッグ装置は、
スレッド単位でデータの演算処理を行う演算処理手段
と、複数のレジスタからなり、上記演算処理手段による
スレッド単位の演算処理により得られたデータを、上記
複数のファイルのいずれかにスレッド単位で保持するレ
ジスタファイルと、上記レジスタファイルの各レジスタ
に保持されたデータに対応したスレッドの情報を、各レ
ジスタに対応して保持するスレッド情報保持手段と、上
記スレッド情報保持手段に保持されたスレッドの情報の
読みだし制御を行うデバッグ制御手段と、上記演算処理
手段に対する演算処理の実行制御を行うとともに、上記
デバッグ制御手段を制御して、上記レジスタファイル及
びスレッド情報処理手段に保持されたデータを読み出す
ホスト制御手段とを備えるようにしたものである。
[0013] Further, a debugging device according to the present invention includes:
An arithmetic processing means for performing data arithmetic processing in units of threads, and a plurality of registers, and holds data obtained by the arithmetic processing in units of threads by the arithmetic processing means in any of the plurality of files in units of threads. A register file, thread information holding means for holding thread information corresponding to the data held in each register of the register file, and thread information holding means for holding the thread information held in the thread information holding means; Debug control means for performing read control; and host control for controlling execution of arithmetic processing to the arithmetic processing means and controlling the debug control means to read data held in the register file and the thread information processing means. Means.

【0014】また、上記レジスタファイルの各レジスタ
に保持されたデータに対応したプログラムカウンタ値
を、各レジスタに対応して保持するプログラムカウンタ
保持手段を備え、上記デバッグ制御手段は、プログラム
カウンタ保持手段に保持されたプログラムカウンタ値の
読み出し制御を行うものであり、上記ホスト制御手段
は、上記レジスタファイルのデータ読み出し時に、上記
プログラムカウンタ保持手段のプログラムカウンタ値を
読み出すようにしたものである。
[0014] The program control apparatus further comprises program counter holding means for holding a program counter value corresponding to data held in each register of the register file in accordance with each register. The read control of the held program counter value is performed, and the host control means reads the program counter value of the program counter holding means when reading the data of the register file.

【0015】[0015]

【発明の実施の形態】実施の形態1.図1は、本発明の
実施の形態1に係るマルチスレッドプロセッサの構造を
示すブロック図であり、マルチスレッドプロセッサ10
0は、演算処理を実行する演算処理手段101と、演算
データを保持する複数のレジスタ20からなるレジスタ
ファイル102と、演算処理手段101と第1の制御信
号線10により接続されたスレッドの切り替え制御を実
行するスレッド制御手段と、IOバス105を介してマ
ルチスレッドプロセッサ100と外部とのデータ入出力
を実行するIO制御手段104と、IO制御手段104
と演算処理手段101とを接続する第2の制御信号線1
1と、スレッド信号線14を介してスレッド制御手段1
06と接続された、各レジスタ20と対を成す複数のス
レッドレジスタ30からなる、スレッド情報(スレッド
ID)を保持するためのスレッド情報保持手段107
と、第3の制御信号線12により演算制御手段101と
接続された、マルチスレッドプロセッサ100のデバッ
グ制御を実行するデバッグ制御手段108と、演算処理
手段101、レジスタファイル102、IO制御手段1
04、及びデバッグ制御手段108と接続された、マル
チスレッドプロセッサ100内部のデータバス103
と、レジスタファイル102とスレッド情報保持手段1
07とに接続されるとともに、デバッグ制御手段108
と第4の制御信号線13を介して接続された、レジスタ
ファイル102とスレッド情報保持手段107のデータ
を選択して内部のデータバス103に出力するセレクタ
109とにより構成されている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 FIG. 1 is a block diagram showing a structure of a multi-thread processor according to the first embodiment of the present invention.
Numeral 0 denotes arithmetic processing means 101 for executing arithmetic processing, a register file 102 including a plurality of registers 20 for holding arithmetic data, and switching control of a thread connected to the arithmetic processing means 101 and the first control signal line 10. Control means for executing data input / output between the multi-thread processor 100 and the outside via the IO bus 105, and an IO control means 104
Control signal line 1 for connecting the
1 and the thread control means 1 via the thread signal line 14.
Thread information holding means 107 for holding thread information (thread ID), comprising a plurality of thread registers 30 paired with each register 20, connected to the register 06.
A debug control means 108 for executing debug control of the multi-thread processor 100 connected to the arithmetic control means 101 by a third control signal line 12; an arithmetic processing means 101; a register file 102;
04 and the data bus 103 inside the multi-thread processor 100 connected to the debug control means 108
, Register file 102 and thread information holding means 1
07 and the debug control means 108
And a selector 109 connected via the fourth control signal line 13 to select the data in the register file 102 and the thread information holding means 107 and output the selected data to the internal data bus 103.

【0016】以上のように構成されたマルチスレッドプ
ロセッサ100において、演算処理手段101は、マル
チスレッドプロセッサ100の外部にIOバス105を
介して接続されるホストコンピュータ等の制御手段等か
ら入力される所定の命令およびデータ、または内部に保
持される所定の命令およびデータに従って、所定の演算
処理を実行する。さらに演算処理手段101は第1の制
御信号を第1の制御信号線10を用いて送信し、スレッ
ド制御手段106に指示してスレッド切り替え処理、お
よびレジスタファイル102のコンテキストスイッチン
グ処理を実行する。
In the multi-thread processor 100 configured as described above, the arithmetic processing means 101 includes a predetermined processing input from a control means such as a host computer connected to the outside of the multi-thread processor 100 via the IO bus 105. A predetermined arithmetic processing is executed in accordance with the instructions and data of the above or predetermined instructions and data held therein. Further, the arithmetic processing unit 101 transmits the first control signal using the first control signal line 10 and instructs the thread control unit 106 to execute a thread switching process and a context switching process of the register file 102.

【0017】コンテキストスイッチングは、スレッド毎
のデータによってレジスタファイル102のデータを更
新する作業であり、データバス103およびIO制御手
段104を利用し、IOバス105を通じてマルチスレ
ッドプロセッサ100の外部に用意されるデータ保持手
段との間でデータ交換を行うことで実行される。
The context switching is an operation for updating data in the register file 102 with data for each thread, and is prepared outside the multi-thread processor 100 through the IO bus 105 using the data bus 103 and the IO control means 104. This is executed by exchanging data with the data holding unit.

【0018】演算処理手段101が、一連の演算処理の
中でレジスタファイル102の特定のレジスタ20にデ
ータ書き込み更新をすると、同時にスレッド制御手段1
06は、前記レジスタ20と対をなすように用意されて
いるスレッド情報保持手段107のスレッドレジスタ3
0に、前記レジスタ20へデータ書き込みを実行してい
るスレッドの情報を書き込む。このスレッド情報は、ど
のスレッドによりレジスタ20に保持されたデータが処
理されたかを示すスレッドを特定できる情報であり、例
えば、スレッド番号等が用いられ、これがスレッドレジ
スタ30に保持される。つまり、このスレッドレジスタ
30に保持されたスレッド情報が、これと対になるレジ
スタ20のデータのスレッド処理の履歴に相当するもの
となる。この処理はマルチスレッドプロセッサ100の
一連の演算処理の中で、レジスタファイル102に対し
てデータ書き込みアクセスが実行されるたびに、そのデ
ータ書き込みの対象となるレジスタ20と対になるスレ
ッドレジスタ30に対して実行される。
When the arithmetic processing means 101 writes and updates data in a specific register 20 of the register file 102 in a series of arithmetic processing, the thread control means 1
Reference numeral 06 denotes a thread register 3 of the thread information holding means 107 prepared to be paired with the register 20.
At 0, the information of the thread executing the data writing is written to the register 20. This thread information is information that can specify a thread indicating which thread has processed the data held in the register 20. For example, a thread number or the like is used, and this is held in the thread register 30. That is, the thread information held in the thread register 30 corresponds to a history of thread processing of data of the register 20 that is paired with the thread information. This processing is performed such that each time a data write access is performed to the register file 102 in a series of arithmetic processing of the multi-thread processor 100, the thread register 30 paired with the register 20 to which the data is to be written is written. Executed.

【0019】次にマルチスレッドプロセッサ100で実
行された一連の演算処理に対して、レジスタファイル1
02に書き込まれたデータおよび前記データの書き込み
を実行したスレッド情報を読み出す処理であるデバッグ
処理を実行する場合は、マルチスレッドプロセッサ10
0の外部に、デバッグ命令を送信可能で、その処理結果
をモニタ可能な手段として、例えばホストコンピュータ
( 図示せず) を設け、IOバス105を介して演算処理
手段101に対して所定のデバッグ命令を指示し、これ
を受けた演算処理手段101は、第3の制御信号線12
を通じてデバッグ制御手段108にレジスタファイル1
02および、スレッド情報保持手段107のデータを、
セレクタ109を通じてデータバス103に出力させ、
さらに演算処理手段101は、第2の制御信号線11を
通じて第2の制御信号をIO制御手段104に出力し、
これを受けてIO制御手段104はデータバス103の
データを、IOバス105を通じマルチスレッドプロセ
ッサ100の外部に出力する。この出力を上述した外部
のモニタ用の手段で受けて、この出力されたデータおよ
びスレッド情報を利用してマルチスレッドプロセッサ1
00で実行される所定の処理に合致するかどうかをチェ
ックすることで一連の処理のデバッグを行う。
Next, for a series of arithmetic processing executed by the multi-thread processor 100, the register file 1
When the debug process, which is the process of reading the data written in the data 02 and the thread information on which the data was written, is executed, the multi-thread processor 10 is used.
For example, a host computer can transmit a debug instruction to the outside of the host computer and monitor the processing result.
(Not shown), instructs a predetermined debug instruction to the arithmetic processing means 101 via the IO bus 105, and upon receiving the instruction, the arithmetic processing means 101 sends the third control signal line 12
Register file 1 to debug control means 108 through
02 and the data of the thread information holding means 107 are
Output to the data bus 103 through the selector 109,
Further, the arithmetic processing means 101 outputs a second control signal to the IO control means 104 through the second control signal line 11,
In response to this, the IO control unit 104 outputs the data on the data bus 103 to the outside of the multi-thread processor 100 via the IO bus 105. This output is received by the above-described external monitoring means, and the multi-thread processor 1 uses the output data and thread information.
A series of processes is debugged by checking whether the process matches the predetermined process executed at 00.

【0020】図2は、マルチスレッドプロセッサ100
で実行する一連の処理のうちの、レジスタファイルへの
データ書き込み処理の流れを示したものである。なお、
以降の説明でスレッドの処理番号は先頭に記号“#" を
付けた番号で示すものとする。図において、処理の時間
の流れを示した時間流200のうち、第1のアクセス時
間201はスレッド#1が特定のレジスタ20にデータ
を書き込んだ特定の時間を、また、第2のアクセス時間
202はスレッド#3が、第1のアクセス時間201で
データ書き込みをおこなったレジスタ20と同じレジス
タ20にデータの書き込みを行う特定の時間を、それぞ
れ示している。第1のデータ保証期間203は、第1の
アクセス時間201で書き込まれ、特定のレジスタに保
持された、スレッド#1のデータが保証される期間、第
2のデータ保証期間204は、第2のアクセス時間20
2で書き込まれ、特定のレジスタに保持された、スレッ
ド#3のデータが保証される期間である。
FIG. 2 shows a multi-thread processor 100.
3 shows a flow of a process of writing data to a register file in a series of processes executed by the process shown in FIG. In addition,
In the following description, the process number of the thread is indicated by a number preceded by the symbol "#". In the figure, a first access time 201 of a time flow 200 showing a flow of processing time indicates a specific time when the thread # 1 has written data into a specific register 20, and a second access time 202. Indicates specific times at which the thread # 3 writes data to the same register 20 as the register 20 to which data was written during the first access time 201, respectively. The first data guarantee period 203 is a period in which data of the thread # 1 written in the first access time 201 and held in a specific register is guaranteed, and the second data guarantee period 204 is a second data guarantee period 204. Access time 20
This is a period in which the data of thread # 3, which has been written in 2 and held in a specific register, is guaranteed.

【0021】図3は、図2の処理と同様の処理の流れを
示した図であり、図2の処理の流れに対して、所定外の
データ書き込みが所定のレジスタに対して発生している
場合の例を示したものである。図において、図2と同一
符号は同一又は相当する部分を示しており、第3のアク
セス時間205は、第1 のアクセス時間201および第
2のアクセス時間202以外に発生した所定外のアクセ
ス時間、所定外処理期間206は、第3のアクセス時間
205の発生によって発生した所定外の処理期間であ
る。
FIG. 3 is a diagram showing a flow of processing similar to the processing of FIG. 2. In the processing flow of FIG. 2, writing of data outside a predetermined range occurs in a predetermined register. This is an example of the case. In the figure, the same reference numerals as those in FIG. 2 indicate the same or corresponding parts, and the third access time 205 is a non-predetermined access time other than the first access time 201 and the second access time 202, The non-predetermined processing period 206 is a non-predetermined processing period generated by the occurrence of the third access time 205.

【0022】また、図4及び図5は、マルチスレッドプ
ロセッサ100のレジスタファイルおよびスレッド情報
保持手段にアクセスする様子を示した図であり、図にお
いて、図1と同一符号は同一又は相当する部分を示して
いる。
FIGS. 4 and 5 are diagrams showing how to access the register file and thread information holding means of the multi-thread processor 100. In the figures, the same reference numerals as those in FIG. 1 denote the same or corresponding parts. Is shown.

【0023】以下、このマルチスレッドプロセッサ10
0のレジスタファイルへのデータ書きこみ処理について
説明する。正常な動作時には、図2に示すように、時間
流200の中で、第1のアクセス時間201に、スレッ
ド#1が、所定のレジスタ20に所定のデータの書き込
みを行う。その書き込みデータは、第1のデータ保証期
間203の間はデータの書き込み更新を禁止することで
データの保持を保証され、この保持されたデータに対
し、データの読み出し処理や、このデータとその他のデ
ータとを用いた演算処理が実行される。第2のアクセス
時間202では、スレッド#3が、前記第1のアクセス
時間201でデータ書き込みを行ったレジスタ20と同
じレジスタ20に対し、データの書き込み更新を行う。
以降第2のデータ保証期間204において予め定められ
た処理が実行される。
Hereinafter, the multi-thread processor 10
The process of writing data to the register file of 0 will be described. During a normal operation, as shown in FIG. 2, in the time stream 200, the thread # 1 writes predetermined data to the predetermined register 20 at the first access time 201. During the first data assurance period 203, the write data is guaranteed to be held by prohibiting the writing and updating of the data, and the held data is subjected to a data reading process and the data and other data. An arithmetic process using the data is performed. In the second access time 202, the thread # 3 writes and updates data in the same register 20 that has written data in the first access time 201.
Thereafter, a predetermined process is performed in the second data guarantee period 204.

【0024】図2に示すように予定する正常処理動作が
実行される場合に対し、図3に示すように、第3のアク
セス時間205にスレッド#2による予定外のデータ書
き込みが第1のデータ保証期間203の対象となるレジ
スタに対して行われる場合、上記図2に示した第1のデ
ータ保証期間203の保証期間が保証されず、所定外処
理期間206が発生してしまい、該所定外処理期間20
6以降の処理が保証されず、処理の実行が停止するか、
所定外の処理結果を得てしまうこととなる。
In contrast to the case where the scheduled normal processing operation is executed as shown in FIG. 2, as shown in FIG. 3, unscheduled data writing by thread # 2 during the third access time 205 is performed as shown in FIG. When the operation is performed on the register that is the object of the guarantee period 203, the guarantee period of the first data guarantee period 203 shown in FIG. 2 is not guaranteed, and a non-scheduled processing period 206 occurs. Processing period 20
The processing after 6 is not guaranteed, and the execution of the processing stops or
This results in a processing result other than the predetermined one.

【0025】ここで本実施の形態1においては、図4に
示すように、レジスタファイル102の所定のレジスタ
20に対して、第1のアクセス時間201のスレッド#
1が所定のデータ書き込みを実行すると同時に、このレ
ジスタに対応したスレッド情報保持手段107のスレッ
ドレジスタ30に対し、データ書き込みを実行したこと
を示すスレッド情報S1の書き込みが行われる。
Here, in the first embodiment, as shown in FIG. 4, a thread # of the first access time 201 is assigned to a predetermined register 20 of the register file 102.
1 executes predetermined data writing, and at the same time, the thread information S1 indicating that the data writing has been executed is written to the thread register 30 of the thread information holding means 107 corresponding to this register.

【0026】同様に、第3のアクセス時間205では、
スレッド#1により書きこまれたレジスタファイル10
2の所定のレジスタ20に対して、第1のアクセス時間
201のスレッド#2が所定のデータ書き込みを実行す
ると同時に、このレジスタ20に対応したスレッド情報
保持手段107のスレッドレジスタ30に対し、データ
書き込みを実行したことを示すスレッド情報S2の書き
込みを行う。以降、同様の処理を実行する。
Similarly, in the third access time 205,
Register file 10 written by thread # 1
At the same time as the thread # 2 of the first access time 201 executes the predetermined data writing to the predetermined register 20 of the second thread, the data writing to the thread register 30 of the thread information holding unit 107 corresponding to this register 20 is performed. Is written, indicating that thread information S2 has been executed. Thereafter, the same processing is performed.

【0027】デバッグ処理の際には、マルチスレッドプ
ロセッサ100では、外部より演算処理手段101に対
して所定のデバッグ命令の指示を受けて、演算処理手段
101は、第3の制御信号線12を通じてデバッグ制御
手段108にレジスタファイル102、及びスレッド情
報保持手段107に保持されているデータを、セレクタ
109を通じてデータバス103に出力させ、さらに演
算処理手段101は、第2の制御信号線11を通じて第
2の制御信号を出力し、IO制御手段104にデータバ
ス103のデータを、IOバス105を通じマルチスレ
ッドプロセッサ100の外部に出力させる。ここで、ス
レッド情報保持手段107にレジスタファイル102の
データに対応したスレッド情報が保持されているため、
これを取り出して各レジスタ30のデータがどのスレッ
ドによって処理されたものであるかといった処理の履歴
を調べることが可能となり、エラーが発生したデータに
対する原因を特定することが可能となる。例えば、スレ
ッド情報S1,S2等を取り出すことで、図3のような
エラーに対して、第1のデータ保証期間203の特定の
時間に、予定外のデータ書き込みがスレッド#2によっ
て行われていること、さらにスレッド#2によってデー
タが更新されていることを特定することができる。
In the debugging process, the multi-thread processor 100 receives an instruction of a predetermined debug command from the outside to the arithmetic processing means 101, and the arithmetic processing means 101 performs debugging through the third control signal line 12. The control unit 108 causes the data held in the register file 102 and the thread information holding unit 107 to be output to the data bus 103 through the selector 109, and the arithmetic processing unit 101 further outputs the second data through the second control signal line 11. It outputs a control signal and causes the IO control means 104 to output data on the data bus 103 to the outside of the multi-thread processor 100 via the IO bus 105. Here, since the thread information corresponding to the data of the register file 102 is held in the thread information holding unit 107,
By taking this out, it is possible to check the processing history such as which thread has processed the data in each register 30, and it is possible to identify the cause of the data in which an error has occurred. For example, by extracting the thread information S1, S2, and the like, an unexpected data write is performed by the thread # 2 at a specific time of the first data guarantee period 203 in response to the error as shown in FIG. That is, it is possible to specify that the data is updated by the thread # 2.

【0028】以上のように本実施の形態1に係るマルチ
スレッドプロセッサによれば、スレッド情報保持手段1
07にレジスタファイル102のデータに対応したスレ
ッド情報を保持し、このスレッド情報をデバッグの際に
取り出せるようにしたから、デバッグの際に、マルチス
レッドによる複数のスレッドからのアクセスによるレジ
スタデータの流れを容易にモニターすることができ、そ
の結果、マルチスレッド処理の短い時間間隔に、予想外
のデータアクセスが生じることによって起こる、処理の
暴走や処理結果の異常等の原因を容易に発見することが
でき、その結果早期にデバッグを実行することができ
る。
As described above, according to the multi-thread processor according to the first embodiment, the thread information holding unit 1
07 holds thread information corresponding to the data of the register file 102, and this thread information can be taken out at the time of debugging. Therefore, at the time of debugging, the flow of register data due to access from a plurality of threads by multi-threading is reduced. It can be easily monitored, and as a result, it is possible to easily find the cause of the runaway of the processing or the abnormality of the processing result caused by unexpected data access in a short time interval of the multi-thread processing. As a result, debugging can be performed early.

【0029】実施の形態2.図6は、本発明の実施の形
態2に係るマルチスレッドプロセッサの構造を示すブロ
ック図であり、図において、図1と同一符号は同一又は
相当する部分を示している。このマルチスレッドプロセ
ッサ300は上記実施の形態1に係るマルチスレッドプ
ロセッサ100に対して、レジスタファイル102のレ
ジスタ20の個々と対になり、各レジスタ20にデータ
を書き込む命令を発行時のプログラムカウンタ値を保持
する複数のプログラムカウンタ(以下、PCと称す)レ
ジスタ40からなるPC保持手段301を設けるように
するとともに、演算処理手段101がプログラムカウン
タ値をデータ制御信号線15を通じてデータ制御信号と
して出力する手段を備えるようにして、演算処理手段1
01のプログラムカウンタ値を、データ制御信号線15
を通じてPC保持手段301のPCレジスタ40に書き
込むようにしたものである。このPC保持手段301の
出力はセレクタ109と接続されている。
Embodiment 2 FIG. 6 is a block diagram showing the structure of the multi-thread processor according to the second embodiment of the present invention. In the figure, the same reference numerals as those in FIG. 1 indicate the same or corresponding parts. The multi-thread processor 300 makes a pair with each of the registers 20 of the register file 102 for the multi-thread processor 100 according to the first embodiment, and sets a program counter value at the time of issuing an instruction to write data to each register 20. PC holding means 301 comprising a plurality of program counter (hereinafter, referred to as PC) registers 40 for holding, and means for the arithmetic processing means 101 to output the program counter value as a data control signal through the data control signal line 15 And the arithmetic processing means 1
01 to the data control signal line 15
Is written into the PC register 40 of the PC holding means 301 through the PC. The output of the PC holding unit 301 is connected to the selector 109.

【0030】本実施の形態2のマルチスレッドプロセッ
サ300においては、上述した実施の形態1と同様に、
所定のレジスタ20にデータの書き込みを行うと同時に
スレッド保持手段107のスレッドレジスタ30に対し
て、データの書き込みをおこなったスレッド情報の書き
込みが行われるが、さらにその動作と同時に、データ書
き込みに関係した命令のプログラムカウンタ値が演算処
理手段101からデータ制御信号線15を通じて入力さ
れ、このプログラムカウンタ値がPC保持手段301の
所定のレジスタ20に対応したPCレジスタ40に書き
込まれる。
In the multi-thread processor 300 according to the second embodiment, similar to the first embodiment,
At the same time as writing the data to the predetermined register 20, the thread information for which the data has been written is written to the thread register 30 of the thread holding means 107. The program counter value of the instruction is input from the arithmetic processing means 101 through the data control signal line 15, and the program counter value is written to the PC register 40 corresponding to the predetermined register 20 of the PC holding means 301.

【0031】デバッグ時には、上記実施の形態1と同様
に、演算処理手段101に対して所定のデバッグ命令を
指示し、演算処理手段101は、第3の制御信号線12
を通じて第3の制御信号を出力し、デバッグ制御手段1
08にレジスタファイル102、スレッド情報保持手段
107、及びPC保持手段301のデータを、セレクタ
109を通じてデータバス103に出力させ、さらに演
算処理手段101は、第2の制御信号11によりIO制
御手段104を制御してデータバス103のデータを、
IOバス105を通じマルチスレッドプロセッサ100
の外部に出力する。この出力されたレジスタファイル1
02のデータ及びこれに対応したスレッド情報を利用し
てマルチスレッドプロセッサ100で実行される所定の
処理に合致するかどうかをチェックすることで上記実施
の形態1と同様の一連の処理のデバッグを行う。
At the time of debugging, as in the first embodiment, a predetermined debug instruction is instructed to the arithmetic processing means 101, and the arithmetic processing means 101
And outputs a third control signal through the debug control unit 1
08 outputs the data of the register file 102, the thread information holding unit 107, and the PC holding unit 301 to the data bus 103 through the selector 109, and further, the arithmetic processing unit 101 controls the IO control unit 104 by the second control signal 11. Controlling the data on the data bus 103,
Multi-thread processor 100 through IO bus 105
Output to the outside of. This output register file 1
By using the data No. 02 and the thread information corresponding thereto, it is checked whether or not the processing matches the predetermined processing executed by the multi-thread processor 100, thereby debugging a series of processing similar to the first embodiment. .

【0032】さらに、この実施の形態2においては、P
C保持手段301に、レジスタファイル102のデータ
に対応したプログラムカウンタ値が保持されているた
め、これをデバッグの際に取り出すことによって、スレ
ッド情報に加えてプログラムカウンタ値も利用してエラ
ーの発生した原因を特定することが可能となる。
Further, in the second embodiment, P
Since the C counter 301 holds the program counter value corresponding to the data in the register file 102, the program counter value is taken out at the time of debugging, and an error occurs using the program counter value in addition to the thread information. The cause can be specified.

【0033】以上のように本発明のマルチスレッドプロ
セッサによれば、スレッド情報保持手段107にレジス
タファイル102のデータに対応したスレッド情報を保
持し、このスレッド情報をデバッグの際に取り出せるよ
うにするとともに、PC保持手段301にレジスタファ
イル102のデータに対応したプログラムカウンタ値を
保持し、このプログラムカウンタ値をデバッグの際に取
り出せるようにしたから、上記実施の形態1と同様の効
果がえられるとともに、デバッグの精度を向上させて、
デバッグの処理の短縮を図ることができる効果がある。
As described above, according to the multi-thread processor of the present invention, the thread information holding means 107 holds the thread information corresponding to the data in the register file 102 so that the thread information can be taken out at the time of debugging. Since the PC counter 301 holds the program counter value corresponding to the data of the register file 102 and can retrieve the program counter value at the time of debugging, the same effect as in the first embodiment can be obtained. Improve the accuracy of debugging,
This has the effect of shortening the debugging process.

【0034】実施の形態3.図7は、本発明の実施の形
態3に係るマルチスレッドプロセッサの構造を示すブロ
ック図であり、図において、図1と同一符号は同一又は
相当する部分を示している。このマルチスレッドプロセ
ッサ400は上記実施の形態2に係るマルチスレッドプ
ロセッサ300に対して、レジスタファイルの代わり
に、セレクタ109と接続された、スレッド情報保持手
段107のスレッドレジスタ30と対になる複数の共有
レジスタ50からなる共有レジスタファイル401と、
データバス103と接続された、スレッド情報保持手段
107のスレッドレジスタ30と対になる複数のレジス
タ20a,及びレジスタ20bからなるレジスタファイ
ル102a,及びレジスタファイル102bを設けるよ
うにしたものである。
Embodiment 3 FIG. 7 is a block diagram showing a structure of a multi-thread processor according to Embodiment 3 of the present invention. In the figure, the same reference numerals as those in FIG. 1 indicate the same or corresponding parts. This multi-thread processor 400 is different from the multi-thread processor 300 according to the second embodiment in that a plurality of shared threads paired with the thread register 30 of the thread information holding means 107 connected to the selector 109 instead of the register file. A shared register file 401 comprising the registers 50;
A register file 102a and a register file 102b, each including a plurality of registers 20a and registers 20b connected to the data bus 103 and paired with the thread register 30 of the thread information holding means 107, are provided.

【0035】このマルチメディアプロセッサ400の動
作は、上記実施の形態2の動作とほぼ同様であり、スレ
ッドにより処理されたデータのうち、スレッド間で共有
されるデータは共有レジスタファイル401のうちのレ
ジスタ50に書きこまれ、共有されるもの以外はレジス
タファイル102a、102bに書きこまれる。共有レ
ジスタファイル401のレジスタ50にデータの書き込
みを行った場合、前記レジスタ50と対になるスレッド
レジスタ30およびPCレジスタ40にスレッド情報お
よびプログラムカウンタ値を書き込む事で、デバッグの
際に必要な情報を保持させる。そして、デバッグの際に
は、上記実施の形態2と同様に、外部のモニタ手段によ
りデバッグ情報の獲得が行われ、デバッグが行われる。
The operation of the multimedia processor 400 is almost the same as that of the second embodiment. Among the data processed by the threads, the data shared among the threads is stored in the register of the shared register file 401. 50, and those other than those shared are written to the register files 102a and 102b. When data is written to the register 50 of the shared register file 401, the thread information and the program counter value are written to the thread register 30 and the PC register 40 that are paired with the register 50, so that information necessary for debugging can be obtained. Hold. Then, at the time of debugging, similarly to the second embodiment, debug information is obtained by an external monitoring means, and debugging is performed.

【0036】この実施の形態3によれば、上記実施の形
態2と同様の効果を奏するとともに、特に、デバッグが
困難な、複数のスレッドからアクセスされる共有レジス
タを具備する場合でも、そのデータの更新経歴を保持し
て、マルチスレッド処理における結果の異常を容易に発
見することができ、その結果早期にデバッグを実行する
ことができる。
According to the third embodiment, the same effects as those of the second embodiment can be obtained. In particular, even when a shared register accessed by a plurality of threads, which is difficult to debug, is provided, the data By retaining the update history, it is possible to easily find an abnormality in the result of the multi-thread processing, and to execute debugging earlier as a result.

【0037】なお、この実施の形態3では、2つのレジ
スタファイル102a、102bを設けるようにした
が、本発明においては、このレジスタファイルをいくつ
設けるようにしても、上記実施の形態3と同様の効果を
奏する。
In the third embodiment, two register files 102a and 102b are provided. However, in the present invention, the same number of register files may be provided as in the third embodiment. It works.

【0038】また、この実施の形態3においては、共有
レジスタファイル401と非共有のレジスタファイル1
02a,102bを、独立したレジスタファイルとして
設けるようにしたが、本発明においては、共有レジスタ
ファイル401のレジスタ50のうちのいくつかのみを
共有レジスタとし、その他のレジスタを非共有レジスタ
としても、上記実施の形態3と同様の効果を奏する。
In the third embodiment, the shared register file 401 and the non-shared register file 1
02a and 102b are provided as independent register files. However, in the present invention, only some of the registers 50 of the shared register file 401 may be used as shared registers, and other registers may be used as non-shared registers. An effect similar to that of the third embodiment is obtained.

【0039】なお、上記実施の形態1ないし3では、ス
レッド制御手段はマルチスレッドプロセッサの内部に装
備したが、本発明においては、マルチスレッドプロセッ
サの外部に装備し、スレッド情報は外部から供給する形
態をとるようにしてもよい。また、本実施の形態1ない
し3では、IO制御手段および演算処理手段を用いてデ
バッグ制御手段を制御していたが、本発明においては、
マルチスレッドプロセッサの外部から直接デバッグ制御
手段を制御するようにしてもよい。また、上記実施の形
態1ないし3では、IO制御手段を通じて命令およびデ
ータが供給されるが、本発明においては、マルチスレッ
ドプロセッサを内部に命令およびデータを保持する形態
として、処理の実行をおこなってもよい。さらに、上記
実施の形態1ないし3では、レジスタファイルのデータ
とスレッド情報保持手段のデータとをセレクタを通して
データバスに選択的に出力するような構成としたが、前
記レジスタファイルのデータとスレッド情報保持手段の
データを出力する構成を有していれば、その形態を制限
するものではない。
In the first to third embodiments, the thread control means is provided inside the multi-thread processor. However, in the present invention, the thread control means is provided outside the multi-thread processor, and the thread information is supplied from outside. May be taken. Further, in the first to third embodiments, the debug control means is controlled by using the IO control means and the arithmetic processing means.
The debug control means may be directly controlled from outside the multi-thread processor. In the first to third embodiments, instructions and data are supplied through the IO control means. However, in the present invention, processing is executed by using a multithread processor as a mode for holding instructions and data inside. Is also good. Further, in the first to third embodiments, the configuration is such that the data of the register file and the data of the thread information holding means are selectively output to the data bus through the selector. The configuration is not limited as long as it has a configuration for outputting means data.

【0040】実施の形態4.図8は本発明の実施の形態
4にかかるデバッグ装置の構造を示すブロック図であ
り、図において、デバッグ装置505は、上記実施の形
態1ないし3において説明したマルチスレッドプロセッ
サと同様の、レジスタファイルの特定のレジスタにデー
タアクセスをしたスレッド情報またはプログラムカウン
タ値、またはスレッド情報とプログラムカウンタ値とか
らなるデバッグ情報を保持し、該デバッグ情報を取り出
すことができるマルチスレッドプロセッサ500と、こ
のプロセッサ500のIOバス502に接続された、こ
のマルチスレッドプロセッサ500にデバッグ情報を取
り出すために必要な一連の処理を指示し、取り出したデ
バッグ情報を表示することが可能なホストコンピュータ
501とにより構成されている。
Embodiment 4 FIG. FIG. 8 is a block diagram showing a structure of a debugging device according to the fourth embodiment of the present invention. In the drawing, a debugging device 505 is a register file similar to the multi-thread processor described in the first to third embodiments. A multi-thread processor 500 capable of holding thread information or a program counter value that has made data access to a specific register, or debug information including the thread information and the program counter value, and extracting the debug information; A host computer 501 connected to the IO bus 502 and capable of instructing the multi-thread processor 500 to perform a series of processes necessary for extracting debug information and displaying the extracted debug information is configured.

【0041】上記のように構成されたデバッグ装置50
5において、マルチスレッドプロセッサ500は、ホス
トコンピュータ501の指示に従ってIOバス502を
通じて命令およびデータを供給し、前記命令およびデー
タに従った所定の処理を指示された処理単位で実行す
る。
The debugging device 50 configured as described above
In 5, the multi-thread processor 500 supplies instructions and data through the IO bus 502 according to the instruction of the host computer 501, and executes a predetermined process according to the instruction and data in the designated processing unit.

【0042】マルチスレッドプロセッサ500はその処
理単位での処理実行を終了すると、ホストコンピュータ
501の指示に従って内部に保持した処理データや、ス
レッド情報またはプログラムカウンタ値、またはスレッ
ド情報とプログラムカウンタ値からなるデバッグ情報を
IOバス502を通じてホストコンピュータ501に出
力する。そして、ホストコンピュータ502に収集され
た前記デバッグ情報が所定の処理にしたがっているかど
うかをチェックすることで、前記マルチスレッドプロセ
ッサ500でデバッグを実行する。
When the multi-thread processor 500 completes the execution of the processing in the processing unit, the multi-thread processor 500 debugs the processing data held internally according to the instruction of the host computer 501, the thread information or the program counter value, or the thread information and the program counter value. The information is output to the host computer 501 via the IO bus 502. Then, the multi-thread processor 500 executes debugging by checking whether the debug information collected by the host computer 502 complies with a predetermined process.

【0043】以上のように本実施の形態におけるデバッ
グ装置によれば、スレッド情報を保持するスレッド情報
保持手段を有するマルチスレッドプロセッサ、またはス
レッド情報とプログラムカウンタ値とをそれぞれ保持す
るスレッド情報保持手段とPC保持手段とを有するマル
チスレッドプロセッサを備えるようにしたから、マルチ
スレッドを実行するマルチスレッドプロセッサにおいて
プログラムミスなどによって発生する、予定外のレジス
タアクセスの原因を容易に特定することができるため、
デバッグの効率を向上させることができる。
As described above, according to the debugging device of the present embodiment, a multi-thread processor having thread information holding means for holding thread information, or a thread information holding means for holding thread information and a program counter value, respectively. Since the multi-thread processor having the PC holding means is provided, the cause of unscheduled register access caused by a program error or the like in the multi-thread processor executing the multi-thread can be easily specified.
Debugging efficiency can be improved.

【0044】[0044]

【発明の効果】以上のようにこの発明によれば、スレッ
ド単位でデータの演算処理を行う演算処理手段と、複数
のレジスタからなり、上記演算処理手段によるスレッド
単位の演算処理により得られたデータを、上記複数のレ
ジスタのいずれかにスレッド単位で保持するレジスタフ
ァイルと、上記レジスタファイルの各レジスタに保持さ
れたデータに対応したスレッドの情報を、各レジスタに
対応して保持するスレッド情報保持手段と、上記スレッ
ド情報保持手段に保持されたスレッドの情報の読みだし
制御を行うデバッグ制御手段とを備えるようにしたか
ら、デバッグ時に上記デバッグ制御手段に指示してスレ
ッド情報保持手段に保持されているスレッドの情報を読
み出すことにより、エラーを発生する原因となったデー
タの書き込み値及びその書き込みに関与したスレッドを
特定することができ、デバッグを容易に行うことが可能
な、マルチスレッド処理を実行するマルチスレッドプロ
セッサを提供できる効果がある。
As described above, according to the present invention, the arithmetic processing means for performing data arithmetic processing in units of threads and a plurality of registers are provided, and the data obtained by the arithmetic processing in units of threads by the arithmetic processing means is provided. And a thread information holding means for holding thread information corresponding to data held in each register of the register file in correspondence with each register. And the debug control means for reading and controlling the information of the thread held in the thread information holding means, so that the debug control means is instructed at the time of debugging to be held in the thread information holding means. By reading the thread information, the written value of the data that caused the error and the Of it is possible to identify the thread that involved in writing, debugging capable performed easily, there is an effect capable of providing a multi-thread processor executing a multithreaded process.

【0045】また、この発明によれば、上記レジスタフ
ァイルの各レジスタに保持されたデータに対応したプロ
グラムカウンタ値を、各レジスタに対応して保持するプ
ログラムカウンタ保持手段を備え、上記デバッグ制御手
段は、プログラムカウンタ保持手段に保持されたプログ
ラムカウンタ値の読み出し制御を行うようにしたから、
デバッグ時にプログラムカウンタ保持手段に保持されて
いるプログラムカウンタ値を読み出すことにより、デバ
ッグを容易に行うことが可能な、マルチスレッド処理を
実行するマルチスレッドプロセッサを提供できる効果が
ある。
Further, according to the present invention, there is provided a program counter holding means for holding a program counter value corresponding to data held in each register of the register file in correspondence with each register. Since the reading control of the program counter value held in the program counter holding means is performed,
By reading out the program counter value held in the program counter holding means at the time of debugging, there is an effect that a multi-thread processor that executes multi-thread processing that can easily perform debugging is provided.

【0046】また、この発明によれば、スレッド単位で
上記レジスタファイルの複数のレジスタを切り替え、ス
レッド単位の処理により得られたデータの上記レジスタ
ファイルのレジスタへの書きこみを制御するとともに、
各スレッドの情報を上記スレッド情報保持手段に出力す
るスレッド制御手段を備えるようにしたから、デバッグ
を容易に行うことが可能な、マルチスレッド処理を実行
するマルチスレッドプロセッサを提供できる効果があ
る。
According to the present invention, a plurality of registers of the register file are switched in units of threads, and writing of data obtained by processing in units of threads to the registers of the register file is controlled.
Since a thread control unit that outputs information of each thread to the thread information holding unit is provided, there is an effect that a multi-thread processor that executes a multi-thread process that can easily perform debugging is provided.

【0047】また、この発明によれば、上記スレッド情
報保持手段は、上記レジスタファイルの各レジスタと対
をなす複数のスレッドレジスタからなり、上記スレッド
制御手段は、複数のレジスタを切り替えると同時に、ス
レッド情報保持手段のスレッドレジスタを切り替えて、
上記スレッド情報保持手段の、上記レジスタファイルの
データが書き込まれるレジスタに対となるスレッドレジ
スタにデータを書きこむようにしたから、デバッグを容
易に行うことが可能な、マルチスレッド処理を実行する
マルチスレッドプロセッサを提供できる効果がある。
Further, according to the present invention, the thread information holding means comprises a plurality of thread registers paired with each register of the register file, and the thread control means switches the plurality of registers, Switch the thread register of the information holding means,
A multi-thread processor that executes multi-thread processing that can easily perform debugging because data is written to a thread register of the thread information holding unit that is paired with a register to which data of the register file is written. There is an effect that can be provided.

【0048】また、この発明によれば、上記演算処理手
段とレジスタファイルとの間のデータ転送に用いられる
とともに、上記スレッド情報保持手段からのデータの読
み出しの際のデータ転送に用いられるデータバスを備え
るようにしたから、デバッグを容易に行うことが可能
な、マルチスレッド処理を実行するマルチスレッドプロ
セッサを提供できる効果がある。
According to the present invention, a data bus used for data transfer between the arithmetic processing means and the register file and used for data transfer when reading data from the thread information holding means is provided. With this configuration, there is an effect that a multi-thread processor that executes multi-thread processing and that can easily perform debugging can be provided.

【0049】また、この発明によれば、スレッド単位で
データの演算処理を行う演算処理手段と、複数のレジス
タからなり、上記演算処理手段によるスレッド単位の演
算処理により得られたデータを、上記複数のファイルの
いずれかにスレッド単位で保持するレジスタファイル
と、上記レジスタファイルの各レジスタに保持されたデ
ータに対応したスレッドの情報を、各レジスタに対応し
て保持するスレッド情報保持手段と、上記スレッド情報
保持手段に保持されたスレッドの情報の読みだし制御を
行うデバッグ制御手段と、上記演算処理手段に対する演
算処理の実行制御を行うとともに、上記デバッグ制御手
段を制御して、上記レジスタファイル及びスレッド情報
処理手段に保持されたデータを読み出すホスト制御手段
とを備えるようにしたから、デバッグ時にホスト制御手
段がデバッグ制御手段に指示してスレッド情報保持手段
に保持されているスレッドの情報を読み出すことによ
り、エラーを発生する原因となったデータの書き込み
値、及びその書き込みに関与したスレッドを特定するこ
とができ、マルチスレッド処理を実行するマルチスレッ
ドプロセッサのデバッグを容易に行うことが可能なデバ
ッグ装置を提供できる効果がある。
Further, according to the present invention, there are provided an arithmetic processing means for performing arithmetic processing of data in units of threads, and a plurality of registers. And a thread information holding means for holding thread information corresponding to data held in each register of the register file in correspondence with each register, A debug control means for controlling reading of thread information held in the information holding means; an execution control of arithmetic processing for the arithmetic processing means; and a control of the debug control means for controlling the register file and the thread information. Host control means for reading data held in the processing means. From the above, at the time of debugging, the host control means instructs the debug control means to read out the thread information held in the thread information holding means, thereby causing the write value of the data causing the error and the writing value of the data to be involved in the writing. This makes it possible to provide a debug device that can specify a thread that has been executed and can easily debug a multi-thread processor that executes multi-thread processing.

【0050】また、この発明によれば、上記レジスタフ
ァイルの各レジスタに保持されたデータに対応したプロ
グラムカウンタ値を、各レジスタに対応して保持するプ
ログラムカウンタ保持手段を備え、上記デバッグ制御手
段は、プログラムカウンタ保持手段に保持されたプログ
ラムカウンタ値の読み出し制御を行うものであり、上記
ホスト制御手段は、上記レジスタファイルのデータ読み
出し時に、上記プログラムカウンタ保持手段のプログラ
ムカウンタ値を読み出すようにしたから、デバッグ時に
プログラムカウンタ値によりエラーの発生する原因を特
定することができ、マルチスレッド処理を実行するマル
チスレッドプロセッサのデバッグを容易に行うことが可
能なデバッグ装置を提供できる効果がある。
Further, according to the present invention, there is provided a program counter holding means for holding a program counter value corresponding to data held in each register of the register file in correspondence with each register. The host control means reads the program counter value of the program counter holding means at the time of reading the data of the register file. In addition, it is possible to specify a cause of an error based on a program counter value at the time of debugging, and to provide a debugging device capable of easily debugging a multi-thread processor that executes multi-thread processing.

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

【図1】 本発明の実施の形態1に係るマルチスレッド
プロセッサの構造を示すブロック図である。
FIG. 1 is a block diagram showing a structure of a multi-thread processor according to a first embodiment of the present invention.

【図2】 本発明の実施の形態1に係るマルチスレッド
プロセッサの動作を説明するための,マルチスレッド動
作でレジスタファイルに正常にアクセスが行われる状態
を示した図である。
FIG. 2 is a diagram for explaining an operation of the multi-thread processor according to the first embodiment of the present invention, showing a state in which a register file is normally accessed in a multi-thread operation.

【図3】 本発明の実施の形態1に係るマルチスレッド
プロセッサの動作を説明するための,マルチスレッド動
作でレジスタファイルに所定外のアクセスが行われる状
態を示した図である。
FIG. 3 is a diagram for explaining an operation of the multi-thread processor according to the first embodiment of the present invention, showing a state where a non-predetermined access to a register file is performed in the multi-thread operation.

【図4】 本発明の実施の形態1に係るマルチスレッド
プロセッサの、レジスタファイル及びスレッド情報保持
手段にスレッドによりデータが保持された状態を示す模
式図である。
FIG. 4 is a schematic diagram showing a state in which data is held by a thread in a register file and thread information holding means of the multithread processor according to the first embodiment of the present invention;

【図5】 本発明の実施の形態1に係るマルチスレッド
プロセッサの、レジスタファイル及びスレッド情報保持
手段に他のスレッドによりデータが保持された状態を示
す模式図である。
FIG. 5 is a schematic diagram showing a state in which data is held by another thread in a register file and thread information holding means of the multithread processor according to the first embodiment of the present invention;

【図6】 本発明の実施の形態2に係るマルチスレッド
プロセッサの構造を示すブロック図である。
FIG. 6 is a block diagram showing a structure of a multi-thread processor according to a second embodiment of the present invention.

【図7】 本発明の実施の形態3に係るマルチスレッド
プロセッサの構造を示すブロック図である。
FIG. 7 is a block diagram illustrating a structure of a multithread processor according to Embodiment 3 of the present invention.

【図8】 本発明の実施の形態4に係るデバッグ装置の
構造を示す図である。
FIG. 8 is a diagram showing a structure of a debugging device according to a fourth embodiment of the present invention.

【符号の説明】[Explanation of symbols]

10 第1の制御信号線 11 第2の制御信号線 12 第3の制御信号線 13 第4の制御信号線 14 スレッド信号線 15 データ制御信号線 20、20a,20b レジスタ 30 スレッドレジスタ 40 PCレジスタ 50 共有レジスタ 100、300,400,500 マルチスレッドプロ
セッサ 101 演算処理手段 102,102a,102b レジスタファイル 103 データバス 104 IO制御手段 105 IOバス 106 スレッド制御手段 107 スレッド情報保持手段 108 デバッグ制御手段 109 セレクタ 200 時間流 201 第1 のアクセス時間 202 第2のアクセス時間 203 第1のデータ保証期間 204 第2のデータ保証期間 205 第3のアクセス時間 206 所定外処理期間 301 PC保持手段 401 共有レジスタファイル 501 ホストコンピュータ 502 IOバス 505 デバッグ装置。
DESCRIPTION OF SYMBOLS 10 1st control signal line 11 2nd control signal line 12 3rd control signal line 13 4th control signal line 14 thread signal line 15 data control signal line 20, 20a, 20b register 30 thread register 40 PC register 50 Shared register 100, 300, 400, 500 Multithread processor 101 Arithmetic processing means 102, 102a, 102b Register file 103 Data bus 104 IO control means 105 IO bus 106 Thread control means 107 Thread information holding means 108 Debug control means 109 Selector 200 hours Flow 201 First access time 202 Second access time 203 First data guarantee period 204 Second data guarantee period 205 Third access time 206 Non-scheduled processing period 301 PC holding means 401 Sharing Register file 501 the host computer 502 IO bus 505 debugging device.

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 スレッド単位でデータの演算処理を行う
演算処理手段と、 複数のレジスタからなり、上記演算処理手段によるスレ
ッド単位の演算処理により得られたデータを、上記複数
のレジスタのいずれかにスレッド単位で保持するレジス
タファイルと、 上記レジスタファイルの各レジスタに保持されたデータ
に対応したスレッドの情報を、各レジスタに対応して保
持するスレッド情報保持手段と、 上記スレッド情報保持手段に保持されたスレッドの情報
の読みだし制御を行うデバッグ制御手段とを備えたこと
を特徴とするマルチスレッドプロセッサ。
An arithmetic processing means for performing data arithmetic processing in a thread unit, and a plurality of registers, wherein data obtained by the arithmetic processing means in a thread unit by the arithmetic processing means is stored in one of the plurality of registers. A register file that is held in units of threads, thread information holding means that holds thread information corresponding to data held in each register of the register file corresponding to each register, and a thread information holding means that holds the thread information. And a debug control means for controlling reading of information of the thread.
【請求項2】 請求項1に記載のマルチスレッドプロセ
ッサにおいて、 上記レジスタファイルの各レジスタに保持されたデータ
に対応したプログラムカウンタ値を、各レジスタに対応
して保持するプログラムカウンタ保持手段を備え、 上記デバッグ制御手段は、プログラムカウンタ保持手段
に保持されたプログラムカウンタ値の読み出し制御を行
うことを特徴とするマルチスレッドプロセッサ。
2. The multi-thread processor according to claim 1, further comprising program counter holding means for holding a program counter value corresponding to data held in each register of the register file in correspondence with each register. The multi-thread processor according to claim 1, wherein the debug control means controls reading of a program counter value held in the program counter holding means.
【請求項3】 請求項1に記載のマルチスレッドプロセ
ッサにおいて、 スレッド単位で上記レジスタファイルの複数のレジスタ
を切り替え、スレッド単位の処理により得られたデータ
の上記レジスタファイルのレジスタへの書きこみを制御
するとともに、各スレッドの情報を上記スレッド情報保
持手段に出力するスレッド制御手段を備えたことを特徴
とするマルチスレッドプロセッサ。
3. The multi-thread processor according to claim 1, wherein a plurality of registers of the register file are switched in units of threads, and writing of data obtained by processing in units of threads to the registers of the register file is controlled. And a thread control means for outputting information of each thread to the thread information holding means.
【請求項4】 請求項3に記載のマルチスレッドプロセ
ッサにおいて、 上記スレッド情報保持手段は、上記レジスタファイルの
各レジスタと対をなす複数のスレッドレジスタからな
り、 上記スレッド制御手段は、複数のレジスタを切り替える
と同時に、スレッド情報保持手段のスレッドレジスタを
切り替えて、上記スレッド情報保持手段の、上記レジス
タファイルのデータが書き込まれるレジスタに対となる
スレッドレジスタにデータを書きこむことを特徴とする
マルチスレッドプロセッサ。
4. The multi-thread processor according to claim 3, wherein said thread information holding means comprises a plurality of thread registers paired with each register of said register file, and said thread control means stores said plurality of registers. A multi-thread processor that switches the thread register of the thread information holding means at the same time as the switching, and writes data in a thread register of the thread information holding means which is paired with a register in which the data of the register file is written. .
【請求項5】 請求項1に記載のマルチスレッドプロセ
ッサにおいて、 上記演算処理手段とレジスタファイルとの間のデータ転
送に用いられるとともに、上記スレッド情報保持手段か
らのデータの読み出しの際のデータ転送に用いられるデ
ータバスを備えたことを特徴とするマルチスレッドプロ
セッサ。
5. The multi-thread processor according to claim 1, wherein said multi-thread processor is used for data transfer between said arithmetic processing means and a register file, and is used for data transfer when reading data from said thread information holding means. A multi-thread processor comprising a data bus to be used.
【請求項6】 スレッド単位でデータの演算処理を行う
演算処理手段と、 複数のレジスタからなり、上記演算処理手段によるスレ
ッド単位の演算処理により得られたデータを、上記複数
のファイルのいずれかにスレッド単位で保持するレジス
タファイルと、 上記レジスタファイルの各レジスタに保持されたデータ
に対応したスレッドの情報を、各レジスタに対応して保
持するスレッド情報保持手段と、 上記スレッド情報保持手段に保持されたスレッドの情報
の読みだし制御を行うデバッグ制御手段と、 上記演算処理手段に対する演算処理の実行制御を行うと
ともに、上記デバッグ制御手段を制御して、上記レジス
タファイル及びスレッド情報処理手段に保持されたデー
タを読み出すホスト制御手段とを備えたことを特徴とす
るデバッグ装置。
6. An arithmetic processing means for performing data arithmetic processing in a thread unit, and a plurality of registers, wherein data obtained by the thread-by-thread arithmetic processing by the arithmetic processing means is stored in one of the plurality of files. A register file that is held in units of threads, thread information holding means that holds thread information corresponding to data held in each register of the register file corresponding to each register, and a thread information holding means that holds the thread information. Debug control means for controlling reading of thread information, and execution control of arithmetic processing for the arithmetic processing means, and controlling the debug control means to be held in the register file and the thread information processing means. A debugging device comprising a host control means for reading data.
【請求項7】 請求項6に記載のデバッグ装置におい
て、 上記レジスタファイルの各レジスタに保持されたデータ
に対応したプログラムカウンタ値を、各レジスタに対応
して保持するプログラムカウンタ保持手段を備え、 上記デバッグ制御手段は、プログラムカウンタ保持手段
に保持されたプログラムカウンタ値の読み出し制御を行
うものであり、 上記ホスト制御手段は、上記レジスタファイルのデータ
読み出し時に、上記プログラムカウンタ保持手段のプロ
グラムカウンタ値を読み出すことを特徴とするデバッグ
装置。
7. The debugging device according to claim 6, further comprising: program counter holding means for holding a program counter value corresponding to data held in each register of the register file in correspondence with each register. The debug control means controls the reading of the program counter value held in the program counter holding means. The host control means reads the program counter value of the program counter holding means when reading the data of the register file. A debugging device, characterized in that:
JP10297942A 1998-10-20 1998-10-20 Multi-thread processor and debugging device Pending JP2000122882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10297942A JP2000122882A (en) 1998-10-20 1998-10-20 Multi-thread processor and debugging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10297942A JP2000122882A (en) 1998-10-20 1998-10-20 Multi-thread processor and debugging device

Publications (1)

Publication Number Publication Date
JP2000122882A true JP2000122882A (en) 2000-04-28

Family

ID=17853098

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10297942A Pending JP2000122882A (en) 1998-10-20 1998-10-20 Multi-thread processor and debugging device

Country Status (1)

Country Link
JP (1) JP2000122882A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005529383A (en) * 2002-03-29 2005-09-29 サン・マイクロシステムズ・インコーポレイテッド Time-multiplexed speculative multithreading to support single-threaded applications
JP2006189423A (en) * 2005-01-06 2006-07-20 Samsung Electronics Co Ltd Array substrate and display unit having the same

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05216851A (en) * 1990-12-19 1993-08-27 Cray Res Inc Method for high-speed communication between user program and operating system
JPH0922370A (en) * 1995-02-07 1997-01-21 Sun Microsyst Inc Method and apparatus for checking of memory access of multithread target program
JPH09212385A (en) * 1996-02-02 1997-08-15 Mitsubishi Electric Corp Parallel program debugging device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05216851A (en) * 1990-12-19 1993-08-27 Cray Res Inc Method for high-speed communication between user program and operating system
JPH0922370A (en) * 1995-02-07 1997-01-21 Sun Microsyst Inc Method and apparatus for checking of memory access of multithread target program
JPH09212385A (en) * 1996-02-02 1997-08-15 Mitsubishi Electric Corp Parallel program debugging device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005529383A (en) * 2002-03-29 2005-09-29 サン・マイクロシステムズ・インコーポレイテッド Time-multiplexed speculative multithreading to support single-threaded applications
JP2006189423A (en) * 2005-01-06 2006-07-20 Samsung Electronics Co Ltd Array substrate and display unit having the same
US8223108B2 (en) 2005-01-06 2012-07-17 Samsung Electronics Co., Ltd. Array substrate and display apparatus having the same

Similar Documents

Publication Publication Date Title
US7020871B2 (en) Breakpoint method for parallel hardware threads in multithreaded processor
US6148381A (en) Single-port trace buffer architecture with overflow reduction
US8640129B2 (en) Hardware multithreading systems and methods
JPS6258341A (en) Input and output interruption processing system
US20100153786A1 (en) Processor, multiprocessor, and debugging method
JPH01173247A (en) Slave controller
US4851992A (en) Register/saving/restoring system for saving and restoring data in a register of a slave processor
KR100495240B1 (en) Processor system
JP2513417B2 (en) Information processing device
US6968410B2 (en) Multi-threaded processing of system management interrupts
US7870311B2 (en) Preemptive packet flow controller
KR20010085997A (en) Thread-oriented debugging
EP2630577B1 (en) Exception control in a multiprocessor system
US6347368B1 (en) Microcomputing device for exchanging data while executing an application
JPH1078887A (en) Debug system and debug method
JP2000122882A (en) Multi-thread processor and debugging device
JPH04350737A (en) Microcomputer
TWI736564B (en) A method, apparatus and system for diagnosing a processor executing a stream of instructions
JPH07152598A (en) Incircuit emulator
JPH01147640A (en) Multi-programming debug device
JPH01147639A (en) Multi-programming debug device
JPH11312102A (en) Reset system for information processor
JPH11119992A (en) Trace controller for firmware
JPH0219937A (en) Electronic computer system
JP2014164378A (en) Parallel debug system, parallel debug method, and parallel debug program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050304

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050315

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050516

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20051102