JP2011181100A - Processor and debugging apparatus corresponding to parallel instruction performance - Google Patents

Processor and debugging apparatus corresponding to parallel instruction performance Download PDF

Info

Publication number
JP2011181100A
JP2011181100A JP2011112495A JP2011112495A JP2011181100A JP 2011181100 A JP2011181100 A JP 2011181100A JP 2011112495 A JP2011112495 A JP 2011112495A JP 2011112495 A JP2011112495 A JP 2011112495A JP 2011181100 A JP2011181100 A JP 2011181100A
Authority
JP
Japan
Prior art keywords
instruction
parallel
execution
debug
executed
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
JP2011112495A
Other languages
Japanese (ja)
Inventor
Akira Takuma
顯 宅間
Kosaku Shibata
耕作 柴田
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 Corp
Original Assignee
Panasonic Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp filed Critical Panasonic Corp
Priority to JP2011112495A priority Critical patent/JP2011181100A/en
Publication of JP2011181100A publication Critical patent/JP2011181100A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem wherein a processor adopting VLIW architecture can not convert only optional instructions in a program instruction strings into a debugging instruction for debugging so as to perform parallel execution and perform only one instruction in a step. <P>SOLUTION: The processor adopting the VLIW architecture is provided with: an instruction analysis means having a plurality of debugging instruction detection means of the same number as that of instructions allowed to be performed in parallel; and an instruction canceling means for canceling the performance of an instruction included in the same performance unit as a debugging instruction and arranged on an address of a higher rank than the debugging instruction when the debugging instruction is detected. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、プロセッサに係わるものであり、特に複数の命令を並列に実行するプロセッサにおけるデバッグ方法に関する。   The present invention relates to a processor, and more particularly to a debugging method in a processor that executes a plurality of instructions in parallel.

従来の技術では静的に並列に実行できる命令を決めるアーキテクチャを持つプロセッサのデバッグ装置において命令列を表示する場合、論理的または物理的に並列に実行可能な命令列の区切りがどこであるかを表示することができた。   In the conventional technology, when displaying an instruction string in a debugging device of a processor having an architecture that determines instructions that can be executed statically in parallel, it indicates where the instruction string delimiter that can be executed logically or physically in parallel is displayed. We were able to.

また、並列に実行できる命令列の先頭の命令または、命令列の一部ずつを固定長に分割した入れ物の先頭にブレークポイントを設定することができた。   In addition, it was possible to set a breakpoint at the beginning of an instruction sequence that can be executed in parallel or at the beginning of a container obtained by dividing a part of the instruction sequence into fixed lengths.

特開平11−194957号公報JP 11-194957 A

Jonathan B.Rosenberg著,吉川 邦夫訳,「デバッガの理論と実装」,ISBN 4−7561−1745−7Jonathan B. Rosenberg, Kunio Yoshikawa, “Theory and Implementation of Debuggers”, ISBN 4-7561-1745-7

従来の技術では静的に並列に実行できる命令を決めるアーキテクチャを持つプロセッサのデバッグ装置において、並列に実行できる命令列の任意の命令にブレークポイントを設定することは以下のいずれかの課題によりできなかった。   In the conventional technology, in a debugging device of a processor having an architecture that determines instructions that can be executed statically in parallel, it is impossible to set a breakpoint at any instruction in an instruction sequence that can be executed in parallel due to any of the following problems: It was.

一番目の課題はプロセッサのアーキテクチャによる制限で論理的に並列に実行できる命令の境界(以後、並列境界と略す)が例えば、128bit長単位であるなど固定的に決まって分割されている場合。この場合、この命令列中のいずれかの命令をデバッグ割込みを発生させるデバッグ命令に置き換えても、その命令と同一分割単位の他の命令も並列に実行されてしまう。例えば、図9に示すソースプログラムに対し、図10に示す機械語コードが生成されたと仮定する。||は次の行の命令と論理的に並列実行できることを意味している。ここで図9の行番号10の命令にブレークを設定しようとするとデバッグ情報よりアドレス0x80000000が得られ、図11のようにアドレス0x80000000のMOV R1,1 ||命令がデバッグ命令であるBRK ||に置換される。ここで、BRK命令には||が付与されているため、ブレーク成立と同時に後続するMOV R2,2とMOV R3,3命令も論理的に実行される可能性があり、元のソースプログラムにおいては行番号10にブレークを設定したにも関わらず、11、12行目の命令も実行された状態で停止する可能性があるという課題が発生していた。   The first problem is a case where the boundary of instructions that can be executed logically in parallel (hereinafter abbreviated as a parallel boundary) is fixedly divided, for example, in units of 128-bit length, due to limitations of the processor architecture. In this case, even if any instruction in this instruction sequence is replaced with a debug instruction that generates a debug interrupt, other instructions in the same division unit as that instruction are also executed in parallel. For example, assume that the machine language code shown in FIG. 10 is generated for the source program shown in FIG. || means that the instruction in the next line can be logically executed in parallel. Here, if a break is set for the instruction of line number 10 in FIG. 9, the address 0x80000000 is obtained from the debug information, and the MOV R1,1 || instruction at the address 0x80000000 as shown in FIG. Replaced. Here, since || is added to the BRK instruction, the following MOV R2,2 and MOV R3,3 instructions may be logically executed at the same time as the break is established. In the original source program, In spite of setting a break at the line number 10, there is a problem that the instructions on the 11th and 12th lines may stop in a state of being executed.

二番目の課題はプロセッサのアーキテクチャによる制限で並列境界が固定ではないが、いくつかのパターンに限定され、任意の命令では指定できない場合。この場合も一番目の課題と同様に、命令列中のいずれかの命令をデバッグ割込みを発生させるデバッグ命令に置き換えても、デバッグ命令に置き換える位置がパターンの制限により並列境界に設定できなかった場合、その命令と同一分割単位の他の命令も並列に実行されてしまう。   The second issue is when the parallel boundary is not fixed due to the limitations of the processor architecture, but it is limited to some patterns and cannot be specified by any instruction. In this case as well, as with the first problem, if any instruction in the instruction sequence is replaced with a debug instruction that generates a debug interrupt, the position to be replaced with the debug instruction cannot be set as a parallel boundary due to pattern restrictions. Other instructions in the same division unit as that instruction are also executed in parallel.

ここでも同じ例を用いて具体例を説明すると仮に並列境界が2命令か3命令おきにしか設定できないプロセッサの場合、先の例でBRK||命令の||を除去しようとしても、BRK命令だけでは1命令なので、並列境界が設定できないため、解決できない課題が発
生していた。
Here, a specific example will be described using the same example. In the case of a processor in which the parallel boundary can be set only every two or three instructions, even if an attempt is made to remove ||| However, since it is one instruction, a parallel boundary cannot be set, and a problem that cannot be solved has occurred.

上記課題を解決するために、本発明のデバッグ方法は、デバッグ装置を用いて、並列実行境界を意味する特定のビットパターンを各命令のビット領域に備える命令並列実行可能なプロセッサで動作するプログラム中で、並列実行境界で区切られた命令列中のいずれかの命令にブレークポイントを設定させるブレークポイント制御方法であって、ブレークポイントの設定の際に、前記ビットパターンを変更することによって、ブレークポイントの設定対象命令と後続する命令とが並列実行されないよう並列実行境界を追加するブレークポイント設定ステップと前記プログラムを実行させ、前記設定対象命令で実行を停止させ、前記設定対象命令と後続する命令とが並列実行されないよう制御する実行・停止制御ステップとを備えるようにしたものである。   In order to solve the above-described problem, a debugging method of the present invention uses a debugging device to program a program that operates on a processor capable of executing instructions in parallel and having a specific bit pattern that represents a parallel execution boundary in a bit area of each instruction. A breakpoint control method for setting a breakpoint at any instruction in an instruction sequence delimited by a parallel execution boundary, wherein the breakpoint is changed by changing the bit pattern when setting the breakpoint. A breakpoint setting step for adding a parallel execution boundary so that the setting target instruction and the subsequent instruction are not executed in parallel, the program is executed, execution is stopped at the setting target instruction, and the setting target instruction and the subsequent instruction are With an execution / stop control step for controlling the system from being executed in parallel. It is.

本発明によりソースプログラムから機械語プログラムへのプログラム変換時に論理的に並列実行できる命令を決めるプログラム装置を用いるプロセッサにおいて、デバッグを行なう場合に、任意の命令でブレークポイントを設定することが可能になる。   According to the present invention, a breakpoint can be set with an arbitrary instruction when debugging is performed in a processor using a program device that determines an instruction that can be logically executed in parallel when converting a source program into a machine language program. .

