JP2010033323A - Multiprocessor, debugging device for debugging the same, and debug method for debugging the multiprocessor - Google Patents

Multiprocessor, debugging device for debugging the same, and debug method for debugging the multiprocessor Download PDF

Info

Publication number
JP2010033323A
JP2010033323A JP2008194830A JP2008194830A JP2010033323A JP 2010033323 A JP2010033323 A JP 2010033323A JP 2008194830 A JP2008194830 A JP 2008194830A JP 2008194830 A JP2008194830 A JP 2008194830A JP 2010033323 A JP2010033323 A JP 2010033323A
Authority
JP
Japan
Prior art keywords
instruction
cpu
cpus
multiprocessor
debugging
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.)
Withdrawn
Application number
JP2008194830A
Other languages
Japanese (ja)
Inventor
Kazuhiko Iwanaga
和彦 岩永
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2008194830A priority Critical patent/JP2010033323A/en
Publication of JP2010033323A publication Critical patent/JP2010033323A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a multiprocessor, a debugging device, and a debug method for executing steps in order of a program even when there are a plurality of CPU cores in one chip. <P>SOLUTION: In the multiprocessor 1 incorporating a CPU 2a, CPU 2b and CPU 2c, respective commands of the CPU 2a, CPU 2b and CPU 2c are decoded by a decoder 21 so as to transit them to a monitor state when operating steps, a monitor transitable signal is output when a command is transitable to a monitor state, and the respective CPU are transited to the monitor state when all the CPU output monitor transitable signals. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

複数のCPU(Central Processing Unit)をコアとして内蔵したマルチプロセッサ及びそれをデバッグするデバッグ装置並びに前記マルチプロセッサをデバッグするデバッグ方法に関する。   The present invention relates to a multiprocessor including a plurality of CPUs (Central Processing Units) as a core, a debugging apparatus for debugging the multiprocessor, and a debugging method for debugging the multiprocessor.

近年、LSI(Large Scale Integration)の処理能力を向上させるために、1チップ内に複数のCPUコアを内蔵するマルチプロセッサ構成を取るものが多くなってきた。複数のCPUコアを含むプロセッサのデバッグにおいては、複数のCPUコアが同期して動作しているため、それぞれのCPUコアで実行しているプログラムの時系列に従ってデバッグを行うことが必要である。デバッグの際にはプログラマーの意図通り動作していないCPUコアがある場合には、対象となるCPUコアのプログラム上にブレークポイントを設定し、そこで各CPUコアをプログラム実行状態からモニター状態と呼ばれるデバッグモードに移行させ、その近傍で1命令ずつステップ実行動作を行わせながらレジスタやメモリに格納されている値をチェックしていくということが行われている。   In recent years, in order to improve the processing capability of LSI (Large Scale Integration), many have adopted a multiprocessor configuration in which a plurality of CPU cores are built in one chip. In debugging a processor including a plurality of CPU cores, since the plurality of CPU cores operate synchronously, it is necessary to perform debugging in accordance with a time series of programs executed in the respective CPU cores. When there is a CPU core that does not operate as intended by the programmer during debugging, a breakpoint is set on the program of the target CPU core, and each CPU core is debugged from the program execution state to the monitor state. The mode is shifted to the mode, and the value stored in the register or the memory is checked while performing the step execution operation one instruction at a time in the vicinity thereof.

複数のコアを同時にモニター状態へ移行させることに関しては、特許文献1ないし特許文献5などに開示されている。   Patent Documents 1 to 5 disclose the transition of a plurality of cores to the monitor state at the same time.

また、マルチプロセッサ構成において、命令を1命令ずつ実行していくステップ実行については特許文献6に開示されている。特許文献6には、複数のCPUコアの動作周波数が異なる場合に、周波数に反比例させた命令数を実行させることで複数のCPUコアを同時にステップ実行可能としていることが記載されている。
特開2005−122375号公報 特開2007−141200号公報 特許第2774770号公報 特開平10−198578号公報 特開平4−114241号公報 特開2006−53835号公報
Further, step execution in which instructions are executed one by one in a multiprocessor configuration is disclosed in Patent Document 6. Patent Document 6 describes that when the operating frequencies of a plurality of CPU cores are different, a plurality of CPU cores can be stepped simultaneously by executing the number of instructions inversely proportional to the frequency.
JP 2005-122375 A JP 2007-141200 A Japanese Patent No. 2774770 Japanese Patent Laid-Open No. 10-198578 JP-A-4-114241 JP 2006-53835 A

しかしながら、RISC(Reduced Instruction Set Computer)プロセッサにおいては遅延分岐や遅延ロードというパイプライン構成があり、この遅延分岐や遅延ロードはデスティネーションレジスタの更新が1サイクル以上遅延するために、ステップ実行している命令が遅延分岐もしくは遅延ロードを伴う命令である場合はプログラム通りにレジスタの値が更新しなくなるという問題がある。   However, a RISC (Reduced Instruction Set Computer) processor has a pipeline structure such as a delay branch and a delay load, and this delay branch and delay load are executed in steps because the destination register update is delayed by one cycle or more. If the instruction is an instruction with a delayed branch or delayed load, there is a problem that the value of the register is not updated according to the program.

上述した問題を図7ないし図9を参照して詳細に説明する。図7ないし図9は、最も代表的なプロセッサのパイプラインの流れを示している。つまり、命令フェッチ(Instruction Fetch)、命令デコード(Instruction Decode)およびレジスタ読み出し(Register Read)、演算(Execute)、メモリアクセス(Memory Access)、レジスタ書き込み(Write Back)の5段階で構成されている。   The above problem will be described in detail with reference to FIGS. 7 to 9 show the pipeline flow of the most typical processor. That is, it is composed of five stages of instruction fetch (Instruction Fetch), instruction decode (Instruction Decode) and register read (Register Read), operation (Execute), memory access (Memory Access), and register write (Write Back).

図7ないし図9のパイプラインを持つプロセッサにおいて、例えば、以下のような連続する3つの命令列がある場合を考える。
命令1:LD [add],R0(メモリのアドレスaddからデータをロードし、R0レジスタに格納する)
命令2:ADD R0,R1,R2(R0レジスタとR1レジスタの和をR2レジスタに格納する)
命令3:ADD R0,R3,R4(R0レジスタとR3レジスタの和をR4レジスタに格納する)
In the processor having the pipeline of FIGS. 7 to 9, for example, consider a case where there are three consecutive instruction sequences as follows.
Instruction 1: LD [add], R0 (load data from memory address add and store in R0 register)
Instruction 2: ADD R0, R1, R2 (store the sum of the R0 and R1 registers in the R2 register)
Instruction 3: ADD R0, R3, R4 (the sum of the R0 and R3 registers is stored in the R4 register)

