JP6900661B2 - Verification equipment, methods and programs - Google Patents

Verification equipment, methods and programs Download PDF

Info

Publication number
JP6900661B2
JP6900661B2 JP2016232093A JP2016232093A JP6900661B2 JP 6900661 B2 JP6900661 B2 JP 6900661B2 JP 2016232093 A JP2016232093 A JP 2016232093A JP 2016232093 A JP2016232093 A JP 2016232093A JP 6900661 B2 JP6900661 B2 JP 6900661B2
Authority
JP
Japan
Prior art keywords
checkpoint
test
test instruction
sequence
instruction
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.)
Active
Application number
JP2016232093A
Other languages
Japanese (ja)
Other versions
JP2018088213A (en
Inventor
結城 伊達
結城 伊達
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2016232093A priority Critical patent/JP6900661B2/en
Publication of JP2018088213A publication Critical patent/JP2018088213A/en
Application granted granted Critical
Publication of JP6900661B2 publication Critical patent/JP6900661B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、プロセッサを含むシステムのテストを行う技術に関する。 The present invention relates to a technique for testing a system including a processor.

プロセッサを含むシステムに、ランダムに生成された試験命令列を実行させて不正動作を検出するランダムテストが知られている。ランダムテストにおける不正動作の検出は、試験命令列を最後まで実行した結果により判断される。ところが、ランダムテストでは、試験命令の並びがランダムに決定されるため、先行する試験命令の実行結果が参照されないまま、後続の試験命令により上書きされてしまう場合がある。このような場合、先行する試験命令が不正動作を起こしても、後続の試験命令によりその不正動作が隠れてしまう。このように、一般的なランダムテストでは、先行する試験命令が起こした不正動作を検出できない場合があるという問題があった。 A random test is known in which a system including a processor is made to execute a randomly generated test instruction sequence to detect a malfunction. The detection of fraudulent behavior in the random test is determined by the result of executing the test command sequence to the end. However, in the random test, since the sequence of test instructions is randomly determined, the execution result of the preceding test instruction may be overwritten by the subsequent test instruction without being referred to. In such a case, even if the preceding test instruction causes an illegal operation, the illegal operation is hidden by the subsequent test instruction. As described above, in a general random test, there is a problem that an illegal operation caused by a preceding test instruction may not be detected.

このような問題に関連する技術の一例が、特許文献1に記載されている。この関連技術は、試験命令列を生成する際に、各レジスタが変更可能であるか否かを表すフラグを用いる。具体的には、この関連技術は、1つの試験命令を生成する度に、生成した試験命令で書き込み対象となったレジスタのフラグを、変更不可を表すよう更新する。また、この関連技術は、生成した試験命令で読み込み対象となったレジスタのフラグを、変更可能を表すよう更新する。そして、この関連技術は、次の試験命令としてランダムに生成した試験命令において書き込み対象となったレジスタのうち、変更不可のフラグがセットされているものがある場合は、その試験命令を採用せずにランダムな生成をやり直す。これにより、この関連技術は、後続の試験命令により先行の試験命令の実行結果が参照されないまま上書きされるような試験命令列を生成しない。 An example of a technique related to such a problem is described in Patent Document 1. This related technique uses a flag indicating whether each register can be changed when generating a test instruction sequence. Specifically, this related technique updates the flag of the register to be written by the generated test instruction every time one test instruction is generated so as to indicate that it cannot be changed. In addition, this related technology updates the flag of the register to be read by the generated test instruction so as to indicate that it can be changed. Then, this related technology does not adopt the test instruction when there is a register to be written in the randomly generated test instruction as the next test instruction and the flag that cannot be changed is set. Random generation is redone. As a result, the related art does not generate a sequence of test instructions in which subsequent test instructions overwrite the execution results of the preceding test instructions without reference.

また、このような問題に関連する他の技術の一例が、特許文献2に記載されている。この関連技術は、試験命令列を生成する際に、変更レジスタテーブルを用いる。具体的には、この関連技術は、1つの試験命令を生成する度に、生成した試験命令で変更されるレジスタを、変更レジスタテーブルに登録する。また、この関連技術は、生成した試験命令で参照されるレジスタを、変更レジスタテーブルから抹消する。ただし、生成した試験命令で変更されるレジスタが、変更レジスタテーブルに既に登録されている場合がある。この場合、この関連技術は、その試験命令に先行して、そのレジスタを参照する試験命令を組み込む。これにより、この関連技術は、後続の試験命令により先行の試験命令の実行結果が参照されないまま上書きされるような試験命令列を生成しない。 Further, an example of another technique related to such a problem is described in Patent Document 2. This related technique uses a change register table when generating the test instruction sequence. Specifically, this related technique registers the register changed by the generated test instruction in the change register table each time one test instruction is generated. This related technique also deletes the registers referenced in the generated test instructions from the change register table. However, the register changed by the generated test instruction may already be registered in the change register table. In this case, the related technique incorporates a test instruction that references the register prior to the test instruction. As a result, the related art does not generate a sequence of test instructions in which subsequent test instructions overwrite the execution results of the preceding test instructions without reference.

特許第2903721号公報Japanese Patent No. 2903721 特開平09−330242号公報Japanese Unexamined Patent Publication No. 09-330242

しかしながら、特許文献1および特許文献2に記載された関連技術には、次のような課題があった。 However, the related techniques described in Patent Document 1 and Patent Document 2 have the following problems.

これらの関連技術は、先行する試験命令の不正動作を検出可能にするために、試験命令列を書き換えている。しかしながら、試験命令列を書き換えることは、試験のランダム性を損なう。また、試験命令列を書き換えると、レジスタやメモリの依存関係のテストが難しくなる場合もある。そのため、これらの関連技術を用いたランダムテストは、偏った試験内容になってしまうという問題があった。 These related techniques rewrite the test instruction sequence to make it possible to detect the illegal operation of the preceding test instruction. However, rewriting the test command sequence impairs the randomness of the test. Also, rewriting the test instruction sequence may make it difficult to test register and memory dependencies. Therefore, there is a problem that the random test using these related techniques has a biased test content.

本発明は、上述の課題を解決するためになされたものである。すなわち、本発明は、プロセッサを含むシステムのランダムテストにおいて、試験のランダム性を損なうことなく、先行する試験命令の不正動作を容易に検出可能にする技術を提供することを目的とする。 The present invention has been made to solve the above-mentioned problems. That is, an object of the present invention is to provide a technique for easily detecting an illegal operation of a preceding test instruction in a random test of a system including a processor without impairing the randomness of the test.

本発明の検証装置は、プロセッサを含むシステムに実行させる試験命令の並びである試験命令列を取得する試験命令列取得部と、前記試験命令列において、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令をチェックポイントとして検出するチェックポイント検出部と、前記試験命令列の先頭から前記各チェックポイントの直前まで、および、前記試験命令列の先頭から末尾までを、前記システムに順次実行させる試験命令列実行部と、前記システムによる各実行結果を検証する実行結果検証部と、を備える。 In the verification device of the present invention, a test instruction sequence acquisition unit that acquires a test instruction sequence that is a sequence of test instructions to be executed by a system including a processor, and a storage area updated by a preceding test instruction in the test instruction sequence are provided. A checkpoint detector that detects subsequent test instructions that are updated without reference as checkpoints, from the beginning of the test instruction sequence to just before each checkpoint, and from the beginning to the end of the test instruction sequence. It includes a test instruction sequence execution unit that causes the system to execute sequentially, and an execution result verification unit that verifies each execution result by the system.

また、本発明の方法は、コンピュータ装置が、プロセッサを含むシステムに実行させる試験命令の並びである試験命令列を取得し、前記試験命令列において、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令をチェックポイントとして検出し、前記試験命令列の先頭から前記各チェックポイントの直前まで、および、前記試験命令列の先頭から末尾までを、前記システムに順次実行させ、前記システムによる各実行結果を検証する方法。 Further, in the method of the present invention, a computer device acquires a test instruction sequence which is a sequence of test instructions to be executed by a system including a processor, and in the test instruction sequence, a storage area updated by a preceding test instruction is referred to. Subsequent test instructions that are updated without being executed are detected as checkpoints, and the system is sequentially executed from the beginning of the test instruction sequence to immediately before each checkpoint and from the beginning to the end of the test instruction sequence. , A method of verifying each execution result by the system.

また、本発明のプログラムは、プロセッサを含むシステムに実行させる試験命令の並びである試験命令列を取得する試験命令列取得ステップと、前記試験命令列において、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令をチェックポイントとして検出するチェックポイント検出ステップと、前記試験命令列の先頭から前記各チェックポイントの直前まで、および、前記試験命令列の先頭から末尾までを、前記システムに順次実行させる試験命令列実行ステップと、前記システムによる各実行結果を検証する実行結果検証ステップと、をコンピュータ装置に実行させる。 Further, the program of the present invention includes a test instruction sequence acquisition step for acquiring a test instruction sequence which is a sequence of test instructions to be executed by a system including a processor, and a storage area updated by a preceding test instruction in the test instruction sequence. A checkpoint detection step that detects subsequent test instructions that are updated without reference to as checkpoints, from the beginning of the test instruction sequence to just before each checkpoint, and from the beginning to the end of the test instruction sequence. , The computer device is made to execute the test instruction sequence execution step to be sequentially executed by the system and the execution result verification step to verify each execution result by the system.

本発明は、プロセッサを含むシステムのランダムテストにおいて、試験のランダム性を損なうことなく、先行する試験命令の不正動作を容易に検出可能にする技術を提供することができる。 INDUSTRIAL APPLICABILITY The present invention can provide a technique for easily detecting an illegal operation of a preceding test instruction in a random test of a system including a processor without impairing the randomness of the test.

本発明の実施の形態としての検証装置の構成を示すブロック図である。It is a block diagram which shows the structure of the verification apparatus as embodiment of this invention. 本発明の実施の形態としての検証装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware composition of the verification apparatus as embodiment of this invention. 本発明の実施の形態としての検証装置の動作を説明するフローチャートである。It is a flowchart explaining the operation of the verification apparatus as embodiment of this invention. 本発明の実施の形態としての検証装置がチェックポイントを検出する動作を説明するフローチャートである。It is a flowchart explaining the operation which the verification apparatus as embodiment of this invention detects a checkpoint. 本発明の実施の形態としての検証装置がチェックポイントの直前までの試験命令列を実行する動作を説明するフローチャートである。It is a flowchart explaining the operation which the verification apparatus as embodiment of this invention executes the test instruction sequence up to just before a checkpoint. 本発明の実施の形態において取得される試験命令列の具体例を説明する図である。It is a figure explaining the specific example of the test order sequence acquired in embodiment of this invention. 本発明の実施の形態において生成される更新リストの具体例を説明する図である。It is a figure explaining the specific example of the update list generated in embodiment of this invention. 本発明の実施の形態において生成されるチェックポイントリストの具体例を説明する図である。It is a figure explaining the specific example of the checkpoint list generated in embodiment of this invention.

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

本発明の実施の形態としての検証装置1の機能ブロック構成を図1に示す。図1において、検証装置1は、試験命令列取得部11と、チェックポイント検出部12と、試験命令列実行部13と、実行結果検証部14とを含む。 FIG. 1 shows a functional block configuration of the verification device 1 as an embodiment of the present invention. In FIG. 1, the verification device 1 includes a test command sequence acquisition unit 11, a checkpoint detection unit 12, a test command sequence execution unit 13, and an execution result verification unit 14.

ここで、検証装置1は、図2に示すようなハードウェア要素によって構成可能である。図2において、検証装置1は、プロセッサ1001、レジスタ1002、メモリ1003を含む。この場合、検証装置1の各機能ブロックは、メモリ1003に格納されるコンピュータ・プログラムを読み込んで実行し各部を制御するプロセッサ1001によって構成される。なお、この例では、プロセッサ1001、レジスタ1002およびメモリ1003は、検証対象となるシステム100を構成する。つまり、この例では、検証装置1は、検証対象となるシステム100上に実現される。ただし、検証装置1のハードウェア構成は、上述の構成に限定されない。また、検証装置1は、検証対象となるシステム100に含まれるプロセッサ1001とは異なるプロセッサを用いて構成されてもよい。 Here, the verification device 1 can be configured by the hardware elements as shown in FIG. In FIG. 2, the verification device 1 includes a processor 1001, a register 1002, and a memory 1003. In this case, each functional block of the verification device 1 is composed of a processor 1001 that reads and executes a computer program stored in the memory 1003 and controls each unit. In this example, the processor 1001, the register 1002, and the memory 1003 constitute the system 100 to be verified. That is, in this example, the verification device 1 is realized on the system 100 to be verified. However, the hardware configuration of the verification device 1 is not limited to the above configuration. Further, the verification device 1 may be configured by using a processor different from the processor 1001 included in the system 100 to be verified.

次に、各機能ブロックについて説明する。 Next, each functional block will be described.

試験命令列取得部11は、試験命令列を取得する。ここで、試験命令列は、システム100に実行させる試験命令の並びである。また、試験命令列は、ランダムに生成されたものであることが望ましい。具体的には、試験命令列では、命令の種類およびその命令によりアクセスされる記憶領域の割り当てがランダムに選択された試験命令が、ランダムに決定された順序で並んでいる。例えば、試験命令においてアクセスされる記憶領域は、レジスタ1002およびメモリ1003のいずれかまたは両方から選択されて割り当てられるものとする。 The test command sequence acquisition unit 11 acquires the test command sequence. Here, the test instruction sequence is a sequence of test instructions to be executed by the system 100. Further, it is desirable that the test command sequence is randomly generated. Specifically, in the test instruction sequence, test instructions in which the types of instructions and the allocation of the storage area accessed by the instructions are randomly selected are arranged in a randomly determined order. For example, the storage area accessed in the test instruction shall be selected and allocated from register 1002 and / or memory 1003.

また、取得した試験命令列は、メモリ1003上に記憶されるものとする。例えば、試験命令列取得部11は、試験命令列を生成することにより取得し、メモリ1003上に記憶してもよい。あるいは、試験命令列取得部11は、外部の試験命令列生成プログラム等により生成された試験命令列がメモリ1003上に格納されている位置を表す情報を取得してもよい。 Further, it is assumed that the acquired test instruction sequence is stored in the memory 1003. For example, the test command sequence acquisition unit 11 may acquire the test command sequence by generating the test command sequence and store it in the memory 1003. Alternatively, the test instruction sequence acquisition unit 11 may acquire information indicating the position where the test instruction sequence generated by an external test instruction sequence generation program or the like is stored in the memory 1003.

チェックポイント検出部12は、試験命令列におけるチェックポイントを検出する。ここで、チェックポイントとは、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令をいうものとする。 The checkpoint detection unit 12 detects a checkpoint in the test command sequence. Here, the checkpoint means a subsequent test instruction in which the storage area updated by the preceding test instruction is updated without being referred to.

試験命令列実行部13は、チェックポイント検出部12によって検出された各チェックポイントについて、先頭から該チェックポイントの直前までの試験命令列を、システム100に実行させる。また、試験命令列実行部13は、試験命令列の先頭から末尾までを、システム100に実行させる。 The test command sequence execution unit 13 causes the system 100 to execute the test command sequence from the beginning to immediately before the checkpoint for each checkpoint detected by the checkpoint detection unit 12. Further, the test command sequence execution unit 13 causes the system 100 to execute the test command sequence from the beginning to the end.

具体的には、試験命令列実行部13は、試験命令列を、チェックポイントの直前で命令の実行が停止するように一時的に設定する。このような設定は、例えば、割り込み処理により実現されてもよい。具体的には、試験命令列実行部13は、チェックポイントの命令を、ソフトウェア的な割り込みを発生させる割り込み命令に一時的に置き換えてもよい。この場合、試験命令列実行部13は、置き換えの前に、置き換えられる命令をメモリ1003上の退避領域に退避しておき、そのチェックポイントまでの試験命令列の実行が終了した後に、退避領域の命令を元の試験命令列における位置に書き戻す。あるいは、試験命令列実行部13は、実行中の命令アドレスがチェックポイントの命令アドレスに一致すると、その命令を実行する代わりにハードウェア的な割り込みを発生させるよう設定してもよい。 Specifically, the test instruction sequence execution unit 13 temporarily sets the test instruction sequence so that the execution of instructions is stopped immediately before the checkpoint. Such a setting may be realized by, for example, interrupt processing. Specifically, the test instruction sequence execution unit 13 may temporarily replace the checkpoint instruction with an interrupt instruction that generates a software-like interrupt. In this case, the test instruction sequence execution unit 13 saves the instruction to be replaced in the save area on the memory 1003 before the replacement, and after the execution of the test instruction sequence up to the checkpoint is completed, the save area Write the instruction back to its position in the original test instruction sequence. Alternatively, the test instruction sequence execution unit 13 may be set to generate a hardware interrupt instead of executing the instruction when the instruction address being executed matches the instruction address of the checkpoint.

また、チェックポイントの直前までの試験命令列の実行を、割り込み処理により実現する場合、割り込み処理としては、例えば、その時点までの試験命令列の実行結果を出力装置(図示せず)に出力する処理が設定されていてもよい。 When the execution of the test instruction sequence up to immediately before the checkpoint is realized by interrupt processing, the interrupt processing is, for example, to output the execution result of the test instruction sequence up to that point to an output device (not shown). Processing may be set.

実行結果検証部14は、システム100による実行結果を検証する。具体的には、実行結果検証部14は、各チェックポイントの直前までの試験命令列の実行結果、および、先頭から末尾までの試験命令列の実行結果を、それぞれの期待値と比較する。 The execution result verification unit 14 verifies the execution result by the system 100. Specifically, the execution result verification unit 14 compares the execution result of the test command sequence up to immediately before each checkpoint and the execution result of the test command sequence from the beginning to the end with their respective expected values.

あるチェックポイントの直前までの試験命令列の実行結果とは、当該チェックポイントの試験命令でアクセスされる予定の記憶領域に格納された値であってもよい。ここで、チェックポイントの試験命令は、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令である。したがって、チェックポイントの直前までの試験命令列の実行結果において、チェックポイントの試験命令でアクセスされる予定の記憶領域に格納された値は、先行の試験命令により更新された値であることが期待される。つまり、チェックポイントの直前までの試験命令列の実行結果において、チェックポイントの試験命令でアクセスされる予定の記憶領域に格納された値が期待値通りでなければ、先行の試験命令により不正動作が起きた可能性が検出されることになる。 The execution result of the test instruction sequence up to immediately before a certain checkpoint may be a value stored in a storage area to be accessed by the test instruction of the checkpoint. Here, the checkpoint test instruction is a subsequent test instruction in which the storage area updated by the preceding test instruction is updated without reference. Therefore, in the execution result of the test instruction sequence up to immediately before the checkpoint, the value stored in the storage area to be accessed by the checkpoint test instruction is expected to be the value updated by the preceding test instruction. Will be done. In other words, in the execution result of the test instruction sequence up to just before the checkpoint, if the value stored in the storage area to be accessed by the checkpoint test instruction is not as expected, the preceding test instruction causes an illegal operation. The possibility that it has happened will be detected.

また、先頭から末尾までの試験命令列の実行結果とは、試験命令列で更新される全ての記憶領域の値であってもよい。 Further, the execution result of the test command sequence from the beginning to the end may be the value of all the storage areas updated by the test command sequence.

なお、先頭から各チェックポイントの直前までの試験命令列の実行結果、および、先頭から末尾までの試験命令列の実行結果としてそれぞれ期待される期待値は、試験命令列に基づいて事前に求められているものとする。 The expected values for the execution result of the test command sequence from the beginning to immediately before each checkpoint and the execution result of the test instruction sequence from the beginning to the end are obtained in advance based on the test instruction sequence. It is assumed that

また、実行結果検証部14は、実行結果が期待値通りでない場合、エラーを出力する。また、実行結果検証部14は、最初に、先頭から、先頭に最も近いチェックポイントの直前までの試験命令列を実行させ、その後、順次、先頭から次のチェックポイントの直前までの試験命令列を実行させてもよい。また、実行結果検証部14は、いずれかのチェックポイントの直前までの試験命令列の実行結果についてエラーを出力した場合、動作を終了してもよい。 Further, the execution result verification unit 14 outputs an error when the execution result is not as expected. Further, the execution result verification unit 14 first executes the test command sequence from the beginning to immediately before the checkpoint closest to the beginning, and then sequentially executes the test instruction sequence from the beginning to immediately before the next checkpoint. You may let it run. Further, the execution result verification unit 14 may end the operation when an error is output regarding the execution result of the test instruction sequence up to immediately before any checkpoint.

以上のように構成された検証装置1の動作について、図3を参照して説明する。 The operation of the verification device 1 configured as described above will be described with reference to FIG.

まず、試験命令列取得部11は、試験命令列を取得する(ステップS11)。 First, the test command sequence acquisition unit 11 acquires the test command sequence (step S11).

次に、チェックポイント検出部12は、試験命令列において1つまたはそれ以上のチェックポイントを検出する(ステップS12)。ステップS12の動作の詳細については後述する。 Next, the checkpoint detection unit 12 detects one or more checkpoints in the test command sequence (step S12). The details of the operation of step S12 will be described later.

次に、試験命令列実行部13は、検出されたチェックポイントの1つを選択する(ステップS13)。 Next, the test command sequence execution unit 13 selects one of the detected checkpoints (step S13).

例えば、ステップS13の初回の実行であれば、試験命令列実行部13は、試験命令列の先頭に最も近いチェックポイントを選択する。また、ステップS13の初回の実行でなければ、試験命令列実行部13は、前回のステップS13で選択したチェックポイントの次に先頭に近いチェックポイントを選択する。 For example, in the case of the first execution of step S13, the test command sequence execution unit 13 selects the checkpoint closest to the beginning of the test command sequence. Further, if it is not the first execution of step S13, the test command sequence execution unit 13 selects a checkpoint closest to the beginning next to the checkpoint selected in the previous step S13.

次に、試験命令列実行部13は、試験命令列の先頭から選択したチェックポイントの直前までの試験命令列を、システム100に実行させる(ステップS14)。ステップS14の動作の詳細については後述する。 Next, the test command sequence execution unit 13 causes the system 100 to execute the test command sequence from the beginning of the test command sequence to immediately before the selected checkpoint (step S14). The details of the operation of step S14 will be described later.

次に、実行結果検証部14は、システム100による試験命令列の実行結果を読み込む(ステップS15)。 Next, the execution result verification unit 14 reads the execution result of the test instruction sequence by the system 100 (step S15).

具体的には、前述のように、実行結果検証部14は、該当するチェックポイントの試験命令により更新される予定の記憶領域の値を読み込めばよい。 Specifically, as described above, the execution result verification unit 14 may read the value of the storage area scheduled to be updated by the test instruction of the corresponding checkpoint.

そして、実行結果検証部14は、実行結果の検証結果が正常であるか否かを判断する(ステップS16)。具体的には、実行結果検証部14は、実行結果が期待値通りであるか否かを判定すればよい。 Then, the execution result verification unit 14 determines whether or not the verification result of the execution result is normal (step S16). Specifically, the execution result verification unit 14 may determine whether or not the execution result is as expected.

ここで、検証結果が正常でない場合(ステップS16でNo)、実行結果検証部14は、検証結果として、エラーを出力する(ステップS20)。そして、検証装置1は、動作を終了する。 Here, if the verification result is not normal (No in step S16), the execution result verification unit 14 outputs an error as the verification result (step S20). Then, the verification device 1 ends the operation.

一方、検証結果が正常である場合(ステップS16でYes)、検証装置1は、次のチェックポイントがあるか否かを判断する(ステップS17)。 On the other hand, when the verification result is normal (Yes in step S16), the verification device 1 determines whether or not there is the next checkpoint (step S17).

ここで、次のチェックポイントがある場合(ステップS17でYes)、検証装置1は、次のチェックポイントについて、ステップS13からの動作を繰り返す。 Here, if there is a next checkpoint (Yes in step S17), the verification device 1 repeats the operation from step S13 for the next checkpoint.

一方、次のチェックポイントがない場合(ステップS17でNo)、試験命令列実行部13は、試験命令列の先頭から末尾までを、システム100に実行させる(ステップS18)。 On the other hand, when there is no next checkpoint (No in step S17), the test command sequence execution unit 13 causes the system 100 to execute the test command sequence from the beginning to the end (step S18).

次に、実行結果検証部14は、システム100による試験命令列の実行結果を読み込む(ステップS19)。 Next, the execution result verification unit 14 reads the execution result of the test instruction sequence by the system 100 (step S19).

具体的には、実行結果検証部14は、システム100による試験命令列の実行により更新される全ての記憶領域の値を読み込めばよい。 Specifically, the execution result verification unit 14 may read the values of all the storage areas updated by the execution of the test command sequence by the system 100.

次に、実行結果検証部14は、実行結果の検証結果が正常であるか否かを検証し、検証結果を出力する(ステップS20)。具体的には、実行結果検証部14は、実行結果が期待値通りであるか否かを出力すればよい。 Next, the execution result verification unit 14 verifies whether or not the verification result of the execution result is normal, and outputs the verification result (step S20). Specifically, the execution result verification unit 14 may output whether or not the execution result is as expected.

次に、ステップS12におけるチェックポイントの検出動作の詳細について、図4を参照して説明する。この検出動作では、チェックポイント検出部12は、チェックポイントリストを生成する。チェックポイントリストは、チェックポイントとなる試験命令の識別情報と、その試験命令で更新される記憶領域の識別情報とを関連付けた情報からなる。試験命令の識別情報としては、試験命令が格納されているメモリ1003上のアドレスが適用可能である。また、記憶領域の識別情報としては、レジスタ1002の番号またはメモリ1003上のアドレスが適用可能である。また、この検出動作では、チェックポイント検出部12は、チェックポイントリストを生成する過程で用いる情報として、更新リストを用いる。更新リストは、ある試験命令の実行までに更新されたが参照されていない記憶領域の識別情報の一覧を保持する。この動作の開始時には、チェックポイントリストおよび更新リストには、情報は格納されていないものとする。 Next, the details of the checkpoint detection operation in step S12 will be described with reference to FIG. In this detection operation, the checkpoint detection unit 12 generates a checkpoint list. The checkpoint list consists of information that associates the identification information of the test instruction that becomes the checkpoint with the identification information of the storage area that is updated by the test instruction. As the identification information of the test instruction, the address on the memory 1003 in which the test instruction is stored can be applied. Further, as the identification information of the storage area, the number of the register 1002 or the address on the memory 1003 can be applied. Further, in this detection operation, the checkpoint detection unit 12 uses the update list as the information used in the process of generating the checkpoint list. The update list holds a list of storage identification information that has been updated but not referenced by the execution of a test instruction. At the beginning of this operation, no information is stored in the checkpoint list and update list.

図4では、まず、チェックポイント検出部12は、試験命令列の先頭から順に、1つの試験命令を読み込む(ステップS31)。 In FIG. 4, first, the checkpoint detection unit 12 reads one test instruction in order from the beginning of the test instruction sequence (step S31).

次に、チェックポイント検出部12は、更新リストに、この試験命令で参照される記憶領域の識別情報が既に記憶されているか否かを判断する(ステップS32)。 Next, the checkpoint detection unit 12 determines whether or not the identification information of the storage area referred to by this test instruction is already stored in the update list (step S32).

ここで、該当する識別情報が記憶されていない場合(ステップS32でNo)、チェックポイント検出部12の動作はステップS34に進む。 Here, if the corresponding identification information is not stored (No in step S32), the operation of the checkpoint detection unit 12 proceeds to step S34.

一方、該当する識別情報が既に記憶されている場合(ステップS32でYes)、チェックポイント検出部12は、更新リストから、該当する記憶領域の識別情報を削除する(ステップS33)。 On the other hand, when the corresponding identification information is already stored (Yes in step S32), the checkpoint detection unit 12 deletes the identification information of the corresponding storage area from the update list (step S33).

次に、チェックポイント検出部12は、更新リストに、この試験命令で更新される記憶領域の識別情報が既に記憶されているか否かを判断する(ステップS34)。 Next, the checkpoint detection unit 12 determines whether or not the identification information of the storage area updated by this test instruction is already stored in the update list (step S34).

ここで、該当する識別情報が記憶されていない場合(ステップS34でNo)、チェックポイント検出部12は、該当する識別情報を更新リストに追加する(ステップS35)。 Here, when the corresponding identification information is not stored (No in step S34), the checkpoint detection unit 12 adds the corresponding identification information to the update list (step S35).

一方、該当する識別情報が既に記憶されている場合(ステップS34でYes)、チェックポイント検出部12は、チェックポイントリストに、この試験命令の識別情報と、この試験命令で更新される記憶領域の識別情報とを関連付けて登録する(ステップS36)。 On the other hand, when the corresponding identification information is already stored (Yes in step S34), the checkpoint detection unit 12 displays the identification information of this test instruction and the storage area updated by this test instruction in the checkpoint list. It is registered in association with the identification information (step S36).

そして、チェックポイント検出部12は、この試験命令が試験命令列の最後でなければ(ステップS37でNo)、次の試験命令について、ステップS31からの動作を繰り返す。 Then, the checkpoint detection unit 12 repeats the operation from step S31 for the next test command unless this test command is at the end of the test command sequence (No in step S37).

一方、この試験命令が試験命令列の最後であれば(ステップS37でYes)、チェックポイント検出部12は、チェックポイントの検出動作を終了する。 On the other hand, if this test instruction is at the end of the test instruction sequence (Yes in step S37), the checkpoint detection unit 12 ends the checkpoint detection operation.

次に、ステップS14における、あるチェックポイントの直前までの試験命令列の実行動作の詳細について、図5を参照して説明する。 Next, the details of the execution operation of the test instruction sequence up to immediately before a certain checkpoint in step S14 will be described with reference to FIG.

まず、試験命令列実行部13は、試験命令列において、選択されたチェックポイントの試験命令を、退避領域に退避する(ステップS41)。 First, the test command sequence execution unit 13 saves the test command of the checkpoint selected in the test command sequence to the save area (step S41).

次に、試験命令列実行部13は、試験命令列において、選択されたチェックポイントの試験命令を、割り込み処理を発生させる割り込み命令に書き換える(ステップS42)。 Next, the test instruction sequence execution unit 13 rewrites the test instruction of the selected checkpoint in the test instruction sequence into an interrupt instruction that generates an interrupt process (step S42).

なお、前述したように、割り込み処理としては、その時点までの実行結果を出力装置に出力する処理が設定されていてもよい。 As described above, as the interrupt process, a process of outputting the execution result up to that point to the output device may be set.

次に、試験命令列実行部13は、選択されたチェックポイントの直前までの試験命令列を、システム100に実行させる(ステップS43)。具体的には、システム100は、先頭から順に試験命令を実行し、チェックポイントの割り込み処理により、その直前までの試験命令列の実行結果を、出力装置に出力することになる。 Next, the test command sequence execution unit 13 causes the system 100 to execute the test command sequence up to immediately before the selected checkpoint (step S43). Specifically, the system 100 executes the test instructions in order from the beginning, and outputs the execution result of the test instruction sequence up to immediately before the checkpoint interrupt process to the output device.

次に、試験命令列実行部13は、ステップS41で退避したチェックポイントの試験命令を、チェックポイントの位置に書き戻す(ステップS44)。そして、試験命令列実行部13は、このチェックポイントの直前までの試験命令列の実行動作を終了する。 Next, the test command sequence execution unit 13 writes back the test command of the checkpoint saved in step S41 to the position of the checkpoint (step S44). Then, the test command sequence execution unit 13 ends the execution operation of the test command sequence up to immediately before this checkpoint.

以上で、検証装置1の動作の説明を終了する。 This completes the description of the operation of the verification device 1.

次に、検証装置1の動作を具体例で説明する。 Next, the operation of the verification device 1 will be described with a specific example.

この例では、図6に示す試験命令列が取得されたことを想定する(ステップS11)。この試験命令列は、10個の試験命令からなる。各試験命令には、先頭から順に命令1〜命令10の識別情報が割り当てられている。各試験命令の行に記載された命令アドレスは、その試験命令が格納されているメモリ1003上のアドレスを表している。各試験命令は、割り当てられた記憶領域から読み込んだ値、または、読み込んだ値に四則演算を施した結果を、割り当てられた記憶領域に書き込む命令である。ここでは、割り当て対象のレジスタ1002は8つあり、REG#n(nは0〜7までの整数)は、n番目のレジスタ1002の値を表している。また、MEM(x)は、メモリ1003におけるアドレスxの値を表している。ここでは、各レジスタ1002に格納される値のサイズと、MEM(x)でアクセスされる値のサイズとは、等しいものとし、例えば8バイトであるとする。また、「<−」は、右辺の値で左辺の記憶領域を更新する命令を表す。また、「+」、「−」、「*」、「÷」は、それぞれ、加算、減算、乗算、除算を表している。 In this example, it is assumed that the test command sequence shown in FIG. 6 has been acquired (step S11). This test command sequence consists of 10 test commands. Identification information of instructions 1 to 10 is assigned to each test instruction in order from the beginning. The instruction address described in the line of each test instruction represents the address on the memory 1003 in which the test instruction is stored. Each test instruction is an instruction to write the value read from the allocated storage area or the result of performing four arithmetic operations on the read value to the allocated storage area. Here, there are eight registers 1002 to be allocated, and REG # n (n is an integer from 0 to 7) represents the value of the nth register 1002. Further, MEM (x) represents the value of the address x in the memory 1003. Here, it is assumed that the size of the value stored in each register 1002 and the size of the value accessed by MEM (x) are equal to each other, for example, 8 bytes. Further, "<-" represents an instruction to update the storage area on the left side with the value on the right side. Further, "+", "-", "*", and "÷" represent addition, subtraction, multiplication, and division, respectively.

まず、ステップS12におけるチェックポイントの検出動作について説明する。 First, the checkpoint detection operation in step S12 will be described.

まず、チェックポイント検出部12は、命令1「REG#0<−MEM(0x20000)」を読み込む(ステップS31)。命令1で参照される記憶領域は、MEM(0x20000)であり、更新される記憶領域は、REG#0である。 First, the checkpoint detection unit 12 reads the instruction 1 "REG # 0 <-MEM (0x20000)" (step S31). The storage area referenced by instruction 1 is MEM (0x20000), and the storage area to be updated is REG # 0.

ここで、命令1は先頭の命令であるため、更新リストには、命令1で参照または更新される記憶領域の識別情報は記憶されていない(ステップS32でNo、S34でNo)。そこで、チェックポイント検出部12は、命令1で更新される記憶領域の識別情報であるREG#0を、更新リストに追加する(ステップS35)。更新リストは、図7の命令1の列に示す通りとなる。 Here, since the instruction 1 is the first instruction, the update list does not store the identification information of the storage area referenced or updated by the instruction 1 (No in step S32, No in S34). Therefore, the checkpoint detection unit 12 adds REG # 0, which is the identification information of the storage area updated by the instruction 1, to the update list (step S35). The update list is as shown in the column of instruction 1 in FIG.

そして、チェックポイント検出部12は、命令1が最後の命令ではないので(ステップS37でNo)、ステップS31からの動作を繰り返す。 Then, since the instruction 1 is not the last instruction (No in step S37), the checkpoint detection unit 12 repeats the operation from step S31.

次の命令2「REG#3<−REG#1+REG#2」についてのステップS31からの処理は、命令1についての処理と略同様である。すなわち、チェックポイント検出部12は、命令2で参照または更新される記憶領域の識別情報が更新リストに記憶されていないので、更新される記憶領域REG#3を、更新リストに追加する。更新リストは、図7の命令2の列に示す通りとなる。 The processing from step S31 for the next instruction 2 “REG # 3 <−REG # 1 + REG # 2” is substantially the same as the processing for instruction 1. That is, since the identification information of the storage area referenced or updated by the instruction 2 is not stored in the update list, the checkpoint detection unit 12 adds the updated storage area REG # 3 to the update list. The update list is as shown in the column of instruction 2 in FIG.

次の命令3「MEM(0x20100)<−REG#4*REG#5」についてのステップS31からの処理は、命令1、2についての処理と略同様である。すなわち、チェックポイント検出部12は、命令3で参照または更新される記憶領域の識別情報が更新リストに記憶されていないので、更新される記憶領域MEM(0x20100)を、更新リストに追加する。更新リストは、図7の命令3の列に示す通りとなる。 The processing from step S31 for the next instruction 3 “MEM (0x20100) <−REG # 4 * REG # 5” is substantially the same as the processing for instructions 1 and 2. That is, since the identification information of the storage area referenced or updated by the instruction 3 is not stored in the update list, the checkpoint detection unit 12 adds the updated storage area MEM (0x20100) to the update list. The update list is as shown in the column of instruction 3 in FIG.

次に、チェックポイント検出部12は、命令4「REG#4<−REG#3−REG#0」を読み込む(ステップS31)。命令4で参照される記憶領域は、REG#3およびREG#0であり、更新される記憶領域は、REG#4である。 Next, the checkpoint detection unit 12 reads the instruction 4 “REG # 4 <−REG # 3-REG # 0” (step S31). The storage areas referenced by instruction 4 are REG # 3 and REG # 0, and the storage areas to be updated are REG # 4.

ここで、更新リストには、命令4で参照されるREG#3およびREG#0が記憶されている(ステップS32でYes)。そこで、チェックポイント検出部12は、REG#3およびREG#0を、更新リストから削除する(ステップS33)。 Here, REG # 3 and REG # 0 referred to by the instruction 4 are stored in the update list (Yes in step S32). Therefore, the checkpoint detection unit 12 deletes REG # 3 and REG # 0 from the update list (step S33).

また、更新リストには、命令4で更新されるREG#4は記憶されていない(ステップS34でNo)。そこで、チェックポイント検出部12は、命令4で更新される記憶領域の識別情報であるREG#4を、更新リストに追加する。更新リストは、図7の命令4の列に示す通りとなる。 Further, REG # 4 updated by the instruction 4 is not stored in the update list (No in step S34). Therefore, the checkpoint detection unit 12 adds REG # 4, which is the identification information of the storage area updated by the instruction 4, to the update list. The update list is as shown in the column of instruction 4 in FIG.

次の命令5「REG#3<−REG#2÷REG#6」についてのステップS31からの処理は、命令1〜3についての処理と略同様である。すなわち、チェックポイント検出部12は、命令5で参照または更新される記憶領域の識別情報が更新リストに記憶されていないので、更新される記憶領域REG#3を、更新リストに追加する。更新リストは、図7の命令5の列に示す通りとなる。 The processing from step S31 for the next instruction 5 “REG # 3 <−REG # 2 ÷ REG # 6” is substantially the same as the processing for instructions 1 to 3. That is, the checkpoint detection unit 12 adds the updated storage area REG # 3 to the update list because the identification information of the storage area referenced or updated by the instruction 5 is not stored in the update list. The update list is as shown in the column of instruction 5 in FIG.

次の命令6「MEM(0x20018)<−REG#0」についてのステップS31からの処理は、命令1〜3、5についての処理と略同様である。すなわち、チェックポイント検出部12は、命令6で参照または更新される記憶領域の識別情報が更新リストに記憶されていないので、更新される記憶領域MEM(0x20018)を、更新リストに追加する。更新リストは、図7の命令6の列に示す通りとなる。 The processing from step S31 for the next instruction 6 “MEM (0x20018) <−REG # 0” is substantially the same as the processing for instructions 1 to 5. That is, since the identification information of the storage area referenced or updated by the instruction 6 is not stored in the update list, the checkpoint detection unit 12 adds the updated storage area MEM (0x20018) to the update list. The update list is as shown in the column of instruction 6 in FIG.

次に、チェックポイント検出部12は、命令7「MEM(0x20100)<−REG#5」を読み込む(ステップS31)。命令7で参照される記憶領域は、REG#5であり、更新される記憶領域は、MEM(0x20100)である。 Next, the checkpoint detection unit 12 reads the instruction 7 “MEM (0x20100) <−REG # 5” (step S31). The storage area referenced by instruction 7 is REG # 5, and the storage area to be updated is MEM (0x20100).

ここで、更新リストには、命令7で参照される記憶領域の識別情報は記憶されていないが(ステップS32でNo)、更新されるMEM(0x20100)が記憶されている(ステップS34でYes)。 Here, the update list does not store the identification information of the storage area referred to by the instruction 7 (No in step S32), but stores the MEM (0x20100) to be updated (Yes in step S34). ..

そこで、チェックポイント検出部12は、命令7の命令アドレス0x1030および更新される記憶領域の識別情報MEM(0x20100)を関連付けて、チェックポイントリストに追加する。 Therefore, the checkpoint detection unit 12 associates the instruction address 0x1030 of the instruction 7 with the identification information MEM (0x20100) of the storage area to be updated, and adds it to the checkpoint list.

これにより、チェックポイントリストには、図8の1行目に示す情報が追加された。なお、更新リストは、命令6までが解析された時点からの更新はなく、命令7の列に示す通りとなる。 As a result, the information shown in the first line of FIG. 8 has been added to the checkpoint list. The update list has not been updated since the time when the instruction 6 was analyzed, and is as shown in the column of the instruction 7.

次の命令8「REG#7<− REG#2+REG#0」についてのステップS31からの処理は、命令1〜3、5〜6についての処理と略同様である。すなわち、チェックポイント検出部12は、命令8で参照または更新される記憶領域の識別情報が更新リストに記憶されていないので、更新される記憶領域REG#7を、更新リストに追加する。更新リストは、図7の命令8の列に示す通りとなる。 The processing from step S31 for the next instruction 8 “REG # 7 <−REG # 2 + REG # 0” is substantially the same as the processing for instructions 1 to 3 and 5 to 6. That is, since the identification information of the storage area referenced or updated by the instruction 8 is not stored in the update list, the checkpoint detection unit 12 adds the updated storage area REG # 7 to the update list. The update list is as shown in the column of instruction 8 in FIG.

次の命令9「REG#4<−MEM(0x20020)」についてのステップS31からの処理は、命令7についての処理と略同様である。すなわち、チェックポイント検出部12は、命令9で参照される記憶領域の識別情報が更新リストに記憶されていないので、更新リストを更新しない。また、チェックポイント検出部12は、命令9で更新される記憶領域の識別情報REG#4が更新リストに記憶されているので、命令9の命令アドレス0x1040と、更新される記憶領域の識別情報REG#4とを関連付けて、チェックポイントリストに追加する。これにより、チェックポイントリストには、図8の2行目に示す情報が追加された。なお、更新リストは、命令8までが解析された時点からの更新はなく、命令9の列に示す通りとなる。 The processing from step S31 for the next instruction 9 “REG # 4 <−MEM (0x20020)” is substantially the same as the processing for instruction 7. That is, the checkpoint detection unit 12 does not update the update list because the identification information of the storage area referred to by the instruction 9 is not stored in the update list. Further, since the checkpoint detection unit 12 stores the storage area identification information REG # 4 updated by the instruction 9 in the update list, the instruction address 0x1040 of the instruction 9 and the update storage area identification information REG # 4 are stored in the update list. Associate with # 4 and add to the checkpoint list. As a result, the information shown in the second line of FIG. 8 has been added to the checkpoint list. The update list has not been updated since the time when the instruction 8 was analyzed, and is as shown in the column of the instruction 9.

次に、チェックポイント検出部12は、命令10「MEM(0x20050)<−REG#7」を読み込む(ステップS31)。命令10で参照される記憶領域は、REG#7であり、更新される記憶領域は、MEM(0x20050)である。 Next, the checkpoint detection unit 12 reads the instruction 10 “MEM (0x2050) <−REG # 7” (step S31). The storage area referenced by instruction 10 is REG # 7, and the storage area to be updated is MEM (0x2050).

ここで、更新リストには、命令10で参照されるREG#7が記憶されている(ステップS32でYes)。そこで、チェックポイント検出部12は、REG#7を、更新リストから削除する(ステップS33)。 Here, REG # 7 referred to by instruction 10 is stored in the update list (Yes in step S32). Therefore, the checkpoint detection unit 12 deletes REG # 7 from the update list (step S33).

また、更新リストには、命令10で更新されるMEM(0x20050)は記憶されていない(ステップS34でNo)。そこで、チェックポイント検出部12は、命令10で更新される記憶領域の識別情報であるMEM(0x20050)を、更新リストに追加する。更新リストは、図7の命令10の列に示す通りとなる。 Further, the MEM (0x2050) updated by the instruction 10 is not stored in the update list (No in step S34). Therefore, the checkpoint detection unit 12 adds MEM (0x20050), which is the identification information of the storage area updated by the instruction 10, to the update list. The update list is as shown in the column of instruction 10 in FIG.

そして、チェックポイント検出部12は、命令10が最後の命令であるため(ステップS37でYes)、ステップS12のチェックポイントの検出動作を終了する。 Then, since the instruction 10 is the last instruction (Yes in step S37), the checkpoint detection unit 12 ends the checkpoint detection operation in step S12.

これにより、図8に示すチェックポイントリストが生成された。 As a result, the checkpoint list shown in FIG. 8 was generated.

次に、試験命令列実行部13は、生成されたチェックポイントリストに基づいて、システム100に、順次、試験命令列を実行させる。 Next, the test command sequence execution unit 13 causes the system 100 to sequentially execute the test command sequence based on the generated checkpoint list.

具体的には、まず、試験命令列実行部13は、最初のチェックポイントの命令アドレスである0x1030の命令7を選択する(ステップS13)。 Specifically, first, the test instruction sequence execution unit 13 selects the instruction 7 of 0x1030, which is the instruction address of the first checkpoint (step S13).

次に、試験命令列実行部13は、命令7を退避領域にバックアップする(ステップS14、S41)。 Next, the test instruction sequence execution unit 13 backs up the instruction 7 to the save area (steps S14 and S41).

次に、試験命令列実行部13は、命令アドレス0x1030に、割り込み命令を上書きする(ステップS42)。 Next, the test instruction sequence execution unit 13 overwrites the interrupt instruction at the instruction address 0x1030 (step S42).

次に、試験命令列実行部13は、システム100に、試験命令列の先頭の命令1からを順次実行させる(ステップS43)。このとき、命令7に置き換えられた割り込み命令により、命令アドレス0x1030で命令の実行が停止する。つまり、システム100は、命令1から命令6までを実行して処理を停止する。そこで、実行結果検証部14は、それまでの実行結果を出力装置に出力する。 Next, the test instruction sequence execution unit 13 causes the system 100 to sequentially execute the first instruction 1 of the test instruction sequence (step S43). At this time, the execution of the instruction is stopped at the instruction address 0x1030 by the interrupt instruction replaced by the instruction 7. That is, the system 100 executes instructions 1 to 6 to stop the process. Therefore, the execution result verification unit 14 outputs the execution results up to that point to the output device.

次に、実行結果検証部14は、退避領域にバックアップした命令7を、割り込み命令に書き換えた命令アドレス0x1030に書き戻す(ステップS44)。 Next, the execution result verification unit 14 writes back the instruction 7 backed up in the save area to the instruction address 0x1030 rewritten as an interrupt instruction (step S44).

次に、実行結果検証部14は、チェックポイントリストを参照し、停止している命令アドレス0x1030に関連付けられた記憶領域の識別情報であるMEM(0x20100)の値を取得する(ステップS15)。 Next, the execution result verification unit 14 refers to the checkpoint list and acquires the value of MEM (0x20100), which is the identification information of the storage area associated with the stopped instruction address 0x1030 (step S15).

そして、実行結果検証部14は、MEM(0x20100)の値を期待値と比較する(ステップS16)。 Then, the execution result verification unit 14 compares the value of MEM (0x20100) with the expected value (step S16).

ここでは、MEM(0x20100)の値は、期待値通りであったものとする(ステップS16でYes)。 Here, it is assumed that the value of MEM (0x20100) is as expected (Yes in step S16).

そして、次のチェックポイントがあるので(ステップS17でYes)、試験命令列実行部13は、次のチェックポイントの命令アドレスである0x1040の命令9を選択する(ステップS13)。 Then, since there is the next checkpoint (Yes in step S17), the test instruction sequence execution unit 13 selects the instruction 9 of 0x1040, which is the instruction address of the next checkpoint (step S13).

次に、試験命令列実行部13は、命令9を退避領域にバックアップする(ステップS14、S41)。 Next, the test instruction sequence execution unit 13 backs up the instruction 9 in the save area (steps S14 and S41).

次に、試験命令列実行部13は、命令アドレス0x1040に、割り込み命令を上書きする(ステップS42)。 Next, the test instruction sequence execution unit 13 overwrites the interrupt instruction at the instruction address 0x1040 (step S42).

次に、試験命令列実行部13は、システム100に、試験命令列の先頭の命令1からを順次実行させる(ステップS43)。このとき、命令9に置き換えられた割り込み命令により、命令アドレス0x1040で命令の実行が停止する。つまり、システム100は、命令1から命令8までを実行して処理を停止する。そこで、実行結果検証部14は、それまでの実行結果を出力装置に出力する。 Next, the test instruction sequence execution unit 13 causes the system 100 to sequentially execute the first instruction 1 of the test instruction sequence (step S43). At this time, the execution of the instruction is stopped at the instruction address 0x1040 by the interrupt instruction replaced by the instruction 9. That is, the system 100 executes instructions 1 to 8 to stop the process. Therefore, the execution result verification unit 14 outputs the execution results up to that point to the output device.

次に、実行結果検証部14は、退避領域にバックアップした命令9を、割り込み命令に書き換えた命令アドレス0x1040に書き戻す(ステップS44)。 Next, the execution result verification unit 14 writes back the instruction 9 backed up in the save area to the instruction address 0x1040 rewritten as an interrupt instruction (step S44).

次に、実行結果検証部14は、チェックポイントリストを参照し、停止している命令アドレス0x1040に関連付けられた記憶領域の識別情報であるREG#4の値を取得する(ステップS15)。 Next, the execution result verification unit 14 refers to the checkpoint list and acquires the value of REG # 4, which is the identification information of the storage area associated with the stopped instruction address 0x1040 (step S15).

そして、実行結果検証部14は、REG#4の値を期待値と比較する(ステップS16)。 Then, the execution result verification unit 14 compares the value of REG # 4 with the expected value (step S16).

ここでは、REG#4の値は、期待値通りであったものとする(ステップS16でYes)。 Here, it is assumed that the value of REG # 4 is as expected (Yes in step S16).

そして、実行結果検証部14は、今回のチェックポイントが最後のチェックポイントであり、次のチェックポイントがないので(ステップS17でNo)、次のステップS18に進む。 Then, the execution result verification unit 14 proceeds to the next step S18 because the current checkpoint is the last checkpoint and there is no next checkpoint (No in step S17).

すなわち、実行結果検証部14は、試験命令列の先頭の命令1から末尾の命令10までを、システム100に実行させる(ステップS18)。 That is, the execution result verification unit 14 causes the system 100 to execute the first instruction 1 to the last instruction 10 of the test instruction sequence (step S18).

そして、実行結果検証部14は、試験命令列の命令において更新される全ての記憶領域の値を読み込む(ステップS19)。 Then, the execution result verification unit 14 reads the values of all the storage areas updated in the instructions of the test instruction sequence (step S19).

そして、実行結果検証部14は、読み込んだ記憶領域の値それぞれを期待値と比較し、その結果を出力する(ステップS20)。 Then, the execution result verification unit 14 compares each value of the read storage area with the expected value, and outputs the result (step S20).

以上で、具体例の説明を終了する。 This is the end of the explanation of the specific example.

次に、本発明の実施の形態の効果について述べる。 Next, the effect of the embodiment of the present invention will be described.

本発明の実施の形態としての検証装置は、プロセッサを含むシステムのランダムテストにおいて、試験のランダム性を損なうことなく、先行する試験命令の不正動作を容易に検出することができる。 The verification device as an embodiment of the present invention can easily detect an illegal operation of a preceding test instruction in a random test of a system including a processor without impairing the randomness of the test.

その理由について説明する。本実施の形態では、試験命令列取得部が、プロセッサを含むシステムに実行させる試験命令の並びである試験命令列を取得する。そして、チェックポイント検出部が、試験命令列において、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令をチェックポイントとして検出する。そして、試験命令列実行部が、試験命令列の先頭から各チェックポイントの直前までおよび先頭から末尾までを、システムに順次実行させる。そして、実行結果検証部が、システムによる各実行結果を検証するからである。 The reason will be explained. In the present embodiment, the test instruction sequence acquisition unit acquires a test instruction sequence which is a sequence of test instructions to be executed by a system including a processor. Then, the checkpoint detection unit detects as a checkpoint a subsequent test instruction that is updated without reference to the storage area updated by the preceding test instruction in the test instruction sequence. Then, the test command sequence execution unit causes the system to sequentially execute from the beginning of the test instruction sequence to immediately before each checkpoint and from the beginning to the end. Then, the execution result verification unit verifies each execution result by the system.

このように、本実施の形態は、試験命令列の途中で不正動作が発生した場合でも、後続の命令がこの実行結果を上書きする前までの実行結果をチェックするので、より確実に不正動作を検出できるようになる。 As described above, in the present embodiment, even if an illegal operation occurs in the middle of the test instruction sequence, the execution result before the subsequent instruction overwrites the execution result is checked, so that the illegal operation can be performed more reliably. You will be able to detect it.

更に、本実施の形態は、チェックポイントの直前まで試験命令列の実行において、全ての記憶領域を検証の対象とせず、当該チェックポイントにおいて参照される予定の記憶領域を検証の対象とする。このように、本実施の形態は、各チェックポイントの直前までの試験命令列の実行結果について検証処理を行うため、検証処理自体の回数を増やすものの、各検証処理において検証対象となる記憶領域の数の増大を抑制する。その結果、本実施の形態は、処理時間の増加を軽減することができる。 Further, in the present embodiment, in the execution of the test instruction sequence until immediately before the checkpoint, not all the storage areas are subject to verification, but the storage area to be referred to at the checkpoint is subject to verification. As described above, in the present embodiment, since the verification process is performed on the execution result of the test instruction sequence up to immediately before each checkpoint, the number of verification processes themselves is increased, but the storage area to be verified in each verification process is used. Suppress the increase in numbers. As a result, the present embodiment can reduce the increase in processing time.

なお、本発明の実施の形態において、検証装置の各機能ブロックが、メモリに記憶されたコンピュータ・プログラムを実行するCPUによって実現される例を中心に説明した。これに限らず、各機能ブロックの一部、全部、または、それらの組み合わせが専用のハードウェアにより実現されていてもよい。 In the embodiment of the present invention, an example in which each functional block of the verification device is realized by a CPU that executes a computer program stored in a memory has been mainly described. Not limited to this, a part, all, or a combination thereof of each functional block may be realized by dedicated hardware.

また、上述した本発明の実施の形態において、検証装置の機能ブロックは、複数の装置に分散されて実現されてもよい。 Further, in the above-described embodiment of the present invention, the functional blocks of the verification device may be distributed and realized in a plurality of devices.

また、上述した本発明の実施の形態において、各フローチャートを参照して説明した検証装置の動作を、本発明のコンピュータ・プログラムとしてコンピュータ装置の記憶装置(記憶媒体)に格納しておく。そして、係るコンピュータ・プログラムを当該CPUが読み出して実行するようにしてもよい。そして、このような場合において、本発明は、係るコンピュータ・プログラムのコードあるいは記憶媒体によって構成される。 Further, in the above-described embodiment of the present invention, the operation of the verification device described with reference to each flowchart is stored in the storage device (storage medium) of the computer device as the computer program of the present invention. Then, the CPU may read and execute the computer program. Then, in such a case, the present invention is composed of the code or storage medium of the computer program.

また、本発明は、上述した本発明の実施の形態に限定されず、様々な態様で実施されることが可能である。 Further, the present invention is not limited to the above-described embodiment of the present invention, and can be implemented in various modes.

1 検証装置
11 試験命令列取得部
12 チェックポイント検出部
13 試験命令列実行部
14 実行結果検証部
100 システム
1001 プロセッサ
1002 レジスタ
1003 メモリ
1 Verification device 11 Test instruction sequence acquisition unit 12 Checkpoint detection unit 13 Test instruction sequence execution unit 14 Execution result verification unit 100 System 1001 Processor 1002 Register 1003 Memory

Claims (5)

プロセッサを含むシステムに実行させる試験命令の並びである試験命令列を取得する試験命令列取得部と、
前記試験命令列において、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令をチェックポイントとして検出するチェックポイント検出部と、
前記試験命令列の先頭から前記各チェックポイントの直前まで、および、前記試験命令列の先頭から末尾までを、前記システムに順次実行させる試験命令列実行部と、
前記システムによる各実行結果を、チェックポイント直前まで実行した際にはチェックポイントの試験命令でアクセスされる予定の記憶領域について検証する実行結果検証部と、
を備えた検証装置。
A test instruction sequence acquisition unit that acquires a test instruction sequence that is a sequence of test instructions to be executed by a system including a processor, and a test instruction sequence acquisition unit.
In the test instruction sequence, a checkpoint detection unit that detects as a checkpoint a subsequent test instruction that is updated without reference to the storage area updated by the preceding test instruction.
A test command sequence execution unit that causes the system to sequentially execute the test command sequence from the beginning to immediately before each checkpoint and from the beginning to the end of the test instruction sequence.
An execution result verification unit that verifies the storage area that will be accessed by the checkpoint test instruction when each execution result by the system is executed until just before the checkpoint.
Verification device equipped with.
前記試験命令列実行部は、前記各チェックポイントについて、当該チェックポイントの試験命令を一時的にチェックポイントの直前で命令の実行を停止させる割り込み命令に置き換えることにより、前記試験命令列の先頭から当該チェックポイントの直前までを前記システムに実行させることを特徴とする請求項1に記載の検証装置。 For each checkpoint, the test instruction sequence execution unit temporarily replaces the test instruction of the checkpoint with an interrupt instruction that temporarily stops the execution of the instruction immediately before the checkpoint , whereby the test instruction sequence is described from the beginning of the test instruction sequence. The verification device according to claim 1, wherein the system is executed until immediately before the checkpoint. 前記実行結果検証部は、前記試験命令列の先頭から前記各チェックポイントの直前までの実行結果については、当該チェックポイントの命令において更新される予定の記憶領域について検証を行い、前記試験命令列の先頭から末尾までの実行結果については、各試験命令において更新される記憶領域について検証を行うことを特徴とする請求項1または請求項2に記載の検証装置。 The execution result verification unit verifies the storage area to be updated by the instruction of the checkpoint for the execution result from the beginning of the test instruction sequence to immediately before each checkpoint, and verifies the storage area of the test instruction sequence. The verification device according to claim 1 or 2, wherein the execution result from the beginning to the end is verified for the storage area updated in each test instruction. コンピュータ装置が、
プロセッサを含むシステムに実行させる試験命令の並びである試験命令列を取得し、
前記試験命令列において、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令をチェックポイントとして検出し、
前記試験命令列の先頭から前記各チェックポイントの直前まで、および、前記試験命令列の先頭から末尾までを、前記システムに順次実行させ、
前記システムによる各実行結果を、チェックポイント直前まで実行した際にはチェックポイントの試験命令でアクセスされる予定の記憶領域について検証する方法。
The computer device
Obtain a test instruction sequence, which is a sequence of test instructions to be executed by the system including the processor,
In the test instruction sequence, the subsequent test instruction updated without reference to the storage area updated by the preceding test instruction is detected as a checkpoint.
The system is sequentially executed from the beginning of the test instruction sequence to immediately before each checkpoint and from the beginning to the end of the test instruction sequence.
A method of verifying the storage area to be accessed by a checkpoint test instruction when each execution result by the system is executed until just before the checkpoint.
プロセッサを含むシステムに実行させる試験命令の並びである試験命令列を取得する試験命令列取得ステップと、
前記試験命令列において、先行の試験命令により更新された記憶領域が参照されないまま更新される後続の試験命令をチェックポイントとして検出するチェックポイント検出ステップと、
前記試験命令列の先頭から前記各チェックポイントの直前まで、および、前記試験命令列の先頭から末尾までを、前記システムに順次実行させる試験命令列実行ステップと、
前記システムによる各実行結果を、チェックポイント直前まで実行した際にはチェックポイントの試験命令でアクセスされる予定の記憶領域について検証する実行結果検証ステップと、
をコンピュータ装置に実行させるプログラム。
A test instruction sequence acquisition step for acquiring a test instruction sequence, which is a sequence of test instructions to be executed by a system including a processor, and a test instruction sequence acquisition step.
In the test instruction sequence, a checkpoint detection step of detecting a subsequent test instruction updated as a checkpoint without referring to the storage area updated by the preceding test instruction, and a checkpoint detection step.
A test command sequence execution step that causes the system to sequentially execute the test command sequence from the beginning to immediately before each checkpoint and from the beginning to the end of the test instruction sequence.
When each execution result by the system is executed until just before the checkpoint, the execution result verification step for verifying the storage area to be accessed by the checkpoint test instruction, and the execution result verification step.
A program that causes a computer device to execute.
JP2016232093A 2016-11-30 2016-11-30 Verification equipment, methods and programs Active JP6900661B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016232093A JP6900661B2 (en) 2016-11-30 2016-11-30 Verification equipment, methods and programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016232093A JP6900661B2 (en) 2016-11-30 2016-11-30 Verification equipment, methods and programs

Publications (2)

Publication Number Publication Date
JP2018088213A JP2018088213A (en) 2018-06-07
JP6900661B2 true JP6900661B2 (en) 2021-07-07

Family

ID=62494619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016232093A Active JP6900661B2 (en) 2016-11-30 2016-11-30 Verification equipment, methods and programs

Country Status (1)

Country Link
JP (1) JP6900661B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09330242A (en) * 1996-06-12 1997-12-22 Hitachi Ltd Test instruction string generation system for information processor
JP3206575B2 (en) * 1998-12-18 2001-09-10 日本電気株式会社 Fault test apparatus, fault test method, and recording medium recording fault test method
JP2013206061A (en) * 2012-03-28 2013-10-07 Sony Corp Information processing device and method, and program

Also Published As

Publication number Publication date
JP2018088213A (en) 2018-06-07

Similar Documents

Publication Publication Date Title
US10379989B2 (en) Processing apparatus, trace unit and diagnostic apparatus
US11036507B2 (en) Processor testing using pairs of counter incrementing and branch instructions
JP7377812B2 (en) Exception handling in transactions
US8683450B2 (en) Systems, methods, and media for testing software patches
JP6290303B2 (en) Circuit and method for testing error correction capability
JP2008084275A (en) Device and method for monitoring alteration of software
JP6900661B2 (en) Verification equipment, methods and programs
CN107665169B (en) Method and device for testing processor program
JP2010102454A (en) Information processing apparatus and information processing program
JP6320269B2 (en) Software test support apparatus and software test support program
JP5024252B2 (en) Trace information acquisition device, trace information acquisition program, and trace information acquisition method
KR102002545B1 (en) Code test automatic proceeding method through virtualixation and appratus for the same
JP5550578B2 (en) Entry rewriting device and entry rewriting program
KR101306656B1 (en) Apparatus and method for providing dynamic analysis information of malignant code
US20120023580A1 (en) Method for detecting an attack by fault injection into a memory device, and corresponding detection system
US20240104219A1 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
JP5181699B2 (en) Computer test method, program, and information processing apparatus
JP6541912B2 (en) Information processing apparatus and access control program
US20150309904A1 (en) Testing optimization of microprocessor table functions
WO2014118910A1 (en) Memory diagnosis device
JPH11282722A (en) Program verification method
JP2007148529A (en) Buffer overflow detection device, buffer overflow detection method, and buffer overflow detection program
JP3012618B1 (en) Debugging method of inspected program and its debugging method
JP5447841B2 (en) Information processing apparatus, debug information acquisition method, and debug information acquisition program
US9678776B2 (en) Suppress newer facilities when simulating an older machine

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191015

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200928

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201006

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201203

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210518

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210531

R150 Certificate of patent or registration of utility model

Ref document number: 6900661

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150