JP2013058264A - Software debugging support program, software debugging support device, and software debugging support method - Google Patents

Software debugging support program, software debugging support device, and software debugging support method Download PDF

Info

Publication number
JP2013058264A
JP2013058264A JP2012281819A JP2012281819A JP2013058264A JP 2013058264 A JP2013058264 A JP 2013058264A JP 2012281819 A JP2012281819 A JP 2012281819A JP 2012281819 A JP2012281819 A JP 2012281819A JP 2013058264 A JP2013058264 A JP 2013058264A
Authority
JP
Japan
Prior art keywords
source code
software
interrupt
register
log data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2012281819A
Other languages
Japanese (ja)
Inventor
Hiroaki Fujimoto
博昭 藤本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2012281819A priority Critical patent/JP2013058264A/en
Publication of JP2013058264A publication Critical patent/JP2013058264A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To automatically provide information related to a source code necessary for software debugging.SOLUTION: When software to be verified is executed by a hardware model 112, a software debugging support device 100 generates log data 105 by associating an address of a source code of the software with execution result of each source code, and stores the generated log data 105 in a recording region. When accepting selection of arbitrary log data among the stored log data 105, a software debugging program 120 refers to the address of the source code associated with the execution result of the arbitrary log data, and retrieves a source code 132 corresponding to the arbitrary log data 105 from the software to be verified, to output the source code 132 to a GUI 130.

Description

この発明は、組み込み型のシステムにおけるソフトウェア開発に用いるソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法に関する。   The present invention relates to a software debug support program, a software debug support apparatus, and a software debug support method used for software development in an embedded system.

従来、CPU(Central Processing Unit)コアや、DSP(Digital Signal Processor)コアを集積したSoC(System on Chip)のようなハードウェアとソフトウェアとが混在した組み込み型のシステムを開発する場合には、ハードウェアとソフトウェアとが一体となったシステムとしてシステムレベル検証がおこなわれる。   Conventionally, when developing an embedded system in which hardware and software are mixed, such as a CPU (Central Processing Unit) core and a SoC (System on Chip) integrated with a DSP (Digital Signal Processor) core, System level verification is performed as a system in which hardware and software are integrated.

このようなシステムレベル検証をおこなうには、前処理として、個々のハードウェアとソフトウェアとが独立した状態で、初期段階の検証を完了しておかなければならない。ところが、ソフトウェアを検証するには、ソフトウェアを実行させるハードウェアが必要である。したがって、C,C++,SystemCといったプログラム言語で記述したHW(ハードウェア)モデルを用いることによってソフトウェアの検証が実現可能となり、ハードウェアの検証状況を待たずにソフトウェアを早期に開発することができる。   In order to perform such system level verification, it is necessary to complete the initial verification in a state where individual hardware and software are independent as preprocessing. However, in order to verify the software, hardware for executing the software is required. Therefore, software verification can be realized by using an HW (hardware) model described in a programming language such as C, C ++, or SystemC, and software can be developed early without waiting for the hardware verification status.

ソフトウェアの早期開発のための手法の一つとしてESL(Electronic System Level)設計手法がある。ESL設計手法には、アーキテクチャ探索、高位合成、性能見積もり、消費電力見積もり、ソフトウェア早期開発、HW/SW協調検証などの技術があるが、上述のように組み込み型のシステムの設計の際には、ESL設計手法をソフトウェアの早期開発に適用することができる。   One of the methods for early software development is an ESL (Electronic System Level) design method. ESL design techniques include technologies such as architecture search, high-level synthesis, performance estimation, power consumption estimation, early software development, and HW / SW collaborative verification. When designing embedded systems as described above, ESL design techniques can be applied to early software development.

図22は、SoCの構成例を示すブロック図である。図22のシステム2200ように、SoCの構成例としては、たとえば、CPUと、メモリとの他に、特定の処理をおこなうための専用のHWブロック群とから構成されている。また、図23は、SoCの開発工程を示す説明図である。図23のように、ESLツール上で動作するHWモデルとISS(インストラクションセットシミュレータ)を使い、ハードウェアが完成する前にソフトウェアの検証を実現している。   FIG. 22 is a block diagram illustrating a configuration example of SoC. As in the system 2200 of FIG. 22, the SoC configuration example includes, for example, a CPU and a memory, and a dedicated HW block group for performing specific processing. FIG. 23 is an explanatory diagram showing the SoC development process. As shown in FIG. 23, the HW model and ISS (instruction set simulator) operating on the ESL tool are used to verify the software before the hardware is completed.

そして、図24は、ソフトウェア早期開発環境の構成例を示す説明図である。上述したように、SoCの開発工程では、ESLツール110に含まれるISS111上で実行形式ファイル102となったソフトウェアを動作させる。そして、各種のプログラム言語によって記述されたHWモデル112によってHWの処理をおこない、仮想的にシステム全体の動作を実現してソフトウェアの検証を実現する。さらに、ソフトウェアの検証にはソフトウェアデバッグプログラム120を使用する。ソフトウェアデバッグプログラム120では、ソフトウェアのソースコード101と実行形式ファイル102とを読み込み、ISS111の実行制御と、ISS111からのCPU動作情報を取得することによって、デバッグ機能を実現している。この、デバッグ機能には、ブレークポイント設定、継続実行、ステップ実行、ソースコード表示、変数・メモリ表示などがある。そして、GUI130によってソフトウェアデバッグプログラム120における実行制御、ソースコードといったデバッグに用いる情報が表示される。   FIG. 24 is an explanatory diagram showing a configuration example of the software early development environment. As described above, in the SoC development process, the software that has become the executable file 102 is operated on the ISS 111 included in the ESL tool 110. Then, HW processing is performed by the HW model 112 described in various program languages, and the verification of the software is realized by virtually realizing the operation of the entire system. Further, a software debug program 120 is used for software verification. The software debug program 120 implements a debugging function by reading the software source code 101 and the execution format file 102 and acquiring execution control of the ISS 111 and CPU operation information from the ISS 111. The debug function includes breakpoint setting, continuous execution, step execution, source code display, variable / memory display, and the like. The GUI 130 displays information used for debugging, such as execution control and source code in the software debug program 120.

ここで、上述したようなデバッグを実現するための従来のデバッグ支援処理について説
明する。図25は、初期段階のソフトウェアデバッグ処理の手順を示すフローチャートである。また、図26は、検証進行後のソフトウェアデバッグ処理の手順を示すフローチャートである。図25のフローチャートは、主にソフトウェア開発の初期段階でバグが多く含まれる時に用いられる。
Here, conventional debugging support processing for realizing debugging as described above will be described. FIG. 25 is a flowchart showing the procedure of the software debugging process in the initial stage. FIG. 26 is a flowchart showing the procedure of the software debugging process after the verification has progressed. The flowchart of FIG. 25 is mainly used when many bugs are included in the initial stage of software development.

図25において、まず、ソースコードの動作を確認したい部分にブレークポイントを設定し(ステップS1)、ソースコードの動作を継続実行させる(ステップS2)。そして、ブレークが発生すると(ステップS3)、停止させて、ソースコード、変数、メモリなどの各値の内容確認をおこなう(ステップS4)。そして、バグが見つかったか否か、および問題がありそうな部分を過ぎたか否かによりデバッグを終了させるか否かを判断し(ステップS5)、デバッグを終了しない場合は(ステップS5:No)、1行ずつソースコードのステップを実行させ(ステップS6)、その都度ステップS4の内容確認処理を実行する。   In FIG. 25, first, a breakpoint is set at a portion where the operation of the source code is to be confirmed (step S1), and the operation of the source code is continuously executed (step S2). When a break occurs (step S3), it is stopped and the contents of each value such as source code, variable, and memory are confirmed (step S4). Then, it is determined whether or not to end debugging depending on whether or not a bug has been found and whether or not a part that seems to have a problem has passed (step S5). If debugging is not ended (step S5: No), The source code step is executed line by line (step S6), and the content confirmation process of step S4 is executed each time.

その後、ソースコードのデバッグが終了すると(ステップS5:Yes)、ステップS4の内容確認の際にプログラムのバグがあるか否かを判断する(ステップS7)。このステップS7において、バグが見つかったと判断された場合には(ステップS7:Yes)、ソースコードを修正・コンパイルして(ステップS8)、再度ステップS1の処理に戻り、デバッグを実行する。そして、ステップS7によってバグが見つからなかったと判断されると(ステップS7:No)、そのまま一連の処理を終了する。   Thereafter, when the debugging of the source code is finished (step S5: Yes), it is determined whether or not there is a program bug at the time of confirming the contents in step S4 (step S7). If it is determined in step S7 that a bug has been found (step S7: Yes), the source code is corrected and compiled (step S8), and the process returns to step S1 again to execute debugging. If it is determined in step S7 that no bug has been found (step S7: No), the series of processing ends.

図25のような処理によって、ある程度の検証が進み、ソフトウェアが安定して動作するようになると、続いて、図26のフローチャートによってより詳細な検証がおこなわれる。図26において、まず、スクリプトなどによって入力ファイル(テストパターン)を指定する(ステップS11)。その後、継続実行させ(ステップS12)、終了後、期待値比較をおこなう(ステップS13)。このステップS13の比較結果を出力し(ステップS14)、入力ファイル数の処理が終了したか否かを判断し(ステップS15)、終了するまで(ステップS15:No)、ステップS11〜S14の処理を繰り返し実行する。   When the verification as shown in FIG. 25 progresses to a certain extent and the software operates stably, the detailed verification is performed according to the flowchart in FIG. In FIG. 26, first, an input file (test pattern) is designated by a script or the like (step S11). Then, it is continuously executed (step S12), and after completion, an expected value comparison is performed (step S13). The comparison result of step S13 is output (step S14), it is determined whether or not the processing of the number of input files has been completed (step S15), and the processing of steps S11 to S14 is performed until the processing is completed (step S15: No). Run repeatedly.

その後、入力ファイル数の処理が終了すると(ステップS15:Yes)、そのまま一連の処理を終了する。このように、検証進行後のデバッグ処理では、スクリプトにより、マニュアルの入力を必要としないため、夜間やバックグラウンドで実行することで複数のテストパターンをまとめて実行させることができる。   Thereafter, when the process for the number of input files is completed (step S15: Yes), the series of processes is terminated as it is. As described above, in the debugging process after the progress of verification, manual input is not required by a script, so that a plurality of test patterns can be collectively executed by executing them at night or in the background.

また、図27は、期待値比較処理を示す説明図である。図26のステップS13にておこなわれる期待値比較処理は、図27のように、テストパターン103からESLツール110によって生成された実行結果104と、期待値生成ソフト271によって生成された期待値データ272との比較処理が期待値比較スクリプト273によって実行され、比較結果274を出力する。図26のステップS13では、この期待値比較スクリプト273を実行させ、ステップS14によって、比較結果274を出力させている。   FIG. 27 is an explanatory diagram showing expected value comparison processing. The expected value comparison process performed in step S13 of FIG. 26 includes the execution result 104 generated by the ESL tool 110 from the test pattern 103 and the expected value data 272 generated by the expected value generation software 271 as shown in FIG. Is compared with the expected value comparison script 273, and the comparison result 274 is output. In step S13 of FIG. 26, the expected value comparison script 273 is executed, and the comparison result 274 is output in step S14.

また、図28は、期待値比較に応じたソフトウェアデバッグ処理の手順を示すフローチャートである。図27の処理によって出力された比較結果が期待値不一致であった場合は、図28のような手順によってデバッグ処理をおこなう。図28において、まず、出力データ、レジスタアクセスログ、ファームを確認する(ステップS21)。   FIG. 28 is a flowchart showing the procedure of software debugging processing corresponding to the expected value comparison. If the comparison result output by the process of FIG. 27 does not match the expected value, the debugging process is performed according to the procedure shown in FIG. In FIG. 28, first, output data, register access log, and firmware are confirmed (step S21).

つぎに、検証対象ソフトに含まれている問題部分を特定できたか否かを判断する(ステップS22)。ここで、問題部分を特定できた場合には(ステップS22:Yes)、ファーム修正後、検証対象ソフトの再実行をおこない(ステップS23)、一連の処理を終
了する。一方、ステップS22において、問題部分が特定できなかった場合(ステップS22:No)、問題部分を特定するため、従来手法によって詳細に調査して(ステップS24)、一連の処理を終了する。
Next, it is determined whether or not the problem part included in the verification target software has been identified (step S22). If the problem part can be identified (step S22: Yes), after the firmware is corrected, the verification target software is re-executed (step S23), and the series of processing ends. On the other hand, if the problem part cannot be identified in step S22 (step S22: No), in order to identify the problem part, a detailed investigation is performed by the conventional method (step S24), and the series of processes is terminated.

通常、ESL環境での実行速度は実機での実行速度の100分の1以下となる。したがって、図25の処理によってデバッグをおこなう際に、長いテストパターンを用いると、非常に長い処理時間を要してしまう。たとえば、画像デコードLSIの場合、実機での処理時間が1分のテストパターンであっても、ESL環境での処理時間は1時間40分かかってしまう。実際には、ブレークポイント設定、ステップ実行といった処理をしながらデバッグを進めるため、さらに時間がかかってしまう。そこで、図28のようなフローチャートの処理によって修正したファームを再実行する前に、まず、出力データ、レジスタアクセスログ、ソースコードを使ってデバッグをおこなう。そして、このデバッグによってバグが見つからなかった場合にのみ、図25のデバッグをおこなう(たとえば、下記特許文献1参照)。   Usually, the execution speed in the ESL environment is 1/100 or less of the execution speed in the actual machine. Therefore, when debugging is performed by the processing of FIG. 25, if a long test pattern is used, a very long processing time is required. For example, in the case of an image decoding LSI, even if the test time is 1 minute in the actual machine, the processing time in the ESL environment takes 1 hour and 40 minutes. Actually, it takes more time to debug while proceeding with processing such as breakpoint setting and step execution. Therefore, before re-execution of the firmware corrected by the processing of the flowchart as shown in FIG. 28, debugging is first performed using the output data, the register access log, and the source code. Only when no bug is found by this debugging, the debugging shown in FIG. 25 is performed (for example, see Patent Document 1 below).