上述した命令列は、図7に示すように実行していくことになるが、命令1でR0レジスタに値が格納されるよりも前に命令2、命令3でR0レジスタの読み出しを行うため、データハザードと呼ばれるパイプライン障害が発生する。命令3ではメモリから読み出した値を直接ALUに供給するForwardingと呼ばれるバイパス経路を開いて対応するが、命令2は絶対に間に合わないため更新前の値をR0レジスタの値として演算を行うことになる。つまり命令1(LD命令)はデスティネーションレジスタの更新が1サイクルの遅延を持っている命令であると言える。RISCプロセッサでは動作速度の向上のために、この状況をプログラムのスケジューリングに委ね、ハードウェアでは解決しないということが行われている。これを遅延ロードと呼ぶ。つまりこの場合プログラマーは、命令2は命令1によって更新される前のR0レジスタの値を使って演算を行うことを期待してプログラムを作成しているということになる。   The above-described instruction sequence is executed as shown in FIG. 7, but since the value is stored in the R0 register by the instruction 1, the R2 register is read by the instruction 2 and the instruction 3. A pipeline failure called a data hazard occurs. The instruction 3 responds by opening a bypass path called Forwarding that directly supplies the value read from the memory to the ALU. However, since the instruction 2 is not in time, the value before the update is calculated as the value of the R0 register. . That is, it can be said that the instruction 1 (LD instruction) is an instruction in which the update of the destination register has a delay of one cycle. In the RISC processor, in order to improve the operation speed, this situation is left to the scheduling of a program, and it is not solved by hardware. This is called lazy loading. In other words, in this case, the programmer is creating a program in the expectation that the instruction 2 performs an operation using the value of the R0 register before being updated by the instruction 1.

ここで命令1をステップ実行する場合を説明する。ステップ実行は、対象となる命令(この場合命令1)の次の命令(命令2)をデバッグ装置のホストコンピュータ上に退避しておき、これをソフトウェアブレーク命令(EBRK命令)に差し替えることで実現されるが、ステップ実行の場合は図8に示すように命令1はパイプラインの最後まで実行されて停止するために、次の命令2をステップ実行する際にはR0レジスタの値が更新されてしまい、プログラム通りにデバッグ出来ないことになる。遅延分岐の場合も同様にステップ実行がプログラム通りに行われない。   Here, the case where the instruction 1 is executed in steps will be described. Step execution is realized by saving the instruction (instruction 2) next to the target instruction (in this case, instruction 1) on the host computer of the debugging device and replacing it with a software break instruction (EBRK instruction). However, in the case of step execution, as shown in FIG. 8, instruction 1 is executed until the end of the pipeline and stops. Therefore, when the next instruction 2 is executed stepwise, the value of the R0 register is updated. It will not be possible to debug according to the program. Similarly, in the case of delayed branching, step execution is not performed according to the program.

このような問題を回避するためにチップの中に1つしかCPUコアがないプロセッサでは、ステップ実行の際に命令2をEBRK命令に差し替えるのではなく、図9のように命令3をEBRK命令に差し替えることでこの問題を回避している。   In order to avoid such a problem, a processor having only one CPU core in the chip does not replace instruction 2 with an EBRK instruction during step execution, but replaces instruction 3 with an EBRK instruction as shown in FIG. By replacing it, this problem is avoided.

しかし1つのチップの中に複数のCPUコアがあるようなマルチプロセッサにおいて、各コアが独立してこの回避策を取ってしまうと、遅延ロード、遅延分岐を含む命令を実行しているCPUコアと、そうでないCPUコアとで同時にステップ実行を行うことが出来ないという問題があった。   However, in a multiprocessor having a plurality of CPU cores in one chip, if each core takes this workaround independently, a CPU core executing an instruction including a delay load and a delay branch There was a problem that step execution could not be performed simultaneously with other CPU cores.

本発明はかかる問題を解決することを目的としている。   The present invention aims to solve such problems.

すなわち、本発明は、1つのチップの中に複数のCPUコアがある場合でも、各CPUコアが同期してプログラムどおりの動作となるステップ実行を行うことができるマルチプロセッサ及びそれをデバッグするデバッグ装置並びに前記マルチプロセッサをデバッグするデバッグ方法を提供することを目的としている。   That is, the present invention relates to a multiprocessor capable of performing step execution in which each CPU core operates in synchronization with a program even when there are a plurality of CPU cores in one chip, and a debugging device for debugging the same. It is another object of the present invention to provide a debugging method for debugging the multiprocessor.

請求項1に記載された発明は、ブレーク命令によって実行状態からモニター状態に遷移し、同一周波数で動作するCPUを複数有するマルチプロセッサにおいて、前記複数のCPUそれぞれで実行している命令を監視する監視手段と、前記CPUに前記ブレーク命令が入力されている際に、前記監視手段が全ての前記CPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、前記複数のCPUを前記モニター状態に遷移させる遷移手段と、を有していることを特徴とするマルチプロセッサである。   According to the first aspect of the present invention, in a multiprocessor having a plurality of CPUs operating at the same frequency by transitioning from an execution state to a monitor state by a break instruction, monitoring that monitors instructions executed by each of the plurality of CPUs And when the monitoring means detects that all of the CPUs are executing instructions that can transition to the monitor state when the break instruction is input to the CPU, the CPUs And a transition means for transitioning to the monitor state.

請求項2に記載された発明は、請求項1に記載された発明において、前記遷移手段が、前記CPUに含まれていることを特徴とするものである。   The invention described in claim 2 is the invention described in claim 1, wherein the transition means is included in the CPU.

請求項3に記載された発明は、請求項1または2に記載された発明において、前記複数のCPUのうちから前記モニター状態に遷移するCPUを選択する選択手段を有していることを特徴とするものである。   The invention described in claim 3 is characterized in that in the invention described in claim 1 or 2, it further comprises selection means for selecting a CPU that transitions to the monitor state from the plurality of CPUs. To do.

請求項4に記載された発明は、ブレーク命令によって実行状態からモニター状態に遷移し、同一周波数で動作するCPUを複数有するマルチプロセッサと、前記マルチプロセッサをデバッグするデバッグ手段と、を有するデバッグ装置において、前記複数のCPUそれぞれで実行している命令を監視する監視手段と、前記CPUに前記ブレーク命令が入力されている際に、前記監視手段が全ての前記CPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、前記複数のCPUを前記モニター状態に遷移させる遷移手段と、を有していることを特徴とするデバッグ装置である。   According to a fourth aspect of the present invention, there is provided a debugging apparatus comprising: a multiprocessor having a plurality of CPUs that transition from an execution state to a monitor state by a break instruction and operating at the same frequency; and a debugging unit that debugs the multiprocessor. Monitoring means for monitoring instructions executed by each of the plurality of CPUs; and when the break instruction is input to the CPU, the monitoring means provides instructions that allow all of the CPUs to transition to a monitor state. And a transition unit configured to transition the plurality of CPUs to the monitor state when the execution is detected.