プログラム変換装置とデバッグ装置を組み合わせたデータの流れData flow combining program converter and debug device デバッグ装置の実施例Example of debugging device 従来の技術のデバッグ装置の制御上の構成要素Control components of prior art debug devices 並列命令実行対応デバッグ装置の制御上の構成要素Constituent elements for controlling a debugging device that supports parallel instruction execution 32ビット長命令のビットパターンの構成例Example of bit pattern configuration for 32-bit instructions 16ビット長命令のビットパターンの構成例Configuration example of 16-bit instruction bit pattern 32ビット長命令の並列境界を合成するビットパターンの例Example of bit pattern that synthesizes parallel boundary of 32-bit instruction 16ビット長命令の並列境界を合成するビットパターンの例Example of bit pattern that synthesizes parallel boundaries of 16-bit instructions ソースプログラム例Source program example 図9のソースプログラムが並列実行命令を含む実行プログラムに変換された例An example in which the source program of FIG. 9 is converted into an execution program including parallel execution instructions 図10の実行プログラムの先頭の命令を従来の技術でデバッグ命令に置換した例Example of replacing the first instruction of the execution program in FIG. 10 with a debug instruction using conventional technology 図10の実行プログラムの先頭の命令を図22の処理の流れでデバッグ命令に置換した例Example of replacing the first instruction of the execution program of FIG. 10 with a debug instruction in the processing flow of FIG. 図10の実行プログラムの先頭の命令を図23の処理の流れでデバッグ命令に置換した例Example of replacing the first instruction of the execution program of FIG. 10 with a debug instruction in the processing flow of FIG. 図10の実行プログラムの先頭の命令を図24の処理の流れでデバッグ命令に置換した例Example of replacing the first instruction of the execution program of FIG. 10 with a debug instruction in the processing flow of FIG. 図10の実行プログラムの二番目の命令の位置に図25の処理の流れで順序変更してデバッグ命令に置換した例An example in which the order is changed to the position of the second instruction in the execution program of FIG. 10 and replaced with a debug instruction in the processing flow of FIG. 図10の実行プログラムの二番目の命令の位置に図26の処理の流れでデバッグ命令を補正した上で置換した例An example in which the debug instruction is corrected and replaced at the position of the second instruction in the execution program of FIG. 10 in the processing flow of FIG. 図10の実行プログラムの先頭の命令を図28の処理の流れでステップ実行可能に置換した例An example in which the first instruction of the execution program in FIG. 10 is replaced with step execution in the processing flow of FIG. 図10の実行プログラムの先頭の命令を図29の処理の流れでステップ実行可能に置換した例An example in which the instruction at the head of the execution program in FIG. 10 is replaced with step execution in the process flow of FIG. 図10の実行プログラムの2つ目の命令を図29の処理の流れでステップ実行可能に置換した例An example in which the second instruction of the execution program of FIG. 10 is replaced with step execution in the processing flow of FIG. 図10の実行プログラムの2つ目の命令を図29の処理の流れに加え、命令順を入れ換えてステップ実行可能に置換した例An example in which the second instruction of the execution program of FIG. 10 is added to the processing flow of FIG. 従来の技術における命令置換処理の流れを示す図The figure which shows the flow of the instruction substitution processing in the prior art 並列境界が変更できて、置換後命令が並列実行できる場合の命令置換処理の流れを示した図Diagram showing the flow of instruction replacement processing when the parallel boundary can be changed and the instruction after replacement can be executed in parallel 並列境界が変更できない場合の命令置換処理の流れを示した図Diagram showing the flow of instruction replacement processing when the parallel boundary cannot be changed 並列境界が変更できるが、置換後命令が並列実行できない場合の命令置換処理の流れを示した図Diagram showing the flow of instruction replacement processing when the parallel boundary can be changed but the instruction after replacement cannot be executed in parallel 並列実行できる命令順序が変更できる場合の命令置換処理の流れを示した図Diagram showing the flow of instruction replacement processing when the order of instructions that can be executed in parallel can be changed ソフトウェアシミュレーションを利用する場合の命令置換処理の流れを示した図Figure showing the flow of instruction replacement processing when using software simulation ステップ実行の処理の流れを示した図The figure which showed the flow of processing of step execution 図27のS2003が並列境界を変更できる場合の流れを示した図The figure which showed the flow in case S2003 of FIG. 27 can change a parallel boundary. 図27のS2003が並列境界を変更できない場合の流れを示した図The figure which showed the flow when S2003 of FIG. 27 cannot change a parallel boundary 本発明におけるプロセッサに関わるブロック図The block diagram regarding the processor in this invention 従来技術におけるVLIWプロセッサの命令実効パイプラインのブロック図Block diagram of instruction execution pipeline of VLIW processor in the prior art 本発明におけるプロセッサの第1の実施例における命令実効パイプラインのブロック図Block diagram of the instruction execution pipeline in the first embodiment of the processor of the present invention 本発明におけるプロセッサの第2の実施例における命令実効パイプラインのブロック図Block diagram of the instruction execution pipeline in the second embodiment of the processor of the present invention 本発明におけるプロセッサの第1の実施例における取り消し信号生成部のブロック図The block diagram of the cancellation signal production | generation part in 1st Example of the processor in this invention 本発明におけるプロセッサの第1の実施例における命令実行制御部のブロック図The block diagram of the instruction execution control part in 1st Example of the processor in this invention 本発明におけるプロセッサの第2の実施例における命令のビットパターンの一例Example of instruction bit pattern in the second embodiment of the processor of the present invention 本発明におけるプロセッサの第2の実施例におけるデバッグ命令のビットパターンの一例Example of bit pattern of debug instruction in the second embodiment of the processor of the present invention

以下、本発明の実施の形態について、図を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図30は本発明におけるプロセッサとメモリの関係を示したブロック図である。プロセッサ901は命令メモリ902とデータメモリ903に接続される。プロセッサ901は命令メモリ902より命令をフェッチし、フェッチされた命令を実行し、プロセッサ901のレジスタなどの内部状態やデータメモリ903の内容を変更する。   FIG. 30 is a block diagram showing the relationship between the processor and the memory in the present invention. The processor 901 is connected to the instruction memory 902 and the data memory 903. The processor 901 fetches an instruction from the instruction memory 902, executes the fetched instruction, and changes the internal state of the processor 901 such as a register and the contents of the data memory 903.

プロセッサ901は、複数の命令をひとつの命令パケットとして同時に実行するVLIW(Very Long Instruction Word)アーキテクチャ構成をとっている。以下VLIWアーキテクチャ構成をとるプロセッサをVLIWプロセッサと呼ぶ。
<従来のプロセッサの構成>
ここで、本発明との差異を明確にするために、従来のVLIWプロセッサの構成を説明する。
The processor 901 has a VLIW (Very Long Instruction Word) architecture configuration that simultaneously executes a plurality of instructions as one instruction packet. Hereinafter, a processor having a VLIW architecture configuration is referred to as a VLIW processor.
<Conventional processor configuration>
Here, in order to clarify the difference from the present invention, the configuration of a conventional VLIW processor will be described.

図31に示されるブロック図は、3命令をひとつの命令パケットとして並列実行可能な従来のVLIWプロセッサにおける命令実行パイプライン構成の一例である。ただし、本発明において重要でない部分については、省略してある。   The block diagram shown in FIG. 31 is an example of an instruction execution pipeline configuration in a conventional VLIW processor that can execute three instructions in parallel as one instruction packet. However, parts that are not important in the present invention are omitted.

従来のプロセッサは、命令メモリより命令をフェッチする命令フェッチ部1001と、フェッチされた命令を解読する命令解読部1011〜1013と、解読された命令に応じて演算器を選択するマルチプレクサ1021と、算術及び論理演算を行うALU(Arithmetic and Logic unit)1031と、データメモリにアクセスするメモリアクセスユニット1032と、命令のフェッチ先を変更する分岐ユニット1033からなる。   A conventional processor includes an instruction fetch unit 1001 that fetches an instruction from an instruction memory, an instruction decoding unit 1011 to 1013 that decodes the fetched instruction, a multiplexer 1021 that selects an arithmetic unit according to the decoded instruction, And an ALU (Arithmetic and Logic unit) 1031 that performs a logical operation, a memory access unit 1032 that accesses a data memory, and a branch unit 1033 that changes an instruction fetch destination.

命令フェッチ部1001でフェッチされた命令パケットに含まれる各命令は、命令解読部1011〜1013で個別に並行して解読される。この際、命令パケット中の最も低位のアドレスに配置された命令は命令解読部1011で、次に低位のアドレスに配置された命令は命令解読部1012で、最も高位のアドレスに配置された命令は命令解読部101
3で解読される。
Each instruction included in the instruction packet fetched by the instruction fetch unit 1001 is individually decoded in parallel by the instruction decoding units 1011 to 1013. At this time, the instruction arranged at the lowest address in the instruction packet is the instruction decoding unit 1011, the instruction arranged at the next lowest address is the instruction decoding unit 1012, and the instruction arranged at the highest address is Instruction decoding unit 101
Decrypted in 3.

マルチプレクサ1021は命令解読部1011〜1913で解読された命令を実行するために必要な演算器を選択し、各命令を演算器に送出する。VLIWプロセッサにおいて、命令パケット中の各命令は、並列実行されることを前提に配置される。そのため、同一命令パケットに存在する命令には、使用する演算器資源の重複やデータ依存は存在しない。そのため、マルチプレクサ1021は非常に簡単な構成で済むことがVLIWプロセッサの特徴である。   The multiplexer 1021 selects an arithmetic unit necessary for executing the instruction decoded by the instruction decoding units 1011 to 1913 and sends each instruction to the arithmetic unit. In the VLIW processor, the instructions in the instruction packet are arranged on the assumption that they are executed in parallel. For this reason, there is no duplication of operator resources to be used or data dependency among instructions existing in the same instruction packet. Therefore, a feature of the VLIW processor is that the multiplexer 1021 can have a very simple configuration.

ALU1031、メモリアクセスユニット1032、分岐ユニット1033は、マルチプレクサ1021より送出された命令を個別に並行して実行する。   The ALU 1031, the memory access unit 1032, and the branch unit 1033 individually execute instructions sent from the multiplexer 1021 in parallel.

分岐ユニット1033でデバッグ命令が実行された場合、デバッグ割込み信号1041を命令フェッチ部1001に送出する。命令フェッチ部1001はデバッグ割込み信号1041を受け取ると、デバッグ割込みハンドラとして指定されているアドレスから命令フェッチを行う。   When a debug instruction is executed in the branch unit 1033, a debug interrupt signal 1041 is sent to the instruction fetch unit 1001. When the instruction fetch unit 1001 receives the debug interrupt signal 1041, the instruction fetch unit 1001 fetches an instruction from an address designated as a debug interrupt handler.

上記で説明したように、VLIWプロセッサは複雑な命令スケジューリング機能を持たないながらも限られた演算器資源を有効に使用し、命令を並列実行する。   As described above, the VLIW processor does not have a complicated instruction scheduling function, but effectively uses limited arithmetic unit resources and executes instructions in parallel.

しかしながら、デバッグ命令は分岐ユニットで実行されるため、分岐ユニットを使用する命令と同じ命令パケットに配置することはできない。このため、プログラムを任意の箇所で停止させるためのブレークポイントを設定する際、任意の命令をデバッグ命令に置き換えることができない。
<本発明におけるプロセッサの第1の実施例>
本発明におけるプロセッサ901の第1の実施例を説明する。
However, since the debug instruction is executed in the branch unit, it cannot be placed in the same instruction packet as the instruction using the branch unit. For this reason, when setting a breakpoint for stopping the program at an arbitrary position, an arbitrary instruction cannot be replaced with a debug instruction.
<First Embodiment of Processor in the Present Invention>
A first embodiment of the processor 901 in the present invention will be described.

図32は本発明のVLIWプロセッサにおける命令実行パイプライン構成の一例である。ただし、本発明において重要でない部分については、省略してある。   FIG. 32 shows an example of an instruction execution pipeline configuration in the VLIW processor of the present invention. However, parts that are not important in the present invention are omitted.

本発明におけるプロセッサの第1の実施例において、プロセッサ901は、命令フェッチ部1001と、命令解読部1011〜1013と、マルチプレクサ1021と、ALU1031と、メモリアクセスユニット1032と、分岐ユニット1033を備え、これらは従来のプロセッサと同様の構成である。   In the first embodiment of the processor according to the present invention, the processor 901 includes an instruction fetch unit 1001, an instruction decoding unit 1011 to 1013, a multiplexer 1021, an ALU 1031, a memory access unit 1032 and a branch unit 1033. Has the same configuration as a conventional processor.