また、SoCに適用させるような組み込み型のソフトウェアの場合、一般的なソフトウェアのような演算処理だけでなく、CPU外部のHWブロックの制御もおこなわなければならない。このような、ソフトウェアによる制御は、HWブロック内のレジスタの読み書きや、HWブロックからの割り込み通知に基づいて実行される。なお、ここで説明したレジスタとは、一般的にCPU内部に配置された演算用レジスタとは異なり、HWブロックを制御したり、動作状態を確認したりするための専用のレジスタであり、CPUのメモリ空間にマッピングされている。   In addition, in the case of embedded software that is applied to SoC, it is necessary not only to perform arithmetic processing as in general software, but also to control the HW block outside the CPU. Such control by software is executed based on reading / writing of a register in the HW block or an interrupt notification from the HW block. Note that the register described here is a register dedicated for controlling the HW block and confirming the operation state, unlike the arithmetic register generally disposed in the CPU. Mapped to memory space.

ここで、図29は、レジスタアクセスログの構成を示す図表であり、図30は、割り込みログの構成を示す図表である。また、図31は、アクセスログ・割り込みログを示す説明図である。図29の図表2900や、図30の図表3000に示したように、組み込みソフトウェアに対するデバッグには、レジスタアクセスや割り込みログの情報が、プログラムを解析する際に非常に役に立つ情報となる。そして、検証対象ソフトをHWモデルによって実行させると、図31のようなレジスタアクセスや割り込みログの情報を出力結果として取得できる。そして、これらの情報によりシステムの動作がわかるため、ログに関する情報だけでもある程度のデバッグをおこなうことができる。   Here, FIG. 29 is a chart showing the configuration of the register access log, and FIG. 30 is a chart showing the configuration of the interrupt log. FIG. 31 is an explanatory diagram showing an access log / interrupt log. As shown in the chart 2900 in FIG. 29 and the chart 3000 in FIG. 30, register access and interrupt log information are very useful information for analyzing a program for debugging the embedded software. When the verification target software is executed by the HW model, register access and interrupt log information as shown in FIG. 31 can be acquired as an output result. Since the information indicates the operation of the system, a certain amount of debugging can be performed using only the information related to the log.

上述のように、HWモデル112によるログデータ105を用いてデバッグをおこなう際の作業としては、具体的には、(1)レジスタの設定内容およびソースコードの確認処理と、(2)割り込み動作の確認処理との2つがある。(1)の確認処理では、レジスタアクセスログ内の確認したいアクセスの値や、レジスタアクセスとそれに対応する検証対象ソフトウェアのソースコードを確認しながら正しく動作しているか確認する。   As described above, when performing debugging using the log data 105 by the HW model 112, specifically, (1) processing for checking register settings and source code, and (2) interrupt operation There are two types of confirmation processing. In the confirmation process (1), it is confirmed whether the operation is correct while confirming the access value to be confirmed in the register access log and the source code of the register access and the verification target software corresponding thereto.

一方、(2)の確認処理では、実行結果として出力されたログデータ105内の割り込みログと、この割り込みログに対応するコマンド起動レジスタなどを確認して、起動をトリガとした割り込み発生のシーケンスの流れが正しく実行されているかどうかを確認する。同時にコマンド起動部分のソースコードも確認する。どちらの場合も検証者が、テキストファイルやプリントアウトした紙を見比べながらデバッグをおこなっていた。   On the other hand, in the confirmation process (2), the interrupt log in the log data 105 output as the execution result, the command activation register corresponding to this interrupt log, etc. are confirmed, and the sequence of the interrupt generation triggered by the activation is confirmed. Check if the flow is running correctly. At the same time, check the source code of the command activation part. In both cases, the verifier debugged while comparing the text file and the printed paper.

特開2001−256072号公報Japanese Patent Laid-Open No. 2001-256072

しかしながら、上述したようなHWモデル112による実行結果を用いたデバッグは、検証者の手によってマニュアル的に実行されていたため、多大な時間を要するという問題
があった。
However, the debugging using the execution result by the HW model 112 as described above has been performed manually by a verifier, and thus has a problem that it takes a lot of time.

さらに、(1)の確認処理の場合、出力結果を目視で確認したり、レジスタ名を使ってソースコードを検索したりといった作業が要求される。ところが、ログと対応するソースコード部分を探す場合も、同じレジスタにアクセスするコードが複数箇所にあった場合には、どちらのソースコードの実行結果であるかを特定できない。たとえば、レジスタアクセスのシーケンスのログからソースコードの該当個所を類推することも不可能ではないが、対応箇所のソースコードを書いた検証者以外が、シーケンスから該当個所を特定するのは困難である。しかしながら、実際の開発環境では、1つのソフトウェアを複数名で分担して作成するのが一般的であるため、ソースコードの特定が非常に困難であるという問題があった。   Further, in the confirmation process (1), an operation such as visually confirming an output result or searching for a source code using a register name is required. However, even when searching for a source code portion corresponding to a log, if there are a plurality of codes accessing the same register, it cannot be specified which source code is the execution result. For example, it is not impossible to infer the corresponding part of the source code from the register access sequence log, but it is difficult for the verifier who wrote the source code of the corresponding part to identify the corresponding part from the sequence. . However, in an actual development environment, since it is common to create a piece of software by sharing it with a plurality of names, there is a problem that it is very difficult to specify a source code.

また、(2)の確認処理の場合、バグにより、途中で割り込みの順序が乱れてしまっているような出力結果では、ログから割り込み発生を起こしたソースコードを特定するのは困難であった。たとえば、図32は、ブロックAに関するログの一例を示す説明図である。そして、図33は、ログに応じたシーケンスを示す説明図である。図32に示したようなログの記述のみから検証をおこなう場合、図33のパターン1のようなシーケンスであってもパターン2のようなシーケンスであっても同一の記述になってしまい判別できないという問題があった。   In the case of the confirmation process (2), it is difficult to identify the source code that caused the interrupt from the log in the output result in which the interrupt order is disturbed due to a bug. For example, FIG. 32 is an explanatory diagram illustrating an example of a log related to the block A. And FIG. 33 is explanatory drawing which shows the sequence according to a log. When the verification is performed only from the log description as shown in FIG. 32, even if it is a sequence like pattern 1 or a sequence like pattern 2 in FIG. There was a problem.

この発明は、上述した従来技術による問題点を解消するため、デバッグに必要となるソースコードに関する情報を自動的に提供するソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法を実現することを目的とする。   The present invention realizes a software debugging support program, a software debugging support device, and a software debugging support method that automatically provide information on source code necessary for debugging in order to solve the above-described problems caused by the prior art. Objective.

上述した課題を解決し、目的を達成するため、このソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法は、コンピュータにおいて、ハードウェアモデルまたはハードウェアによって検証対象のソフトウェアが実行されると、前記ソフトウェアのソースコードごとの実行結果に当該ソースコードのアドレスを関連付けたログデータを生成する処理と、生成されたログデータを記録領域に蓄積する処理と、蓄積されたログデータを出力する処理とを含むことを要件とする。   In order to solve the above-described problems and achieve the object, the software debugging support program, the software debugging support apparatus, and the software debugging support method are executed when a software to be verified is executed by a hardware model or hardware in a computer. A process of generating log data in which the address of the source code is associated with an execution result for each source code of the software, a process of storing the generated log data in a recording area, and a process of outputting the stored log data It is a requirement to include.

このソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法によれば、指定したレジスタへのアスクセスログと、当該アクセスログを出力させる命令元となったソースコードとが関連付いたログデータを出力することができる。   According to the software debug support program, software debug support apparatus, and software debug support method, log data in which an access log to a designated register and a source code that is an instruction source for outputting the access log are associated with each other is output. be able to.

また、このソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法は、検証対象ソフトウェアのソースコード群と、前記検証対象ソフトウェアをハードウェアモデルまたはハードウェアによって実行させた際のログデータ群とにアクセス可能なコンピュータにおいて、前記ログデータ群に記述されているレジスタの中から任意のレジスタの選択を受け付ける処理と、前記ソースコード群の中から、受け付けられた任意のレジスタの記述が含まれているソースコードを検索する処理と、検索されたソースコードを前記任意のレジスタが記述されたログデータと対応付けて出力する処理とを含むことを要件とする。   The software debugging support program, the software debugging support apparatus, and the software debugging support method include a source code group of verification target software and a log data group when the verification target software is executed by a hardware model or hardware. In an accessible computer, a process for receiving selection of an arbitrary register from among the registers described in the log data group and a description of an arbitrary register received from the source code group are included. It is necessary to include processing for searching for source code and processing for outputting the searched source code in association with log data in which the arbitrary register is described.

このソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法によれば、指定したレジスタへのアクセスを実行するソースコードを自動的に抽出して検証者に提供することができる。   According to this software debug support program, software debug support apparatus, and software debug support method, it is possible to automatically extract source code for executing access to a designated register and provide it to a verifier.

このソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法によれば、デバッグに必要となるソースコードに関する情報を自動的に提供することによって効率的なデバッグを支援することができるという効果を奏する。   According to the software debug support program, the software debug support apparatus, and the software debug support method, it is possible to support efficient debugging by automatically providing information on source code necessary for debugging. .

本実施の形態にかかるソフトウェアデバッグ支援処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of the software debugging assistance process concerning this Embodiment. ソフトウェアデバッグ支援装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of a software debugging assistance apparatus. 実施例1におけるソフトウェアデバッグプログラムの構成を示すブロック図である。It is a block diagram which shows the structure of the software debug program in Example 1. FIG. 実施例1におけるソフトウェアデバッグ支援処理の手順を示すフローチャートである。3 is a flowchart illustrating a procedure of software debugging support processing according to the first exemplary embodiment. 実施例2におけるソフトウェアデバッグプログラムの構成を示すブロック図である。It is a block diagram which shows the structure of the software debug program in Example 2. 実施例2におけるHWモデルの構成を示すブロック図である。It is a block diagram which shows the structure of the HW model in Example 2. FIG. 実施例2におけるレジスタアクセスログの構成を示す図表である。10 is a chart illustrating a configuration of a register access log according to the second embodiment. 実施例2における割り込みログの構成を示す図表である。10 is a chart showing a configuration of an interrupt log in Embodiment 2. HWモデルにおけるレジスタアクセスログ出力時の実行処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the execution process at the time of the register access log output in a HW model. 実施例2におけるソフトウェアデバッグプログラムのソースコード表示処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of a source code display process of a software debug program in the second embodiment. HWモデルにおける割り込みログ出力時の実行処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the execution process at the time of the interruption log output in a HW model. 実施例2におけるソフトウェアデバッグプログラムの割り込み対応レジスタの表示処理の手順を示すフローチャートである。14 is a flowchart illustrating a procedure of display processing of an interrupt-compatible register of a software debug program according to the second embodiment. ログデータの出力例(その1)を示す説明図である。It is explanatory drawing which shows the output example (the 1) of log data. ログデータの出力例(その2)を示す説明図である。It is explanatory drawing which shows the output example (the 2) of log data. ログデータの出力例(その3)を示す説明図である。It is explanatory drawing which shows the output example (the 3) of log data. 本実施の形態にかかるソフトウェアデバッグ処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the software debugging process concerning this Embodiment. SoCの構成例を示すブロック図である。It is a block diagram which shows the structural example of SoC. ソースコード表示時のHWモデルの処理を示すシーケンス図である。It is a sequence diagram which shows the process of the HW model at the time of a source code display. ソースコード表示時のGUIの表示例を示す説明図である。It is explanatory drawing which shows the example of a GUI display at the time of a source code display. 割り込みログ出力時のHWモデルの処理例(その1)を示すシーケンス図である。FIG. 10 is a sequence diagram illustrating a processing example (part 1) of the HW model when outputting an interrupt log. 割り込みログ出力時のHWモデルの処理例(その2)を示すシーケンス図である。It is a sequence diagram which shows the process example (the 2) of the HW model at the time of interruption log output. 割り込みログ出力時のHWモデルの処理例(その3)を示すシーケンス図である。It is a sequence diagram which shows the process example (the 3) of the HW model at the time of interruption log output. マスク/イネーブル変化による割り込み発生時のGUI表示例(その1)を示す説明図である。It is explanatory drawing which shows the GUI display example (the 1) at the time of interruption generation | occurrence | production by a mask / enable change. マスク/イネーブル変化による割り込み発生時のGUI表示例(その2)を示す説明図である。It is explanatory drawing which shows the GUI display example (the 2) at the time of the interruption generation | occurrence | production by a mask / enable change. コマンド完了による割り込み発生時のGUI表示例を示す説明図である。It is explanatory drawing which shows the example of a GUI display at the time of interruption generate | occur | produced by command completion. その他の割り込み発生時のGUI表示例を示す説明図である。It is explanatory drawing which shows the example of a GUI display at the time of the other interruption generation | occurrence | production. SoCの構成例を示すブロック図である。It is a block diagram which shows the structural example of SoC. SoCの開発工程を示す説明図である。It is explanatory drawing which shows the development process of SoC. ソフトウェア早期開発環境の構成例を示す説明図である。It is explanatory drawing which shows the structural example of a software early development environment. 初期段階のソフトウェアデバッグ処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the software debugging process of an initial stage. 検証進行後のソフトウェアデバッグ処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the software debug process after verification progress. 期待値比較処理を示す説明図である。It is explanatory drawing which shows an expected value comparison process. 期待値比較に応じたソフトウェアデバッグ処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the software debugging process according to expected value comparison. レジスタアクセスログの構成を示す図表である。It is a graph which shows the structure of a register access log. 割り込みログの構成を示す図表である。It is a chart which shows the structure of an interruption log. アクセスログ・割り込みログを示す説明図である。It is explanatory drawing which shows an access log and an interruption log. ブロックAに関するログの一例を示す説明図である。It is explanatory drawing which shows an example of the log regarding the block A. FIG. ログに応じたシーケンスを示す説明図である。It is explanatory drawing which shows the sequence according to a log.

以下に添付図面を参照して、このソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法の好適な実施の形態を詳細に説明する。このソフトウェアデバッグ支援プログラム、ソフトウェアデバッグ支援装置およびソフトウェアデバッグ支援方法では、指定されたレジスタアクセスや割り込み動作とソースコードとの対応情報を自動的に抽出して検証者に提供することによってデバッグを支援することができる。   Exemplary embodiments of a software debugging support program, a software debugging support apparatus, and a software debugging support method will be described below in detail with reference to the accompanying drawings. In this software debugging support program, software debugging support apparatus, and software debugging support method, debugging is supported by automatically extracting correspondence information between designated register access and interrupt operation and source code and providing it to a verifier. be able to.