請求項5に記載された発明は、ブレーク命令によって実行状態からモニター状態に遷移し、同一周波数で動作するCPUを複数有するマルチプロセッサをデバッグするデバッグ方法において、前記複数のCPUそれぞれで実行している命令を監視し、前記CPUに前記ブレーク命令が入力されている際に、全ての前記CPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、前記複数のCPUを前記モニター状態に遷移させることを特徴とするデバッグ方法である。   According to a fifth aspect of the present invention, in a debugging method for debugging a multiprocessor having a plurality of CPUs operating at the same frequency by transitioning from an execution state to a monitoring state by a break instruction, each of the plurality of CPUs executes the debugging method. The instruction is monitored, and when the break instruction is input to the CPU, if it is detected that all the CPUs are executing an instruction that can transition to the monitor state, the plurality of CPUs are monitored. This is a debugging method characterized by transitioning to a state.

請求項1に記載の発明によれば、監視手段で複数のCPUそれぞれで実行している命令を監視し、CPUにブレーク命令が入力されている際に、監視手段が全てのCPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、複数のCPUをモニター状態に遷移させているので、複数のCPUの中でステップ実行中の命令が遅延分岐や遅延ロードなどモニター状態に移行することでプログラム通りの動きを再現できないような命令であるものが1つでもある場合には、モニター状態に移行せずに次の命令を実行するようにすることで、全てのCPUが同期してモニター状態に遷移することができるので、プログラム通りの動きを再現できるステップ実行をすることができる。また、ハードウェアで制御しているので、ステップ実行時のデバッグ用ホストコンピュータの処理の負荷を軽減することができる。   According to the first aspect of the present invention, the monitoring unit monitors the instruction executed by each of the plurality of CPUs, and when the break instruction is input to the CPU, the monitoring unit sets all the CPUs to the monitor state. If it is detected that a transitionable instruction is being executed, multiple CPUs are transitioned to the monitor state, so that the instruction being stepped in the multiple CPUs is placed in the monitor state such as delayed branch or delayed load. If there is even one command that cannot be reproduced as programmed by shifting, all the CPUs are synchronized by executing the next command without shifting to the monitor state. Thus, it is possible to perform step execution that can reproduce the movement according to the program. In addition, since it is controlled by hardware, the processing load of the debugging host computer during step execution can be reduced.

請求項2に記載の発明によれば、遷移手段が、CPUに含まれているので、監視手段と遷移手段との間の配線が短くなり高速に動作させる際に有利となる。   According to the second aspect of the present invention, since the transition means is included in the CPU, the wiring between the monitoring means and the transition means is shortened, which is advantageous when operating at high speed.

請求項3に記載の発明によれば、複数のCPUのうちからモニター状態に遷移するCPUを選択する選択手段を有しているので、他のCPUとの依存関係の無い物を除外することができ、それによってステップ実行を行う際の1ステップの命令数を少なくすることができる。   According to the third aspect of the present invention, since there is a selection means for selecting a CPU that transitions to a monitor state from among a plurality of CPUs, it is possible to exclude an object having no dependency relationship with other CPUs. Thus, the number of instructions in one step when performing step execution can be reduced.

請求項4に記載の発明によれば、監視手段で複数のCPUそれぞれで実行している命令を監視し、CPUにブレーク命令が入力されている際に、監視手段が全てのCPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、複数のCPUをモニター状態に遷移させているので、複数のCPUの中でステップ実行中の命令が遅延分岐や遅延ロードなどモニター状態に移行することでプログラム通りの動きを再現できないような命令であるものが1つでもある場合には、モニター状態に移行せずに次の命令を実行するようにすることで、全てのCPUが同期してモニター状態に遷移することができるので、プログラム通りの動きを再現できるステップ実行をすることができる。   According to the fourth aspect of the present invention, the monitoring unit monitors the instruction executed by each of the plurality of CPUs, and when the break instruction is input to the CPU, the monitoring unit sets all the CPUs to the monitor state. If it is detected that a transitionable instruction is being executed, multiple CPUs are transitioned to the monitor state, so that the instruction being stepped in the multiple CPUs is placed in the monitor state such as delayed branch or delayed load. If there is even one command that cannot be reproduced as programmed by shifting, all the CPUs are synchronized by executing the next command without shifting to the monitor state. Thus, it is possible to perform step execution that can reproduce the movement according to the program.

請求項5に記載の発明によれば、複数のCPUそれぞれで実行している命令を監視し、CPUにブレーク命令が入力されている際に、全てのCPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、複数のCPUをモニター状態に遷移させているので、複数のCPUの中でステップ実行中の命令が遅延分岐や遅延ロードなどモニター状態に移行することでプログラム通りの動きを再現できないような命令であるものが1つでもある場合には、モニター状態に移行せずに次の命令を実行するようにすることで、全てのCPUが同期してモニター状態に遷移することができるので、プログラム通りの動きを再現できるステップ実行をすることができる。   According to the fifth aspect of the present invention, the instruction executed by each of the plurality of CPUs is monitored, and when a break instruction is input to the CPU, all the CPUs execute an instruction that can transit to the monitor state. If it is detected that a plurality of CPUs are in the monitor state, the instructions being executed in steps in the plurality of CPUs are shifted to the monitor state such as delayed branching and delay load, and the program is executed. If there is at least one command that cannot reproduce the movement of the CPU, the next command is executed without shifting to the monitor state, so that all CPUs shift to the monitor state synchronously. Therefore, it is possible to perform step execution that can reproduce the motion as programmed.

[第1実施形態]
以下、本発明の第1の実施形態を、図1ないし図3を参照して説明する。図1は、本発明の第1の実施形態にかかるマルチプロセッサのブロック図である。図2は、図1に示したマルチプロセッサの変形例を示したブロック図である。図3は、図1に示したマルチプロセッサのチップレイアウトの例を示した説明図である。
[First Embodiment]
A first embodiment of the present invention will be described below with reference to FIGS. FIG. 1 is a block diagram of a multiprocessor according to the first embodiment of the present invention. FIG. 2 is a block diagram showing a modification of the multiprocessor shown in FIG. FIG. 3 is an explanatory diagram showing an example of the chip layout of the multiprocessor shown in FIG.

図1に示したマルチプロセッサ1は、CPU2a、2b、2cと、ブレーク生成装置3と、を備え、1チップのLSIで構成されている。   The multiprocessor 1 shown in FIG. 1 includes CPUs 2a, 2b, and 2c and a break generation device 3, and is configured by a one-chip LSI.

CPU(CPUコア、コアCPU或いは単にコアともいう)2aは、デコーダ21、AND回路22、23と、を備えている。また、CPU2aは、図示しないが、プログラム格納用のプログラムRAM、演算データ格納用のデータRAM、プログラムのアドレスを保持するプログラムカウンタ、プログラムRAMから読み出した命令を格納する命令レジスタ、演算回路および各種レジスタも備えている。なお、CPU2b、2cも同様の構成である。また、CPU2a、2b、2cは同一周波数のクロックで動作する。   The CPU (also referred to as CPU core, core CPU, or simply core) 2 a includes a decoder 21 and AND circuits 22 and 23. Although not shown, the CPU 2a includes a program RAM for storing programs, a data RAM for storing operation data, a program counter for holding program addresses, an instruction register for storing instructions read from the program RAM, an arithmetic circuit, and various registers. It also has. The CPUs 2b and 2c have the same configuration. The CPUs 2a, 2b and 2c operate with clocks having the same frequency.