本発明におけるプロセッサの第1の実施例において、プロセッサ901はさらに、任意の命令がデバッグ割込みを発生させるか否かを検出するデバッグ割込み検出部2051〜2053を備えるデバッグ割込み解読部2081と、命令実行を取り消すための取り消し信号2111〜2113を生成する取り消し信号生成部2061と、命令を無効化することで命令実行を取り消す命令実行制御部2071と、デバッグ割込み検出部2051〜2053より送出されたデバッグ割込み信号2101〜2103の論理和を取る論理和回路2091を備える。   In the first embodiment of the processor according to the present invention, the processor 901 further includes a debug interrupt decoding unit 2081 including a debug interrupt detection unit 2051 to 2053 for detecting whether or not an arbitrary instruction generates a debug interrupt, and instruction execution Cancel signal generation unit 2061 that generates cancel signals 2111 to 2113 for canceling, instruction execution control unit 2071 that cancels instruction execution by invalidating instructions, and debug interrupts sent from debug interrupt detection units 2051 to 2053 A logical sum circuit 2091 that performs a logical sum of the signals 2101 to 2103 is provided.

デバッグ割込み検出部2051〜2053は、命令解読部1011〜1013より命令信号2121〜2123を取得し、解読された命令がデバッグ命令か否かを判定する。解読された命令がデバッグ命令であった場合、各デバッグ割込み検出部2051〜2053に対応するデバッグ割込み信号2101〜2103をアサートする。   The debug interrupt detection units 2051 to 2053 acquire the instruction signals 2121 to 2123 from the instruction decoding units 1011 to 1013 and determine whether or not the decoded instruction is a debug instruction. When the decoded instruction is a debug instruction, debug interrupt signals 2101 to 2103 corresponding to the debug interrupt detection units 2051 to 2053 are asserted.

デバッグ割込み検出部2051〜2053によりアサートされたデバッグ割込み信号2101〜2103は論理和回路2091によりマージされ、デバッグ割込み信号1041
として命令フェッチ部1001に入力される。これにより、従来のプロセッサと同様にデバッグ割込みを発生させることができる。
The debug interrupt signals 2101 to 2103 asserted by the debug interrupt detection units 2051 to 2053 are merged by the OR circuit 2091 and the debug interrupt signal 1041 is merged.
Is input to the instruction fetch unit 1001. As a result, a debug interrupt can be generated as in the conventional processor.

取り消し信号生成部2061は、デバッグ割込み信号2101〜2103を受け、低位のアドレスに配置された命令のデバッグ割込み信号がアサートされている場合、デバッグ割込み信号がアサートされている命令及び、その命令より高位のアドレスに配置された命令の実行を取り消すように対応する取り消し信号2111〜2113をアサートする。   The cancel signal generation unit 2061 receives the debug interrupt signals 2101 to 2103, and when the debug interrupt signal of the instruction arranged at the lower address is asserted, the instruction for which the debug interrupt signal is asserted and the higher order than the instruction. The corresponding cancel signals 2111 to 2113 are asserted so as to cancel the execution of the instruction arranged at the address.

命令実行制御部2071は、アサートされている取り消し信号2111〜2113に対応する命令の命令信号2121〜2123を、NOP(No OPeration)に相当する命令信号に変換し、命令信号2131〜2133としてALU1031、メモリアクセスユニット1032、分岐ユニット1033に送出することで命令の実行を無効化する。   The instruction execution control unit 2071 converts instruction signals 2121 to 2123 of instructions corresponding to the asserted cancellation signals 2111 to 2113 into instruction signals corresponding to NOP (No Operation), and ALU 1031 as instruction signals 2131 to 2133. The instruction execution is invalidated by sending it to the memory access unit 1032 and the branch unit 1033.

さらに以下で取り消し信号生成部2061と命令実行制御部2071の構成について説明する。   Further, the configuration of the cancellation signal generation unit 2061 and the instruction execution control unit 2071 will be described below.

図34に取り消し信号生成部2061の構成をより詳細に示す。   FIG. 34 shows the configuration of the cancellation signal generation unit 2061 in more detail.

取り消し信号生成部2061は論理和回路4001〜4002を備える。   The cancellation signal generation unit 2061 includes logical sum circuits 4001 to 4002.

取り消し信号生成部2061はデバッグ割込み信号2101〜2103を入力とする。   The cancel signal generation unit 2061 receives the debug interrupt signals 2101 to 2103 as inputs.

デバッグ割込み信号2101は、命令パケット中の最も低位のアドレスに配置される命令に対応する。   The debug interrupt signal 2101 corresponds to the instruction placed at the lowest address in the instruction packet.

デバッグ割込み信号2102は、命令パケット中の2番目に低位のアドレスに配置される命令に対応する。   The debug interrupt signal 2102 corresponds to the instruction placed at the second lowest address in the instruction packet.

デバッグ割込み信号2103は、命令パケット中の3番目に低位のアドレスに配置される命令に対応する。   The debug interrupt signal 2103 corresponds to the instruction placed at the third lowest address in the instruction packet.

取り消し信号生成部2061は取り消し信号2111〜2113を出力とする。   The cancellation signal generation unit 2061 outputs cancellation signals 2111 to 2113.

取り消し信号2111は、命令パケット中の最も低位のアドレスに配置される命令に対応する。   Cancel signal 2111 corresponds to the instruction placed at the lowest address in the instruction packet.

取り消し信号2112は、命令パケット中の2番目に低位のアドレスに配置される命令に対応する。   Cancel signal 2112 corresponds to the instruction placed at the second lowest address in the instruction packet.

取り消し信号2113は、命令パケット中の3番目に低位のアドレスに配置される命令に対応する。   Cancel signal 2113 corresponds to the instruction placed at the third lowest address in the instruction packet.

取り消し信号2111はデバッグ割込み信号2101から生成される。   Cancel signal 2111 is generated from debug interrupt signal 2101.

取り消し信号2112は、論理和回路4001に入力されたデバッグ割込み信号2102とデバッグ割込み信号2102の論理和から生成される。   The cancel signal 2112 is generated from the logical sum of the debug interrupt signal 2102 and the debug interrupt signal 2102 input to the logical sum circuit 4001.

取り消し信号2112は、論理和回路4002に入力されたデバッグ割込み信号2102とデバッグ割込み信号2102とデバッグ割込み信号2103の論理和から生成される
The cancel signal 2112 is generated from the logical sum of the debug interrupt signal 2102, the debug interrupt signal 2102, and the debug interrupt signal 2103 input to the logical sum circuit 4002.

上記の構成により、命令パケット中の任意の命令でデバッグ割込みが発生した場合は、デバッグ割込みが発生した命令及びデバッグ割込みが発生した命令より高位のアドレスに配置された命令に対応する取り消し信号がアサートされる。   With the above configuration, when a debug interrupt occurs at any instruction in the instruction packet, the cancellation signal corresponding to the instruction at the address higher than the instruction at which the debug interrupt occurred and the instruction at which the debug interrupt occurred is asserted Is done.

図35に命令実行制御部2071の構成をより詳細に示す。   FIG. 35 shows the configuration of the instruction execution control unit 2071 in more detail.

命令実行制御部2071はマルチプレクサ5001〜5003を備える。   The instruction execution control unit 2071 includes multiplexers 5001 to 5003.

命令実行制御部2071は命令信号2121〜2123、取り消し信号2111〜2113を入力とする。   The command execution control unit 2071 receives command signals 2121 to 2123 and cancel signals 2111 to 2113 as inputs.

命令実行制御部2071は命令信号2131〜2133を出力とする。   The instruction execution control unit 2071 outputs the instruction signals 2131 to 2133.

マルチプレクサ5001〜5003は、命令信号2131〜2133とNOPに相当する命令信号である0を入力とする。この入力を、取り消し信号2111〜2113で選択する。   The multiplexers 5001 to 5003 receive the command signals 2131 to 2133 and 0 which is a command signal corresponding to NOP. This input is selected by cancel signals 2111 to 2113.

マルチプレクサ5001〜5003は、取り消し信号2111〜2113が0の場合は命令信号2131〜2133を、取り消し信号が1の場合は0を選択し、出力する。   The multiplexers 5001 to 5003 select and output the command signals 2131 to 2133 when the cancellation signals 2111 to 2113 are 0, and select 0 when the cancellation signals are 1.

マルチプレクサ5001〜5003の出力が、そのまま命令信号2131〜2133となり、ALU1031、メモリアクセスユニット1032、分岐ユニット1033に送出される。   The outputs of the multiplexers 5001 to 5003 are directly used as instruction signals 2131 to 2133, and are sent to the ALU 1031, the memory access unit 1032 and the branch unit 1033.

上記の構成により、任意の命令に対応した取り消し信号2111〜2113がアサートされた場合、任意の対応する命令信号2131〜2133がNOP相当の命令信号に変換される。これにより、アサートされた取り消し信号に基づき、特定の命令を無効化することができる。   With the above configuration, when the cancel signals 2111 to 2113 corresponding to an arbitrary command are asserted, the arbitrary corresponding command signals 2131 to 2133 are converted into NOP equivalent command signals. Thus, a specific instruction can be invalidated based on the asserted cancellation signal.

以上説明した構成により、本発明におけるプロセッサの第1の実施例におけるプロセッサ901では、デバッグ命令を解読すると、解読されたデバッグ命令及び解読されたデバッグ命令より高位のアドレスに配置された命令が無効化され、デバッグ命令を命令パケット中のどこに配置しようが演算器などの命令実行資源不足が発生することがなくなる。即ち、デバッグ命令の実行制限がなくなり、命令パケット中の任意の位置にデバッグ命令を配置可能となる。これにより、プログラムを任意の箇所で停止させるためのブレークポイントを設定する際、任意の命令をデバッグ命令に置き換えることができる。また、命令パケット中のデバッグ命令に後続する命令の実行が取り消されるため、デバッグ割込みが発生し、ブレークポイントでプログラムが停止した際には、ブレークポイントより高位のアドレスに配置された命令が実行されておらず、ブレークポイントと命令実行の関係がより直感的に捉えられる。   With the configuration described above, in the processor 901 in the first embodiment of the processor of the present invention, when the debug instruction is decoded, the decoded debug instruction and the instruction arranged at a higher address than the decoded debug instruction are invalidated. Thus, no shortage of instruction execution resources such as an arithmetic unit occurs wherever debug instructions are placed in the instruction packet. That is, there is no restriction on the execution of the debug instruction, and the debug instruction can be arranged at an arbitrary position in the instruction packet. Thereby, when setting a breakpoint for stopping the program at an arbitrary position, an arbitrary instruction can be replaced with a debug instruction. Also, since the execution of the instruction following the debug instruction in the instruction packet is canceled, when a debug interrupt occurs and the program stops at the breakpoint, the instruction placed at the address higher than the breakpoint is executed. The relationship between breakpoints and instruction execution is more intuitive.

なお、以上の実施例において、説明の簡単のために同時実行命令数を3としているが、同時実行命令数が2以上のVLIWプロセッサにおいて同様の構成を適用可能であり、同様の効果が得られることは自明である。
<本発明におけるプロセッサの第2の実施例>
本発明におけるプロセッサ901の第2の実施例を説明する。
In the above embodiment, the number of simultaneously executed instructions is set to 3 for the sake of simplicity of explanation. However, the same configuration can be applied to a VLIW processor having 2 or more simultaneously executed instructions and the same effect can be obtained. That is obvious.
<Second Embodiment of Processor in the Present Invention>
A second embodiment of the processor 901 in the present invention will be described.