(ソフトウェアデバッグ支援処理の概要)
まず、本実施の形態にかかるソフトウェアデバッグ支援処理について説明する。図1は、本実施の形態にかかるソフトウェアデバッグ支援処理の概要を示す説明図である。図1のように、本実施の形態では、ソフトウェアデバッグ支援装置100によって検証者(ユーザ)が指定したレジスタアクセスや割り込み動作のログを対応するソースコードと関連付けて出力することによって、検証者によるソフトウェアデバッグを支援することができる。
(Outline of software debugging support process)
First, software debugging support processing according to the present embodiment will be described. FIG. 1 is an explanatory diagram showing an outline of software debugging support processing according to the present embodiment. As shown in FIG. 1, in this embodiment, the software debug support apparatus 100 outputs a register access or interrupt operation log specified by the verifier (user) in association with the corresponding source code, thereby enabling the software by the verifier. Debugging can be supported.

まず、本実施の形態にかかるソフトウェアデバッグ支援装置100の構成について説明する。図1のように、ソフトウェアデバッグ支援装置100は、ESLツール110と、ソフトウェアデバッグプログラム120と、GUI130とを含んだ構成になっている。ESLツール110は、従来より用いられている設計手法である。そして、今回のソフトウェアデバッグ支援装置100のように、ソフトウェア早期開発に用いる場合は、図1のようにISS111と、HWモデル112とを搭載した構成を用いる。   First, the configuration of the software debug support apparatus 100 according to the present embodiment will be described. As shown in FIG. 1, the software debug support apparatus 100 includes an ESL tool 110, a software debug program 120, and a GUI 130. The ESL tool 110 is a conventionally used design method. And when using for software early development like this software debugging assistance apparatus 100, the structure which mounted ISS111 and the HW model 112 like FIG. 1 is used.

このISS111およびHWモデル112は、検証対象ソフトの実行形式ファイル102を読み込むことによって、仮想的なSoCを構成する。また、HWモデル112には入力データ103としてテストパターンが入力される。HWモデル112では、ISS111の制御に応じて入力された入力データ103のテストパターンに応じた処理を実行し、この実行結果が、出力データ104として出力される。また、HWモデル112からは、ISS111からの制御に応じたログデータ105が出力される。   The ISS 111 and the HW model 112 configure a virtual SoC by reading the execution format file 102 of the verification target software. In addition, a test pattern is input as input data 103 to the HW model 112. In the HW model 112, processing according to the test pattern of the input data 103 input in accordance with the control of the ISS 111 is executed, and the execution result is output as output data 104. Further, the log data 105 corresponding to the control from the ISS 111 is output from the HW model 112.

また、ソフトウェアデバッグプログラム120は、検証対象ソフトウェアのソースコード101と実行形式ファイル102とを読み込み、ISS111の実行制御と、ISS111からのCPU動作情報を取得することによって、デバッグ機能を実現する。この、デバッグ機能には、従来のブレークポイント設定、継続実行、ステップ実行、ソースコード表示、変数・メモリ表示に加えて、指定したレジスタアクセスログ131と対応するソースコード132とを対応付けて表示させる機能を備えている。したがって、GUI130は、ソフトウェアデバッグプログラム120における実行制御の受け付けや、ソースコード132といったデバッグに用いる情報が表示される。   Further, the software debug program 120 implements a debugging function by reading the source code 101 and the execution format file 102 of the verification target software, and acquiring execution control of the ISS 111 and CPU operation information from the ISS 111. In addition to the conventional breakpoint setting, continuous execution, step execution, source code display, and variable / memory display, the debug function displays the specified register access log 131 and the corresponding source code 132 in association with each other. It has a function. Therefore, the GUI 130 displays information used for debugging, such as acceptance of execution control in the software debug program 120 and source code 132.

つぎに、上述したソフトウェアデバッグ支援装置100のハードウェア構成について説明する。図2は、ソフトウェアデバッグ支援装置のハードウェア構成を示すブロック図である。ソフトウェアデバッグ支援装置100は、図2のようなハードウェア構成をもつ汎用コンピュータによってESLツール110と、ソフトウェアデバッグプログラム120
と、GUI130とが実現される。
Next, a hardware configuration of the above-described software debug support apparatus 100 will be described. FIG. 2 is a block diagram illustrating a hardware configuration of the software debugging support apparatus. The software debug support apparatus 100 includes an ESL tool 110 and a software debug program 120 by a general-purpose computer having a hardware configuration as shown in FIG.
And the GUI 130 are realized.

たとえば、図2において、ソフトウェアデバッグ支援装置100は、CPU(Central Processing Unit)201と、ROM(Read‐Only Memory)202と、RAM(Random Access Memory)203と、磁気ディスクドライブ204と、磁気ディスク205と、光ディスクドライブ206と、光ディスク207と、ディスプレイ208と、入力I/F(Interface)209とネットワークI/F(Interface)210と、を備えている。また、各構成部はバス220によってそれぞれ接続されている。   For example, in FIG. 2, the software debug support apparatus 100 includes a CPU (Central Processing Unit) 201, a ROM (Read-Only Memory) 202, a RAM (Random Access Memory) 203, a magnetic disk drive 204, and a magnetic disk 205. An optical disk drive 206, an optical disk 207, a display 208, an input I / F (Interface) 209, and a network I / F (Interface) 210. Each component is connected by a bus 220.

ここで、CPU201は、ソフトウェアデバッグ支援装置100の全体の制御を司る。ROM202は、ブートプログラムや、ESLツールや、ソフトウェアデバッグプログラムなどのプログラムを記憶している。RAM203は、CPU201のワークエリアとして使用される。磁気ディスクドライブ204は、CPU201の制御にしたがって磁気ディスク205に対するデータのリード/ライトを制御する。磁気ディスク205は、磁気ディスクドライブ204の制御で書き込まれたデータを記憶する。   Here, the CPU 201 governs overall control of the software debugging support apparatus 100. The ROM 202 stores programs such as a boot program, an ESL tool, and a software debug program. The RAM 203 is used as a work area for the CPU 201. The magnetic disk drive 204 controls reading / writing of data with respect to the magnetic disk 205 according to the control of the CPU 201. The magnetic disk 205 stores data written under the control of the magnetic disk drive 204.

光ディスクドライブ206は、CPU201の制御にしたがって光ディスク207に対するデータのリード/ライトを制御する。光ディスク207は、光ディスクドライブ206の制御で書き込まれたデータを記憶したり、光ディスク207に記憶されたデータをコンピュータに読み取らせたりする。   The optical disk drive 206 controls reading / writing of data with respect to the optical disk 207 according to the control of the CPU 201. The optical disk 207 stores data written under the control of the optical disk drive 206, or causes the computer to read data stored on the optical disk 207.

ディスプレイ208は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。このディスプレイ208は、たとえば、CRT、TFT液晶ディスプレイ、プラズマディスプレイなどを採用することができる。   The display 208 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box. As the display 208, for example, a CRT, a TFT liquid crystal display, a plasma display, or the like can be adopted.

入力インターフェース(以下、「入力I/F」と略する)209は、キーボード、タッチパネルなど検証者からの指示を受け付ける。たとえば、キーボードの場合、文字、数字、各種指示などの入力のためのキーを備え、データの入力をおこなう。また、タッチパネル式の入力パッドやテンキーなどであってもよい。また、マウスの場合は、カーソルの移動や範囲選択、あるいはウィンドウの移動やサイズの変更などをおこなう。ポインティングデバイスとして同様に機能を備えるものであれば、トラックボールやジョイスティックなどであってもよい。   An input interface (hereinafter abbreviated as “input I / F”) 209 receives an instruction from a verifier such as a keyboard and a touch panel. For example, in the case of a keyboard, keys are provided for inputting characters, numbers, various instructions, etc., and data is input. Moreover, a touch panel type input pad or a numeric keypad may be used. In the case of a mouse, the cursor is moved and a range is selected, or a window is moved and the size is changed. A trackball or a joystick may be used as long as they have the same function as a pointing device.

ネットワークインターフェース(以下、「ネットワークI/F」と略する)210は、通信回線を通じてLAN(Local Area Network)、WAN(Wide
Area Network)、インターネットなどのネットワークに接続され、このネットワークを介して他の装置に接続される。そして、ネットワークI/F210は、ネットワークと内部のインターフェースを司り、外部装置からのデータの入出力を制御する。ネットワークI/F210には、たとえばモデムやLANアダプタなどを採用することができる。
A network interface (hereinafter abbreviated as “network I / F”) 210 is a LAN (Local Area Network) or WAN (Wide) through a communication line.
Are connected to a network such as an area network or the Internet, and are connected to other devices via this network. The network I / F 210 serves as an internal interface with the network, and controls data input / output from an external device. As the network I / F 210, for example, a modem or a LAN adapter can be employed.

以上説明したように、ソフトウェアデバッグ支援装置100は、汎用のコンピュータのハードウェア資源201〜210を利用してESLツール110、ソフトウェアデバッグプログラム120およびGUI130を実現することができる。たとえば、ESLツール110およびソフトウェアデバッグプログラム120は、CPU201、ROM202、RAM203によって実現することができる。また、GUI130は、ディスプレイ208および入力I/F209によって実現することができる。   As described above, the software debugging support apparatus 100 can realize the ESL tool 110, the software debugging program 120, and the GUI 130 using the hardware resources 201 to 210 of a general-purpose computer. For example, the ESL tool 110 and the software debug program 120 can be realized by the CPU 201, the ROM 202, and the RAM 203. The GUI 130 can be realized by the display 208 and the input I / F 209.

また、ソフトウェアデバッグ支援装置100の入力情報であるソースコード(全体)1
01、実行形式ファイル102および入力データ(テストパターン)103は、あらかじめ磁気ディスク205や、光ディスク207に記録しておいてもよいし、ネットワークI/F210を介して外部から取得してもよい。また、磁気ディスク205や、光ディスク207を、デバッグ支援装置100からの出力情報であり出力データ104やログデータ105を蓄積する蓄積手段として利用することもできる。
Also, source code (entire) 1 which is input information of the software debugging support apparatus 100
01, the execution format file 102 and the input data (test pattern) 103 may be recorded in advance on the magnetic disk 205 or the optical disk 207, or may be acquired from the outside via the network I / F 210. Further, the magnetic disk 205 and the optical disk 207 can be used as storage means for storing output data 104 and log data 105 that are output information from the debug support apparatus 100.

また、上述の説明では、ESLツール110、ソフトウェアデバッグプログラム120およびGUI130を1台の汎用コンピュータによって実現させているが、複数のコンピュータによってそれぞれの機能を実現させ、ネットワークI/F210を介して、1つのソフトウェアデバッグ支援システムとして提供してもよい。   In the above description, the ESL tool 110, the software debug program 120, and the GUI 130 are realized by one general-purpose computer, but each function is realized by a plurality of computers, and the network I / F 210 is used to One software debugging support system may be provided.

以下に、図1によって説明したようなソフトウェアデバッグ支援処理を実現するための具体的な実施例1,2について説明する。実施例1,2は、図1のソフトウェアデバッグ支援装置100によって実現されるが、それぞれ異なる構成のログデータ105を扱うため(実施例1の場合は、従来のログデータと同じ構成)、ソフトウェアデバッグ支援用に検証者に提供される情報もそれぞれ異なる構成となる。したがって、検証者は、デバッグ支援装置100のハードウェア環境や、デバッグ処理における検証目的に応じて、実施例1,2のいずれかを利用すればよい。   Specific examples 1 and 2 for realizing the software debugging support process as described with reference to FIG. 1 will be described below. The first and second embodiments are realized by the software debugging support apparatus 100 shown in FIG. 1. However, in order to handle log data 105 having different configurations (in the case of the first embodiment, the same configuration as conventional log data), software debugging is performed. The information provided to the verifier for support also has a different configuration. Therefore, the verifier may use any one of the first and second embodiments according to the hardware environment of the debug support apparatus 100 and the verification purpose in the debugging process.

(実施例1)
実施例1では、図25にて説明したような、通常のログデータを利用して、指定されたアクセスログや割り込みログについて、対応するソースコードを抽出してユーザに提供することでデバッグを支援する構成になっている。
Example 1
In the first embodiment, debugging is supported by extracting the corresponding source code and providing it to the user for the specified access log and interrupt log using normal log data as described in FIG. It is configured to do.

上述したように、本実施の形態では、図1にて説明したデバッグ支援装置100によってソフトウェアデバッグ支援処理が実現される。したがって、まず、実施例1におけるソフトウェアデバッグプログラム120の構成について説明する。図3は、実施例1におけるソフトウェアデバッグプログラムの構成を示すブロック図である。図3のように、ソフトウェアデバッグプログラム120には、ソースコード101、実行形式ファイル102およびログデータ105が入力され、下記のような処理を実行するプログラム群によって構成されている。   As described above, in this embodiment, software debug support processing is realized by the debug support device 100 described with reference to FIG. Therefore, first, the configuration of the software debug program 120 in the first embodiment will be described. FIG. 3 is a block diagram illustrating the configuration of the software debug program according to the first embodiment. As shown in FIG. 3, the source code 101, the execution format file 102, and the log data 105 are input to the software debug program 120, and the software debug program 120 includes a program group that executes the following processing.

・ログデータ入力部:ログデータからレジスタアクセス・割り込みログを読み込ませる。・レジスタアクセスログ表示部:ログデータ入力部が読み込んだレジスタアクセス・割り込みログをGUI上に表示させる。
・GUI制御受付部:検証者からのGUI操作を受け付ける。
・ソースコード検索部:GUI制御受付部によって指定されたレジスタ名からソースコードを検索する。検索時に同じレジスタ名を含んだソースコードが複数の箇所に存在する場合は、すべてのソースコードの記述箇所を検証候補としてGUI上に表示させて選択可能にする。
・ソースコード表示部:ソースコード検索部によって検索されたソースコードを表示させる。
-Log data input section: Reads register access / interrupt log from log data. Register access log display section: The register access / interrupt log read by the log data input section is displayed on the GUI.
GUI control accepting unit: accepts a GUI operation from the verifier.
Source code search unit: Searches the source code from the register name specified by the GUI control reception unit. When source code including the same register name exists at a plurality of locations at the time of search, the description locations of all the source codes are displayed on the GUI as verification candidates and can be selected.
Source code display unit: Displays the source code searched by the source code search unit.