監視手段としてのデコーダ21は、命令レジスタに格納された命令をデコードするデコーダであり、本実施形態では、モニター状態に遷移できる命令である場合はモニター遷移移行可能信号を出力する。モニター状態とは、プログラムを実行している状態である実行状態から遷移する状態であり、この状態でプログラムのステップ実行やデータメモリなどの読み出しなどのデバッグを行うことができる。また、モニター状態に遷移できる命令とは、CPU2a、2b、2cに実装されている命令のうち遅延ロード、遅延分岐を伴う命令以外の命令を示す。   The decoder 21 serving as a monitoring unit is a decoder that decodes an instruction stored in the instruction register. In this embodiment, the monitor 21 outputs a monitor transition enable signal when the instruction can be changed to the monitor state. The monitor state is a state in which a transition is made from an execution state that is a state in which a program is being executed. In this state, debugging such as step execution of a program and reading of a data memory or the like can be performed. In addition, the instruction that can transit to the monitor state indicates an instruction other than an instruction accompanied by a delay load and a delay branch among instructions installed in the CPUs 2a, 2b, and 2c.

遷移手段としてのAND回路22は、CPU2a、2b、2cのモニター遷移可能信号の論理積をとって、全てのモニター遷移可能信号がアクティブ(例えばハイレベル)になるとアクティブレベルの信号(例えばハイレベル)を出力する。   The AND circuit 22 as a transition means takes the logical product of the monitor transition enable signals of the CPUs 2a, 2b, and 2c, and when all the monitor transition enable signals become active (for example, high level), an active level signal (for example, high level) Is output.

遷移手段としてのAND回路23は、後述するブレーク生成装置3から出力されるハードウェアブレーク信号とAND回路22の出力との論理積をとって、双方ともアクティブ(例えばハイレベル)になると出力であるモニター状態移行信号をアクティブ(例えばハイレベル)とする。   The AND circuit 23 as a transition means takes a logical product of a hardware break signal output from a break generation device 3 to be described later and the output of the AND circuit 22, and outputs both when active (for example, high level). The monitor state transition signal is activated (for example, high level).

ブレーク生成装置3は、マルチプロセッサ1の外部などからの信号などによってハードウェアブレーク信号を生成し出力する。   The break generation device 3 generates and outputs a hardware break signal by a signal from the outside of the multiprocessor 1 or the like.

次に、図1に示したマルチプロセッサ1におけるステップ動作を説明する。説明を平易にするためにCPU2a、2bをステップ実行する場合について説明することとし、一例として以下のプログラムでそれぞれ命令1をステップ実行する場合を考える。   Next, the step operation in the multiprocessor 1 shown in FIG. 1 will be described. In order to simplify the explanation, a case where the CPUs 2a and 2b are step-executed will be described. As an example, a case where the instruction 1 is step-executed by the following program will be considered.

CPU2aのプログラム
命令1:LD [add],R0(メモリのアドレスaddからデータをロードし、R0レジスタに格納する)
命令2:ADD R0,R1,R2(R0レジスタとR1レジスタの和をR2レジスタに格納する)
命令3:ADD R0,R3,R4(R0レジスタとR3レジスタの和をR4レジスタに格納する)
命令4:NOP(何もしない)
CPU2a program instruction 1: LD [add], R0 (load data from memory address add and store in R0 register)
Instruction 2: ADD R0, R1, R2 (store the sum of the R0 and R1 registers in the R2 register)
Instruction 3: ADD R0, R3, R4 (the sum of the R0 and R3 registers is stored in the R4 register)
Command 4: NOP (do nothing)

CPU2bのプログラム
命令1:LD [add],R0(メモリのアドレスaddからデータをロードし、R0レジスタに格納する)
命令2:LD [add],R1(メモリのアドレスaddからデータをロードし、R1レジスタに格納する)
命令3:ADD R1,R6,R7(R1レジスタとR6レジスタの和をR7レジスタに格納する)
命令4:ADD R1,R9,R10(R1レジスタとR9レジスタの和をR10レジスタに格納する)
CPU2b program instruction 1: LD [add], R0 (load data from memory address add and store in R0 register)
Instruction 2: LD [add], R1 (load data from memory address add and store in R1 register)
Instruction 3: ADD R1, R6, R7 (the sum of the R1 register and R6 register is stored in the R7 register)
Instruction 4: ADD R1, R9, R10 (store the sum of the R1 and R9 registers in the R10 register)

まず命令1をそれぞれのCPUのデコーダ21でデコードすると、CPU2a、CPU2bともに遅延ロード命令であるためモニター遷移可能信号はアクティブとならない。次に命令2をそれぞれのCPUのデコーダ21でデコードするとCPU2aは遅延ロードでも遅延分岐でもないのでCPU2aのモニター遷移可能信号はアクティブとなるが、CPU2bが遅延ロード命令であるためCPU2bのモニター遷移可能信号はアクティブとならない。従ってAND回路22の出力はアクティブとならない。命令1をステップ実行する場合この命令2のタイミングでハードウェアブレーク信号がアクティブとなる。次の命令3をそれぞれのCPUのデコーダ21でデコードすると、CPU2a、CPU2bともに遅延ロードでも遅延分岐でもないため、それぞれのモニター遷移可能信号がアクティブとなってAND回路22がアクティブとなり、ハードウェアブレーク信号がアクティブであるためAND回路23がアクティブとなって命令4のタイミングでCPU2a、CPU2bともにブレーク(停止)する。   First, when the instruction 1 is decoded by the decoder 21 of each CPU, the monitor transition enable signal is not activated because both the CPUs 2a and 2b are delayed load instructions. Next, when the instruction 2 is decoded by the decoder 21 of each CPU, since the CPU 2a is neither delayed load nor delayed branch, the monitor transition enable signal of the CPU 2a becomes active, but since the CPU 2b is a delay load instruction, the monitor transition enable signal of the CPU 2b Is not active. Therefore, the output of the AND circuit 22 is not active. When stepping instruction 1, the hardware break signal becomes active at the timing of instruction 2. When the next instruction 3 is decoded by the decoder 21 of each CPU, neither the CPU 2a nor the CPU 2b is delayed loading nor delayed branching, so that each monitor transition enable signal becomes active, the AND circuit 22 becomes active, and the hardware break signal Is active, the AND circuit 23 becomes active, and both the CPU 2a and CPU 2b break (stop) at the timing of the instruction 4.

こうするとCPU2aもCPU2bも命令1〜3を実行した後にモニター状態に遷移するため、プログラム通りにステップ実行を行うことができる。   In this way, since both the CPU 2a and the CPU 2b execute the instructions 1 to 3 and transition to the monitor state, step execution can be performed according to the program.