図33は本発明のVLIWプロセッサにおける命令実行パイプライン構成の一例である
。ただし、本発明において重要でない部分については、省略してある。
FIG. 33 shows an example of an instruction execution pipeline configuration in the VLIW processor of the present invention. However, parts that are not important in the present invention are omitted.

本発明におけるプロセッサの第2の実施例において、プロセッサ901は、命令フェッチ部1001と、マルチプレクサ1021と、ALU1031と、メモリアクセスユニット1032と、分岐ユニット1033と、デバッグ割込み検出部2051〜2053を備えるデバッグ命令解読部2081と、論理和回路2091を備え、これらは本発明におけるプロセッサ901の第1の実施例と同様の構成である。   In the second embodiment of the processor according to the present invention, the processor 901 includes an instruction fetch unit 1001, a multiplexer 1021, an ALU 1031, a memory access unit 1032, a branch unit 1033, and a debug having a debug interrupt detection unit 2051 to 2053. An instruction decoding unit 2081 and an OR circuit 2091 are provided, which have the same configuration as that of the first embodiment of the processor 901 in the present invention.

本発明におけるプロセッサの第2の実施例において、プロセッサ901はさらに、フェッチされた命令のうち、特定のビットパターンが検出された命令より高位のアドレスに配置される命令を無効化する命令無効化部3151と、有効な命令のみを命令解読部に発行する命令発行部3161と、発行された命令を解読する命令解読部2011〜2013を備える。   In the second embodiment of the processor according to the present invention, the processor 901 further includes an instruction invalidating unit for invalidating an instruction arranged at a higher address than an instruction in which a specific bit pattern is detected among fetched instructions. 3151, an instruction issuing unit 3161 for issuing only valid instructions to the instruction decoding unit, and instruction decoding units 2011-2013 for decoding issued instructions.

命令無効化部3151は、フェッチされた命令パケット中の各命令の一部が、特定のビットパターンを有するか否かを判定する。本発明におけるプロセッサの第2の実施例において、特定のビットパターンとは、図36に示すように16bit命令において、最上位の1ビットが1であるパターンとする。他のビットが0であるか1であるかは問わない。   The instruction invalidation unit 3151 determines whether a part of each instruction in the fetched instruction packet has a specific bit pattern. In the second embodiment of the processor according to the present invention, the specific bit pattern is a pattern in which the most significant bit is 1 in a 16-bit instruction as shown in FIG. It does not matter whether the other bits are 0 or 1.

命令無効化部3151は、任意の命令に特定のビットパターンが有ると判定すると、その命令が無効であることを示す信号を命令発行部3161に送出する。   If the instruction invalidation unit 3151 determines that an arbitrary instruction has a specific bit pattern, it sends a signal indicating that the instruction is invalid to the instruction issuing unit 3161.

命令発行部3151は、命令無効化部3151より命令が無効であることを示す信号を基に命令解読部2081に発行する命令を選別する。   The instruction issuing unit 3151 selects an instruction to be issued to the instruction decoding unit 2081 based on a signal indicating that the instruction is invalid from the instruction invalidating unit 3151.

命令発行部3151は、無効命令より高位のアドレスに配置された命令パケット中の全ての命令を無効とみなし、命令解読部に命令を発行しない。   The instruction issuing unit 3151 regards all instructions in the instruction packet arranged at an address higher than the invalid instruction as invalid, and does not issue the instruction to the instruction decoding unit.

命令解読部2011〜2013は、命令発行部3151から命令が発行されない場合は、命令を解読せずにNOP命令に相当する命令信号をマルチプレクサ1021に送出する。   When the instruction is not issued from the instruction issuing unit 3151, the instruction decoding units 2011 to 2013 send an instruction signal corresponding to the NOP instruction to the multiplexer 1021 without decoding the instruction.

命令解読部2011〜2013は、デバッグ命令を解読した際には、いずれの演算器も使用しないという信号を命令信号としてマルチプレクサ1021に出力する。   When the instruction decoding unit 2011-2013 decodes the debug instruction, the instruction decoding unit 2011-2013 outputs a signal indicating that no arithmetic unit is used to the multiplexer 1021 as an instruction signal.

本発明におけるプロセッサの第2の実施例における、デバッグ命令のビットパターンを図37に示す。   FIG. 37 shows a bit pattern of a debug instruction in the second embodiment of the processor according to the present invention.

デバッグ命令は、bit0、bit4、bit8、bit12が0であり、その他のビットが1で構成される。最上位ビットが1であるため、命令無効化部3151により、命令パケット中のデバッグ命令より高位のアドレスに配置された命令は全て無効となり、命令解読部2011〜2013に発行されることはない。これにより、デバッグ命令より高位のアドレスに配置された命令は実行されない。   In the debug instruction, bit0, bit4, bit8, and bit12 are 0, and other bits are 1s. Since the most significant bit is 1, the instruction invalidation unit 3151 invalidates all instructions arranged at higher addresses than the debug instruction in the instruction packet and is not issued to the instruction decoding units 2011 to 2013. As a result, an instruction placed at an address higher than the debug instruction is not executed.

以上説明した構成により、本発明におけるプロセッサの第2の実施例におけるプロセッサ901では、デバッグ命令はいずれの演算器資源も使用しないと解読されるため、デバッグ命令を命令パケット中のどこに配置しようが演算器などの命令実行資源不足が発生することがなくなる。即ち、デバッグ命令の実行制限がなくなり、命令パケット中の任意の位置にデバッグ命令を配置可能となる。これにより、プログラムを任意の箇所で停止させるためのブレークポイントを設定する際、任意の命令をデバッグ命令に置き換えることが
できる。また、命令パケット中のデバッグ命令に後続する命令の実行が取り消されるため、デバッグ割込みが発生し、ブレークポイントでプログラムが停止した際には、ブレークポイントより高位のアドレスに配置された命令が実行されておらず、ブレークポイントと命令実行の関係がより直感的に捉えられる。
With the configuration described above, the processor 901 in the second embodiment of the processor according to the present invention interprets that the debug instruction does not use any arithmetic unit resources, so that it is possible to calculate where to place the debug instruction in the instruction packet. Insufficient instruction execution resources such as a container will not occur. That is, there is no restriction on the execution of the debug instruction, and the debug instruction can be arranged at an arbitrary position in the instruction packet. Thereby, when setting a breakpoint for stopping the program at an arbitrary position, an arbitrary instruction can be replaced with a debug instruction. Also, since the execution of the instruction following the debug instruction in the instruction packet is canceled, when a debug interrupt occurs and the program stops at the breakpoint, the instruction placed at the address higher than the breakpoint is executed. The relationship between breakpoints and instruction execution is more intuitive.

なお、以上の実施例において、説明の簡単のために同時実行命令数を3としているが、同時実行命令数が2以上のVLIWプロセッサにおいて同様の構成を適用可能であり、同様の効果が得られることは自明である。
<本発明におけるデバッグ方法の実施例>
以下、本発明におけるデバッグ方法の実施の形態について、図1から図29を用いて説明する。
In the above embodiment, the number of simultaneously executed instructions is set to 3 for the sake of simplicity of explanation. However, the same configuration can be applied to a VLIW processor having 2 or more simultaneously executed instructions and the same effect can be obtained. That is obvious.
<Example of Debugging Method in the Present Invention>
Hereinafter, an embodiment of a debugging method according to the present invention will be described with reference to FIGS.

図1に一般的なプログラム変換装置とデバッグ装置を組み合わせたデータの流れを示す。入出力装置105からのユーザの指示によりソースプログラム101はプログラム変換装置102により実行プログラム103aに変換される。その際にソースプログラム101と実行プログラム103aの対応づけをデバッグ情報103bとして出力させることもできる。   FIG. 1 shows a data flow in which a general program conversion device and a debugging device are combined. The source program 101 is converted into an execution program 103 a by the program conversion device 102 in accordance with a user instruction from the input / output device 105. At this time, the correspondence between the source program 101 and the execution program 103a can be output as debug information 103b.

入出力装置105からのユーザの指示によりデバッグ装置104は実行プログラム103aと存在する場合はソースプログラム101及びデバッグ情報103bを参照し、プログラムの実行、停止、状態参照などの様々なデバッグ操作を制御する。   In response to a user instruction from the input / output device 105, the debug device 104 refers to the source program 101 and debug information 103b when there is an execution program 103a, and controls various debug operations such as program execution, stop, and status reference. .

図2はより具体的なデバッグ装置の例を示したものである。   FIG. 2 shows a more specific example of a debugging device.

201はプログラム変換装置及びデバッグ装置のホスト側ソフトウェアを実行するホストコンピュータである。204はターゲットとなるプロセッサの評価ボードであり、これらを接続ケーブル205で接続している。ターゲットとなるプロセッサをホストコンピュータ上でシミュレーションする場合は、204及び205は不要となる。201はホストコンピュータと接続された出力装置のディスプレイであり、203は同じく入力装置のキーボード及びマウスである。206はデバッグ装置が出力した表示画面である。   A host computer 201 executes the host-side software of the program conversion device and the debugging device. Reference numeral 204 denotes a target processor evaluation board, which is connected by a connection cable 205. When the target processor is simulated on the host computer, 204 and 205 are not necessary. Reference numeral 201 denotes an output device display connected to the host computer, and 203 denotes an input device keyboard and mouse. Reference numeral 206 denotes a display screen output by the debugging device.

図3は従来の技術のデバッグ装置の制御上の構成要素を示したものである。入出力手段501、実行プログラム・デバッグ情報読み込み手段502、命令参照・変更手段503、実行・停止制御手段504、デバッグ情報検索手段505から構成される。   FIG. 3 shows control components of a conventional debugging apparatus. An input / output unit 501, an execution program / debug information reading unit 502, an instruction reference / change unit 503, an execution / stop control unit 504, and a debug information search unit 505 are configured.

図4は本発明の実施の形態におけるデバッグ装置の制御上の構成要素を示したものである。601から605はそれぞれ501から505と同じものである。並列実行命令列境界細分化手段606は論理的に並列実行可能な命令列の並列境界をさらに細分化した命令列に分解し、そこに並列境界を追加設定する手段である。並列実行命令列再構成手段は論理的に並列実行可能な命令列中の並列境界を変更しないまま、その中の複数の命令を置換する手段である。   FIG. 4 shows control components of the debugging device according to the embodiment of the present invention. Reference numerals 601 to 605 are the same as 501 to 505, respectively. The parallel execution instruction sequence boundary subdividing means 606 is a means for decomposing the parallel boundaries of logically executable instruction sequences into subdivided instruction sequences and additionally setting parallel boundaries there. The parallel execution instruction sequence reconfiguring means is means for replacing a plurality of instructions in the instruction sequence that is logically executable in parallel without changing the parallel boundary.