つぎに、実施例1におけるソフトウェアデバッグ支援処理の手順について説明する。図4は、実施例1におけるソフトウェアデバッグ支援処理の手順を示すフローチャートである。図4のフローチャートは、GUI130などによって検証者からのソース表示指示が入力されると、これをトリガとしてソフトウェアデバッグ支援処理を開始する。まず、GUI130からソース表示指示があると、指定されたレジスタ名でソースコードを検索する(ステップS401)。ステップS401によって、指定されたレジスタ名に対応するレジスタアクセスの記述が検索されるため、検索されたれレジスタアクセス記述が複数あ
るか否かを判断する(ステップS402)。
Next, a procedure of software debugging support processing in the first embodiment will be described. FIG. 4 is a flowchart illustrating the procedure of the software debugging support process according to the first embodiment. In the flowchart of FIG. 4, when a source display instruction is input from the verifier through the GUI 130 or the like, the software debugging support process is started using this as a trigger. First, when there is a source display instruction from the GUI 130, the source code is searched with the designated register name (step S401). Since the description of the register access corresponding to the designated register name is retrieved in step S401, it is determined whether there are a plurality of retrieved register access descriptions (step S402).

このステップS402において、レジスタアクセス記述が複数ある場合(ステップS402:Yes)、これら複数のレジスタアクセス記述の候補部分の一覧をGUI130上に表示させる(ステップS403)。ここで表示させた候補部分の一覧から検証者からの選択を受け付けると、選択された部分のソースコード132を表示させ(ステップS404)、一連の処理を終了する。   In step S402, when there are a plurality of register access descriptions (step S402: Yes), a list of candidate portions of the plurality of register access descriptions is displayed on the GUI 130 (step S403). When a selection from the verifier is received from the list of candidate parts displayed here, the source code 132 of the selected part is displayed (step S404), and the series of processes is terminated.

一方、ステップS402において、検索されたレジスタアクセス記述が一カ所のみであった場合(ステップS402:No)、検索されたレジスタアクセス記述部分に対応するソースコードを表示し(ステップS405)、一連の処理を終了する。   On the other hand, in step S402, when there is only one retrieved register access description (step S402: No), the source code corresponding to the retrieved register access description portion is displayed (step S405), and a series of processing Exit.

なお、図4のフローチャートでは、検証者にレジスタ名を指定させ、指定されたレジスタ名からソースコードを検索しているが、ログデータ一覧の中から検証したいログデータを指定させてもよい。このような場合は、選択されたログデータの中からレジスタ名を抽出する。そして抽出されたレジスタ名について図4のフローチャートの処理をおこなえばよい。   In the flowchart of FIG. 4, the verifier designates the register name, and the source code is searched from the designated register name. However, the log data to be verified may be designated from the log data list. In such a case, a register name is extracted from the selected log data. Then, the processing of the flowchart of FIG. 4 may be performed on the extracted register name.

このように、実施例1では従来のログデータをそのまま利用して指定したレジスタに関するレジスタアクセスログ131とソースコード132とを対応付けて表示させることができる。したがって、検証者は、従来のようにすべてのソースコード101とログデータ105とを比較しながら対応関係を把握するような手間が削減される。また、上述したように、ログデータ105は従来の構成のものをそのまま利用するため、HWモデル112もあらたな機能を追加することなく従来の構成をそのまま利用することができる。   As described above, in the first embodiment, it is possible to display the register access log 131 and the source code 132 related to the designated register by using conventional log data as they are. Therefore, it is possible for the verifier to reduce the trouble of grasping the correspondence relationship while comparing all the source code 101 and the log data 105 as in the past. Further, as described above, since the log data 105 uses the conventional configuration as it is, the HW model 112 can also use the conventional configuration as it is without adding a new function.

(実施例2)
実施例2は、ログデータ105として実施例1の場合よりも多くの情報を取得することによって、実施例1よりも多様な情報を提供してデバッグ支援を実現する。なお、実施例2の場合も実施例1と同様に図1のようなデバッグ支援装置100の構成によって実現されるが、HWモデル112内部の構成と、ソフトウェアデバッグプログラム120内部の構成、さらに、HWモデル112から出力させるログデータの構成が異なっている。したがって、以下に各構成の相違点と、具体的なデバッグ支援処理の内容とについて説明する。
(Example 2)
The second embodiment obtains more information than the case of the first embodiment as the log data 105, thereby providing more information than the first embodiment and realizing debugging support. The second embodiment is also realized by the configuration of the debug support apparatus 100 as shown in FIG. 1 as in the first embodiment. However, the configuration inside the HW model 112, the configuration inside the software debug program 120, and the HW The configuration of log data output from the model 112 is different. Therefore, the difference between each configuration and the specific contents of the debugging support process will be described below.

<ソフトウェアデバッグプログラムの構成>
まず、実施例2におけるソフトウェアデバッグプログラムについて説明する。図5は、実施例2におけるソフトウェアデバッグプログラムの構成を示すブロック図である。図5のように、ソフトウェアデバッグプログラム120には、レジスタアクセスログ表示部、ソースコード表示部、ソース行取得部、GUI制御受付部、ログデータ入力部、ログデータ検索部が含まれている。このように、実施例1と比較して、ソース行取得部が追加され、ソースコード検索部に替わってログデータ検索部が追加された構成になっている。
<Configuration of software debug program>
First, a software debug program according to the second embodiment will be described. FIG. 5 is a block diagram illustrating the configuration of the software debug program according to the second embodiment. As shown in FIG. 5, the software debug program 120 includes a register access log display unit, a source code display unit, a source line acquisition unit, a GUI control reception unit, a log data input unit, and a log data search unit. As described above, compared to the first embodiment, a source line acquisition unit is added, and a log data search unit is added instead of the source code search unit.