本実施形態のように、CPUをブレークさせるための信号がハードウェアとして装備されており、その信号をプロセッサに印加することによって実行状態からモニター状態へ移行することをハードウェアブレークといい、ハードウェアブレーク信号が特許請求の範囲のブレーク命令に相当する。   As in this embodiment, a signal for breaking the CPU is provided as hardware, and the transition from the execution state to the monitoring state by applying the signal to the processor is called a hardware break. The break signal corresponds to a break instruction in the claims.

本実施形態によれば、CPU2a、CPU2b、CPU2cを内蔵したマルチプロセッサ1において、ステップ動作時にモニター状態に遷移させるために、CPU2a、CPU2b、CPU2cそれぞれの命令をデコーダ21でデコードして、モニター状態に遷移可能な命令の場合はモニター遷移可能信号を出力し、全てのCPUがモニター遷移可能信号を出力した場合に、各CPUをモニター状態に遷移させているので、プログラム通りの動きを再現できるステップ実行をすることができる。   According to the present embodiment, in the multiprocessor 1 incorporating the CPU 2a, CPU 2b, and CPU 2c, in order to shift to the monitor state during the step operation, each instruction of the CPU 2a, CPU 2b, and CPU 2c is decoded by the decoder 21 to enter the monitor state. In the case of a transitionable instruction, a monitor transition enable signal is output, and when all CPUs output a monitor transition enable signal, each CPU is transitioned to the monitor state, so step execution that can reproduce the behavior as programmed Can do.

また、マルチプロセッサ1内部でモニター状態への遷移をハード的に制御しているので、ステップ実行時のデバッグ用ホストコンピュータの処理の負荷を軽減することができる。さらに、ハードウェアブレークを用いているので、各CPUのプログラムメモリからのデータを読み出して各CPUのプログラムメモリの書き換えといった作業が不要となるためステップ実行が高速化できる。   In addition, since the transition to the monitor state is controlled by hardware in the multiprocessor 1, it is possible to reduce the processing load of the debugging host computer at the time of step execution. Furthermore, since a hardware break is used, the step execution can be speeded up because the operation of reading data from the program memory of each CPU and rewriting the program memory of each CPU becomes unnecessary.

なお、AND回路22およびAND回路23は、CPU2a、2b、2cがそれぞれ内蔵せずに、図2に示すようにブレーク生成装置3で一括して論理積をとってモニター遷移信号を生成してCPU2a、2b、2cに出力する構成としてもよい。   Note that the AND circuit 22 and the AND circuit 23 are not built in the CPUs 2a, 2b, and 2c, respectively, and as shown in FIG. 2b and 2c may be output.

このように構成することで、ブレーク生成装置3で一括して論理積をとってモニター遷移信号を生成してCPU2a、2b、2cに出力しているので、CPU2a、2b、2cに対する回路変更が最小限で済む。   With this configuration, the break generation device 3 collectively performs logical product and generates monitor transition signals and outputs them to the CPUs 2a, 2b, and 2c, so that circuit changes to the CPUs 2a, 2b, and 2c are minimized. It ’s all you need.

ただし、図2よりも図1の構成のほうが、各CPUとAND回路との間の配線が短くなるために高速に動作させる際に有利である。一般的にLSIのチップレイアウトの際には図3に示すようにCPU2a、2b、2cは並べて配置されることが多い。一方、ブレーク生成装置3のようなデバッグ回路は、通常動作に関わらないことや外部との通信を行うことからCPU2a、2b、2cとは離れた外周に配置される可能性が大きい。この場合、各CPUとブレーク生成装置3との間の配線が長くなり、図2のように各CPUから信号を取り出してからまた各CPUに信号を出力する構成では、図1と比較して回路の高速化が困難である。従って、ハードウェアで各CPUをブレークさせる際には図1の構成の方が好ましい。   However, the configuration shown in FIG. 1 is more advantageous than the configuration shown in FIG. 2 because the wiring between each CPU and the AND circuit is shortened. In general, in the LSI chip layout, the CPUs 2a, 2b, and 2c are often arranged side by side as shown in FIG. On the other hand, a debug circuit such as the break generating device 3 is not likely to be related to normal operation or communicates with the outside, so it is highly likely that the debug circuit is arranged on the outer periphery away from the CPUs 2a, 2b, and 2c. In this case, the wiring between each CPU and the break generating device 3 becomes long, and in the configuration in which a signal is taken out from each CPU as shown in FIG. It is difficult to increase the speed. Therefore, the configuration shown in FIG. 1 is preferable when breaking each CPU with hardware.

[第2実施形態]
次に、本発明の第2の実施形態を図4を参照して説明する。なお、前述した第1の実施形態と同一部分には、同一符号を付して説明を省略する。図4は、本発明の第2の実施形態にかかるマルチプロセッサのブロック図である。
[Second Embodiment]
Next, a second embodiment of the present invention will be described with reference to FIG. Note that the same parts as those in the first embodiment described above are denoted by the same reference numerals and description thereof is omitted. FIG. 4 is a block diagram of a multiprocessor according to the second embodiment of the present invention.

本実施形態では、選択手段としてのブレーク生成装置3が、ハードウェアブレーク信号に加えて、CPU2aマスク信号、CPU2bマスク信号、CPU2cマスク信号を出力している。   In the present embodiment, the break generation device 3 as selection means outputs a CPU 2a mask signal, a CPU 2b mask signal, and a CPU 2c mask signal in addition to the hardware break signal.

さらに、CPU2aでは、CPU2bマスク信号とCPU2bが出力したモニター遷移可能信号とがOR回路24によって論理和をとってAND回路22に入力され、CPU2cマスク信号とCPU2cが出力したモニター遷移可能信号とがOR回路25によって論理和をとってAND回路22に入力されている。CPU2bでは、CPU2aマスク信号とCPU2aが出力したモニター遷移可能信号とがOR回路24によって論理和をとってAND回路22に入力され、CPU2cマスク信号とCPU2cが出力したモニター遷移可能信号とがOR回路25によって論理和をとってAND回路22に入力されている。CPU2cでは、CPU2aマスク信号とCPU2aが出力したモニター遷移可能信号とがOR回路24によって論理和をとってAND回路22に入力され、CPU2bマスク信号とCPU2bが出力したモニター遷移可能信号とがOR回路25によって論理和をとってAND回路22に入力されている。   Further, in the CPU 2a, the CPU 2b mask signal and the monitor transition enable signal output from the CPU 2b are ORed by the OR circuit 24 and input to the AND circuit 22, and the CPU 2c mask signal and the monitor transition enable signal output from the CPU 2c are ORed. A logical sum is taken by the circuit 25 and inputted to the AND circuit 22. In the CPU 2b, the CPU 2a mask signal and the monitor transition enable signal output by the CPU 2a are ORed by the OR circuit 24 and input to the AND circuit 22, and the CPU 2c mask signal and the monitor transition enable signal output by the CPU 2c are OR circuit 25. Is logically summed and input to the AND circuit 22. In the CPU 2c, the CPU 2a mask signal and the monitor transition enable signal output from the CPU 2a are ORed by the OR circuit 24 and input to the AND circuit 22, and the CPU 2b mask signal and the monitor transition enable signal output from the CPU 2b are OR circuit 25. Is logically summed and input to the AND circuit 22.