図5は可変長命令かつ論理的に並列実行可能なプロセッサの32ビット長命令におけるビットパターン構成例を示している。lenは命令長を区別するためのビットでendは並列境界を示すビットを示している。   FIG. 5 shows an example of a bit pattern configuration in a 32-bit length instruction of a variable-length instruction and a logically executable processor. len is a bit for distinguishing the instruction length, and end is a bit indicating a parallel boundary.

図6は可変長命令かつ論理的に並列実行可能なプロセッサの16ビット長命令におけるビットパターン構成例を示している。len、endの意味は図5と同じである。   FIG. 6 shows an example of a bit pattern configuration in a 16-bit instruction of a variable-length instruction and a logically executable processor. The meanings of len and end are the same as in FIG.

図7は図41のビットパターンに対する並列境界を設定するための論理和で、図8は同
じく図42に対するものである。
FIG. 7 is a logical sum for setting a parallel boundary for the bit pattern of FIG. 41, and FIG. 8 is also for FIG.

図9はソースプログラム101の一部分を示した例である。図10は図9のソースプログラムをコンパイルした後の実行プログラムの例である。   FIG. 9 is an example showing a part of the source program 101. FIG. 10 shows an example of an execution program after compiling the source program of FIG.

図11は図10の実行プログラムの先頭の命令を従来の技術でデバッグ命令に置換した例を示したものである。   FIG. 11 shows an example in which the head instruction of the execution program of FIG. 10 is replaced with a debug instruction by the conventional technique.

図12は図10の実行プログラムの先頭の命令を図22の処理の流れでデバッグ命令に置換した例を示したものである。   FIG. 12 shows an example in which the first instruction of the execution program of FIG. 10 is replaced with a debug instruction in the processing flow of FIG.

図13は図10の実行プログラムの先頭の命令を図23の処理の流れでデバッグ命令に置換した例を示したものである。   FIG. 13 shows an example in which the first instruction of the execution program of FIG. 10 is replaced with a debug instruction in the processing flow of FIG.

図14は図10の実行プログラムの先頭の命令を図24の処理の流れでデバッグ命令に置換した例を示したものである。   FIG. 14 shows an example in which the first instruction of the execution program of FIG. 10 is replaced with a debug instruction in the processing flow of FIG.

図15は図10の実行プログラムの二番目の命令の位置に図25の処理の流れで順序変更してデバッグ命令に置換した例を示したものである。   FIG. 15 shows an example in which the order is changed to the position of the second instruction in the execution program of FIG. 10 and replaced with a debug instruction in the processing flow of FIG.

図16は図10の実行プログラムの二番目の命令の位置に図26の処理の流れでデバッグ命令を補正した上で置換した例を示したものである。   FIG. 16 shows an example in which the debug instruction is corrected and replaced at the position of the second instruction in the execution program of FIG. 10 by the processing flow of FIG.

図17は図10の実行プログラムの先頭の命令を図28の処理の流れでステップ実行可能に置換した例を示したものである。   FIG. 17 shows an example in which the top instruction of the execution program of FIG. 10 is replaced in a step-executable manner by the processing flow of FIG.

図18は図10の実行プログラムの先頭の命令を図29の処理の流れでステップ実行可能に置換した例を示したものである。   FIG. 18 shows an example in which the top instruction of the execution program of FIG. 10 is replaced in a step-executable manner by the processing flow of FIG.

図19は図10の実行プログラムの2つ目の命令を図29の処理の流れでステップ実行可能に置換した例を示したものである。   FIG. 19 shows an example in which the second instruction of the execution program of FIG. 10 is replaced with step execution in the processing flow of FIG.

図20は図10の実行プログラムの2つ目の命令を図29の処理の流れに加え、命令順を入れ換えてステップ実行可能に置換した例を示したものである。   FIG. 20 shows an example in which the second instruction of the execution program of FIG. 10 is added to the processing flow of FIG.

図21は従来の技術における命令置換処理の流れ図を示したものである。   FIG. 21 shows a flowchart of instruction replacement processing in the prior art.

図22は並列境界が変更できて、置換後命令が並列実行できる場合の命令置換処理の流れ図を示したものである。   FIG. 22 shows a flowchart of the instruction replacement process when the parallel boundary can be changed and the replaced instruction can be executed in parallel.

図23は並列境界が変更できない場合の命令置換処理の流れ図を示したものである。   FIG. 23 shows a flowchart of instruction replacement processing when the parallel boundary cannot be changed.

図24は並列境界が変更できるが、置換後命令が並列実行できない場合の命令置換処理の流れ図を示したものである。   FIG. 24 shows a flowchart of instruction replacement processing when the parallel boundary can be changed but the instruction after replacement cannot be executed in parallel.

図25は並列実行できる命令順序が変更できる場合の命令置換処理の流れ図を示したものである。   FIG. 25 shows a flowchart of instruction replacement processing when the order of instructions that can be executed in parallel can be changed.

図26はソフトウェアシミュレーションを利用する場合の命令置換処理の流れ図を示したものである。   FIG. 26 shows a flowchart of instruction replacement processing when software simulation is used.

図27は、ステップ実行の処理の流れ図を示したものである。   FIG. 27 shows a flowchart of the step execution process.

図28は、図27のS2003が並列境界を変更できる場合の流れ図を示したものである。   FIG. 28 shows a flowchart when S2003 in FIG. 27 can change the parallel boundary.

図29は、図27のS2003が並列境界を変更できない場合の流れ図を示したものである。   FIG. 29 shows a flow chart when S2003 of FIG. 27 cannot change the parallel boundary.

以下、これらの図を用いて詳細に説明する。   Hereinafter, it demonstrates in detail using these figures.

並列命令実行が可能なプロセッサのプログラムをデバッグ装置を利用してデバッグする場合、利用者は図1で説明した通りの流れで、デバッグ装置104に実行プログラム103aと存在する場合、デバッグ情報103bをロードする。   When debugging a program of a processor capable of executing parallel instructions using a debugging device, the user loads the debugging information 103b when the execution device 103a exists in the debugging device 104 according to the flow described in FIG. To do.

ここで、ソースプログラム101の一部が図9のような場合を想定して説明する。図71をコンパイルした結果、実行プログラムの一部として図10に示すようなコードが生成されたものとする。同図においてアドレスは命令が格納されている位置を示している。グループは説明の便宜上、論理的に並列に実行可能な命令列の固まりを区別するための通し番号で、実際の機械語コード中には番号自体は含まれていない。ニーモニックは機械語コードを利用者が理解できるように簡略化した英単語や記号の組合せに置き換えたものである。ここで、MOV R1,1とは、R1レジスタに1を転送することを、CALL subとは関数subを呼び出すことを意味している。またニーモニック末尾の||記号は次のアドレスの命令と論理的に並列に実行可能なことを示しているものとする。また、デバッグ割込みを発生させるデバッグ命令はBRK命令、プログラムカウンタを進める命令はNOP命令とする。   Here, description will be made assuming that a part of the source program 101 is as shown in FIG. As a result of compiling FIG. 71, a code as shown in FIG. 10 is generated as a part of the execution program. In the figure, the address indicates the position where the instruction is stored. For convenience of explanation, the group is a serial number for distinguishing a group of instruction sequences that can be logically executed in parallel, and the actual machine language code does not include the number itself. The mnemonic replaces the machine language code with a combination of English words and symbols that are simplified for the user to understand. Here, MOV R1,1 means transferring 1 to the R1 register, and CALL sub means calling a function sub. The symbol || at the end of the mnemonic indicates that the instruction can be executed logically in parallel with the instruction at the next address. A debug instruction that generates a debug interrupt is a BRK instruction, and an instruction that advances the program counter is a NOP instruction.

デバッグ装置の利用者が図9における行番号10にブレークポイントを設定しようとした場合、該当する機械語コードのアドレスは従来技術を使ってデバッグ情報から0x80000000と変換できる。これを従来の技術で命令境界を変更せずにそのままデバッグ命令に置き換えると図81のMOV R1,1 ||命令は図82のBRK ||命令に置換される。従来の技術の処理の流れは図21に示す通りである。   When the user of the debugging device tries to set a breakpoint at line number 10 in FIG. 9, the address of the corresponding machine language code can be converted from the debug information to 0x80000000 using the conventional technology. If this is replaced with a debug instruction as it is without changing the instruction boundary in the conventional technique, the MOV R1,1 || instruction in FIG. 81 is replaced with the BRK || instruction in FIG. The flow of processing in the conventional technique is as shown in FIG.

S1001で命令置換処理を開始し、ブレークポイントを削除した時に備えて、元の命令をS1002で保存し、1020にアドレスと元の命令を格納しておく。S1003で置換後命令、即ちブレーク設定の場合はBRK命令に置き換える。S1004で命令置換処理は終了する。ブレークポイントを削除する時はS1010で命令復元処理を開始し、1020に格納しておいた対応するアドレスと元の命令を使ってS1011で元の命令に置換する。S1012で命令復元処理を完了する。   In step S1001, the instruction replacement process is started, and the original instruction is saved in step S1002 and the address and the original instruction are stored in 1020 in preparation for when a breakpoint is deleted. In S1003, the instruction after replacement, that is, the break setting is replaced with the BRK instruction. In step S1004, the instruction replacement process ends. When deleting a breakpoint, instruction restoration processing is started in S1010, and the corresponding instruction stored in 1020 and the original instruction are used to replace the original instruction in S1011. In step S1012, the instruction restoration process is completed.

本発明ではこの処理の流れを図22、図23、図24のいずれかの方法を用いて解決する。図22,図24は請求項3の実施例に対応する。図23は請求項5の実施例に対応する。   In the present invention, this processing flow is solved by using any one of the methods shown in FIGS. 22 and 24 correspond to the third embodiment. FIG. 23 corresponds to the embodiment of claim 5.