また、ソフトウェアデバッグプログラム120に入力されるソースコード101、実行形式ファイル102は、実施例1と同じ情報である。また、上述したように、ログデータ105は、実施例2のデバッグ支援処理を実現するために、HWモデル112によって、実施例1のログデータ105(図29,30に示した従来のログデータと同じ構成)とは異なる構成のログデータ105が出力されており、このログデータ105が入力される。なお、HWモデル112によるログデータ105の出力処理については後述する。   The source code 101 and the execution format file 102 input to the software debug program 120 are the same information as in the first embodiment. In addition, as described above, the log data 105 is generated by the HW model 112 according to the log data 105 of the first embodiment (the conventional log data shown in FIGS. Log data 105 having a configuration different from that of the same configuration is output, and this log data 105 is input. The log data 105 output process by the HW model 112 will be described later.

つぎに、上述したソフトウェアデバッグプログラムの各機能部について、実施例1と異
なる処理をおこなう点について説明する、ソース行取得部は、レジスタアクセスログ表示部によって表示されたレジスタアクセスログや割込ログの中から検証者にソースコード表示指示を受け付けると、ログデータ105に関連付けられたた命令アドレスを参照して対応するソースコード行数を取得する。したがって、ソースコード表示部は、指定された行数に対応するソースコード132の表示をおこなう。なお、アドレスとソースコード132の行数との対応情報は、HWモデル112に入力される実行形式ファイル102に含まれるため、HWモデル112によって、命令アドレスが関連付いたログデータ105を出力させている(詳しくはHWモデル112の構成にて説明する)。またログデータ検索部は、検証者によって指定された割り込み名でログデータ105を検索する処理をおこなう。
Next, a description will be given of the point that the processing different from that of the first embodiment is performed for each functional unit of the above-described software debug program. The source line acquisition unit stores the register access log and interrupt log displayed by the register access log display unit. When a source code display instruction is received from the verifier, the instruction code associated with the log data 105 is referenced to obtain the corresponding number of source code lines. Therefore, the source code display unit displays the source code 132 corresponding to the designated number of lines. Since the correspondence information between the address and the number of lines of the source code 132 is included in the execution format file 102 input to the HW model 112, the HW model 112 causes the log data 105 associated with the instruction address to be output. (It will be described in detail in the configuration of the HW model 112). The log data search unit performs a process of searching the log data 105 with the interrupt name designated by the verifier.

<HWモデルの構成>
つぎに、実施例2のソフトウェアデバッグ支援装置100に適用するHWモデルの構成について説明する。図6は、実施例2におけるHWモデルの構成を示すブロック図である。図6のように、実施例2のデバッグ支援装置100のESLツール110のHWモデル112は、デバッグ用の情報を含んだログデータ105を出力させるために、あらたな機能を含んだ構成になっている。
<Configuration of HW model>
Next, the configuration of the HW model applied to the software debugging support apparatus 100 according to the second embodiment will be described. FIG. 6 is a block diagram illustrating the configuration of the HW model in the second embodiment. As shown in FIG. 6, the HW model 112 of the ESL tool 110 of the debugging support apparatus 100 according to the second embodiment has a configuration including a new function in order to output the log data 105 including information for debugging. Yes.

具体的に説明すると、図6のHWモデル112では、従来のHW機能部600に加えて、レジスタアクセスログ出力部601と、割り込みログ出力部602と、命令アドレス取得部603と、スタックメモリ読み出し部604と、リターンアドレス取得部605とを備えている。   More specifically, in the HW model 112 of FIG. 6, in addition to the conventional HW function unit 600, a register access log output unit 601, an interrupt log output unit 602, an instruction address acquisition unit 603, and a stack memory read unit 604 and a return address acquisition unit 605.

レジスタアクセスログ出力部601は、従来のログ(「従来のログ」とは図29にて説明したログデータを意味する)に加えてデバッグ用の情報をあらたに出力する。割り込みログ出力部602は、従来の割り込みログ(「従来の割り込みログ」とは図30にて説明したログデータを意味する)に加えてデバッグ用の情報をあらたに出力する。命令アドレス取得部603は、レジスタアクセスが発生した時点のプログラムの命令アドレス(プログラムカウンタの値)を取得する。命令アドレスは、ISS111のAPI(Application Program Interface)として用意されているPC取得関数を用いて取得する。   The register access log output unit 601 newly outputs information for debugging in addition to the conventional log (“conventional log” means the log data described with reference to FIG. 29). The interrupt log output unit 602 newly outputs debugging information in addition to the conventional interrupt log (“conventional interrupt log” means the log data described with reference to FIG. 30). The instruction address acquisition unit 603 acquires the instruction address (program counter value) of the program at the time when the register access occurs. The instruction address is acquired using a PC acquisition function prepared as an API (Application Program Interface) of the ISS 111.

スタックメモリ読み出し部604は、ISS111からスタックメモリの内容を読み出す処理をおこなう。このスタックメモリの読み出しもAPIとして用意されているメモリ読み出し関数を用いて実現する。リターンアドレス取得部605は、読み出したスタックメモリの内容から呼び出し元の関数を示すリターンアドレスを取得する処理をおこなう。   The stack memory reading unit 604 performs processing for reading the contents of the stack memory from the ISS 111. This reading of the stack memory is also realized by using a memory reading function prepared as an API. The return address acquisition unit 605 performs processing for acquiring a return address indicating a caller function from the contents of the read stack memory.

<ログの構成>
つぎに、実施例2におけるレジスタアクセスログ、割り込みログそれぞれの構成について説明する。図6にて説明したように、実施例2のHWモデル112は、あらたな機能部601〜605が追加されている。したがって、HWモデル112からは、図30,31にて説明した従来のログや従来の割り込みログにあらたにデバッグ用の情報が追加された構成のログデータ105が出力される。
<Log structure>
Next, the configurations of the register access log and the interrupt log in the second embodiment will be described. As described with reference to FIG. 6, new functional units 601 to 605 are added to the HW model 112 of the second embodiment. Therefore, the HW model 112 outputs log data 105 having a configuration in which information for debugging is newly added to the conventional log and the conventional interrupt log described with reference to FIGS.

図7は、実施例2におけるレジスタアクセスログの構成を示す図表であり、図8は、実施例2における割り込みログの構成を示す図表である。実施例2において、レジスタアクセスに関するログデータは、図7の図表700に示すように従来のログデータの構成に、割り込みID、命令アドレスおよびリターンアドレスが追加された構成になっている。また、図8の図表800に示すように従来のログデータの構成に、割り込み種別、割り込みIDが追加されている。ここで追加されている割り込みIDは、割り込みの原因となるコ
マンド起動レジスタと割り込みを対応付けるために割り当てられるIDである。なお、本実施の形態では、割り込み種別として、下記の4種類に区別された情報を用いる。
FIG. 7 is a chart showing the configuration of the register access log in the second embodiment, and FIG. 8 is a chart showing the configuration of the interrupt log in the second embodiment. In the second embodiment, the log data related to the register access has a configuration in which an interrupt ID, an instruction address, and a return address are added to the configuration of the conventional log data as shown in a chart 700 of FIG. Further, as shown in a chart 800 of FIG. 8, an interrupt type and an interrupt ID are added to the configuration of the conventional log data. The interrupt ID added here is an ID assigned to associate the interrupt with the command activation register that causes the interrupt. In the present embodiment, the following four types of information are used as interrupt types.

・コマンド完了:COM_END
・イネーブル変化:ENABLE
・その他:OTHER
・要因変化:MASKED
-Command completion: COM_END
・ Enable change: ENABLE
・ Others: OTHER
・ Factor change: MASKED

このように、実施例2のHWモデル112では、従来のログデータにデバッグ用の情報が関連付いたあらたなログデータ105を生成する構成になっている。したがって、以下に、HWモデル112が各種実行処理をおこなった場合のログデータ105の出力手順と、出力されたログデータ105を用いソフトウェアデバッグ支援処理について説明する。   As described above, the HW model 112 according to the second embodiment is configured to generate new log data 105 in which debug information is associated with conventional log data. Therefore, the output procedure of the log data 105 when the HW model 112 performs various execution processes and the software debug support process using the output log data 105 will be described below.

<HWモデル実行処理(レジスタアクセスログ出力時)>
まず、HWモデル112におけるレジスタアクセスログ出力時の実行処理の手順を説明する。図9は、HWモデルにおけるレジスタアクセスログ出力時の実行処理の手順を示すフローチャートである。図9において、まず、実行中のプログラムにおいてレジスタアクセスが発生したか否かを判断する(ステップS901)。ここで、レジスタアクセスが発生するまで待ち(ステップS901:Noのループ)、レジスタアクセスが発生すると(ステップS901:Yes)、命令アドレス取得部603によってレジスタアクセス発生時に実行された命令アドレスを取得する(ステップS902)。
<HW model execution processing (when register access log is output)>
First, the procedure of the execution process at the time of register access log output in the HW model 112 will be described. FIG. 9 is a flowchart showing a procedure of execution processing at the time of register access log output in the HW model. In FIG. 9, first, it is determined whether or not a register access has occurred in the program being executed (step S901). Here, it waits until register access occurs (step S901: No loop). When register access occurs (step S901: Yes), the instruction address executed when the register access occurs is acquired by the instruction address acquisition unit 603 ( Step S902).

つぎに、スタックメモリ読み出し部604によってスタックメモリを読み出し(ステップS903)、リターンアドレス取得部605によって、ステップS903によって読み出したスタックメモリの内容を解析し、リターンアドレスが存在する場合は値を保持する(ステップS904)。そして、プログラムの実行結果に加えて、ステップS902にて取得した命令アドレスと、ステップS904にて取得したリターンアドレスとをログデータ105として出力する(ステップS905)。その後、実行させたプログラムに応じてハードウェア構成を実行させて(ステップS906)、一連の処理が終了する。   Next, the stack memory is read out by the stack memory reading unit 604 (step S903), the return address acquisition unit 605 analyzes the contents of the stack memory read out at step S903, and holds the value if there is a return address ( Step S904). Then, in addition to the execution result of the program, the instruction address acquired in step S902 and the return address acquired in step S904 are output as log data 105 (step S905). Thereafter, the hardware configuration is executed in accordance with the executed program (step S906), and a series of processing ends.

このように、HWモデル112は、レジスタアクセスを実行した場合に、このレジスタアクセスの実行を命令したソースコードの命令アドレスを取得し、命令アドレスが関連付いたログデータ105生成され蓄積されている。また、実行したレジスタアクセスにおいてリターンアドレスが存在する場合には、リターンアドレスを併せて取得し、リターンアドレスが関連付いたログデータ105が生成され蓄積されていることになる。   As described above, when the register access is executed, the HW model 112 acquires the instruction address of the source code instructing the execution of the register access, and the log data 105 associated with the instruction address is generated and stored. Further, when there is a return address in the executed register access, the return address is also acquired, and log data 105 associated with the return address is generated and accumulated.

<ソースコード表示処理>
つぎに、上述のようにデバッグ用の情報として各種アドレスを含んだログデータ105を用いたソフトウェアデバッグ支援処理について説明する。ここでは、具体的には、ソフトウェアデバッグプログラム120によってログデータ105から指定したログについてのソースコードを表示させることによって検証者のソフトウェアデバッグを支援する。
<Source code display processing>
Next, software debugging support processing using the log data 105 including various addresses as debugging information as described above will be described. Specifically, the verifier's software debugging is supported by displaying the source code for the log designated from the log data 105 by the software debugging program 120.

図10は、実施例2におけるソフトウェアデバッグプログラムのソースコード表示処理の手順を示すフローチャートである。図10のフローチャートでは、検証者がGUIを使ってレジスタアクセスに対応するソースコード132を表示させる指示をおこなった際の処理をあらわしている。   FIG. 10 is a flowchart illustrating a procedure of source code display processing of the software debug program according to the second embodiment. The flowchart of FIG. 10 shows processing when the verifier issues an instruction to display the source code 132 corresponding to register access using the GUI.

図10において、まず検証者からのGUIの入力を受け付けたか否かを判断する(ステップS1001)。ここで、GUI入力を受け付けたと判断されるまで待ち(ステップS1001:Noのループ)、GUI入力を受け付けると(ステップS1001:Yes)
、受け付けたGUI入力がソース表示指示か呼び出し元関数表示指示かを確認するための処理に移行する。
In FIG. 10, it is first determined whether or not a GUI input from the verifier has been received (step S1001). Here, it waits until it is determined that the GUI input is accepted (step S1001: No loop), and when the GUI input is accepted (step S1001: Yes).
Then, the process proceeds to a process for confirming whether the received GUI input is a source display instruction or a caller function display instruction.

まず、受け付けたGUI入力がソース表示指示か否かを判断する(ステップS1002)。ここで、受け付けたGUI入力がソース表示指示であった場合(ステップS1002:Yes)、ソース表示をおこなうため、指定アクセス部分の命令アドレスを取得し(ステップS1003)、さらに、取得した命令アドレスに対応するソース行番号を取得する(ステップS1004)。そして、取得したソース行番号を参照してソースコードを表示し(ステップS1005)、一連の処理を終了する。   First, it is determined whether or not the received GUI input is a source display instruction (step S1002). Here, when the received GUI input is a source display instruction (step S1002: Yes), the instruction address of the designated access portion is acquired to perform source display (step S1003), and further, the instruction address is supported. The source line number to be acquired is acquired (step S1004). Then, the source code is displayed with reference to the acquired source line number (step S1005), and the series of processes is terminated.

一方、ステップS1002において、ソース表示指示ではなかった場合(ステップS1002:No)、呼び出し元表示指示と判断し、リターンアドレスがあるか否かを判断する(ステップS1006)。ここで、リターンアドレスがあると判断された場合は(ステップS1006:Yes)、リターンアドレスを取得し(ステップS1007)、リターンアドレスに対応するソース行番号を取得する(ステップS1008)。そして、取得したソース行番号を参照してソースコードを表示し(ステップS1009)、一連の処理を終了する。以上説明したステップS1005およびステップS1009のソースコード表示処理では、表示対象部分のソースコードがGUI130上に表示される。また、ステップS1006において、リターンアドレスがないと判断された場合(ステップS1006:No)、そのまま一連の処理を終了する。   On the other hand, if it is not a source display instruction in step S1002 (step S1002: No), it is determined as a caller display instruction, and it is determined whether there is a return address (step S1006). If it is determined that there is a return address (step S1006: Yes), the return address is acquired (step S1007), and the source line number corresponding to the return address is acquired (step S1008). Then, the source code is displayed with reference to the acquired source line number (step S1009), and the series of processes is terminated. In the source code display process of step S1005 and step S1009 described above, the source code of the display target portion is displayed on the GUI 130. If it is determined in step S1006 that there is no return address (step S1006: No), the series of processing ends.

このように、ソフトウェアデバッグ支援装置100のHWモデル112によって事前に出力されたレジスタアクセスログを用いて、ソフトウェアデバッグプログラム120がレジスタアクセスの実行元となる命令アドレスやリターンアドレスに対応するソースコード132を自動的に抽出する。抽出されたソースコード132は、GUI130によってレジスタアクセスログ131と対応付けられた情報として表示され、検証者によるソフトウェアデバッグ用の情報として提供される。   Thus, using the register access log output in advance by the HW model 112 of the software debug support apparatus 100, the software debug program 120 generates the source code 132 corresponding to the instruction address and return address from which the register access is executed. Extract automatically. The extracted source code 132 is displayed as information associated with the register access log 131 by the GUI 130, and is provided as information for software debugging by the verifier.

<HWモデル実行処理(割り込みログ出力時)>
つぎに、HWモデル112の実行処理によって割り込みが発生した場合の割り込みログ出力について説明する。図11は、HWモデルにおける割り込みログ出力時の実行処理の手順を示すフローチャートである。割り込み処理は、レジスタライトが発生した際にそのレジスタが、(ア)コマンド起動レジスタ、(イ)割り込みマスク/イネーブルレジスタ、(ウ)それ以外である場合におこなわれる。したがって、レジスタライトが上述の(ア)〜(ウ)のいずれかを確認した後、それぞれの場合に応じた処理をおこなう。
<HW model execution process (when interrupt log is output)>
Next, output of an interrupt log when an interrupt is generated by the execution process of the HW model 112 will be described. FIG. 11 is a flowchart showing a procedure of execution processing at the time of interrupt log output in the HW model. Interrupt processing is performed when a register write occurs when the register is (a) a command activation register, (b) an interrupt mask / enable register, or (c) any other register. Therefore, after register write confirms any one of the above (a) to (c), processing corresponding to each case is performed.

図11のフローチャートにおいて、まず、レジスタライトが発生したか否かを判断する(ステップS1101)。ここで、レジスタライトが発生するまで待ち(ステップS1101:Noのループ)、レジスタライトが発生すると(ステップS1101:Yes)、つぎに、ステップS1101において、ライトされたレジスタが起動レジスタであるか否かを判断する(ステップS1102)。   In the flowchart of FIG. 11, it is first determined whether or not a register write has occurred (step S1101). Here, the process waits until register write occurs (step S1101: No loop). When register write occurs (step S1101: Yes), next, in step S1101, whether or not the written register is an activation register. Is determined (step S1102).

このステップS1102において、ライトされたレジスタが起動レジスタであると(ステップS1102:Yes)、上述した(ア)の場合と判断される。したがって、まず、割り込みIDを割り当て(ステップS1103)、アクセスログを出力し(ステップS1104)、HW処理を実行する(ステップS1105)。そして、ステップS1105のHW処理実行後、割り込みが発生するか否かを判断して(ステップS1106)、割り込みが発生すると判断された場合には(ステップS1106:Yes)、割り込みを実行させる(ステップS1107)。そして、ステップ1107にて実行した割り込み処理のログを出力して(ステップS1108)、一連の処理を終了する。また、ステップS110
5のHW処理実行後、割り込みが発生しないと判断された場合には(ステップS1106:No)、そのまま一連の処理を終了する。
In step S1102, if the written register is the activation register (step S1102: Yes), it is determined that the above-mentioned case (a) is present. Therefore, first, an interrupt ID is assigned (step S1103), an access log is output (step S1104), and HW processing is executed (step S1105). Then, after executing the HW process in step S1105, it is determined whether or not an interrupt occurs (step S1106). If it is determined that an interrupt occurs (step S1106: Yes), the interrupt is executed (step S1107). ). Then, a log of the interrupt process executed in step 1107 is output (step S1108), and the series of processes is terminated. Step S110
When it is determined that no interruption occurs after the execution of the HW process No. 5 (step S1106: No), the series of processes is terminated as it is.

一方、ステップS1102において、ライトしたレジスタが起動レジスタでなかったとすると(ステップS1102:No)、上述した(イ)また(ウ)の場合と判断される。したがって、今度は、ライトしたレジスタがマスク/イネーブルレジスタか否かを判断する(ステップS1109)。ここで、アクセスしたレジスタがマスク/イネーブルレジスタのいずれかであれば(ステップS1109:Yes)、(イ)の場合と判断される。したがって、マスク/イネーブルレジスタのアクセスログを出力し(ステップS1110)、さらに、割り込みが発生するか否かを判断する(ステップS1111)。   On the other hand, if it is determined in step S1102 that the written register is not a start register (step S1102: No), it is determined that the above-described cases (a) and (c) are present. Therefore, this time, it is determined whether or not the written register is a mask / enable register (step S1109). Here, if the accessed register is one of the mask / enable registers (step S1109: Yes), it is determined that the case is (A). Therefore, the access log of the mask / enable register is output (step S1110), and it is further determined whether or not an interrupt occurs (step S1111).

ステップS1111において、割り込みが発生すると判断された場合には(ステップS1111:Yes)、そのまま、割り込み処理を実行させる(ステップS1112)。そして、ステップ1112にて実行した割り込み処理のログを出力して(ステップS1113)、一連の処理を終了する。なお、ステップS1111において、割り込みが発生しないと判断された場合には(ステップS1111:No)、そのまま一連の処理を終了する。   If it is determined in step S1111 that an interrupt will occur (step S1111: Yes), the interrupt process is executed as it is (step S1112). Then, a log of the interrupt process executed in step 1112 is output (step S1113), and the series of processes is terminated. If it is determined in step S1111 that no interrupt occurs (step S1111: No), the series of processing ends.

そして、ステップS1109において、アクセスしたレジスタがマスク/イネーブルレジスタのいずれでもなければ(ステップS1109:No)、(ウ)の場合と判断される。したがって、アクセスしたレジスタは、起動レジスタ、マスク/イネーブルレジスタのいずれにも該当しないその他のレジスタとしてアクセスログを出力して(ステップS1114)、一連の処理を終了する。   In step S1109, if the accessed register is neither a mask / enable register (step S1109: No), it is determined that the case is (c). Therefore, the accessed register outputs an access log as another register that does not correspond to either the activation register or the mask / enable register (step S1114), and the series of processing ends.

<割り込み対応レジスタ表示処理>
つぎに、図11の処理によってHWモデル112から出力されたログデータ105を用いて、割り込みに対応する起動レジスタの表示処理の手順について説明する。図12は、実施例2におけるソフトウェアデバッグプログラムの割り込み対応レジスタの表示処理の手順を示すフローチャートである。ここでは、ソフトウェアデバッグプログラム120は、検証者からGUI130を介して割り込み原因表示指示があった場合、割り込みログの割り込み種別が(A)マスク/イネーブル変化による割り込み、(B)コマンド完了による通常の割り込み、(C)それ以外の割り込みのいずれであるかを確認して、それぞれの割り込み種別に応じた表示処理をおこなう。
<Interrupt-compatible register display processing>
Next, a procedure of display processing of the activation register corresponding to the interrupt will be described using the log data 105 output from the HW model 112 by the processing of FIG. FIG. 12 is a flowchart illustrating the display processing procedure of the interrupt-compatible register of the software debug program according to the second embodiment. Here, when the verifier gives an instruction to display an interrupt cause through the GUI 130, the software debug program 120 has (A) an interrupt due to a change in mask / enable and (B) a normal interrupt due to completion of a command. (C) It is confirmed which of the other interrupts, and display processing corresponding to each interrupt type is performed.

図12のフローチャートにおいて、まず、検証者から割り込み原因表示指示を受け付けたか否かを判断する(ステップS1201)。ここで、割り込み原因表示指示を受け付けるまで待ち(ステップS1201:Noのループ)、割り込み原因表示指示を受け付けると(ステップS1201:Yes)、つぎに、割り込みの発生原因はマスク/イネーブル変化によるか否かを判断する(ステップS1202)。このステップS1202における割り込み発生原因の判別は、ログデータ105に含まれている情報の中の割り込み種別を参照する。   In the flowchart of FIG. 12, it is first determined whether or not an interrupt cause display instruction has been received from the verifier (step S1201). Here, the process waits until an interrupt cause display instruction is accepted (step S1201: No loop). When an interrupt cause display instruction is accepted (step S1201: Yes), whether or not the cause of the interrupt is due to a mask / enable change is determined. Is determined (step S1202). In step S1202, the cause of the interrupt occurrence is determined by referring to the interrupt type in the information included in the log data 105.