このような構成にすることで同期して動かなくても構わないCPUを除外してステップ実行が可能となる。例えば、CPU2aを除外する場合、CPU2aマスク信号をアクティブ(ハイレベル)にする。そうすると、CPU2bとCPU2cではOR回路24によってAND回路22の入力が常にアクティブ(ハイレベル)となるので、CPU2aの状態に関わらずCPU2bと2cとでステップ実行を行うことができる。すなわち、ブレーク生成装置3が出力するCPU2aマスク信号、CPU2bマスク信号、CPU2cマスク信号によってモニター状態に遷移するCPUを選択している。   By adopting such a configuration, it is possible to perform step execution by excluding CPUs that do not have to operate synchronously. For example, when excluding the CPU 2a, the CPU 2a mask signal is made active (high level). Then, since the input of the AND circuit 22 is always active (high level) by the OR circuit 24 in the CPUs 2b and 2c, the CPUs 2b and 2c can perform step execution regardless of the state of the CPU 2a. In other words, the CPU that changes to the monitor state is selected by the CPU 2a mask signal, the CPU 2b mask signal, and the CPU 2c mask signal output from the break generation device 3.

本実施形態によれば、ブレーク生成装置3が各CPUに対してマスク信号(CPU2aマスク信号、CPU2bマスク信号、CPU2cマスク信号)を出力して、各CPUでは他のCPUからのモニター遷移可能信号とマスク信号の論理和を取った上で、自身の信号と論理積を取るように構成しているので、他のCPUとの依存関係の無い物を除外することができ、それによって除外したCPUがモニター状態に遷移できない命令を実行中であってもモニター状態にさせることができ、全てのCPUを同期してステップ実行する場合と比較してステップ実行を行う際の1ステップの命令数を少なくすることができる。   According to the present embodiment, the break generation device 3 outputs a mask signal (CPU 2a mask signal, CPU 2b mask signal, CPU 2c mask signal) to each CPU, and each CPU receives a monitor transition enable signal from another CPU. Since it is configured to take the logical product of its own signal after taking the logical sum of the mask signal, it is possible to exclude those that do not depend on other CPUs, Even if an instruction that cannot be shifted to the monitor state is being executed, the monitor state can be set, and the number of instructions in one step when performing step execution is reduced as compared with the case where all CPUs execute step by step synchronously. be able to.

[第3の実施形態]
次に、本発明の第3の実施形態を図5および図6を参照して説明する。なお、前述した第1、第2の実施形態と同一部分には、同一符号を付して説明を省略する。図5は、本発明の第3の実施形態にかかるデバッグ装置のブロック図である。図6は、図5に示したデバッグ装置のステップ実行動作を示すフローチャートである。
[Third Embodiment]
Next, a third embodiment of the present invention will be described with reference to FIGS. The same parts as those in the first and second embodiments described above are denoted by the same reference numerals and description thereof is omitted. FIG. 5 is a block diagram of a debugging device according to the third embodiment of the present invention. FIG. 6 is a flowchart showing the step execution operation of the debugging apparatus shown in FIG.

図5に示したデバッグ装置10は、マルチプロセッサ1´と、ブレーク生成装置3´と、を備えている。   The debugging device 10 shown in FIG. 5 includes a multiprocessor 1 ′ and a break generation device 3 ′.

マルチプロセッサ1´は、CPU2a´、2b´、2c´を備えている。CPU2a´、2b´、2c´は、デコーダ21や、図示しないプログラム格納用のプログラムRAM、演算データ格納用のデータRAM、プログラムのアドレスを保持するプログラムカウンタ、プログラムRAMから読み出した命令を格納する命令レジスタ、演算回路および各種レジスタを備えている点は第1、第2の実施形態のCPU2a、2b、2cと同様であるが、AND回路22および23が削除されている点が異なる。   The multiprocessor 1 ′ includes CPUs 2a ′, 2b ′, and 2c ′. The CPUs 2a ′, 2b ′, and 2c ′ are a decoder 21, a program RAM (not shown) for storing a program, a data RAM for storing operation data, a program counter that holds a program address, and an instruction that stores an instruction read from the program RAM. The point that a register, an arithmetic circuit, and various registers are provided is the same as the CPUs 2a, 2b, and 2c of the first and second embodiments, except that the AND circuits 22 and 23 are deleted.

さらに、マルチプロセッサ1´は第1、第2の実施形態において、内蔵されていたブレーク生成装置3が削除され、マルチプロセッサ1´外部にブレーク生成装置3´として設けられている。この監視手段、遷移手段としてのブレーク生成装置は、例えばデバッグ用のコンピュータやワークステーションなどで構成してもよい。   Furthermore, in the first and second embodiments, the built-in break generation device 3 is deleted from the multiprocessor 1 ′, and the multiprocessor 1 ′ is provided outside the multiprocessor 1 ′ as a break generation device 3 ′. The break generation device as the monitoring means and the transition means may be constituted by, for example, a debugging computer or a workstation.

次に、上述した構成のデバッグ装置10において、ステップ実行を行う際の動作を図6のフローチャートを参照して説明する。図6に示したフローチャートはブレーク実行装置3´にて実行される。   Next, the operation when performing step execution in the debug device 10 having the above-described configuration will be described with reference to the flowchart of FIG. The flowchart shown in FIG. 6 is executed by the break execution device 3 ′.

まず、ステップS1において、検査対象となる命令を各CPUのプログラムカウンタ位置の命令に設定しステップS2に進む。本ステップでは、各CPUのプログラムをプログラムメモリからブレーク生成装置3´に読み出して、ステップ実行する命令をプログラムカウンタに設定された状態としている。   First, in step S1, an instruction to be inspected is set as an instruction at the program counter position of each CPU, and the process proceeds to step S2. In this step, the program of each CPU is read from the program memory to the break generation device 3 ', and the instruction to be executed in step is set in the program counter.

次に、ステップS2において、全CPUにおいて対象命令をチェックしてステップS3に進む。本ステップにおいては、モニター状態に遷移できる命令であるか否かをチェックしている。   Next, in step S2, the target instruction is checked in all the CPUs, and the process proceeds to step S3. In this step, it is checked whether or not the command is capable of transitioning to the monitor state.

次に、ステップS3において、全てのCPUがモニター状態に遷移可能か否かを判断して遷移可能である場合(YESの場合)はステップS5に進み、遷移可能でない場合(NOの場合)はステップS4に進む。つまり、ステップS2でチェックした命令がモニター状態に遷移可能か否かを判断している。   Next, in step S3, it is determined whether or not all CPUs can transition to the monitor state, and if transition is possible (in the case of YES), the process proceeds to step S5. Proceed to S4. That is, it is determined whether or not the instruction checked in step S2 can transition to the monitor state.