プロセッサが任意の命令に並列境界を設定可能なアーキテクチャの場合、図22の方法が利用できる。S1101で命令置換処理を開始し、S1102で元の命令を1120に保存する。ここまでは従来技術と同様である。次にS1103において、置換後命令、即ちブレーク設定の場合はBRK命令と並列境界のビットパターンを合成する。ブレークの場合は、該当命令で区切りをつけたいので、並列境界として合成する。図5,図6の32,16ビット長の2種類の命令長を持つアーキテクチャを例にとると命令長を示すlen
ビットでまず命令長を判断する。xxx...の部分が命令そのものを示すビットパターンであるため、この部分がBRK命令のパターンとなる。endビットは並列境界を示しており、ここが0なら境界でなく、1なら境界であるとする。BRK命令のパターンと命令長に合わせ、図7または図8の並列境界を設定するビットパターンの論理和をとることにより実現される。最後にS1104において合成されたビットパターンに置き換え、S1105で命令置換処理を終了する。ブレークを削除する場合は、従来のS1010からS1012と全く同様にS1110からS1112の処理を行なう。
In the case of an architecture in which the processor can set a parallel boundary for an arbitrary instruction, the method of FIG. 22 can be used. In step S1101, instruction replacement processing is started. In step S1102, the original instruction is stored in 1120. So far, it is the same as that of the prior art. Next, in S1103, a bit pattern on the parallel boundary is synthesized with the BRK instruction in the case of setting a replacement instruction, that is, a break. In the case of a break, we want to make a break with the corresponding instruction, so we will compose it as a parallel boundary. Taking the architecture having two types of instruction lengths of 32 and 16 bits in FIGS. 5 and 6 as an example, len indicating the instruction length.
First, the instruction length is determined by the bit. xxx. . . Since this part is a bit pattern indicating the instruction itself, this part becomes the pattern of the BRK instruction. The end bit indicates a parallel boundary, and if it is 0, it is not a boundary, and if it is 1, it is a boundary. This is realized by taking the logical sum of the bit patterns that set the parallel boundary in FIG. 7 or FIG. 8 in accordance with the pattern and instruction length of the BRK instruction. Finally, the bit pattern is replaced with the synthesized bit pattern in S1104, and the instruction replacement process is terminated in S1105. When deleting a break, the processing from S1110 to S1112 is performed in exactly the same way as the conventional S1010 to S1012.

図22の処理の流れにより、図9のソースプログラムに対応する行番号10にブレークを設定した場合は、図12のようにデバッグ装置内部で置換された状態となる。   When a break is set at line number 10 corresponding to the source program of FIG. 9 according to the processing flow of FIG. 22, the state is replaced in the debug device as shown in FIG.

プロセッサが1または3命令単位に並列境界を設定可能だが、2命令単位には設定できないなど制約を持つアーキテクチャの場合、図24の方法が利用できる。S1301で命令置換処理を開始し、S1302でブレークを設定したい自命令と論理的に同時に実行可能な命令グループの元の命令列を1320としてアドレスと元の命令列をセットで格納する。S1303において自命令と同じグループの命令をプロセッサの制約の範囲で別のグループに分解する。グループの分解は先の図22の説明と同様に並列境界を設定することによって行なう。S1304で自命令を置換後命令、即ちBRK命令に置き換え、S1305で命令置換処理を終了する。ブレークを削除する場合は、従来のS1010からS1012と同様にS1310からS1312の処理を行なう。相違はS1311において単一命令ではなく、同一グループの命令列を復元している点がある。   The method shown in FIG. 24 can be used in the case of an architecture having a restriction that the processor can set a parallel boundary in units of 1 or 3 instructions but cannot set in units of 2 instructions. In step S1301, instruction replacement processing is started. In step S1302, the original instruction sequence of an instruction group that can be executed logically simultaneously with the self instruction to set a break is stored as 1320, and the address and the original instruction sequence are stored as a set. In S1303, the instructions in the same group as the self instruction are decomposed into another group within the scope of the processor. The group decomposition is performed by setting parallel boundaries in the same manner as described above with reference to FIG. In step S1304, the instruction is replaced with a post-substitution instruction, that is, a BRK instruction. In step S1305, the instruction replacement process is terminated. When deleting a break, the processing from S1310 to S1312 is performed in the same manner as the conventional S1010 to S1012. The difference is that in S1311, not the single instruction but the instruction group of the same group is restored.

図24の処理の流れにより、図9のソースプログラムに対応する行番号10にブレークを設定した場合は、図14のようにデバッグ装置内部で置換された状態となる。ブレークを設定する位置がプロセッサ制約内で並列境界に分解できれば、上記で解決できる。   When a break is set at line number 10 corresponding to the source program of FIG. 9 according to the processing flow of FIG. 24, the state is replaced in the debug device as shown in FIG. If the break setting position can be decomposed into parallel boundaries within the processor constraints, the above can be solved.

上記の方法でもプロセッサ制約で無理の場合は、図23の方法が利用できる。   If the above method is too difficult for the processor, the method shown in FIG. 23 can be used.

S1201で命令置換処理を開始する。S1202は先のS1302と同じである。S1203はブレークを設定したい位置の命令を置換後命令、即ちBRK命令に置換する。次にS1204において、後続する同一グループの命令をプログラムカウンタを進めるだけのNOP命令に置き換える。S1205で命令置換処理を終える。
ブレークを削除する場合は、S1310からS1312と同様にS1210からS1212の処理を行なう。
In step S1201, instruction replacement processing is started. S1202 is the same as the previous S1302. In step S1203, the instruction at the position where the break is to be set is replaced with an instruction after replacement, that is, a BRK instruction. In step S1204, the subsequent instructions in the same group are replaced with NOP instructions that only advance the program counter. In step S1205, the instruction replacement process ends.
When deleting a break, the process of S1210 to S1212 is performed similarly to S1310 to S1312.

図23の処理の流れにより、図9のソースプログラムに対応する行番号10にブレークを設定した場合は、図13のようにデバッグ装置内部で置換された状態となる。この場合、実際に停止するのは0x80000008のNOP命令まで実施した後になる可能性があるが、デバッグ装置では1320の情報中のアドレスを利用して、0x80000000で停止したと補正を行なう。   When a break is set at line number 10 corresponding to the source program of FIG. 9 according to the processing flow of FIG. 23, the state is replaced in the debug device as shown in FIG. In this case, there is a possibility that the actual stop will be after the execution of the NOP instruction of 0x80000008, but the debug device uses the address in the information of 1320 to correct the stop at 0x80000000.

次にデバッグ装置において図9のソースプログラムの行番号10の位置から1実行文(命令ではなくステートメント)だけステップ実行する場合を例に説明する。このソースプログラムに対応する機械語コードは図10のように生成されるものとする。
プロセッサにステップ実行を指示すると行番号10に対応する機械語コードは行番号11,12に対応する機械語コードとも論理的に並列実行可能となっているために、同時に実行されてしまう可能性がある。
Next, a case will be described as an example where one debug statement (not an instruction) is stepped from the position of line number 10 of the source program in FIG. Assume that the machine language code corresponding to this source program is generated as shown in FIG.
When the processor is instructed to execute a step, the machine language code corresponding to the line number 10 can be logically executed in parallel with the machine language code corresponding to the line numbers 11 and 12, and may be executed simultaneously. is there.

図27に本発明の並列実行に対応したステップ実行の基本の制御の流れを示す。S2001においてステップ実行処理を開始する。S2002でステップ実行したい命令が並列
実行命令であるかどうかを判定する。先に説明した図5や図6のような命令フォーマットの場合、endビットが0であれば、並列実行命令として判断できる。並列実行命令でないと判断された場合は、従来の並列実行でないプロセッサの時の技術と同様にS2006で自命令のみを単位実行してS2007でステップ実行処理を終える。並列実行命令と判断された場合は、S2003で並列実行命令列を単位実行できるように再構成する。この際、元の命令を保存しておく。詳細は図28と図29を用いて後述する。S2004で再構成した並列実行命令列を単位実行し、S2005で再構成した命令列をS2003で保存しておいた元の命令列に復元する。S2007でステップ実行処理を終了する。
FIG. 27 shows a basic control flow of step execution corresponding to the parallel execution of the present invention. In step S2001, step execution processing is started. In S2002, it is determined whether or not the instruction to be step-executed is a parallel execution instruction. In the case of the instruction format as shown in FIGS. 5 and 6 described above, if the end bit is 0, it can be determined as a parallel execution instruction. If it is determined that the instruction is not a parallel execution instruction, only the own instruction is unit-executed in S2006 and the step execution process is ended in S2007, as in the case of a conventional processor that is not parallel execution. If it is determined that the instruction is a parallel execution instruction, in S2003, the parallel execution instruction sequence is reconfigured so that it can be executed in units. At this time, the original instruction is saved. Details will be described later with reference to FIGS. The parallel execution instruction sequence reconstructed in S2004 is unit-executed, and the instruction sequence reconstructed in S2005 is restored to the original instruction sequence saved in S2003. In step S2007, the step execution process ends.

S2003の詳細を説明する。   Details of S2003 will be described.

図28は請求項4の実施例に対応する。S2101で命令置換処理が開始され、S2102で2120にステップ実行したい位置のアドレス、元の命令を保存する。S2103で自命令と並列境界のビットパターンを合成する。並列境界のビットパターンの合成方法は図22のS1103の説明と同じである。S2104で合成したビットパターンに置き換え、S2105で命令置換処理を終える。この状態でステップ実行を行ない、停止した時点でS2110において命令復元処理を開始する。S2111で2120に保存したアドレス、元の命令に置換し、S2112で命令復元処理を終了する。   FIG. 28 corresponds to the embodiment of claim 4. In S2101, the instruction replacement process is started. In S2102, the address of the position to be step-executed and the original instruction are stored in 2120. In step S2103, the self-instruction and the parallel boundary bit pattern are synthesized. The method of synthesizing the bit pattern at the parallel boundary is the same as that described in S1103 of FIG. The bit pattern is replaced with the synthesized bit pattern in step S2104, and the instruction replacement process ends in step S2105. Step execution is performed in this state, and when it is stopped, instruction restoration processing is started in S2110. The address and the original instruction stored in 2120 in S2111 are replaced with the original instruction, and the instruction restoration process is terminated in S2112.

これらの処理により、ステップ実行する間だけ図17のように置換を行ない、0x80000000の命令のみを単一のグループとして実行することが可能になる。これにより、行番号10に1実行文に対応する命令列だけを区別して実行することが可能になる。   With these processes, it is possible to perform the replacement as shown in FIG. 17 only during the step execution and execute only the instruction of 0x80000000 as a single group. Thereby, it is possible to distinguish and execute only the instruction sequence corresponding to one executable statement in line number 10.

プロセッサの制約により、並列境界が変更できない場合は、図29の方法を用いる。図29は請求項6の実施例に対応する。   If the parallel boundary cannot be changed due to processor restrictions, the method of FIG. 29 is used. FIG. 29 corresponds to an embodiment of the sixth aspect.

S2201により命令置換処理を開始する、S2202によりステップ実行したい位置の自命令と同じ命令グループのアドレスと元の命令列を2220として保存する。293において自命令と同じ命令グループの自命令以外の他の命令をNOP命令に置き換える。S2204で命令置換処理を終了する。この状態でステップ実行を行ない、実行が停止したら、S2210で命令復元処理を開始する。S2211で2220の情報を使って元の命令列に置換する。S2212で命令復元処理を終了する。   In step S2201, the instruction replacement process is started. In step S2202, the address of the same instruction group as the local instruction at the position to be step-executed and the original instruction string are stored as 2220. In 293, instructions other than the self instruction in the same instruction group as the self instruction are replaced with the NOP instruction. In step S2204, the instruction replacement process ends. In this state, step execution is performed, and when execution is stopped, instruction restoration processing is started in S2210. In S2211, the original instruction sequence is replaced with the information of 2220. In step S2212, the instruction restoration process ends.