ステップS1202において、割り込み発生原因が(A)マスク/イネーブル変化であった場合(ステップS1202:Yes)、まず、ログデータ105から割り込み要因を取得し(ステップS1203)、取得した割り込み要因でログを検索する(ステップS1204)。そして、その割り込みが発生した時間より前の時間で一番近い位置の割り込み要因変化部分を探し、その割り込みIDを取得する(ステップS1205)。その後、ステップS1205にて取得した割り込みIDによってログデータ105を検索し(ステップS1206)、対応するレジスタアクセスを特定し、GUI130上に表示して(ステップS1207)、一連の処理を終了する。   In step S1202, if the cause of the interrupt is (A) mask / enable change (step S1202: Yes), first, the interrupt factor is acquired from the log data 105 (step S1203), and the log is searched with the acquired interrupt factor. (Step S1204). Then, the interrupt factor change portion at the closest position before the time when the interrupt occurs is searched for, and the interrupt ID is acquired (step S1205). Thereafter, the log data 105 is searched with the interrupt ID acquired in step S1205 (step S1206), the corresponding register access is specified, displayed on the GUI 130 (step S1207), and the series of processing is terminated.

一方、ステップS1202において、割り込み発生原因が(A)ではない場合(ステップS1202:No)、さらに(B)コマンド完了による通常の割り込みであるか否かを判断し(ステップS1208)、(B)の割り込みであった場合(ステップS1208:Yes)、割り込みログからIDを取得し(ステップS1209)、そのIDでログを検索し(ステップS1210)、対応するレジスタアクセスを特定してGUI上に表示して(ステップS1211)、一連の処理を終了する。   On the other hand, if the cause of the interruption is not (A) in step S1202 (step S1202: No), it is further determined whether or not (B) a normal interruption due to command completion (step S1208). If it is an interrupt (step S1208: Yes), the ID is acquired from the interrupt log (step S1209), the log is searched with the ID (step S1210), the corresponding register access is identified and displayed on the GUI. (Step S1211), a series of processing ends.

また、ステップ1208において(B)の割り込みでなかった場合(ステップS1208:No)、(C)それ以外の割り込みであると判断される。したがって、GUI130に割り込みに対応する起動レジスタが無いというメッセージのみを表示して(ステップS1212)、一連の処理を終了する。   If the interrupt is not (B) in step 1208 (step S1208: No), (C) it is determined that the interrupt is other than that. Therefore, only a message indicating that there is no activation register corresponding to the interrupt in the GUI 130 is displayed (step S1212), and the series of processing ends.

<ログデータの出力例>
ここで、図13−1〜図13−3は、ログデータの出力例を示す説明図である。図13−1は、上述した(A)の場合に出力されるログデータ105である。具体的には、イネーブルレジスタへの書き込みにより割り込みが発生する場合であり、2行目の割り込みイネーブルレジスタへの書き込みにより割り込みが無効となっている。また、3行目のコマンド起動レジスタへの書き込みによりHWモデル112の処理が開始される(起動レジスタID:0x324)。
<Output example of log data>
Here, FIGS. 13A to 13C are explanatory diagrams illustrating output examples of log data. FIG. 13A is log data 105 output in the case of (A) described above. Specifically, an interrupt is generated by writing to the enable register, and the interrupt is invalidated by writing to the interrupt enable register in the second row. The processing of the HW model 112 is started by writing to the command activation register on the third line (activation register ID: 0x324).

さらに、10行目でコマンド完了により割り込み要因レジスタの値が変化し、割り込み状態となっている。このとき、割り込みが無効となっているため、実際に割り込みは発生しない。そしてログデータ105には起動レジスタのIDに対応する0x324が記録されている。また、12行目の割り込みイネーブルレジスタへの書き込みにより割り込みが有効となっている。その結果、13行目において、10行目で割り込み状態となっていた割り込みが発生している。ここでは、イネーブルレジスタ変更による割り込み発生のため、割り込みIDは記録されない。   Furthermore, on the 10th line, the value of the interrupt factor register changes upon completion of the command, and an interrupt state is entered. At this time, since the interrupt is invalid, no interrupt actually occurs. In the log data 105, 0x324 corresponding to the ID of the activation register is recorded. Also, the interrupt is enabled by writing to the interrupt enable register on the 12th row. As a result, on the 13th line, an interrupt that has been in the interrupt state on the 10th line is generated. Here, the interrupt ID is not recorded because an interrupt is generated by changing the enable register.

つぎに、図13−2は、上述した(B)の場合に出力されるログデータ105である。起動コマンドの完了に伴った割り込みが発生する場合となっている。さらに、図13−3は、上述した(C)の場合に出力されるログデータ105である。(C)の場合、起動/マスク/イネーブルレジスタとは関係なく発生する割り込み(エラーなど)をあらわしている(たとえば、9行目のように起動/マスク/イネーブルレジスタとは関係のないエラーによる割り込み)。上述したように、(C)の割り込みの場合、対応するIDがないため割り込みIDは記録されない。   Next, FIG. 13B is log data 105 output in the case of (B) described above. An interrupt occurs when the start command is completed. Further, FIG. 13C is the log data 105 output in the case of (C) described above. In the case of (C), an interrupt (error or the like) that occurs regardless of the start / mask / enable register is indicated (for example, an interrupt due to an error that is not related to the start / mask / enable register as in the ninth line). ). As described above, in the case of the interrupt of (C), the interrupt ID is not recorded because there is no corresponding ID.

このように、ソフトウェアデバッグ支援装置100のHWモデル112によって割り込みが発生すると、割り込みの種別に応じて、割り込みに対応する起動レジスタへのアクセスを表示され、検証者によるソフトウェアデバッグ用の情報として提供される。また、割り込み要因がわからない場合には、その旨を示すメッセージを出力することもできる。   As described above, when an interrupt is generated by the HW model 112 of the software debugging support apparatus 100, the access to the activation register corresponding to the interrupt is displayed according to the type of the interrupt, and is provided as information for software debugging by the verifier. The If the cause of the interruption is not known, a message indicating that can be output.

(デバッグ処理の手順)
つぎに、本実施の形態にかかるデバッグ処理の手順について説明する。図14は、本実施の形態にかかるデバッグ処理の手順を示すフローチャートである。上述したように、本実施の形態では、ソフトウェアデバッグプログラム120によってデバッグ支援処理をおこなうことによって指定した箇所に対応するソースコードが表示される。検証者は、表示されたソースコードから検証箇所を確認して、適宜ソースコードの修正をおこなう。
(Debugging process procedure)
Next, the procedure of debugging processing according to this embodiment will be described. FIG. 14 is a flowchart illustrating a procedure of debugging processing according to the present embodiment. As described above, in the present embodiment, the source code corresponding to the location specified by performing the debug support process by the software debug program 120 is displayed. The verifier checks the verification portion from the displayed source code and corrects the source code as appropriate.

デバッグ処理について説明すると、図14のフローチャートにおいて、まず、バッチ処
理により複数のテストパターンを連続実行する(ステップS1401)。そして実行結果と期待値との比較結果が正しいか否かを判断する(ステップS1402)。ここで、比較結果が正しいと判断された場合は(ステップS1402:Yes)、ソースコードにバグは含まれないため、そのまま一連の処理を終了する。
The debugging process will be described. In the flowchart of FIG. 14, first, a plurality of test patterns are continuously executed by batch processing (step S1401). Then, it is determined whether or not the comparison result between the execution result and the expected value is correct (step S1402). Here, when it is determined that the comparison result is correct (step S1402: Yes), the bug is not included in the source code, and thus the series of processing is ended as it is.

一方、ステップS1402において、比較結果が正しくないと判断された場合は(ステップS1402:No)、デバッグ支援処理によって再度アクセスログ、割り込みログのソースコードを確認する(ステップS1403)。そして、ステップ1403のソースコードの確認処理によって問題部分を特定できたか否かを判断する(ステップS1404)。ここで、問題部分が特定できた場合は(ステップS1404:Yes)、問題部分のファームを修正し(ステップS1405)、ステップS1401の処理に戻り、再度バッチ処理を実行する。   On the other hand, if it is determined in step S1402 that the comparison result is not correct (step S1402: No), the source code of the access log and interrupt log is confirmed again by the debug support process (step S1403). Then, it is determined whether or not the problematic part has been identified by the source code checking process in step 1403 (step S1404). If the problem part can be identified (step S1404: Yes), the problem part firmware is corrected (step S1405), the process returns to step S1401, and the batch process is executed again.

また、ステップS1404において、問題部分が特定できなかった場合(ステップS1404:No)、従来手法を用いてソースコードを詳細に調査して問題特定し(ステップS1406)、ステップS1405の処理に移行する。このように、ソフトウェアデバッグ支援装置100では、ソースコード修正後のソフトウェアのデバッグ処理を繰り返すことにより検証精度を向上させることができる。   In step S1404, if the problem part cannot be identified (step S1404: No), the source code is investigated in detail using a conventional method to identify the problem (step S1406), and the process proceeds to step S1405. As described above, the software debugging support apparatus 100 can improve the verification accuracy by repeating the software debugging process after the source code correction.

以上説明したように、実施例2では下記のような機能が実現される。したがって、検証者へデバッグに必要となるソースコードに関する情報を自動的に提供可能となりファーム開発期間を短縮できる。
・デバッガでレジスタログ/割り込みログ表示
・レジスタアクセスとソースとの対応表示
・ログデータ内の指定された割り込み処理についての割り込みの原因(レジスタアクセスログ)表示
・指定された起動レジスタアクセス部分のソースコード表示
As described above, the following functions are realized in the second embodiment. Therefore, it is possible to automatically provide the verifier with information on the source code necessary for debugging, and the farm development period can be shortened.
-Register log / interrupt log display with debugger-Correspondence display between register access and source-Cause of interrupt (register access log) for specified interrupt processing in log data-Source code of specified start register access part display

(表示例)
つぎに、実施例2のソフトウェアデバッグ支援装置100を利用して、検証者がレジスタアクセスに対応するソースコードを表示させる場合と、割り込みに対応する起動レジスタを表示させる場合について具体例を挙げて説明する。
(Display example)
Next, the case where the verifier displays the source code corresponding to the register access and the case where the activation register corresponding to the interrupt is displayed using the software debugging support apparatus 100 according to the second embodiment will be described with specific examples. To do.

<SoCの構成>
まず、SoCの構成について説明する。図15は、SoCの構成例を示すブロック図である。以下表示例はいずれも図15のSoC1500によって検証対象ソフトウェアが例の説明に使用するSoC例のブロック図を示す。SoC1500では、CPU上のファームからブロックA、ブロックB、ブロックCの制御をおこなう。
<Structure of SoC>
First, the configuration of SoC will be described. FIG. 15 is a block diagram illustrating a configuration example of SoC. The following display examples show block diagrams of SoC examples used by the verification target software to explain the examples by the SoC 1500 in FIG. In the SoC 1500, block A, block B, and block C are controlled from the firmware on the CPU.

<ソースコード表示時>
つぎに、ソースコード表示時の表示例について説明する。ここでは、まずソースコード表示時のHWモデルの処理について説明した後、GUIへの表示例について説明する。
<When displaying source code>
Next, a display example when displaying source code will be described. Here, the processing of the HW model at the time of displaying the source code will be described first, and then a display example on the GUI will be described.

・HWモデルのシーケンス
図16は、ソースコード表示時のHWモデルの処理を示すシーケンス図である。図16では、通常のレジスタ(コマンド起動レジスタではない)にアクセスする際の処理を示している。まず、ISS(ファーム)111によるレジスタアクセスが発生すると、HWモデル112では、命令アドレスを取得する(ステップS1601)。ステップS1601では、HWモデル112は、ISS111に対して命令アドレスの出力を要求する。この要求に応答してISS111から命令アドレスが送信されることによってHWモデル11
2が命令アドレスを取得することができる。
HW Model Sequence FIG. 16 is a sequence diagram showing processing of the HW model when displaying source code. FIG. 16 shows processing when accessing a normal register (not a command activation register). First, when a register access by the ISS (firm) 111 occurs, the HW model 112 acquires an instruction address (step S1601). In step S1601, the HW model 112 requests the ISS 111 to output an instruction address. In response to this request, an instruction address is transmitted from the ISS 111, whereby the HW model 11
2 can obtain the instruction address.

続いて、HWモデル112は、取得した命令アドレスを参照してISS111からスタックメモリの内容を読み出す(ステップS1602)。このステップS1602の処理もステップS1601と同様に、HWモデル112からISS111へスタックメモリの読み出しを要求することによって実現される。そして、HWモデル112は、ステップS1602によって読み出したスタックメモリからリターンアドレスを取り出し(ステップS1603)、命令アドレスと、リターンアドレスを加えたレジスタアクセスログを出力し(ステップS1604)、最後に実際のハード処理を実行する(ステップS1605)。   Subsequently, the HW model 112 reads the contents of the stack memory from the ISS 111 with reference to the acquired instruction address (step S1602). Similar to step S1601, the processing in step S1602 is also realized by requesting reading of the stack memory from the HW model 112 to the ISS 111. The HW model 112 extracts the return address from the stack memory read in step S1602 (step S1603), outputs a register access log to which the instruction address and the return address are added (step S1604), and finally the actual hardware processing Is executed (step S1605).

・GUIの表示例
つぎに、ソースコード表示時のGUIの表示例について説明する。図17は、ソースコード表示時のGUIの表示例を示す説明図である。上述した図13-1はこの時のレジス
タアクセスログである。図17のように、ソースコード表示時には、複数のウィンドウが表示される。そして、たとえば、上側のウィンドウ1701にレジスタアクセス・割り込みログを表示し、下側のウィンドウ1702にソースコードを表示させる。図17の表示例では、レジスタアクセスログのBLOCK_A__IRQ_CLEARレジスタへの書き込みを指定し、ソースコード表示ボタンBをクリックすることによって、ソースコード表示画面にレジスタアクセスに対応するソースコード行「write_reg(BLOCK_A__IRQ_CLEAR,int_clear);」が表示されている。
GUI Display Example Next, a GUI display example when displaying source code will be described. FIG. 17 is an explanatory diagram illustrating a display example of a GUI when displaying source code. FIG. 13-1 described above is a register access log at this time. As shown in FIG. 17, a plurality of windows are displayed when the source code is displayed. Then, for example, the register access / interrupt log is displayed in the upper window 1701, and the source code is displayed in the lower window 1702. In the display example of FIG. 17, by designating writing of the register access log to the BLOCK_A__IRQ_CLEAR register and clicking the source code display button B, the source code line “write_reg (BLOCK_A__IRQ_CLEAR, int_clear) corresponding to the register access is displayed on the source code display screen. ); ”Is displayed.