次に、ステップS4において、全てのCPUがモニター状態に遷移可能な命令でなかったため、対象命令を1つ次の命令に進めてステップS2に戻る。   Next, in step S4, since all the CPUs are not instructions that can make a transition to the monitor state, the target instruction is advanced to the next instruction and the process returns to step S2.

次に、ステップS5において、全てのCPUがモニター状態に遷移可能な命令であったため、対象命令の1つ次の命令を退避してステップS6に進む。   Next, in step S5, since all the CPUs are instructions that can transition to the monitor state, the instruction next to the target instruction is saved and the process proceeds to step S6.

次に、ステップS6において、対象命令の1つ次の命令をソフトウェアブレーク命令(EBRK命令)に修正しステップS7に進む。本ステップにおいて、ステップS5で退避した命令に代えてソフトウェアブレーク命令に差し替える。   Next, in step S6, the instruction next to the target instruction is corrected to a software break instruction (EBRK instruction), and the process proceeds to step S7. In this step, a software break instruction is substituted for the instruction saved in step S5.

次に、ステップS7において、全てのCPUをプログラム実行状態にする。本ステップにおいて、修正したプログラムを各CPUのプログラムメモリに書き込んでプログラムを実行させている。そして、実行されたプログラムはEBRK命令をデコーダ21がデコードすることでモニター遷移可能信号を出力してCPUを停止させ、以後モニター状態に遷移してステップ実行を行うことができる。   Next, in step S7, all the CPUs are set to the program execution state. In this step, the modified program is written in the program memory of each CPU and the program is executed. The executed program causes the decoder 21 to decode the EBRK instruction to output a monitor transition enable signal to stop the CPU, and then transitions to the monitor state to perform step execution.

上述したフローチャートの動作例を第1の実施形態で例示したプログラムでそれぞれ命令1をステップ実行する場合で説明する。まず命令1をそれぞれ検査すると、CPU2a´、CPU2b´ともに遅延ロード命令であるためスキップする。次に命令2をそれぞれ検査するとCPU2a´は遅延ロードでも遅延分岐でもないが、CPU2b´が遅延ロード命令であるためスキップする。次の命令3をそれぞれ検査すると、CPU2a´、CPU2b´ともに遅延ロードでも遅延分岐でもないため、それぞれ次の命令4をソフトウェアブレーク命令(EBRK命令)に差し替える。   An operation example of the above-described flowchart will be described in the case where the instruction 1 is stepped by the program exemplified in the first embodiment. First, when each of the instructions 1 is inspected, both CPU 2a 'and CPU 2b' are skipped because they are delayed load instructions. Next, when each of the instructions 2 is inspected, the CPU 2a 'is neither a delay load nor a delay branch, but skips because the CPU 2b' is a delay load instruction. When each of the next instructions 3 is inspected, neither the CPU 2a 'nor the CPU 2b' is a delayed load or delayed branch, so the next instruction 4 is replaced with a software break instruction (EBRK instruction).

本実施形態のように、ブレークしたい箇所の命令を、EBRK命令に置き換えて、モニター状態への移行をプロセッサの命令デコーダに委ねて、モニターモードへ移行することをソフトウェアブレークといい、このEBRK命令が特許請求の範囲のブレーク命令に相当する。   As in this embodiment, replacing an instruction at a place where a break is desired with an EBRK instruction, leaving the transition to the monitor state to the instruction decoder of the processor and shifting to the monitor mode is called a software break, and this EBRK instruction This corresponds to the break instruction in the claims.

本実施例によれば、デバッグ装置10において、ステップ動作時にモニター状態に遷移させるために、ブレーク生成装置3´でマルチプロセッサ1´内のCPU2a´、2b´、2c´のプログラムをそれぞれ読み込んで、実行するべき命令を検査し、全てのCPUでその命令が遅延ロード、遅延分岐命令ではなければ次の命令を退避し、ソフトウェアブレーク命令に差し替えた後、全てのCPUを同時にプログラム実行状態にする。もしも1つでも遅延ロードや遅延分岐命令がある場合には全てのCPUでその命令をスキップして次の命令を検査するということを遅延ロード、遅延分岐命令が出なくなるまで繰り返しているので、プログラム通りの動きを再現できるステップ実行をすることができる。   According to the present embodiment, the debug device 10 reads the programs of the CPUs 2 a ′, 2 b ′, and 2 c ′ in the multiprocessor 1 ′ with the break generation device 3 ′ in order to transit to the monitor state during the step operation. The instruction to be executed is inspected, and if the instruction is not a delayed load or delayed branch instruction in all the CPUs, the next instruction is saved and replaced with a software break instruction. If there is at least one delayed load or delayed branch instruction, all CPUs skip the instruction and check the next instruction until the delay load and delayed branch instructions are not issued. Step execution that can reproduce the movement of the street can be performed.

また、ブレーク生成装置3´でソフトウェアブレーク命令に差し替えることでステップ実行を行わせているので、マルチプロセッサ1´に追加回路等が不要となる。   In addition, since step execution is performed by replacing the software break instruction with the break generation device 3 ', an additional circuit or the like is not required for the multiprocessor 1'.

また、上述した第3の実施形態では、遅延ロードである場合には直後の命令をEBRK命令に差し替えることが出来ないとして説明を行ったが、遅延ロードであってもデスティネーションが直後の命令のソースと異なる場合には、直後の命令をEBRK命令に差し替えても問題がないため、検査対象の命令だけではなく、直後の命令も考慮して判断を行うようにすればステップ実行の際の命令実行数を少なくすることが出来る。   Further, in the third embodiment described above, it has been described that the instruction immediately after cannot be replaced with the EBRK instruction in the case of a delay load. If it is different from the source, there is no problem even if the immediately following instruction is replaced with the EBRK instruction. Therefore, if the determination is made considering not only the instruction to be inspected but also the immediately following instruction, the instruction at the time of step execution The number of executions can be reduced.

なお、本発明は上記実施形態に限定されるものではない。即ち、本発明の骨子を逸脱しない範囲で種々変形して実施することができる。   The present invention is not limited to the above embodiment. That is, various modifications can be made without departing from the scope of the present invention.

本発明の第1の実施形態にかかるマルチプロセッサのブロック図である。1 is a block diagram of a multiprocessor according to a first embodiment of the present invention. FIG. 図1に示したマルチプロセッサの変形例を示したブロック図である。FIG. 6 is a block diagram showing a modification of the multiprocessor shown in FIG. 1. 図1に示したマルチプロセッサのチップレイアウトの例を示した説明図である。FIG. 2 is an explanatory diagram showing an example of a chip layout of the multiprocessor shown in FIG. 1. 本発明の第2の実施形態にかかるマルチプロセッサのブロック図である。It is a block diagram of the multiprocessor concerning the 2nd Embodiment of this invention. 本発明の第3の実施形態にかかるデバッグ装置のブロック図である。It is a block diagram of the debugging apparatus concerning the 3rd Embodiment of this invention. 図5に示したデバッグ装置のステップ実行動作を示すフローチャートである。6 is a flowchart showing a step execution operation of the debugging apparatus shown in FIG. 5. 遅延ロード命令のパイプラインの例を示す説明図である。It is explanatory drawing which shows the example of the pipeline of a delay load instruction. 遅延ロード命令をステップ実行させた場合のパイプラインの例を示す説明図である。It is explanatory drawing which shows the example of the pipeline at the time of making the delay load instruction execute step. 遅延ロード命令時の問題点を除いたステップ実行のパイプラインの例を示す説明図である。It is explanatory drawing which shows the example of the pipeline of step execution except the problem at the time of a delay load instruction.