これらの処理により、ステップ実行する間だけ図18のように置換を行ない、0x80000000からステップ実行を行なう。この場合、実際に停止するのは0x80000008のNOP命令まで実施した後になる可能性もあるが、デバッグ装置では2220の情報中のアドレスを利用して、1命令分進めた0x80000004で停止したと補正を行なう。同様に更にステップ実行を行なう場合は、0x80000000と0x80000008の命令をNOP命令に置き換えて、図19のように置き換えて、0x80000004の命令だけ実行したのと同様の結果が得られるようにする。   By these processes, replacement is performed as shown in FIG. 18 only during step execution, and step execution is performed from 0x80000000. In this case, there is a possibility that the actual stop will be after the execution of the NOP instruction of 0x80000008, but the debug device uses the address in the information of 2220 to correct that it stopped at 0x80000004 advanced by one instruction. Do. Similarly, when further step execution is performed, the instructions of 0x80000000 and 0x80000008 are replaced with NOP instructions, and are replaced as shown in FIG. 19, so that the same result as when only the instruction of 0x80000004 is executed is obtained.

ここで、もしプロセッサがNOP命令は命令グループの末尾にしか配置できないなど制約をもっている場合は、図20のようにNOP命令以外を先頭に、NOP命令を後続するように入れ換えることにより回避する。この方法が請求項8の実施例に対応する。   Here, if the processor has a restriction such that the NOP instruction can be placed only at the end of the instruction group, it can be avoided by replacing the NOP instruction with the head of the instruction other than the NOP instruction as shown in FIG. This method corresponds to the embodiment of claim 8.

デバッグ命令の記述箇所が命令グループの最後である必要があるなど制約を持ったプロセッサの場合、デバッグ命令の位置を制約に従い最後に移動し、元々設定したかった位置から移動した位置までの間をNOP命令に置き換える。この時の処理は図29と同じである。そして停止した位置は元々ブレークを設定したかった場所であるとデバッグ装置が補正を行なうことで解決する。   In the case of a processor with restrictions such as the need to describe the debug instruction at the end of the instruction group, the position of the debug instruction is moved to the end according to the restriction, and the position from where it was originally set to the moved position Replace with NOP instruction. The processing at this time is the same as in FIG. Then, the debugging apparatus corrects that the stop position is the place where the break was originally intended to be set.

デバッグ命令の記述箇所が命令グループの先頭である必要があるなど制約を持ったプロセッサの場合、デバッグ命令の位置を制約に従い先頭に挿入し、元々設定したかった位置までの命令は命令順序をデバッグ命令を挿入した分だけ移動することで回避する。
例えば、図10の二番目の命令にブレークを設定したい場合、図25のようにS1401で命令置換処理を始め、S1402で自命令と同じ命令グループの元の命令をアドレスと元の命令列をセットで1420として保存する。S1403で自命令と同じ命令グループの命令を置換後命令配置制約、即ち今回の例の場合、先頭にしか配置できないため、自命令を先頭に移動し、元々先頭にあった命令の位置から自命令が元々あった位置までの命令を順に後ろへ移動する。S1404で順序変更後の自命令は置換後命令配置制約を受けなくなっているため置換後命令に置換を行なう。S1405にて命令置換処理を終了する。この結果として図15のような命令列に置換が行なわれる。この方法が請求項7の実施例に対応する。
In the case of a processor with restrictions such as where the debug instruction must be written at the beginning of the instruction group, the position of the debug instruction is inserted at the beginning according to the restrictions, and the instructions up to the originally set position are debugged. It avoids by moving by the amount of the inserted instruction.
For example, if it is desired to set a break in the second instruction in FIG. 10, instruction replacement processing is started in S1401 as shown in FIG. 25, and the original instruction in the same instruction group as the own instruction is set in S1402 with the address and the original instruction string in S1402. Save as 1420. In S1403, instructions in the same instruction group as the instruction itself are replaced after replacement, that is, in the case of this example, since it can only be arranged at the beginning, the instruction is moved to the beginning, and the instruction from the position of the instruction that was originally at the beginning Moves the command to the position where was originally in order. In step S1404, the self-instruction after the change of order is not subject to post-replacement instruction placement restrictions, so the post-replacement instruction is replaced. In step S1405, the instruction replacement process ends. As a result, the instruction sequence as shown in FIG. 15 is replaced. This method corresponds to the embodiment of claim 7.

デバッグ命令の記述箇所が命令グループの先頭である必要があるなど制約を持ったプロセッサの場合、デバッグ命令の位置を制約に従い先頭に移動し、元々ブレークを設定したかった位置までの命令はソフトウェアでシミュレーションすることで回避する。例えば、図10の二番目の命令にブレークを設定したい場合、図26におけるS1501で命令置換処理を始める。S1502で自命令と同じ命令グループの命令列をアドレスと元の命令列をセットにして1520として保存する。図24におけるS1303と同様の方法でS1503にて自命令と同じ命令グループの命令を別グループに分解する。S1504にて、命令の配置制約に従い、自命令と同じ命令グループの先頭命令を置換後命令に置換し、S1505にて命令置換処理を終了する。ここまでで図87のような状態になる。ここでプログラムの実行を開始し、BRK命令でブレークが検出された場合、S1510で命令復元処理が開始され、S1511にて1520にて保存しておいたアドレスから元の命令列を復元する。S1512にて命令復元処理を終了する。ブレークを検出した位置から元々ブレークを設定したかった命令まで一命令ずつソフトウェアシミュレーションを実施する。MOV R1,1ならR1レジスタに1を設定することでソフトウェアシミュレーションする。元々ブレークを設定したかった位置に到達した時点で再度、S1501からのフローを処理し、命令置換された状態に戻す。ブレークを検出した場所を元々ブレークを設定したかった場所に置き換え、デバッグ装置のブレーク検出を処理を終える。この方法が請求項9の実施例に対応する。   In the case of a processor that has restrictions such as where the debug instruction must be written at the beginning of the instruction group, the debug instruction position is moved to the beginning according to the restrictions, and the instructions up to the position where the break originally wanted to be set by software Avoid by simulation. For example, when it is desired to set a break for the second instruction in FIG. 10, instruction replacement processing is started in S1501 in FIG. In step S1502, an instruction string of the same instruction group as the self instruction is stored as 1520 with the address and the original instruction string set. In the same manner as S1303 in FIG. 24, instructions in the same instruction group as the own instruction are decomposed into different groups in S1503. In step S1504, the first instruction in the same instruction group as that of the own instruction is replaced with the replaced instruction in accordance with the instruction arrangement constraint. In step S1505, the instruction replacement process is terminated. Up to this point, the state is as shown in FIG. When execution of the program is started and a break is detected by the BRK instruction, instruction restoration processing is started in S1510, and the original instruction sequence is restored from the address saved in 1520 in S1511. In step S1512, the instruction restoration process ends. Software simulation is performed one instruction at a time from the position where the break was detected to the instruction that originally wanted to set the break. In the case of MOV R1,1, software simulation is performed by setting 1 in the R1 register. When the position where the break was originally intended to be reached is reached, the flow from S1501 is processed again to return to the instruction-replaced state. The place where the break was detected is replaced with the place where the break was originally intended to be set, and the break detection of the debugging device is completed. This method corresponds to the embodiment of claim 9.

並列境界が変更できず、NOP命令がないなどの制約を持つプロセッサにおいてステップ実行したい場合、既に説明した図28,図29のいずれの方法も解決できない。例えば、図9の先頭の実行文をステップ実行したい場合、実行文に対応する命令列をデバッグ情報中の103bから検索して求める。図10のような機械語コードが生成されていた場合は、この時点でアドレス0x80000000の命令のみが抽出される。ここで該当の命令がMOV R1,1であるので、デバッグ装置においてR1レジスタに1を設定するようにソフトウェアエミュレーションすることで、見かけ上、プロセッサが該当命令のみをステップ実行したのと同じ結果を得ることができる。この方法が請求項11において請求項10を使った実施例に対応する。   When it is desired to execute a step in a processor having a constraint that the parallel boundary cannot be changed and there is no NOP instruction, neither of the above-described methods shown in FIGS. 28 and 29 can be solved. For example, when it is desired to step-execute the first executable statement in FIG. 9, the instruction sequence corresponding to the executable statement is searched for from 103b in the debug information. If the machine language code as shown in FIG. 10 has been generated, only the instruction at the address 0x80000000 is extracted at this point. Here, since the corresponding instruction is MOV R1,1, by performing software emulation so that the R1 register is set to 1 in the debugging device, the same result is obtained as if the processor apparently executed only the corresponding instruction in steps. be able to. This method corresponds to the embodiment using claim 10 in claim 11.

本発明にかかる並列命令実行可能なプロセッサは、各種制御装置、信号処理装置など高い実行性能を要求される電子機器に適用可能である。   The processor capable of executing parallel instructions according to the present invention can be applied to electronic devices that require high execution performance, such as various control devices and signal processing devices.

デバッグ命令を自由に配置可能という本発明のプロセッサの特徴は、電子機器のソフトウェア開発において有用となる。   The feature of the processor of the present invention in which debug instructions can be freely arranged is useful in software development of electronic devices.

本発明にかかる並列命令実行対応デバッグ装置はソフトウェアの開発において、プログラム変換装置によって生成された並列に実行可能な命令列に対して、一命令単位に実行するプロセッサにおけるデバッグ装置と同様に自由にブレークポイントの設定、ステップ実行などの単位実行操作を利用する場合に有用である。
ホストコンピュータなど組み込み以外のプロセッサにも応用できる。
The debugging apparatus for parallel instruction execution according to the present invention can freely break a parallel execution instruction sequence generated by a program conversion apparatus in the same manner as a debugging apparatus in a processor that executes in units of instructions for a sequence of instructions that can be executed in parallel. This is useful when using unit execution operations such as point setting and step execution.
It can also be applied to non-embedded processors such as host computers.