ソフトウェアデバッグプログラム120の動作としては、レジスタアクセスログの時間536465におけるBLOCK_A__IRQ_CLEARレジスタへの書き込みの際、実行形式ファイル内のデバッグ情報から、命令アドレス0xB588に対応するソースコード行を求める。そして、その行数のソースコードをソース表示ウィンドウに表示させる。さらに、ソフトウェアデバッグプログラム120は、ソースコードウィンドウの呼び出し元関数表示ボタンCがクリックされると、呼び出し元関数のソースコードを表示させる。   As an operation of the software debug program 120, when writing to the BLOCK_A__IRQ_CLEAR register at time 536465 of the register access log, a source code line corresponding to the instruction address 0xB588 is obtained from the debug information in the execution format file. Then, the source code of the number of lines is displayed in the source display window. Further, when the caller function display button C in the source code window is clicked, the software debug program 120 displays the source code of the caller function.

<割り込み発生時>
つぎに、割り込み発生時の表示例について説明する。ここでも、まず割り込み発生時のHWモデルの処理について説明した後、GUIへの表示例について説明する。
<When an interrupt occurs>
Next, a display example when an interrupt occurs will be described. Here, first, the processing of the HW model when an interrupt occurs will be described, and then a display example on the GUI will be described.

・HWモデルのシーケンス
図18−1〜図18−3は、割り込みログ出力時のHWモデルの処理例を示すシーケンス図である。図18−1では、HWモデル112において(ア)のコマンド起動レジスタの割り込みが発生した場合のシーケンスを示している。図18−1のように、ISS111からのコマンド起動レジスタへの書き込みが発生すると、HWモデル112では、割り込みID0x324が割り当てられる(ステップS1811)。そして、割り込みIDを含むレジスタアクセスログが出力される(ステップS1812)。
HW Model Sequence FIGS. 18A to 18C are sequence diagrams illustrating a processing example of the HW model at the time of interrupt log output. FIG. 18A shows a sequence when an interrupt of the command activation register (a) occurs in the HW model 112. As shown in FIG. 18A, when writing to the command activation register from the ISS 111 occurs, the HW model 112 is assigned an interrupt ID 0x324 (step S1811). Then, a register access log including the interrupt ID is output (step S1812).

その後、HWモデル112における時間経過を実現するためにタイマー設定がおこなわれ(ステップS1813)、ISS111に送信される。ISS111は、タイマー設定に応答して指定サイクル経過後にタイマーイベントが発生する。なお、タイマー設定およびタイマーイベント発生はISS111のAPIに用意されているものとする。   Thereafter, a timer setting is performed in order to realize the passage of time in the HW model 112 (step S1813), and the data is transmitted to the ISS 111. In response to the timer setting, the ISS 111 generates a timer event after a specified cycle has elapsed. It is assumed that timer setting and timer event generation are provided in the API of ISS 111.

HWモデル112はISS111からのタイマーイベントを受け付けると、ハードウェア処理を実行し(ステップS1814)、その後、割り込みを発生させ(ステップS1815)、割り込みID0x324の割り込みログをログデータ105として出力する(ステップS1816)。   When the HW model 112 receives a timer event from the ISS 111, it executes a hardware process (step S1814), thereafter generates an interrupt (step S1815), and outputs the interrupt log of the interrupt ID 0x324 as the log data 105 (step S1816). ).

つぎに、図18−2は、割り込みログ出力時のHWモデルの処理例(その2)を示すシーケンス図である。HWモデル112において(イ)の割り込みマスク/イネーブルレジスタの割り込みが発生した場合のシーケンスを示している。図18−2のように、ISS111からのコマンド起動レジスタへの書き込みが発生すると、HWモデル112では、ハードウェア処理が実行される(ステップS1821)。そして、ステップS1821の処理完了に伴い、割り込み要因が変化する(ステップS1822)   Next, FIG. 18-2 is a sequence diagram illustrating a processing example (part 2) of the HW model at the time of interrupt log output. The sequence when the interrupt of the interrupt mask / enable register (a) occurs in the HW model 112 is shown. As shown in FIG. 18-2, when writing to the command activation register from the ISS 111 occurs, the hardware processing is executed in the HW model 112 (step S1821). Then, the interrupt factor changes with the completion of the process of step S1821 (step S1822).

そして、ISS111によって割り込みイネーブルレジスタを有効にされると、さらに、ISS111からのマスク/イネーブルレジスタ書き込みにより、HWモデル112は、割り込みが有効となる(ステップS1823)。そして、HWモデル112は、レジスタアクセスログを出力した後(ステップS1824)、イネーブルレジスタの値と、割り込み要因レジスタの値を確認して割り込みを発生させるかどうかチェックする(ステップS1825)。図18−2の例では、事前に割り込み状態となっているため割り込みを発生させ(ステップS1826)、割り込みログを出力する(ステップS1827)。この場合、対応する起動レジスタがないため、割り込みIDは記録されない。   When the interrupt enable register is enabled by the ISS 111, the HW model 112 further enables the interrupt by writing the mask / enable register from the ISS 111 (step S1823). Then, after outputting the register access log (step S1824), the HW model 112 checks the value of the enable register and the value of the interrupt factor register to check whether or not to generate an interrupt (step S1825). In the example of FIG. 18-2, since an interrupt state has been entered in advance, an interrupt is generated (step S1826), and an interrupt log is output (step S1827). In this case, no interrupt ID is recorded because there is no corresponding activation register.

また、図18−3のシーケンスでは、図11における(ウ)のようにコマンド起動/割り込みマスク/割り込みイネーブルレジスタ以外で割り込みに関係のないレジスタへの書き込みがおこなわれる場合のHWモデル112の手順を示している。図18−3のように、ISS111からのレジスタ書き込み(起動/マスク/イネーブル以外)に応答して、HWモデル112では、レジスタアクセスログを出力する(ステップS1831)。なお、ステップS1831の処理の際、HWモデル112は、割り込み処理自体は未発生であるため、割り込みログは出力しない。   Also, in the sequence of FIG. 18-3, the procedure of the HW model 112 when writing to a register other than the command activation / interrupt mask / interrupt enable register other than the interrupt as shown in FIG. Show. As shown in FIG. 18-3, in response to register writing (other than activation / mask / enable) from the ISS 111, the HW model 112 outputs a register access log (step S1831). In the process of step S1831, the HW model 112 does not generate an interrupt log because the interrupt process itself has not occurred.

・GUIの表示例
[マスク/イネーブル変化による割り込み発生時]
つぎに、マスク/イネーブル変化による割り込み発生時のGUIの表示例について説明する。図19−1および図19−2は、マスク/イネーブル変化による割り込み発生時のGUI表示例を示す説明図である。図19−1では、図14において(A)のイネーブル変化による割り込みに相当するログ例である。
-GUI display example [When interrupt occurs due to mask / enable change]
Next, an example of GUI display when an interrupt occurs due to a mask / enable change will be described. 19A and 19B are explanatory diagrams illustrating GUI display examples when an interrupt is generated due to a mask / enable change. FIG. 19A is a log example corresponding to the interrupt due to the enable change in FIG.

レジスタアクセスの中から検証者によって検証対象となる割り込みの指定を受け付けた後、割り込み原因表示ボタンAをクリックすることによって、対応する割り込み要因変化ログ、起動レジスタ書き込みが表示される。ソフトウェアデバッグプログラム120では、まず指定された割り込みログの割り込み種別を確認する。このとき割り込み種別は、イネーブル(ENABLE)となっているため、割り込み要因の値「BLOCK_A_INT_DEC_DONE」で時間的に前方向のログを検索し、一番近い位置の要因変化(MASKED)で割り込み要因が同じログを探す。表示例では、一番近い位置として10行目に見つかり、その時点で割り込みID(0x324)が確定する。その後、ID0x324でログを検索し、対応するBLOCK_A_DEC_STARTレジスタへの書き込みアクセスを表示する。割り込み要因も表示する。   After accepting the designation of the interrupt to be verified by the verifier from the register access, when the interrupt cause display button A is clicked, the corresponding interrupt factor change log and activation register write are displayed. The software debug program 120 first checks the interrupt type of the specified interrupt log. At this time, since the interrupt type is enabled (ENABLE), the log of the forward direction is searched with the value “BLOCK_A_INT_DEC_DONE” of the interrupt factor, and the interrupt factor is the same with the factor change (MASKED) at the nearest position. Search for logs. In the display example, the closest position is found on the 10th line, and the interrupt ID (0x324) is determined at that time. Thereafter, the log is searched with ID0x324, and the write access to the corresponding BLOCK_A_DEC_START register is displayed. The interrupt factor is also displayed.

また、図19−2では、図19−1と同様に図14において(A)のイネーブル変化による割り込みであるが、割り込み要因変化部分のログをGUIに表示しない場合を示している(検証者によって割り込み原因表示ボタンAがクリックされなかった)。このとき、ソフトウェアデバッグプログラム120の処理は、図19−1と同様のものとなる。   Further, FIG. 19-2 shows the case where the interrupt due to the enable change in FIG. 14A is similar to FIG. 19A, but the log of the interrupt factor change portion is not displayed on the GUI (by the verifier). The interrupt cause display button A was not clicked). At this time, the processing of the software debug program 120 is the same as that in FIG.

[コマンド完了による割り込み発生時]
つぎに、コマンド完了による割り込み発生時のGUI表示例について説明する。図20
は、コマンド完了による割り込み発生時のGUI表示例を示す説明図である。図20では、図14における(B)の起動コマンドに対応する完了割り込みが発生した場合に表示をあらわしている。
[When an interrupt occurs due to command completion]
Next, an example of GUI display when an interrupt occurs due to command completion will be described. FIG.
These are explanatory drawings showing a GUI display example when an interrupt occurs due to command completion. FIG. 20 shows a display when a completion interrupt corresponding to the activation command (B) in FIG. 14 occurs.

図20のように、割り込み原因表示ボタンAをクリックすることにより対応する起動レジスタ書き込みが表示される。このとき、ソフトウェアデバッグプログラム120は、割り込みログの割り込みID0x324で割り込みログを検索する。そして、対応する、時間525650の「BLOCK_A__DEC_START」レジスタへの書き込みアクセスを表示する。さらに、ソースコード表示ボタンBがクリックされると、BLOCK_A__DEC_STARTレジスタへの書き込み部分のソースコードを表示させる。   As shown in FIG. 20, when the interrupt cause display button A is clicked, the corresponding start register writing is displayed. At this time, the software debug program 120 searches the interrupt log with the interrupt ID 0x324 of the interrupt log. It then displays the corresponding write access to the “BLOCK_A__DEC_START” register at time 525650. Further, when the source code display button B is clicked, the source code of the part written to the BLOCK_A__DEC_START register is displayed.

[その他の割り込み発生時]
最後に、上述したマスク/イネーブル変化およびコマンド完了以外の要因による割り込み発生時のGUIの表示例について説明する。図21は、その他の割り込み発生時のGUI表示例を示す説明図である。図21のウィンドウ2100の表示例は、図12にて説明した(C)起動/マスク/イネーブルレジスタとは関係なく発生する割り込み(エラーなど)の場合の表示例である。
[When other interrupts occur]
Finally, a GUI display example when an interrupt occurs due to a factor other than the mask / enable change and command completion described above will be described. FIG. 21 is an explanatory diagram showing a GUI display example when another interrupt occurs. The display example of the window 2100 in FIG. 21 is a display example in the case of an interrupt (such as an error) that occurs regardless of (C) the start / mask / enable register described in FIG.

上述したように、マスク/イネーブル変化およびコマンド完了以外の要因によって発生した割り込みログの場合、特定のレジスタが関連付けられていない。したがって、割り込み原因表示ボタンAをクリックすると、図21のように、「割り込み原因起動レジスタなし」とのメッセージが表示される。このとき、ソフトウェアデバッグプログラム120では、まず、指定された割り込みログについて、ログデータ105を参照して割り込み種別を確認する。割り込み種別はOTHER(その他)となっているため、ソフトウェアデバッグプログラム120は、対応する起動レジスタなしとして、GUI130上に表示させるように動作する。   As described above, in the case of an interrupt log generated by a factor other than mask / enable change and command completion, a specific register is not associated. Therefore, when the interrupt cause display button A is clicked, a message “no interrupt cause activation register” is displayed as shown in FIG. At this time, the software debug program 120 first confirms the interrupt type with reference to the log data 105 for the specified interrupt log. Since the interrupt type is OTHER (others), the software debug program 120 operates to display on the GUI 130 with no corresponding activation register.

このように、本実施の形態では、従来のログデータを用いて指定したレジスタへのアクセスを実行するソースコードを自動的に抽出して検証者に提供することができる(実施例1)。また、デバッグ用のデータと関連付いたあらたなログデータを生成して、デバッグに必要となるソースコードに関する情報を自動的に提供することもできる(実施例2)。   As described above, in this embodiment, it is possible to automatically extract the source code for executing access to the designated register using the conventional log data and provide it to the verifier (Example 1). In addition, new log data associated with debugging data can be generated to automatically provide information on source code necessary for debugging (second embodiment).

なお、本実施の形態で説明したソフトウェアデバッグ支援方法は、あらかじめ用意されたプログラムをパーソナル・コンピュータやワークステーションなどのコンピュータで実行することにより実現することができる。このプログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVDなどのコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また、このプログラムは、インターネット等のネットワークを介して配布することが可能な媒体であってもよい。   The software debugging support method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. Further, this program may be a medium that can be distributed via a network such as the Internet.

上述した実施の形態に関し、さらに以下の付記を開示する。   The following additional notes are disclosed with respect to the embodiment described above.

(付記1)コンピュータを、
ハードウェアモデルまたはハードウェアによって検証対象のソフトウェアが実行されると、当該ソフトウェアのソースコードごとの実行結果に当該ソースコードのアドレス情報を関連付けたログデータを生成する生成手段、
前記生成手段によって生成されたログデータを記録領域に蓄積する蓄積手段、
前記蓄積手段によって記録領域に蓄積されたログデータを出力する出力手段、
として機能させることを特徴とするソフトウェアデバッグ支援プログラム。
(Appendix 1) Computer
When the software to be verified is executed by a hardware model or hardware, generating means for generating log data in which address information of the source code is associated with an execution result for each source code of the software,
Storage means for storing the log data generated by the generating means in a recording area;
Output means for outputting log data stored in the recording area by the storage means;
Software debugging support program characterized by functioning as