符号の説明Explanation of symbols

1 マルチプロセッサ
2a、2b、2c CPU
21 デコーダ(監視手段)
22、23 AND回路(遷移手段)
24、25 OR回路(選択手段)
3 ブレーク生成装置(選択手段)
10 デバッグ装置(選択手段)
1´ マルチプロセッサ
2a´、2b´、2c´ CPU
3´ ブレーク生成装置(監視手段、遷移手段)
1 Multiprocessor 2a, 2b, 2c CPU
21 Decoder (monitoring means)
22, 23 AND circuit (transition means)
24, 25 OR circuit (selection means)
3 Break generation device (selection means)
10 Debugging device (selection means)
1 'multiprocessor 2a', 2b ', 2c' CPU
3 'Break generation device (monitoring means, transition means)

Claims (5)

ブレーク命令によって実行状態からモニター状態に遷移し、同一周波数で動作するCPUを複数有するマルチプロセッサにおいて、
前記複数のCPUそれぞれで実行している命令を監視する監視手段と、
前記CPUに前記ブレーク命令が入力されている際に、前記監視手段が全ての前記CPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、前記複数のCPUを前記モニター状態に遷移させる遷移手段と、
を有していることを特徴とするマルチプロセッサ。
In a multiprocessor having a plurality of CPUs that transition from an execution state to a monitor state by a break instruction and operate at the same frequency,
Monitoring means for monitoring instructions executed by each of the plurality of CPUs;
When the break instruction is input to the CPU, if the monitoring unit detects that all the CPUs are executing an instruction that can transition to the monitor state, the plurality of CPUs are placed in the monitor state. Transition means for transitioning to
A multiprocessor characterized by comprising:
前記遷移手段が、前記CPUに含まれていることを特徴とする請求項1に記載のマルチプロセッサ。   The multiprocessor according to claim 1, wherein the transition unit is included in the CPU. 前記複数のCPUのうちから前記モニター状態に遷移するCPUを選択する選択手段を有していることを特徴とする請求項1または2に記載のマルチプロセッサ。   The multiprocessor according to claim 1, further comprising a selection unit that selects a CPU that transitions to the monitor state from the plurality of CPUs. ブレーク命令によって実行状態からモニター状態に遷移し、同一周波数で動作するCPUを複数有するマルチプロセッサと、前記マルチプロセッサをデバッグするデバッグ手段と、を有するデバッグ装置において、
前記複数のCPUそれぞれで実行している命令を監視する監視手段と、
前記CPUに前記ブレーク命令が入力されている際に、前記監視手段が全ての前記CPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、前記複数のCPUを前記モニター状態に遷移させる遷移手段と、
を有していることを特徴とするデバッグ装置。
In a debugging device having a multiprocessor having a plurality of CPUs that transition from an execution state to a monitor state by a break instruction and operate at the same frequency, and debugging means for debugging the multiprocessor,
Monitoring means for monitoring instructions executed by each of the plurality of CPUs;
When the break instruction is input to the CPU, if the monitoring unit detects that all the CPUs are executing an instruction that can transition to the monitor state, the plurality of CPUs are placed in the monitor state. Transition means for transitioning to
A debugging device characterized by comprising:
ブレーク命令によって実行状態からモニター状態に遷移し、同一周波数で動作するCPUを複数有するマルチプロセッサをデバッグするデバッグ方法において、
前記複数のCPUそれぞれで実行している命令を監視し、前記CPUに前記ブレーク命令が入力されている際に、全ての前記CPUがモニター状態に遷移可能な命令を実行していることを検出した場合は、前記複数のCPUを前記モニター状態に遷移させることを特徴とするデバッグ方法。
In a debugging method for debugging a multiprocessor having a plurality of CPUs operating at the same frequency by transitioning from an execution state to a monitor state by a break instruction,
An instruction executed by each of the plurality of CPUs is monitored, and when the break instruction is input to the CPU, it is detected that all the CPUs are executing an instruction that can transition to a monitor state. In this case, the debugging method is characterized by causing the plurality of CPUs to transition to the monitor state.
JP2008194830A 2008-07-29 2008-07-29 Multiprocessor, debugging device for debugging the same, and debug method for debugging the multiprocessor Withdrawn JP2010033323A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008194830A JP2010033323A (en) 2008-07-29 2008-07-29 Multiprocessor, debugging device for debugging the same, and debug method for debugging the multiprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008194830A JP2010033323A (en) 2008-07-29 2008-07-29 Multiprocessor, debugging device for debugging the same, and debug method for debugging the multiprocessor

Publications (1)

Publication Number Publication Date
JP2010033323A true JP2010033323A (en) 2010-02-12

Family

ID=41737719

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008194830A Withdrawn JP2010033323A (en) 2008-07-29 2008-07-29 Multiprocessor, debugging device for debugging the same, and debug method for debugging the multiprocessor

Country Status (1)

Country Link
JP (1) JP2010033323A (en)

Similar Documents

Publication Publication Date Title
JP2011513843A (en) System and method for data transfer in an execution device
JP4996654B2 (en) Processor
JP2010044578A (en) Multicore processor
JP4865016B2 (en) Processor
US20010023479A1 (en) Information processing unit, and exception processing method for specific application-purpose operation instruction
US7676774B2 (en) System LSI verification system and system LSI verification method
JP2010102732A (en) Information processing apparatus, exception control circuit, and exception control method
JP2009175960A (en) Virtual multiprocessor system
JP2000353092A (en) Information processor and register file switching method for the processor
JP2010033323A (en) Multiprocessor, debugging device for debugging the same, and debug method for debugging the multiprocessor
JP2013161484A (en) Reconfigurable computing apparatus, first memory controller and second memory controller therefor, and method of processing trace data for debugging therefor
JP2007257349A (en) Processor and processing method thereof
JP2008140124A (en) Data processor
JP2010015298A (en) Information processor and instruction fetch control method
JP5850732B2 (en) Semiconductor device and control method thereof
JP7378254B2 (en) multiprocessor device
JP4009461B2 (en) Semiconductor device
JP2002268876A (en) Pipeline processing method and information processor
JP2004199630A (en) Data processor
JP4151497B2 (en) Pipeline processing equipment
JP3933679B2 (en) Instruction processing device
JP2003108541A (en) Processor, memory test method and memory test system
JP2005242457A (en) Programmable controller
JP5718600B2 (en) Information processing system and information processing method
JP2007213415A (en) Memory device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20111004