101 ソースプログラム
102 プログラム変換装置
103a 実行プログラム
103b デバッグ情報
104 デバッグ装置
105 入出力装置
201 ホストコンピュータ
202 ディスプレイ
203 入力装置
204 評価用ボード
205 接続ケーブル
206 表示画面
501 入出力手段
502 実行プログラム・デバッグ情報読み込み手段
503 命令参照・変更手段
504 実行・停止制御手段
505 デバッグ情報検索手段
601 入出力手段
602 実行プログラム・デバッグ情報読み込み手段
603 命令参照・変更手段
604 実行・停止制御手段
605 デバッグ情報検索手段
606 条件付命令合成手段
607 条件別実行位置検出手段
1001 命令フェッチ部
1011 命令解読部
1012 命令解読部
1013 命令解読部
1021 マルチプレクサ
1031 ALU
1032 メモリアクセスユニット
1033 分岐ユニット
1041 デバッグ割込み信号
2051 デバッグ割込み検出部
2052 デバッグ割込み検出部
2053 デバッグ割込み検出部
2061 取消信号生成部
2071 命令実行制御部
2081 デバッグ命令解読部
2091 論理和回路
2101 デバッグ割込み信号
2102 デバッグ割込み信号
2103 デバッグ割込み信号
2111 取り消し信号
2112 取り消し信号
2113 取り消し信号
2121 命令信号
2122 命令信号
2123 命令信号
2131 命令信号
2132 命令信号
2133 命令信号
3011 命令解読部
3012 命令解読部
3013 命令解読部
3151 命令無効化部
3161 命令発行部
4001 論理和回路
4002 論理和回路
5001 マルチプレクサ
5002 マルチプレクサ
5003 マルチプレクサ
DESCRIPTION OF SYMBOLS 101 Source program 102 Program conversion apparatus 103a Execution program 103b Debug information 104 Debug apparatus 105 Input / output apparatus 201 Host computer 202 Display 203 Input apparatus 204 Evaluation board 205 Connection cable 206 Display screen 501 Input / output means 502 Execution program / debug information reading means 503 Instruction reference / change means 504 Execution / stop control means 505 Debug information search means 601 Input / output means 602 Execution program / debug information reading means 603 Instruction reference / change means 604 Execution / stop control means 605 Debug information search means 606 Conditional instructions Combining means 607 Conditional execution position detecting means 1001 Instruction fetch unit 1011 Instruction decoding unit 1012 Instruction decoding unit 1013 Instruction decoding unit 021 multiplexer 1031 ALU
1032 Memory access unit 1033 Branch unit 1041 Debug interrupt signal 2051 Debug interrupt detection unit 2052 Debug interrupt detection unit 2053 Debug interrupt detection unit 2061 Cancel signal generation unit 2071 Instruction execution control unit 2081 Debug instruction decoding unit 2091 OR circuit 2101 Debug interrupt signal 2102 Debug interrupt signal 2103 Debug interrupt signal 2111 Cancel signal 2112 Cancel signal 2113 Cancel signal 2121 Command signal 2122 Command signal 2123 Command signal 2131 Command signal 2132 Command signal 2133 Command signal 3011 Command decode unit 3012 Command decode unit 3013 Command decode unit 3151 Command invalidation Section 3161 Instruction issuing section 4001 OR circuit 4002 OR circuit 5001 Multiplex Grasses 5002 multiplexer 5003 multiplexer

Claims (3)

デバッグ装置を用いて、並列実行境界を意味する特定のビットパターンを各命令のビット領域に備える命令並列実行可能なプロセッサで動作するプログラム中で、並列実行境界で区切られた命令列中のいずれかの命令にブレークポイントを設定させるブレークポイント制御方法であって、
ブレークポイントの設定の際に、前記ビットパターンを変更することによって、ブレークポイントの設定対象命令と後続する命令とが並列実行されないよう並列実行境界を追加するブレークポイント設定ステップと
前記プログラムを実行させ、前記設定対象命令で実行を停止させ、前記設定対象命令と後続する命令とが並列実行されないよう制御する実行・停止制御ステップと
を備えたブレークポイント制御方法。
Any one of the instruction sequences delimited by the parallel execution boundary in a program that runs on a processor that can execute instructions in parallel with a specific bit pattern that means a parallel execution boundary in the bit area of each instruction using a debugging device A breakpoint control method for setting a breakpoint in the instruction of
When setting a breakpoint, by changing the bit pattern, a breakpoint setting step for adding a parallel execution boundary so that a breakpoint setting target instruction and a subsequent instruction are not executed in parallel is executed, and the program is executed. A breakpoint control method comprising: an execution / stop control step for stopping execution at the setting target instruction and controlling the setting target instruction and a subsequent instruction not to be executed in parallel.
並列実行境界を意味する特定のビットパターンを各命令のビット領域に備える命令並列実行可能なプロセッサで動作するプログラム中で、並列実行境界で区切られた命令列中のいずれかの命令にブレークポイントを設定させる、コンピュータをデバッグ装置として機能させるためのブレークポイント制御プログラムであって、
ブレークポイントの設定の際に、前記ビットパターンを変更することによって、ブレークポイントの設定対象命令と後続する命令とが並列実行されないよう並列実行境界を追加するブレークポイント設定ステップと
前記プログラムを実行させ、前記設定対象命令で実行を停止させ、前記設定対象命令と後続する命令とが並列実行されないよう制御する実行・停止制御ステップと
を備えたブレークポイント制御プログラム。
Instructions that have a specific bit pattern that means a parallel execution boundary in the bit area of each instruction In a program that runs on a processor that can be executed in parallel, a breakpoint is set at any instruction in the instruction sequence delimited by the parallel execution boundary A breakpoint control program for setting a computer to function as a debugging device,
When setting a breakpoint, by changing the bit pattern, a breakpoint setting step for adding a parallel execution boundary so that a breakpoint setting target instruction and a subsequent instruction are not executed in parallel is executed, and the program is executed. A breakpoint control program comprising: an execution / stop control step for stopping execution at the setting target instruction and controlling the setting target instruction and a subsequent instruction not to be executed in parallel.
並列実行境界を意味する特定のビットパターンを各命令のビット領域に備える命令並列実行可能なプロセッサで動作するプログラム中で、並列実行境界で区切られた命令列中のいずれかの命令にブレークポイントを設定するデバッグ装置であって、
前記ブレークポイントを設定する際に、前記ビットパターンを変更することによって、ブレークポイントの設定対象命令と後続する命令とが並列実行されないよう並列実行境界を追加する並列実行命令列境界細分化手段と
前記プログラムを実行させ、前記設定対象命令で実行を停止させ、前記設定対象命令と後続する命令とが並列実行されないよう制御する実行・停止制御手段と
を備えたデバッグ装置。
Instructions that have a specific bit pattern that means a parallel execution boundary in the bit area of each instruction In a program that runs on a processor that can be executed in parallel, a breakpoint is set at any instruction in the instruction sequence delimited by the parallel execution boundary A debugging device to be configured,
A parallel execution instruction string boundary subdivision means for adding a parallel execution boundary so that a breakpoint setting target instruction and a subsequent instruction are not executed in parallel by changing the bit pattern when setting the breakpoint; A debugging apparatus comprising: an execution / stop control unit that executes a program, stops execution at the setting target instruction, and controls the setting target instruction and a subsequent instruction not to be executed in parallel.
JP2011112495A 2011-05-19 2011-05-19 Processor and debugging apparatus corresponding to parallel instruction performance Pending JP2011181100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011112495A JP2011181100A (en) 2011-05-19 2011-05-19 Processor and debugging apparatus corresponding to parallel instruction performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011112495A JP2011181100A (en) 2011-05-19 2011-05-19 Processor and debugging apparatus corresponding to parallel instruction performance

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005245645A Division JP2007058731A (en) 2005-08-26 2005-08-26 Processor and debugging apparatus corresponding to parallel instruction execution

Publications (1)

Publication Number Publication Date
JP2011181100A true JP2011181100A (en) 2011-09-15

Family

ID=44692480

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011112495A Pending JP2011181100A (en) 2011-05-19 2011-05-19 Processor and debugging apparatus corresponding to parallel instruction performance

Country Status (1)

Country Link
JP (1) JP2011181100A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0659933A (en) * 1992-08-11 1994-03-04 Toshiba Corp Code converter
JPH11194957A (en) * 1998-01-07 1999-07-21 Matsushita Electric Ind Co Ltd Debug supporting device, parallel execution information generation device and recording medium for recording program applied to the same
JPH11282674A (en) * 1998-03-30 1999-10-15 Matsushita Electric Ind Co Ltd Processor
JP2001202241A (en) * 1999-11-15 2001-07-27 Texas Instr Inc <Ti> Digital processing system equipped with microprocessor in which execution packet span two or more extraction packet and method for operating the same system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0659933A (en) * 1992-08-11 1994-03-04 Toshiba Corp Code converter
JPH11194957A (en) * 1998-01-07 1999-07-21 Matsushita Electric Ind Co Ltd Debug supporting device, parallel execution information generation device and recording medium for recording program applied to the same
JPH11282674A (en) * 1998-03-30 1999-10-15 Matsushita Electric Ind Co Ltd Processor
JP2001202241A (en) * 1999-11-15 2001-07-27 Texas Instr Inc <Ti> Digital processing system equipped with microprocessor in which execution packet span two or more extraction packet and method for operating the same system

Similar Documents

Publication Publication Date Title
JP2007058731A (en) Processor and debugging apparatus corresponding to parallel instruction execution
KR101754462B1 (en) Method and apparatus for implementing a dynamic out-of-order processor pipeline
Colwell et al. A VLIW architecture for a trace scheduling compiler
TWI514267B (en) System, method and apparatus for scheduling of instructions in a multi-strand out-of-order processor
CN108139908B (en) Move prefix instructions
US7237229B2 (en) Debugging aid parallel execution of a plurality of iterations with source lists display corresponding to each iteration
JP4718901B2 (en) Instruction execution device, debugging method, debugging device, and debugging program
JP6122749B2 (en) Computer system
US9383977B1 (en) Generation of compiler description from architecture description
Chattopadhyay et al. LISA: A uniform ADL for embedded processor modeling, implementation, and software toolsuite generation
Fauth Beyond tool-specific machine descriptions
Halambi et al. Automatic software toolkit generation for embedded systems-on-chip
JP2011181100A (en) Processor and debugging apparatus corresponding to parallel instruction performance
KR20140005526A (en) Apparatus and method for source level debugging of reconfigurable processor
Leupers et al. Retargetable compilers and architecture exploration for embedded processors
Mittal et al. An overview of a compiler for mapping software binaries to hardware
Stitt et al. Thread warping: Dynamic and transparent synthesis of thread accelerators
Koppanalil et al. A simple mechanism for detecting ineffectual instructions in slipstream processors
Wu et al. CTFS: A Configurable Tuning Framework on SHENWEI System
CN112947999B (en) Method and device for expanding instruction function of reduced instruction set computer
Tanaka et al. Implementation of a RISC-V SMT Core in an AI processor
Přikryl et al. Design and simulation of high performance parallel architectures using the ISAC language
JP2004206699A (en) Simulation device, simulation method, and program
Lee et al. Securing more registers with reduced instruction encoding architectures
Othman INVESTIGATION OF NEW ARCHITECTURAL FEATURES TO SUPPORT PERFORMANCE IMPROVEMENT IN EMBEDDED PROCESSORS

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121204

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20121218

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130402