(付記2)前記コンピュータを、さらに、
前記蓄積手段によって前記記録領域に蓄積されたログデータの中の任意のログデータの選択を受け付ける受付手段、
前記受付手段によって受け付けられた任意のログデータの実行結果に関連付けられているアドレス情報に対応するソースコードを前記検証対象のソフトウェアから検索する検索手段、
として機能させ、
前記出力手段は、前記検索手段によって検索されたソースコードを前記任意のログデータと対応付けて出力することを特徴とする付記1に記載のソフトウェアデバッグ支援プログラム。
(Supplementary note 2)
Accepting means for accepting selection of arbitrary log data among the log data accumulated in the recording area by the accumulation means;
Search means for searching source code corresponding to address information associated with an execution result of arbitrary log data received by the receiving means from the verification target software;
Function as
The software debug support program according to appendix 1, wherein the output means outputs the source code searched by the search means in association with the arbitrary log data.

(付記3)前記生成手段は、前記ソフトウェアのソースコードごとの実行結果に前記ソースコードの命令アドレスおよびリターンアドレスの少なくとも一方をアドレス情報として関連付けたログデータを生成することを特徴とする付記1または2に記載のソフトウェアデバッグ支援プログラム。 (Additional remark 3) The said production | generation means produces | generates the log data which linked | related at least one of the instruction address and the return address of the said source code with the execution result for every source code of the said software as address information. The software debugging support program according to 2.

(付記4)前記生成手段は、前記ソフトウェアによって割り込み処理が発生した場合、当該割り込み処理をあらわす割り込みIDと、当該割り込み処理の種別情報とを含んだログデータを生成することを特徴とする付記1〜3のいずれか一つに記載のソフトウェアデバッグ支援プログラム。 (Supplementary Note 4) When the interrupt process is generated by the software, the generation unit generates log data including an interrupt ID representing the interrupt process and type information of the interrupt process. The software debugging support program according to any one of to 3.

(付記5)前記検索手段は、前記受付手段によって割り込みに関する情報を含んだログデータが選択された場合、当該ログデータに含まれている割り込みIDと、当該割り込み処理の種別情報と用いて当該割り込み処理を起こしたレジスタと検索し、
前記出力手段は、前記割り込みに関する情報を含んだログデータと、前記検索手段によって検索されたレジスタと、を対応付けて出力することを特徴とする付記4に記載のソフトウェアデバッグ支援プログラム。
(Additional remark 5) When the log data containing the information regarding interruption is selected by the reception means, the search means uses the interruption ID included in the log data and the type information of the interruption processing to Search for the register that caused the processing,
The software debug support program according to appendix 4, wherein the output means outputs log data including information on the interrupt in association with the register searched by the search means.

(付記6)検証対象ソフトウェアのソースコード群と、前記検証対象ソフトウェアをハードウェアモデルまたはハードウェアによって実行させた際のログデータ群とにアクセス可能なコンピュータを、
前記ログデータ群に記述されているレジスタの中から任意のレジスタの選択を受け付ける受付手段、
前記ソースコード群の中から、前記受付手段によって受け付けられた任意のレジスタの記述が含まれているソースコードを検索する検索手段、
前記検索手段によって検索されたソースコードを前記任意のレジスタが記述されたログデータと対応付けて出力する出力手段、
として機能させることを特徴とするソフトウェアデバッグ支援プログラム。
(Appendix 6) A computer capable of accessing a source code group of verification target software and a log data group when the verification target software is executed by a hardware model or hardware,
Accepting means for accepting selection of an arbitrary register from among the registers described in the log data group;
Search means for searching a source code including a description of an arbitrary register accepted by the accepting means from the source code group,
Output means for outputting the source code searched by the search means in association with log data in which the arbitrary register is described;
Software debugging support program characterized by functioning as

(付記7)前記出力手段は、前記検索手段によって、前記任意のレジスタの記述が含まれているソースコードが複数検索された場合に、当該検索されたソースコードの一覧を出力し、前記受付手段によって、当該一覧の中から任意のソースコードの選択を受け付けると、当該任意のソースコードを前記任意のレジスタが記述されたログデータと対応付けて出力することを特徴とする付記1に記載のソフトウェアデバッグ支援プログラム。 (Supplementary note 7) When a plurality of source codes including the description of the arbitrary register are searched by the search means, the output means outputs a list of the searched source codes, and the receiving means When the selection of an arbitrary source code from the list is accepted, the arbitrary source code is output in association with the log data in which the arbitrary register is described. Debug support program.

(付記8)前記コンピュータを、さらに、
前記受付手段が、ログデータ群の中の任意のログデータの選択を受け付けた場合に、当該任意のログデータからレジスタの記述を抽出する抽出手段として機能させ、
前記検索手段は、前記ソースコード群の中から、前記抽出手段によって抽出されたレジスタの記述が含まれているソースコードを検索することを特徴とする付記1または2に記
載のソフトウェアデバッグ支援プログラム。
(Supplementary note 8)
When the accepting unit accepts selection of arbitrary log data in the log data group, the receiving unit functions as an extracting unit that extracts a register description from the arbitrary log data;
The software debug support program according to appendix 1 or 2, wherein the search means searches the source code group for a source code including a description of a register extracted by the extraction means.

(付記9)ハードウェアモデルまたはハードウェアによって検証対象のソフトウェアが実行されると、当該ソフトウェアのソースコードごとの実行結果に当該ソースコードのアドレス情報を関連付けたログデータを生成する生成手段と、
前記生成手段によって生成されたログデータを記録領域に蓄積する蓄積手段と、
前記蓄積手段によって記録領域に蓄積されたログデータを出力する出力手段と、
を備えることを特徴とするソフトウェアデバッグ支援装置。
(Supplementary Note 9) When the software to be verified is executed by a hardware model or hardware, a generation unit that generates log data in which address information of the source code is associated with an execution result for each source code of the software,
Storage means for storing log data generated by the generation means in a recording area;
Output means for outputting log data accumulated in the recording area by the accumulation means;
A software debugging support apparatus comprising:

(付記10)コンピュータが、
ハードウェアモデルまたはハードウェアによって検証対象のソフトウェアが実行されると、当該ソフトウェアのソースコードごとの実行結果に当該ソースコードのアドレス情報を関連付けたログデータを生成する生成工程と、
前記生成工程によって生成されたログデータを記録領域に蓄積する蓄積工程と、
前記蓄積工程によって記録領域に蓄積されたログデータを出力する出力工程と、
を実行することを特徴とするソフトウェアデバッグ支援方法。
(Supplementary note 10)
When the software to be verified is executed by a hardware model or hardware, a generation process for generating log data in which address information of the source code is associated with an execution result for each source code of the software,
An accumulation step of accumulating log data generated by the generation step in a recording area;
An output step of outputting log data accumulated in the recording area by the accumulation step;
A software debugging support method comprising:

100 ソフトウェアデバッグ支援装置
101 ソースコード(全体)
102 実行形式ファイル
103 入力データ(テストパターン)
104 出力データ(実行結果)
105 ログデータ
110 ESLツール
111 ISS
112 HWモデル
120 ソフトウェアデバッグプログラム
130 GUI
131 レジスタアクセスログ
132 ソースコード(ログ対応部分)
100 Software debugging support device 101 Source code (whole)
102 Executable file 103 Input data (test pattern)
104 Output data (execution result)
105 Log data 110 ESL tool 111 ISS
112 HW model 120 Software debug program 130 GUI
131 Register access log 132 Source code (log corresponding part)

Claims (3)

検証対象ソフトウェアのソースコード群と、前記検証対象ソフトウェアをハードウェアモデルまたはハードウェアによって実行させた際のログデータ群とにアクセス可能なコンピュータを、
前記ログデータ群に記述されているレジスタの中から任意のレジスタの選択を受け付ける受付手段、
前記ソースコード群の中から、前記受付手段によって受け付けられた前記任意のレジスタの記述が含まれているソースコードを検索する検索手段、
前記検索手段によって検索された前記ソースコードを前記任意のレジスタが記述されたログデータと対応付けて出力する出力手段、
として機能させることを特徴とするソフトウェアデバッグ支援プログラム。
A computer capable of accessing a source code group of verification target software and a log data group when the verification target software is executed by a hardware model or hardware;
Accepting means for accepting selection of an arbitrary register from among the registers described in the log data group;
Search means for searching a source code including a description of the arbitrary register received by the receiving means from the source code group,
Output means for outputting the source code searched by the search means in association with log data in which the arbitrary register is described;
Software debugging support program characterized by functioning as
検証対象ソフトウェアのソースコード群と、前記検証対象ソフトウェアをハードウェアモデルまたはハードウェアによって実行させた際のログデータ群とにアクセス可能なソフトウェアデバッグ支援装置であって、
前記ログデータ群に記述されているレジスタの中から任意のレジスタの選択を受け付ける受付手段と、
前記ソースコード群の中から、前記受付手段によって受け付けられた前記任意のレジスタの記述が含まれているソースコードを検索する検索手段と、
前記検索手段によって検索された前記ソースコードを前記任意のレジスタが記述されたログデータと対応付けて出力する出力手段と、
を備えることを特徴とするソフトウェアデバッグ支援装置。
A software debugging support apparatus capable of accessing a source code group of verification target software and a log data group when the verification target software is executed by a hardware model or hardware,
Accepting means for accepting selection of an arbitrary register from among the registers described in the log data group;
Search means for searching a source code including a description of the arbitrary register received by the receiving means from the source code group;
Output means for outputting the source code searched by the search means in association with log data in which the arbitrary register is described;
A software debugging support apparatus comprising:
検証対象ソフトウェアのソースコード群と、前記検証対象ソフトウェアをハードウェアモデルまたはハードウェアによって実行させた際のログデータ群とにアクセス可能なコンピュータが、
前記ログデータ群に記述されているレジスタの中から任意のレジスタの選択を受け付ける受付工程と、
前記ソースコード群の中から、前記受付工程によって受け付けられた前記任意のレジスタの記述が含まれているソースコードを検索する検索工程と、
前記検索工程によって検索された前記ソースコードを前記任意のレジスタが記述されたログデータと対応付けて出力する出力工程と、
を実行することを特徴とするソフトウェアデバッグ支援方法。
A computer capable of accessing a source code group of verification target software and a log data group when the verification target software is executed by a hardware model or hardware,
An accepting step of accepting selection of an arbitrary register from among the registers described in the log data group;
A search step for searching a source code including a description of the arbitrary register received by the receiving step from the source code group;
An output step of outputting the source code searched by the search step in association with log data in which the arbitrary register is described;
A software debugging support method comprising:
JP2012281819A 2012-12-25 2012-12-25 Software debugging support program, software debugging support device, and software debugging support method Withdrawn JP2013058264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012281819A JP2013058264A (en) 2012-12-25 2012-12-25 Software debugging support program, software debugging support device, and software debugging support method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012281819A JP2013058264A (en) 2012-12-25 2012-12-25 Software debugging support program, software debugging support device, and software debugging support method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008216771A Division JP2010055180A (en) 2008-08-26 2008-08-26 Program, device, and method for supporting software debugging

Publications (1)

Publication Number Publication Date
JP2013058264A true JP2013058264A (en) 2013-03-28

Family

ID=48134008

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012281819A Withdrawn JP2013058264A (en) 2012-12-25 2012-12-25 Software debugging support program, software debugging support device, and software debugging support method

Country Status (1)

Country Link
JP (1) JP2013058264A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110352409A (en) * 2018-02-01 2019-10-18 株式会社软技 Message handling program, information processing unit and debugging system
CN111290743A (en) * 2020-03-17 2020-06-16 贵州轻工职业技术学院 Computer software technology development and debugging system
CN115061940A (en) * 2022-07-28 2022-09-16 德萱(天津)科技发展有限公司 Data processing method and system based on software research and development process

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110352409A (en) * 2018-02-01 2019-10-18 株式会社软技 Message handling program, information processing unit and debugging system
CN110352409B (en) * 2018-02-01 2023-02-03 株式会社软技 Information processing program, information processing apparatus, and debugging system
CN111290743A (en) * 2020-03-17 2020-06-16 贵州轻工职业技术学院 Computer software technology development and debugging system
CN115061940A (en) * 2022-07-28 2022-09-16 德萱(天津)科技发展有限公司 Data processing method and system based on software research and development process

Similar Documents

Publication Publication Date Title
CN106471476B (en) For the editor to optimized code and the technology of the optimized debugging of continuation and enhancing
JP4420968B2 (en) Method and computer-readable medium for commanding
US10191832B2 (en) Multi-language playback framework
CN108762743B (en) Data table operation code generation method and device
US10635434B2 (en) Annotating generator output stream with source code information of the generator
US11755293B2 (en) Code execution and data processing pipeline
JP2012103791A (en) Program testing device, program testing method and program testing program
US10162628B2 (en) Transactional distributed data analysis and transformation
CN106575231B (en) Automated saving with cross-user session revocation support for operations
JP6514084B2 (en) OPERATION SUPPORT SYSTEM, OPERATION SUPPORT METHOD, AND OPERATION SUPPORT PROGRAM
JP7291740B2 (en) Modeling parameter setting method, apparatus, device, computer storage medium, and computer program
da Silva et al. Model-driven gui generation and navigation for android bis apps
JP2013058264A (en) Software debugging support program, software debugging support device, and software debugging support method
Aghaee et al. Live mashup tools: challenges and opportunities
US20130263143A1 (en) Information processing method and system
JP4941674B2 (en) Simulation system
JP6075557B2 (en) Method for supporting manual creation of program product, computer and computer program thereof
JP2010055180A (en) Program, device, and method for supporting software debugging
JP5374965B2 (en) Simulation control program, simulation control apparatus, and simulation control method
TW591540B (en) Win F-language interpreter
JP4925514B2 (en) Program execution control method, program, execution control apparatus, and recording medium by internal / external event driven system
CN114968751A (en) Program debugging method and program debugging device of code-free development platform
US8769506B2 (en) Using a command interpreter at design time
Mărășoiu et al. An empirical investigation of code completion usage by professional software developers
JP2013109673A (en) Simulation device, simulation method, and simulation program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121225

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20130731