Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4854551B2 - Test apparatus for branch prediction circuit of information processing apparatus, test method for branch prediction circuit of information processing apparatus, and test program for branch prediction circuit of information processing apparatus - Google Patents
[go: Go Back, main page]

JP4854551B2 - Test apparatus for branch prediction circuit of information processing apparatus, test method for branch prediction circuit of information processing apparatus, and test program for branch prediction circuit of information processing apparatus - Google Patents

Test apparatus for branch prediction circuit of information processing apparatus, test method for branch prediction circuit of information processing apparatus, and test program for branch prediction circuit of information processing apparatus Download PDF

Info

Publication number
JP4854551B2
JP4854551B2 JP2007064793A JP2007064793A JP4854551B2 JP 4854551 B2 JP4854551 B2 JP 4854551B2 JP 2007064793 A JP2007064793 A JP 2007064793A JP 2007064793 A JP2007064793 A JP 2007064793A JP 4854551 B2 JP4854551 B2 JP 4854551B2
Authority
JP
Japan
Prior art keywords
branch
instruction
instruction sequence
random
prediction circuit
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.)
Expired - Fee Related
Application number
JP2007064793A
Other languages
Japanese (ja)
Other versions
JP2008225978A (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.)
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 JP2007064793A priority Critical patent/JP4854551B2/en
Publication of JP2008225978A publication Critical patent/JP2008225978A/en
Application granted granted Critical
Publication of JP4854551B2 publication Critical patent/JP4854551B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Advance Control (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a device, method and program for testing a branch prediction circuit of an information processor, in which verification of the branch prediction circuit can be easily and efficiently performed without performing processing for specifying a branch point and substituting a branch instruction by the other instruction. <P>SOLUTION: In the branch prediction circuit test device 1, a random instruction generation part 11 generates a random instruction sequence, and a test execution control part 12 makes a device 2 of the test object execute the instruction sequence. After completion of execution of the instruction sequence, the control part 12 instructs the generation part 11 to shift the instruction sequence, and the control part 12 makes the device 2 of the test object execute the shifted new instruction sequence. A verification part 13 stores log information every time when the instruction sequence is executed, and compares the log information with an expected value stored in an expected value storage part 132 to verify the operation of the branch prediction circuit 21. <P>COPYRIGHT: (C)2008,JPO&amp;INPIT

Description

本発明は、情報処理装置の分岐予測回路の試験技術に関し、特に、分岐命令を含むランダムな命令列を被試験対象装置に実行させて、該ランダムな命令列の実行結果に基づき該被試験対象装置の分岐予測回路の動作を検証する情報処理装置の分岐予測回路の試験装置、情報処理装置の分岐予測回路の試験方法及び情報処理装置の分岐予測回路の試験プログラムに関する。   The present invention relates to a test technique for a branch prediction circuit of an information processing device, and in particular, causes a device under test to execute a random instruction sequence including a branch instruction, and the device under test based on an execution result of the random instruction sequence. The present invention relates to a test apparatus for a branch prediction circuit of an information processing apparatus, a test method for a branch prediction circuit of an information processing apparatus, and a test program for a branch prediction circuit of the information processing apparatus.

従来、分岐予測回路を検証するためには、命令列に含まれる分岐命令箇所(分岐ポイント)を特定し、該分岐ポイントの分岐命令を他の命令に書き換えて該命令列を実行し、分岐予測が正しくキャンセルされることを検証する必要があった。ランダム命令列を使用したシステム試験では分岐命令箇所(分岐ポイント)を特定できないため、該ランダム命令列に含まれる分岐命令を書き換える一連の処理(以下、「ファントム」という)をランダム命令列生成時に埋め込んだ上で該ランダム命令列を実行し、該実行結果に基づいて分岐予測回路の検証を行っていた。
なお、分岐予測機能を検証する具体的技術として、下記の特許文献1に、ランダム命令列を生成し、該命令列内の分岐命令の分岐先をランダムに設定し、分岐命令で比較する条件を初期設定する命令と繰り返しループから抜け出すために比較値を変化させる命令とを上記命令列内に設定し、無条件分岐命令の時ループを抜け出す命令を設定することで、分岐予測機能について試験を行う情報処理装置試験方式に関して記載されている。
特開平2−115942号公報
Conventionally, in order to verify a branch prediction circuit, a branch instruction location (branch point) included in an instruction sequence is specified, the branch instruction at the branch point is rewritten to another instruction, the instruction sequence is executed, and branch prediction is performed. Had to be verified to be canceled correctly. Since a branch instruction location (branch point) cannot be specified in a system test using a random instruction sequence, a series of processing (hereinafter referred to as “phantom”) for rewriting a branch instruction included in the random instruction sequence is embedded when generating a random instruction sequence. Then, the random instruction sequence is executed, and the branch prediction circuit is verified based on the execution result.
In addition, as a specific technique for verifying the branch prediction function, the following patent document 1 describes a condition for generating a random instruction sequence, setting a branch destination of a branch instruction in the instruction sequence at random, and comparing with a branch instruction. Test the branch prediction function by setting the instruction to be initialized and the instruction that changes the comparison value to exit the loop repeatedly in the above instruction sequence, and setting the instruction to exit the loop at the time of an unconditional branch instruction. The information processing apparatus test method is described.
Japanese Patent Laid-Open No. 2-115942

前述した、ランダム命令列に含まれる分岐命令を書き換えるファントムをランダム命令生成時に埋め込んで該命令を実行して分岐予測回路の検証を行う技術は、機能試験レベルと変わらないため、試験のランダム性が失われる。また、命令の書き換え作業に時間を要し、試験効率の低下に繋がる。 Since the technique for verifying the branch prediction circuit by embedding a phantom for rewriting a branch instruction included in a random instruction sequence and executing the instruction when generating a random instruction is the same as the functional test level, the randomness of the test is Lost. In addition, it takes time to rewrite instructions, leading to a decrease in test efficiency.

本発明は上記問題点を解決するためになされたものであって、分岐ポイントを特定して分岐命令を他の命令で置き換える処理を行うことなく、容易に、かつ効率的に分岐予測回路の検証を可能とする情報処理装置の分岐予測回路の試験装置、情報処理装置の分岐予測回路の試験方法及び情報処理装置の分岐予測回路の試験プログラムの提供を目的とする。   The present invention has been made to solve the above problems, and it is possible to easily and efficiently verify a branch prediction circuit without performing a process of specifying a branch point and replacing a branch instruction with another instruction. An object is to provide a test apparatus for a branch prediction circuit of an information processing apparatus, a test method for a branch prediction circuit of an information processing apparatus, and a test program for a branch prediction circuit of the information processing apparatus.

上記課題を解決するため、本発明は、次のようにして前記課題を解決する。
(1)分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験装置を設ける。上記情報処理装置における分岐予測回路の試験装置は、分岐命令を含むランダムな命令列を生成する手段と、上記ランダムな命令列を被試験対象装置に与えて実行させ、該ランダムな命令列の実行後、上記ランダムな命令列を所定の命令数分シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させる試験実行制御手段と、上記被試験対象装置による上記ランダムな命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する検証手段とを備える。
(2)上記試験実行制御手段は、更に、上記新たな命令列が実行された後に、該新たな命令列を上記シフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置に実行させる。
(3)上記試験実行制御手段は、上記命令列に含まれる分岐命令の分岐条件を規定するデータを、上記ランダムな命令列を実行する毎に変更する。
(4)上記検証手段は、前記命令列の実行中にトラップが発生したことを契機として、該トラップ発生時のログ情報を記憶するログ情報記憶手段と、
前記命令列の実行後に、前記ログ情報記憶手段に記憶されたログ情報と予め用意された期待値もしくは先の試験時に取得したログ情報とを比較し、該比較結果に基づいて該命令列の実行結果を検証する比較手段とを備える。
(5)分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験方法を実行する。上記情報処理装置における分岐予測回路の試験方法は、分岐命令を含むランダムな命令列を生成し、上記ランダムな命令列を被試験対象装置に与えて実行させ、該ランダムな命令列の実行後、上記ランダムな命令列を所定の命令数分シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させ、上記被試験対象装置による上記ランダムな命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する。
(6)分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験プログラムを設ける。上記情報処理装置における分岐予測回路の試験プログラムは、コンピュータに、分岐命令を含むランダムな命令列を生成する処理と、上記ランダムな命令列を被試験対象装置に与えて実行させ、該ランダムな命令列の実行後、上記ランダムな命令列を所定の命令数分シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させる処理と、上記被試験対象装置による上記ランダムな命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する処理とを実行させる。
In order to solve the above problems, the present invention solves the above problems as follows.
(1) The correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the storage means stores the information of the branch instruction. An apparatus for testing a branch prediction circuit in an information processing apparatus having a branch prediction circuit for executing an instruction at a branch destination address registered in the storage means without executing the branch instruction when an address is registered Provide. A test apparatus for a branch prediction circuit in the information processing apparatus includes: means for generating a random instruction sequence including a branch instruction; and executing the random instruction sequence by applying the random instruction sequence to the device under test for execution. Thereafter, the random instruction sequence is shifted by a predetermined number of instructions to generate a new instruction sequence in which the address position of the branch instruction included in the executed instruction sequence is updated, and the new instruction sequence is executed again. And a test execution control unit for verifying the operation of the branch prediction circuit of the device under test based on the execution result of the random instruction sequence by the device under test.
(2) The test execution control means, after the new instruction sequence is executed, returns the new instruction sequence to the state before the shift, and the test sequence that has been returned to the state before the shift is tested. Cause the target device to execute.
(3) The test execution control means changes the data defining the branch condition of the branch instruction included in the instruction sequence every time the random instruction sequence is executed.
(4) The verification means, log information storage means for storing log information at the time of the occurrence of the trap, triggered by the occurrence of a trap during the execution of the instruction sequence;
After execution of the instruction sequence, the log information stored in the log information storage unit is compared with an expected value prepared in advance or log information acquired at the previous test, and the execution of the instruction sequence is performed based on the comparison result Comparing means for verifying the results.
(5) The correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the storage means stores the information of the branch instruction A method for testing a branch prediction circuit in an information processing apparatus having a branch prediction circuit that executes an instruction at a branch destination address registered in the storage means without executing the branch instruction when an address is registered Execute. A test method of the branch prediction circuit in the information processing apparatus generates a random instruction sequence including a branch instruction, gives the random instruction sequence to a device under test to be executed, and after executing the random instruction sequence, The random instruction sequence is shifted by a predetermined number of instructions to generate a new instruction sequence in which the address position of the branch instruction included in the executed instruction sequence is updated, and the new instruction sequence is executed again. The operation of the branch prediction circuit of the device under test is verified based on the execution result of the random instruction sequence by the device under test.
(6) Correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the storage means stores the information of the branch instruction A test program for a branch prediction circuit in an information processing apparatus having a branch prediction circuit for executing an instruction at a branch destination address registered in the storage means without executing the branch instruction when an address is registered Provide. A test program for a branch prediction circuit in the information processing apparatus causes a computer to generate a random instruction sequence including a branch instruction and to execute the random instruction sequence by giving the random instruction sequence to a device under test. After the execution of the sequence, the random instruction sequence is shifted by a predetermined number of instructions to generate a new instruction sequence in which the address position of the branch instruction included in the executed instruction sequence is updated, and the new instruction sequence And a process of verifying the operation of the branch prediction circuit of the device under test based on the execution result of the random instruction sequence by the device under test.

本発明によれば、以下の効果を奏することができる。
(1)本発明は、分岐命令を含むランダムな命令列を生成して被試験対象装置に実行させ、該ランダムな命令列の実行後、該ランダムな命令列を所定の命令数分シフトして上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成し、該新たな命令列を被試験対象装置に再度実行させ、該実行結果に基づいて、被試験対象装置の分岐予測回路の動作を検証する。従って、本発明によれば、ランダムな命令列をシフトすることによって、該ランダムな命令列に含まれる分岐命令のアドレス位置が更新され、結果的に分岐命令の元のアドレス位置に他の命令を上書きしたことと同じ状態を作ることができる。その結果、分岐ポイントを特定して分岐命令を他の命令で置き換える処理を行う必要がなくなり、容易に、かつ効率的に被試験対象装置の分岐予測回路の検証をすることが可能となる。
(2)本発明は、上記シフトされた命令列が実行された後に、該新たな命令列をシフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置に実行させる。従って、本発明によれば、例えば、シフト前の状態に戻した命令列が実行された時のログ情報と、該シフト前の元の命令列が実行された時のログ情報とが一致するかを検証することによって、精度良く被試験対象装置の分岐予測回路の動作を検証することができる。
(3)本発明は、上記命令列に含まれる分岐命令の分岐条件を規定するデータを上記ランダムな命令列を実行する毎に変更した上で、被試験対象装置の分岐予測回路の動作を検証する。従って、本発明によれば、分岐条件を規定するデータを変更しつつ、同じ命令列を繰り返し実行することを通じて、被試験対象装置の分岐予測回路の動作を検証することができる。その結果、効率良く被試験対象装置の分岐予測回路の動作を検証することが可能となる。
(4)本発明は、命令列の実行中にトラップが発生したことを契機として、該トラップ発生時のログ情報を記憶し、上記命令列の実行後に、上記記憶されたログ情報と予め用意された期待値もしくは先の試験時に取得したログ情報とを比較し、該比較結果に基づいて該命令列の実行結果を検証する。従って、本発明によれば、被試験対象装置の分岐予測回路の動作が正常であるか否かを自動的に検証することが可能となる。
According to the present invention, the following effects can be obtained.
(1) In the present invention, a random instruction sequence including a branch instruction is generated and executed by the device under test. After the random instruction sequence is executed, the random instruction sequence is shifted by a predetermined number of instructions. Generate a new instruction sequence in which the address position of the branch instruction included in the executed instruction sequence is updated, cause the device under test to execute the new instruction sequence again, and based on the execution result, The operation of the branch prediction circuit of the target device is verified. Therefore, according to the present invention, by shifting a random instruction string, the address position of the branch instruction included in the random instruction string is updated, and as a result, another instruction is moved to the original address position of the branch instruction. You can create the same state as overwriting. As a result, there is no need to specify a branch point and replace the branch instruction with another instruction, and the branch prediction circuit of the device under test can be verified easily and efficiently.
(2) In the present invention, after the shifted instruction sequence is executed, the new instruction sequence is returned to the state before the shift, and the device under test is executed with the instruction sequence returned to the state before the shift. . Therefore, according to the present invention, for example, whether the log information when the instruction sequence returned to the state before the shift is executed matches the log information when the original instruction sequence before the shift is executed. Thus, the operation of the branch prediction circuit of the device under test can be verified with high accuracy.
(3) The present invention verifies the operation of the branch prediction circuit of the device under test after changing the data defining the branch condition of the branch instruction included in the instruction sequence every time the random instruction sequence is executed. To do. Therefore, according to the present invention, it is possible to verify the operation of the branch prediction circuit of the device under test by repeatedly executing the same instruction sequence while changing the data defining the branch condition. As a result, it is possible to efficiently verify the operation of the branch prediction circuit of the device under test.
(4) The present invention stores log information at the time of the occurrence of a trap triggered by the occurrence of a trap during execution of the instruction sequence, and is prepared in advance with the stored log information after execution of the instruction sequence. The expected value or the log information obtained at the previous test is compared, and the execution result of the instruction sequence is verified based on the comparison result. Therefore, according to the present invention, it is possible to automatically verify whether or not the operation of the branch prediction circuit of the device under test is normal.

図1は、本発明のシステム構成の一例を示す図である。
分岐予測回路試験装置1は、被試験対象装置2が備える分岐予測回路21の動作を検証する処理装置である。分岐予測回路試験装置1は、ランダム命令生成部11、試験実行制御部12、検証部13を備える。
ランダム命令生成部11は、分岐命令を含むランダムな命令列(ランダム命令列)を生成する。試験実行制御部12は、生成されたランダム命令列を被試験対象装置2が備える命令実行部22に与えて実行させる。また、試験実行制御部12は、該ランダム命令列が実行された後、上記ランダム命令生成部11に指示して、上記ランダム命令列を所定の命令数分シフトさせて、上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度命令実行部22に実行させる。
FIG. 1 is a diagram showing an example of a system configuration of the present invention.
The branch prediction circuit test device 1 is a processing device that verifies the operation of the branch prediction circuit 21 provided in the device under test 2. The branch prediction circuit test apparatus 1 includes a random instruction generation unit 11, a test execution control unit 12, and a verification unit 13.
The random instruction generation unit 11 generates a random instruction sequence (random instruction sequence) including a branch instruction. The test execution control unit 12 gives the generated random instruction sequence to the instruction execution unit 22 included in the device under test 2 for execution. In addition, after the random instruction sequence is executed, the test execution control unit 12 instructs the random instruction generation unit 11 to shift the random instruction sequence by a predetermined number of instructions and execute the executed instruction sequence. A new instruction sequence in which the address position of the branch instruction included in is updated is generated, and the instruction execution unit 22 is made to execute the new instruction sequence again.

本発明の一実施形態によれば、試験実行制御部12は、更に、上記新たな命令列が実行された後に、該新たな命令列を上記シフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置2が備える命令実行部22に実行させる。
また、本発明の一実施形態によれば、試験実行制御部12は、上記命令列に含まれる分岐命令の分岐条件を規定するデータを、上記被試験対象装置2が備える命令実行部22が上記ランダム命令列を実行する毎に変更する。
According to an embodiment of the present invention, the test execution control unit 12 further returns the new instruction sequence to the state before the shift and returns to the state before the shift after the new instruction sequence is executed. The instruction execution unit 22 provided in the device under test 2 executes the instruction sequence.
Further, according to one embodiment of the present invention, the test execution control unit 12 includes the instruction execution unit 22 included in the device under test 2 that stores data defining a branch condition of a branch instruction included in the instruction sequence. Change every time a random instruction sequence is executed.

検証部13は、被試験対象装置2による上記ランダム命令列の実行結果に基づいて、該被試験対象装置2が備える分岐予測回路21の動作を検証する。
検証部13は、チェックサム生成部131、期待値記憶部132、比較部133を備える。チェックサム生成部131は、上記ランダム命令列の実行中にトラップが発生したことを契機として、該トラップ発生時の各レジスタ、メモリの内容に基づいてチェックサムを生成し、生成されたチェックサムの値をログ情報として記憶する。チェックサムは、例えば、各レジスタ、メモリの内容を加算して圧縮した形式のデータである。チェックサム生成部131は、ハードトラップ又はソフトトラップが発生したことを契機として、又は、トラップの発生に関係なくランダム命令列の実行終了時に、上記各レジスタ、メモリの内容をログ情報として記憶するようにしてもよい。期待値記憶部132には、上記ログ情報との比較対象となる期待値が予め記憶される。比較部133は、上記ランダム命令列が実行された後に、上記チェックサム生成部131によって生成されたログ情報と上記期待値記憶部132に予め記憶された期待値もしくは先の試験時に生成されたログ情報とを比較し、該比較結果に基づいて該命令列の実行結果の検証(分岐予測回路21の動作の検証)を行う。
The verification unit 13 verifies the operation of the branch prediction circuit 21 provided in the device under test 2 based on the execution result of the random instruction sequence by the device under test 2.
The verification unit 13 includes a checksum generation unit 131, an expected value storage unit 132, and a comparison unit 133. The checksum generator 131 generates a checksum based on the contents of each register and memory at the time of the trap when the trap is generated during execution of the random instruction sequence, and the checksum of the generated checksum The value is stored as log information. The checksum is, for example, data in a format compressed by adding the contents of each register and memory. The checksum generation unit 131 stores the contents of each register and memory as log information when a hard trap or a soft trap occurs, or at the end of execution of a random instruction sequence regardless of the occurrence of a trap. It may be. The expected value storage unit 132 stores in advance an expected value to be compared with the log information. The comparison unit 133 executes the log information generated by the checksum generation unit 131 and the expected value stored in advance in the expected value storage unit 132 or the log generated during the previous test after the random instruction sequence is executed. Information is compared, and the execution result of the instruction sequence is verified (the operation of the branch prediction circuit 21 is verified) based on the comparison result.

なお、上述した分岐予測回路試験装置1及びその各部の機能は、CPUとその上で実行されるプログラムにより実現される。当該本発明を実現するプログラムは、コンピュータが読み取り可能な記録媒体、例えば半導体メモリ、ハードディスク、CD−ROM、DVD等に格納することができ、これらの記録媒体に記録して提供され、又は、通信インタフェースを介してネットワークを利用した送受信により提供される。   Note that the functions of the branch prediction circuit test apparatus 1 and the components described above are realized by a CPU and a program executed thereon. The program for realizing the present invention can be stored in a computer-readable recording medium such as a semiconductor memory, a hard disk, a CD-ROM, a DVD, or the like, provided by being recorded in these recording media, or communication. It is provided by transmission / reception using a network via an interface.

被試験対象装置2は、分岐予測回路試験装置1による分岐予測回路の検証処理の対象となる情報処理装置である。被試験対象装置2は、命令実行部22と分岐予測回路21とを備える。
分岐予測回路21は、分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を分岐予測管理テーブル211に記憶する。また、分岐予測回路21は、分岐命令の実行時に分岐予測管理テーブル211を参照して、該分岐予測管理テーブル211に該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該該分岐予測管理テーブル211に登録された分岐先アドレスの命令を実行対象として命令実行部22に実行させる(分岐予測処理を行う)。命令実行部22は、命令格納域100に格納された命令をフェッチし、データ格納域101に格納されたデータをロードして、該命令を実行する。
The device under test 2 is an information processing device that is a target of verification processing of the branch prediction circuit by the branch prediction circuit test device 1. The device under test 2 includes an instruction execution unit 22 and a branch prediction circuit 21.
The branch prediction circuit 21 stores correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction in the branch prediction management table 211. Further, the branch prediction circuit 21 refers to the branch prediction management table 211 when executing the branch instruction, and executes the branch instruction when the address of the branch instruction is registered in the branch prediction management table 211. Then, the instruction execution unit 22 is caused to execute the instruction at the branch destination address registered in the branch prediction management table 211 as an execution target (perform a branch prediction process). The instruction execution unit 22 fetches the instruction stored in the instruction storage area 100, loads the data stored in the data storage area 101, and executes the instruction.

図2は、分岐命令と該分岐命令の分岐条件の一例を示す図である。
図2に示すように、例えば、分岐命令BRNZは、対象レジスタの値が0でなかったら分岐するという分岐条件を有し、分岐命令BRZは、対象レジスタの値が0であれば分岐するという分岐条件を有し、分岐命令BRGZは、対象レジスタの値が0より大きければ分岐するという分岐条件を有し、分岐命令BRLZは、対象レジスタの値が0より小さければ分岐するという分岐条件を有する。
FIG. 2 is a diagram illustrating an example of a branch instruction and a branch condition of the branch instruction.
As shown in FIG. 2, for example, the branch instruction BRNZ has a branch condition that branches if the value of the target register is not 0, and the branch instruction BRZ is a branch that branches if the value of the target register is 0. The branch instruction BRGZ has a branch condition that branches if the value of the target register is greater than 0, and the branch instruction BRLZ has a branch condition that branches if the value of the target register is less than 0.

図3は、被試験対象装置が備える分岐予測回路の分岐予測処理を説明する図である。
図3に示すように、分岐命令Xが命令格納域100のA番地に格納され、該分岐命令Xの分岐先アドレスであるB番地に命令Zが格納されている。分岐予測回路21による分岐予測処理は、以下の[1]〜[4]までの処理ステップに従って行われる。
[1]:命令実行部22が、命令格納域100に格納されている命令列を実行する。
[2]:分岐予測回路21が、分岐命令XのアドレスであるA番地と該分岐命令Xにより分岐する分岐先アドレスであるB番地とを分岐予測管理テーブル211に登録する。図3中に示す分岐予測管理テーブル211において、分岐アドレスというデータ項目は分岐命令のアドレスを示し、分岐先アドレスというデータ項目は分岐命令により分岐する分岐先アドレスを示す。
[3]:命令実行部22が、再度命令列を実行する。
[4]:分岐予測回路21が、分岐予測管理テーブル211を参照して、A番地を分岐命令Xと判断し、予め分岐先アドレスであるB番地に格納された命令Zを実行する。
FIG. 3 is a diagram for explaining branch prediction processing of the branch prediction circuit provided in the device under test.
As shown in FIG. 3, the branch instruction X is stored at address A of the instruction storage area 100, and the instruction Z is stored at address B, which is the branch destination address of the branch instruction X. Branch prediction processing by the branch prediction circuit 21 is performed according to the following processing steps [1] to [4].
[1]: The instruction execution unit 22 executes the instruction sequence stored in the instruction storage area 100.
[2]: The branch prediction circuit 21 registers the address A, which is the address of the branch instruction X, and the address B, which is the branch destination address branched by the branch instruction X, in the branch prediction management table 211. In the branch prediction management table 211 shown in FIG. 3, a data item called a branch address shows the address of a branch instruction, and a data item called a branch destination address shows a branch destination address branched by a branch instruction.
[3]: The instruction execution unit 22 executes the instruction sequence again.
[4]: The branch prediction circuit 21 refers to the branch prediction management table 211, determines that the address A is the branch instruction X, and executes the instruction Z stored in advance at the address B which is the branch destination address.

上記のように、分岐予測回路21は、一度実行された分岐命令のアドレスと該分岐命令により分岐する分岐アドレスとの対応情報を分岐予測管理テーブル211に登録し、次回同じアドレスの分岐命令を実行する際に、上述した分岐予測処理を行い、予め分岐先アドレスに格納された命令を実行することによって、処理の高速化を図る。   As described above, the branch prediction circuit 21 registers the correspondence information between the address of the branch instruction executed once and the branch address branched by the branch instruction in the branch prediction management table 211, and executes the branch instruction of the same address next time. In this case, the above-described branch prediction process is performed, and the instruction stored in advance at the branch destination address is executed to speed up the process.

以下に、図4乃至図6を参照して、本発明の第1の実施の形態について説明する。本発明の第1の実施の形態では、分岐命令を含むランダム命令列を生成して実行した後、該ランダム命令列を所定の命令数分シフトして再度実行し、該ランダム命令列の実行結果に基づき、分岐予測回路の動作を検証する。   Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. In the first embodiment of the present invention, after generating and executing a random instruction sequence including a branch instruction, the random instruction sequence is shifted by a predetermined number of instructions and executed again, and the execution result of the random instruction sequence Based on the above, the operation of the branch prediction circuit is verified.

図4は、本発明の第1の実施の形態に係る分岐予測回路の試験処理フローの一例を示す図である。まず、分岐予測回路試験装置1のランダム命令生成部11が、図5(A)に示すような、分岐命令Xを含むランダム命令列を生成する(ステップS1)。次に、試験実行制御部12が、生成されたランダム命令列を被試験対象装置2の命令実行部22に実行させる(ステップS2)。ステップS2の処理によって、ランダム命令列が実行されると、分岐予測回路21が、図6(A)に示すように、分岐命令XのアドレスであるA番地と該分岐命令Xにより分岐する分岐先アドレスであるB番地とを分岐予測管理テーブル211に登録する。   FIG. 4 is a diagram showing an example of a test process flow of the branch prediction circuit according to the first embodiment of the present invention. First, the random instruction generation unit 11 of the branch prediction circuit test apparatus 1 generates a random instruction sequence including the branch instruction X as shown in FIG. 5A (step S1). Next, the test execution control unit 12 causes the instruction execution unit 22 of the device under test 2 to execute the generated random instruction sequence (step S2). When the random instruction sequence is executed by the process of step S2, the branch prediction circuit 21 branches the address A which is the address of the branch instruction X and the branch destination by the branch instruction X as shown in FIG. Address B as an address is registered in the branch prediction management table 211.

次に、試験実行制御部12が、上記ランダム命令列の実行後、ランダム命令生成部11に指示して、該ランダム命令列の先頭にnop命令を一つ追加させることによって該ランダム命令列をシフトする(ステップS3)。nop命令とは、命令としては存在するが動作を伴わない命令である。ステップS3の処理によって、例えば、図5(B)に示すような、ランダム命令列が下方向(アドレスが増加する方向)にシフトされた新たなランダム命令列が生成される。図5(B)に示すランダム命令列を参照すると、A番地に命令Cが格納され、A’番地に分岐命令Xが格納され、B’番地に分岐命令Xの分岐先の命令である命令Yが格納されている。   Next, after executing the random instruction sequence, the test execution control unit 12 instructs the random instruction generation unit 11 to shift the random instruction sequence by adding one nop instruction to the head of the random instruction sequence. (Step S3). A nop instruction is an instruction that exists as an instruction but does not involve any action. By the process in step S3, for example, a new random instruction sequence in which the random instruction sequence is shifted downward (in the direction in which the address increases) as illustrated in FIG. 5B is generated. Referring to the random instruction sequence shown in FIG. 5B, an instruction C is stored at address A, a branch instruction X is stored at address A ′, and an instruction Y that is a branch destination instruction of branch instruction X is stored at address B ′. Is stored.

次に、試験実行制御部12が、命令実行部22に上記新たなランダム命令列を再度実行させる(ステップS4)。ステップS4における新たなランダム命令列の実行時に、分岐予測回路21は、一旦、図6(A)に示す分岐予測管理テーブル211中に登録されたA番地を検索する。しかし、図5(B)に示すように、A番地には命令Cが分岐命令Xに置き換わって格納されているため、分岐予測回路21による分岐予測処理はキャンセルされて命令Cが実行される。また、ステップS4の処理によって新たなランダム命令列が実行されると、分岐予測回路21が、図6(B)に示すように、上記新たなランダム命令列に含まれる分岐命令XのアドレスであるA’番地と該分岐命令Xにより分岐する分岐先アドレスであるB’番地とを分岐予測管理テーブル211に登録する。   Next, the test execution control unit 12 causes the instruction execution unit 22 to execute the new random instruction sequence again (step S4). At the time of execution of a new random instruction sequence in step S4, the branch prediction circuit 21 searches the address A registered in the branch prediction management table 211 shown in FIG. However, as shown in FIG. 5B, the instruction C is replaced with the branch instruction X at the address A, so that the branch prediction process by the branch prediction circuit 21 is canceled and the instruction C is executed. When a new random instruction sequence is executed by the process of step S4, the branch prediction circuit 21 is the address of the branch instruction X included in the new random instruction sequence as shown in FIG. 6B. Address A ′ and address B ′, which is a branch destination address to be branched by the branch instruction X, are registered in the branch prediction management table 211.

次に、試験実行制御部12が、ランダム命令生成部11に指示して、ステップS4において実行されたランダム命令列にnop命令を一つ追加させることによって該ランダム命令列をシフトする(ステップS5)。ステップS5の処理によって、例えば、図5(C)に示すような、ステップS4において実行されたランダム命令列が下方向にシフトされた新たなランダム命令列が生成される。図5(C)に示すランダム命令列を参照すると、A’番地に命令Cが格納され、A”番地に分岐命令Xが格納され、B”番地に分岐命令Xの分岐先の命令である命令Yが格納されている。   Next, the test execution control unit 12 instructs the random command generation unit 11 to shift the random command sequence by adding one nop command to the random command sequence executed in step S4 (step S5). . By the processing in step S5, for example, a new random instruction sequence in which the random instruction sequence executed in step S4 is shifted downward is generated as shown in FIG. Referring to the random instruction sequence shown in FIG. 5C, an instruction C is stored at address A ', a branch instruction X is stored at address A ", and an instruction that is a branch destination instruction of branch instruction X at address B". Y is stored.

次に、試験実行制御部12が、命令実行部22に上記ステップS5において生成された新たなランダム命令列を再度実行させる(ステップS6)。該新たなランダム命令列の実行時に、分岐予測回路21は、一旦、図6(B)に示す分岐予測管理テーブル211中に登録されたA’番地を検索する。しかし、図5(C)に示すように、A’番地には命令Cが分岐命令Xに置き換わって格納されているため、分岐予測回路21による分岐予測処理はキャンセルされて命令Cが実行される。また、ステップS6の処理によって新たなランダム命令列が実行されると、分岐予測回路21が、図6(C)に示すように、上記新たなランダム命令列に含まれる分岐命令XのアドレスであるA”番地と該分岐命令Xにより分岐する分岐先アドレスであるB”番地とを分岐予測管理テーブル211に登録する。 上述したランダム命令列のシフト処理(ステップS3、ステップS5)とシフトされた命令列の実行処理(ステップS4、ステップS6)と同様の処理を、ランダム命令列がN回シフトされるまで繰り返す。   Next, the test execution control unit 12 causes the instruction execution unit 22 to execute again the new random instruction sequence generated in step S5 (step S6). At the time of execution of the new random instruction sequence, the branch prediction circuit 21 searches for the address A ′ registered in the branch prediction management table 211 shown in FIG. However, as shown in FIG. 5C, since the instruction C is stored in place of the branch instruction X at the address A ′, the branch prediction process by the branch prediction circuit 21 is canceled and the instruction C is executed. . When a new random instruction sequence is executed by the process of step S6, the branch prediction circuit 21 is the address of the branch instruction X included in the new random instruction sequence, as shown in FIG. 6C. The address A ″ and the address B ″, which is the branch destination address branched by the branch instruction X, are registered in the branch prediction management table 211. Processing similar to the above-described random instruction sequence shift processing (steps S3 and S5) and the shifted instruction sequence execution processing (steps S4 and S6) is repeated until the random instruction sequence is shifted N times.

分岐予測回路試験装置1の検証部13は、例えば、上述した図4に示す処理フローに従ってランダム命令列が実行される毎に、該命令列の実行終了時の各レジスタ、メモリの内容をログ情報として記憶し、該ログ情報と期待値記憶部132に記憶された期待値とを比較し、該比較結果に基づいて、分岐予測処理がキャンセルされたかの検証を行う。   For example, each time a random instruction sequence is executed according to the processing flow shown in FIG. 4 described above, the verification unit 13 of the branch prediction circuit test apparatus 1 logs the contents of each register and memory at the end of execution of the instruction sequence. And the log information and the expected value stored in the expected value storage unit 132 are compared, and based on the comparison result, it is verified whether the branch prediction process has been canceled.

以下に、図7乃至図9を参照して、本発明の第2の実施の形態について説明する。本発明の第2の実施の形態では、分岐命令を含むランダム命令列を生成して実行し、該ランダム命令列を所定の命令数分シフトして実行した後、該実行された命令列をシフト前の元の命令列の状態に戻して再度実行する。   Hereinafter, a second embodiment of the present invention will be described with reference to FIGS. In the second embodiment of the present invention, a random instruction sequence including a branch instruction is generated and executed, the random instruction sequence is shifted by a predetermined number of instructions, and then the executed instruction sequence is shifted. Return to the previous instruction sequence and execute again.

図7は、本発明の第2の実施の形態に係る分岐予測回路の試験処理フローの一例を示す図である。まず、分岐予測回路試験装置1のランダム命令生成部11が、図8(A)に示すような、分岐命令Xを含むランダム命令列を生成する(ステップS11)。次に、試験実行制御部12が、生成されたランダム命令列を被試験対象装置2の命令実行部22に実行させる(ステップS12)。ステップS12の処理によって、ランダム命令列が実行されると、分岐予測回路21が、図9(A)に示すように、分岐命令XのアドレスであるA番地と該分岐命令Xにより分岐する分岐先アドレスであるB番地とを分岐予測管理テーブル211に登録する。   FIG. 7 is a diagram showing an example of a test process flow of the branch prediction circuit according to the second embodiment of the present invention. First, the random instruction generation unit 11 of the branch prediction circuit test apparatus 1 generates a random instruction sequence including the branch instruction X as shown in FIG. 8A (step S11). Next, the test execution control unit 12 causes the instruction execution unit 22 of the device under test 2 to execute the generated random instruction sequence (step S12). When the random instruction sequence is executed by the processing of step S12, the branch prediction circuit 21 branches the address A which is the address of the branch instruction X and the branch destination by the branch instruction X as shown in FIG. Address B as an address is registered in the branch prediction management table 211.

次に、試験実行制御部12が、上記ランダム命令列の実行後、ランダム命令生成部11に指示して、該ランダム命令列の先頭にnop命令を一つ追加させることによって該ランダム命令列をシフトする(ステップS13)。ステップS13の処理によって、例えば、図8(B)に示すような、ランダム命令列が下方向(アドレスが増加する方向)にシフトされた新たなランダム命令列が生成される。図8(B)に示すランダム命令列を参照すると、A番地に命令Cが格納され、A’番地に分岐命令Xが格納され、B’番地に分岐命令Xの分岐先の命令である命令Yが格納されている。   Next, after executing the random instruction sequence, the test execution control unit 12 instructs the random instruction generation unit 11 to shift the random instruction sequence by adding one nop instruction to the head of the random instruction sequence. (Step S13). By the processing in step S13, for example, a new random instruction sequence in which the random instruction sequence is shifted downward (in the direction in which the address increases) as illustrated in FIG. 8B is generated. Referring to the random instruction sequence shown in FIG. 8B, the instruction C is stored at address A, the branch instruction X is stored at address A ′, and the instruction Y that is the branch destination instruction of the branch instruction X is stored at address B ′. Is stored.

次に、試験実行制御部12が、命令実行部22に上記新たなランダム命令列を再度実行させる(ステップS14)。ステップS14における新たなランダム命令列の実行時に、分岐予測回路21は、一旦、図9(A)に示す分岐予測管理テーブル211中に登録されたA番地を検索する。しかし、図8(B)に示すように、A番地には命令Cが分岐命令Xに置き換わって格納されているため、分岐予測回路21による分岐予測処理はキャンセルされて命令Cが実行される。また、ステップS14の処理によって新たなランダム命令列が実行されると、分岐予測回路21が、図9(B)に示すように、上記新たなランダム命令列に含まれる分岐命令XのアドレスであるA’番地と該分岐命令Xにより分岐する分岐先アドレスであるB’番地とを分岐予測管理テーブル211に登録する。   Next, the test execution control unit 12 causes the instruction execution unit 22 to execute the new random instruction sequence again (step S14). At the time of executing a new random instruction sequence in step S14, the branch prediction circuit 21 temporarily searches for the address A registered in the branch prediction management table 211 shown in FIG. However, as shown in FIG. 8B, since the instruction C is stored in place of the branch instruction X at the address A, the branch prediction process by the branch prediction circuit 21 is canceled and the instruction C is executed. When a new random instruction sequence is executed by the process of step S14, the branch prediction circuit 21 is the address of the branch instruction X included in the new random instruction sequence as shown in FIG. 9B. Address A ′ and address B ′, which is a branch destination address to be branched by the branch instruction X, are registered in the branch prediction management table 211.

次に、試験実行制御部12が、ランダム命令生成部11に指示して、ステップS14において実行されたランダム命令列からnop命令を一つ削除させることによって、該ランダム命令列を上方向にシフトする(ステップS15)。ステップS15の処理によって、例えば、図8(C)に示すような、ステップS12において実行された命令列(図8(A)に示す命令列)と同じ状態の命令列が生成される。すなわち、図8(B)に示す命令列がシフト前の元の状態に戻る。図8(C)に示すランダム命令列を参照すると、A番地に分岐命令Xが格納され、B番地に分岐命令Xの分岐先の命令である命令Yが格納されている。   Next, the test execution control unit 12 instructs the random command generation unit 11 to delete one nop command from the random command sequence executed in step S14, thereby shifting the random command sequence upward. (Step S15). By the processing in step S15, for example, an instruction sequence having the same state as the instruction sequence executed in step S12 (instruction sequence shown in FIG. 8A) as shown in FIG. 8C is generated. That is, the instruction sequence shown in FIG. 8B returns to the original state before the shift. Referring to the random instruction sequence shown in FIG. 8C, a branch instruction X is stored at address A, and an instruction Y that is a branch destination instruction of branch instruction X is stored at address B.

次に、試験実行制御部12が、命令実行部22に上記ステップS15の処理によって元の状態に戻ったランダム命令列を再度実行させる(ステップS16)。図8(C)に示すように、A番地には分岐命令Xが格納されているため、該分岐命令Xが実行される。ステップS16の処理によってランダム命令列が実行されると、分岐予測回路21が、図9(C)に示すように、該実行されたランダム命令列に含まれる分岐命令XのアドレスであるA番地と該分岐命令Xにより分岐する分岐先アドレスであるB番地とを分岐予測管理テーブル211に登録する。   Next, the test execution control unit 12 causes the instruction execution unit 22 to execute again the random instruction sequence that has been returned to the original state by the process of step S15 (step S16). As shown in FIG. 8C, since the branch instruction X is stored at address A, the branch instruction X is executed. When the random instruction sequence is executed by the process of step S16, the branch prediction circuit 21 receives the address A which is the address of the branch instruction X included in the executed random instruction sequence, as shown in FIG. 9C. The B address that is the branch destination address to be branched by the branch instruction X is registered in the branch prediction management table 211.

分岐予測回路試験装置1の検証部13は、例えば、上述した図7に示す処理フローに従ってランダム命令列が実行される毎に、該命令列の実行終了時の各レジスタ、メモリの内容をログ情報として記憶する。そして、検証部13は、例えば、ランダム命令列が下方向にシフトされて実行された時のログ情報と期待値記憶部132に記憶された期待値とを比較し、該比較結果に基づいて分岐予測処理がキャンセルされたかを検証する。また、検証部13は、例えば、上記下方向にシフトされて実行されたランダム命令列がシフト前の元の命令列の状態に戻されて実行された時のログ情報と、該シフト前の元の命令列が実行された時のログ情報とが一致するかを判断し、該判断結果に基づいて、分岐予測回路21の動作を検証する。   For example, each time a random instruction sequence is executed according to the processing flow shown in FIG. 7 described above, the verification unit 13 of the branch prediction circuit test apparatus 1 logs the contents of each register and memory at the end of execution of the instruction sequence. Remember as. Then, for example, the verification unit 13 compares the log information when the random instruction sequence is shifted downward and is executed with the expected value stored in the expected value storage unit 132, and branches based on the comparison result. Verify whether the prediction process has been canceled. Further, the verification unit 13 may, for example, log information when the random instruction sequence shifted and executed in the downward direction is returned to the original instruction sequence before the shift and executed, and the original information before the shift It is determined whether or not the log information when the instruction sequence is executed matches, and the operation of the branch prediction circuit 21 is verified based on the determination result.

次に、図10乃至図12を参照して、本発明の第3の実施の形態について説明する。本発明の第3の実施の形態では、ランダム命令列に含まれる分岐命令の分岐条件を規定するデータを、該ランダム命令列を実行する毎に変更する。   Next, a third embodiment of the present invention will be described with reference to FIGS. In the third embodiment of the present invention, the data defining the branch condition of the branch instruction included in the random instruction sequence is changed every time the random instruction sequence is executed.

図10は、本発明の第3の実施の形態に係る分岐予測回路の試験処理フローの一例を示す図である。まず、分岐予測回路試験装置3のランダム命令生成部11が、図11(A)に示すような、分岐命令Xを含むランダム命令列を生成する(ステップS21)。該生成された図10(A)に示す命令列を参照すると、命令格納域100のA番地に分岐命令Xが格納され、A番地より前のアドレスであるA’番地に命令Cが格納されている。命令Cと分岐命令Xの処理フローを示す図12を参照すると、命令Cは、図11(A)中のデータ格納域101のC番地に格納されたデータをロード(load)する命令であり、分岐命令Xは、命令Cがロードしたデータの値が0である場合に分岐先をB番地とし、命令Cがロードしたデータの値が0でない場合に分岐先をA+1番地とする分岐命令である。   FIG. 10 is a diagram illustrating an example of a test processing flow of the branch prediction circuit according to the third embodiment of the present invention. First, the random instruction generation unit 11 of the branch prediction circuit test apparatus 3 generates a random instruction sequence including the branch instruction X as shown in FIG. 11A (step S21). Referring to the generated instruction sequence shown in FIG. 10A, branch instruction X is stored at address A of instruction storage area 100, and instruction C is stored at address A ', which is an address before address A. Yes. Referring to FIG. 12 showing the processing flow of the instruction C and the branch instruction X, the instruction C is an instruction for loading the data stored in the address C in the data storage area 101 in FIG. The branch instruction X is a branch instruction in which the branch destination is address B when the data value loaded by the instruction C is 0, and the branch destination is address A + 1 when the data value loaded by the instruction C is not 0. .

次に、試験実行制御部12が、生成されたランダム命令列を被試験対象装置2の命令実行部22に実行させる(ステップS22)。ここで、図11(A)中のデータ格納域101のC番地には値が0であるデータAが格納されているため、命令Cがロードするデータの値は0である。従って、分岐命令Xが実行されると、前述した図12に示す処理フローに従って、B番地へ分岐する。分岐予測回路21は、分岐命令XのアドレスであるA番地と該分岐命令Xにより分岐する分岐先アドレスであるB番地とを分岐予測管理テーブル211に登録する。   Next, the test execution control unit 12 causes the instruction execution unit 22 of the device under test 2 to execute the generated random instruction sequence (step S22). Here, since data A having a value of 0 is stored at address C of the data storage area 101 in FIG. 11A, the value of data loaded by the instruction C is 0. Therefore, when the branch instruction X is executed, the program branches to the B address according to the processing flow shown in FIG. The branch prediction circuit 21 registers the address A, which is the address of the branch instruction X, and the address B, which is the branch destination address branched by the branch instruction X, in the branch prediction management table 211.

次に、試験実行制御部12が、分岐命令Xの分岐条件を規定するデータである、データ格納域101のC番地のデータを変更する(ステップS23)。例えば、図11(B)中に示すように、データAに替えて、値が10であるデータWがデータ格納域101のC番地に格納される。そして、試験実行制御部12が、命令実行部22に上記ステップS22において実行されたランダム命令列を再度実行させる(ステップS24)。該ランダム命令列に含まれる分岐命令Xの実行時には、分岐命令Xの分岐条件を規定する上記C番地のデータの値が10に変更されているため、前述した図12に示す処理フローに従って、A+1番地へ分岐する。分岐命令Xの分岐方向がB番地からA+1番地に変更されるため、分岐予測回路21による分岐予測処理がキャンセルされる。   Next, the test execution control unit 12 changes data at address C in the data storage area 101, which is data defining the branch condition of the branch instruction X (step S23). For example, as shown in FIG. 11B, instead of data A, data W having a value of 10 is stored at address C in data storage area 101. Then, the test execution control unit 12 causes the instruction execution unit 22 to execute again the random instruction sequence executed in step S22 (step S24). When the branch instruction X included in the random instruction sequence is executed, the value of the data at the address C that defines the branch condition of the branch instruction X is changed to 10. Therefore, according to the processing flow shown in FIG. Branch to the street address. Since the branch direction of the branch instruction X is changed from the B address to the A + 1 address, the branch prediction process by the branch prediction circuit 21 is cancelled.

分岐予測回路試験装置1の検証部13は、例えば、上述した図10に示す処理フローに従ってランダム命令列が実行される毎に、該命令列の実行終了時の各レジスタ、メモリの内容をログ情報として記憶し、該ログ情報と期待値記憶部132に記憶された期待値とを比較し、該比較結果に基づいて、分岐予測処理がキャンセルされたかを検証する。   For example, each time a random instruction sequence is executed according to the processing flow shown in FIG. 10 described above, the verification unit 13 of the branch prediction circuit test apparatus 1 logs the contents of each register and memory at the end of execution of the instruction sequence. And the log information is compared with the expected value stored in the expected value storage unit 132, and it is verified whether the branch prediction process is canceled based on the comparison result.

次に、図13を参照して、本発明の第4の実施の形態について説明する。本発明の第4の実施の形態では、命令列の実行中にトラップが発生したことを契機として、該トラップ発生時のログ情報を生成し、該命令列の実行後に、上記生成されたログ情報と予め記憶手段に記憶された期待値もしくは先の試験時に生成されたログ情報とを比較し、該比較結果に基づいて該命令列の実行結果を検証する。   Next, a fourth embodiment of the present invention will be described with reference to FIG. In the fourth embodiment of the present invention, when a trap occurs during execution of an instruction sequence, log information at the time of the occurrence of the trap is generated, and after the execution of the instruction sequence, the generated log information And the expected value stored in the storage means in advance or the log information generated during the previous test, and the execution result of the instruction sequence is verified based on the comparison result.

本発明の第4の実施の形態では、ランダム命令生成部11が、ランダム命令列を生成する際に、図13中に示すように、ランダム命令列中の所定の命令数毎(例えば、1024命令毎)にソフトトラップを設定する。そして、検証部13のチェックサム生成部131が、上記ランダム命令列の実行中にハードトラップ又は上記ソフトトラップが発生したことを契機として、該トラップ発生時の各レジスタ、メモリの内容をログ情報として記憶する。チェックサム生成部131が、トラップが発生する毎に、各レジスタ、メモリの内容に基づいて、例えば8バイトのチェックサムを生成し、該チェックサムの値を図13中に示すログ情報として記憶するようにしてもよい。また、チェックサム生成部131が、最終トラップが発生した時に、上記トラップが発生する毎に作成された全てのチェックサムを統合して、図13中に示すトータルのチェックサム(トータルchecksum200)の値を求め、該トータルchecksum200の値をログ情報として記憶するようにしてもよい。   In the fourth embodiment of the present invention, when the random instruction generation unit 11 generates a random instruction sequence, as shown in FIG. 13, for each predetermined instruction number in the random instruction sequence (for example, 1024 instructions). Every time). Then, when the checksum generation unit 131 of the verification unit 13 generates a hard trap or the soft trap during the execution of the random instruction sequence, the contents of each register and memory at the time of the trap generation are used as log information. Remember. Each time a trap occurs, the checksum generation unit 131 generates, for example, an 8-byte checksum based on the contents of each register and memory, and stores the checksum value as log information shown in FIG. You may do it. Further, when the final trap occurs, the checksum generation unit 131 integrates all checksums created each time the trap occurs, and the total checksum (total checksum200) value shown in FIG. And the value of the total checksum 200 may be stored as log information.

上記ランダム命令列の実行後、検証部13の比較部133が、上記記憶されたログ情報と予め期待値記憶部132に記憶された期待値とを比較し、該比較結果に基づいて、上記ランダム命令列の実行結果を検証する。例えば、比較部133は、図13中に示すトータルchecksum200と期待値201とを比較して、ランダム命令列の実行結果を検証する。   After execution of the random instruction sequence, the comparison unit 133 of the verification unit 13 compares the stored log information with the expected value stored in the expected value storage unit 132 in advance, and based on the comparison result, the random number The execution result of the instruction sequence is verified. For example, the comparison unit 133 compares the total checksum 200 shown in FIG. 13 with the expected value 201 to verify the execution result of the random instruction sequence.

本発明の一実施形態によれば、各々のトラップに対応付けられた複数の期待値を予め期待値記憶部132に記憶しておき、比較部133が、トラップが発生した時にチェックサム生成部131によって生成されたチェックサムの値と、上記期待値記憶部132に記憶された複数の期待値のうちの該トラップに対応付けられた期待値とを比較するようにしてもよい。
また、本発明の一実施形態によれば、命令列実行部21が、同じ命令列を繰り返し実行し、比較部133が、ある命令列の実行後に生成されたログ情報と該命令列の過去の実行時に生成されたログ情報とを比較し、該比較結果に基づいて該命令列の実行結果を検証するようにしてもよい。
According to an embodiment of the present invention, a plurality of expected values associated with each trap are stored in the expected value storage unit 132 in advance, and the comparison unit 133 checks the checksum generation unit 131 when a trap occurs. The checksum value generated in step (1) may be compared with the expected value associated with the trap among the plurality of expected values stored in the expected value storage unit 132.
Further, according to an embodiment of the present invention, the instruction sequence execution unit 21 repeatedly executes the same instruction sequence, and the comparison unit 133 includes log information generated after execution of a certain instruction sequence and the past of the instruction sequence. The log information generated at the time of execution may be compared, and the execution result of the instruction sequence may be verified based on the comparison result.

以下に図14乃至図16を参照して、本発明の実施例について説明する。
図14は本発明の実施例に係る期待値記憶部のデータ構成例を示す図である。この例では、期待値記憶部132は、データ、シフト、期待値といったデータ項目を有する。データには、実行対象となる命令列に含まれる分岐命令の分岐条件を規定するデータの更新回数が設定される。シフトには、命令列のシフト回数が設定される。期待値には、上記データの更新回数と命令列のシフト回数とに対応付けられた期待値が設定される。
Embodiments of the present invention will be described below with reference to FIGS.
FIG. 14 is a diagram illustrating a data configuration example of the expected value storage unit according to the embodiment of the present invention. In this example, the expected value storage unit 132 has data items such as data, shift, and expected value. In the data, the number of data updates that defines the branch condition of the branch instruction included in the instruction sequence to be executed is set. The number of shifts of the instruction sequence is set for the shift. As the expected value, an expected value associated with the data update count and the instruction sequence shift count is set.

図15は、データ格納域に格納されているデータの更新を示す図である。分岐予測回路試験装置1の試験実行制御部12は、Xのポインタによって、図15に示すような、ランダムデータに含まれる各データを指定して、実行対象となる命令列に含まれる分岐命令の分岐条件を規定するアドレスに該指定された各データを設定する。Xは、上記分岐命令の分岐条件を規定するアドレスを示す変数である。ランダムデータは、複数のランダムなデータからなるデータである。試験実行制御部12は、Xのポインタによって指定するデータを順次変更することによって、分岐命令の分岐条件を規定するデータを更新する。。   FIG. 15 is a diagram illustrating updating of data stored in the data storage area. The test execution control unit 12 of the branch prediction circuit test apparatus 1 designates each data included in the random data as shown in FIG. 15 by the X pointer, and determines the branch instruction included in the instruction sequence to be executed. Each designated data is set at an address that defines a branch condition. X is a variable indicating an address that defines the branch condition of the branch instruction. Random data is data composed of a plurality of random data. The test execution control unit 12 updates the data defining the branch condition of the branch instruction by sequentially changing the data designated by the X pointer. .

図16は、本発明の実施例に係る情報処理装置の分岐予測回路の試験処理フローを示す図である。まず、ランダム命令生成部11がランダム命令列を生成し、試験実行制御部12が図15中に示すようなランダムデータを生成する(ステップS31)。次に、試験実行制御部12がXのポインタでランダムデータの先頭のデータを指定する(ステップS32)。試験実行制御部12が、データ域を初期化する(ステップS33)。データ域は、ランダムな命令を実行する際のメモリ上の作業領域である。
そして、命令列実行部31が、ランダム命令列を実行する(ステップS33)。該ランダム命令列の実行中にトラップが発生すると、チェックサム生成部131がチェックサムを生成する(ステップS35)。
FIG. 16 is a diagram illustrating a test processing flow of the branch prediction circuit of the information processing apparatus according to the embodiment of the present invention. First, the random instruction generation unit 11 generates a random instruction sequence, and the test execution control unit 12 generates random data as shown in FIG. 15 (step S31). Next, the test execution control unit 12 designates the leading data of the random data with the X pointer (step S32). The test execution control unit 12 initializes the data area (step S33). The data area is a work area on the memory when a random instruction is executed.
Then, the instruction sequence execution unit 31 executes a random instruction sequence (step S33). If a trap occurs during the execution of the random instruction sequence, the checksum generator 131 generates a checksum (step S35).

次に、比較部133が、上記ステップS35において生成されたチェックサムと前述した図14に示す期待値記憶部132に予め記憶されている期待値とを比較する(ステップS36)。試験実行制御部12が、ランダム命令列を下方向にN回シフトして実行したかを判断する(ステップS37)。試験実行制御部12が、ランダム命令列を下方向にN回シフトして実行していないと判断した場合、試験実行制御部12は、ランダム命令生成部11に指示して、ランダム命令列の先頭にnop命令を一つ追加させることによって該ランダム命令列を1命令分下方向にシフトし(ステップS38)、ステップS33に戻る。   Next, the comparison unit 133 compares the checksum generated in step S35 with the expected value stored in advance in the expected value storage unit 132 shown in FIG. 14 (step S36). The test execution control unit 12 determines whether or not the random instruction sequence is shifted N times downward and executed (step S37). When the test execution control unit 12 determines that the random instruction sequence is not shifted and executed N times downward, the test execution control unit 12 instructs the random instruction generation unit 11 to start the random instruction sequence. The random instruction sequence is shifted downward by one instruction by adding one nop instruction to (step S38), and the process returns to step S33.

試験実行制御部12が、ランダム命令列を下方向にN回シフトして実行したと判断した場合、試験実行制御部12が、データ格納域101を初期化し(ステップS39)、命令実行部22が、ランダム命令列を実行する(ステップS40)。該ランダム命令列の実行中にトラップが発生すると、チェックサム生成部131がチェックサムを生成する(ステップS41)。
次に、比較部133が、上記ステップS41において生成されたチェックサムと図14に示す期待値記憶部132に予め記憶されている期待値とを比較する(ステップS42)。試験実行制御部12が、ランダム命令列を上方向にN回シフトして実行したかを判断する(ステップS43)。試験実行制御部12が、ランダム命令列を上方向にN回シフトして実行していないと判断した場合、試験実行制御部12は、ランダム命令生成部11に指示して、ランダム命令列のnop命令を一つ削除させることによって該ランダム命令列を1命令分上方向にシフトし(ステップS44)、ステップS39に戻る。
When the test execution control unit 12 determines that the random instruction sequence is shifted N times downward and executed, the test execution control unit 12 initializes the data storage area 101 (step S39), and the instruction execution unit 22 Then, a random instruction sequence is executed (step S40). If a trap occurs during the execution of the random instruction sequence, the checksum generation unit 131 generates a checksum (step S41).
Next, the comparison unit 133 compares the checksum generated in step S41 with the expected value stored in advance in the expected value storage unit 132 shown in FIG. 14 (step S42). The test execution control unit 12 determines whether or not the random instruction sequence has been shifted N times in the upward direction (step S43). When the test execution control unit 12 determines that the random instruction sequence is not shifted and executed N times upward, the test execution control unit 12 instructs the random instruction generation unit 11 to perform a random instruction sequence nop. By deleting one instruction, the random instruction sequence is shifted upward by one instruction (step S44), and the process returns to step S39.

試験実行制御部12が、ランダム命令列を上方向にN回シフトして実行したと判断した場合、試験実行制御部12は、ランダム命令列に含まれる分岐命令の分岐条件を規定するデータをM回更新したかを判断する(ステップS45)。試験実行制御部12が、ランダム命令列に含まれる分岐命令の分岐条件を規定するデータをM回更新したと判断した場合は、処理を終了する。
試験実行制御部12が、ランダム命令列に含まれる分岐命令の分岐条件を規定するデータをM回更新していないと判断した場合は、試験実行制御部12は、Xのポインタを更新して(Xのポインタの指定によって他のデータを分岐命令の分岐条件を規定するアドレスに設定して)、ステップS33に戻る。
When the test execution control unit 12 determines that the random instruction sequence is shifted N times in the upward direction and executed, the test execution control unit 12 stores the data defining the branch condition of the branch instruction included in the random instruction sequence as M It is determined whether or not it has been updated once (step S45). If the test execution control unit 12 determines that the data defining the branch condition of the branch instruction included in the random instruction sequence has been updated M times, the process ends.
When the test execution control unit 12 determines that the data defining the branch condition of the branch instruction included in the random instruction sequence has not been updated M times, the test execution control unit 12 updates the X pointer ( According to the designation of the X pointer, other data is set to an address that defines the branch condition of the branch instruction), and the process returns to step S33.

以上から把握できるように、本発明の実施形態の特徴を述べると以下の通りである。
(付記1)分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験装置であって、
分岐命令を含むランダム命令列を生成する手段と、
上記ランダム命令列を被試験対象装置に与えて実行させ、該ランダム命令列の実行後、上記ランダム命令列を所定の命令数分シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させる試験実行制御手段と、
上記被試験対象装置による上記ランダム命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する検証手段とを備えた
ことを特徴とする情報処理装置の分岐予測回路の試験装置。
As can be understood from the above, the features of the embodiment of the present invention are described as follows.
(Appendix 1) Correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the branch instruction is stored in the storage means. The branch prediction circuit test apparatus in the information processing apparatus having the branch prediction circuit that executes the instruction of the branch destination address registered in the storage means without executing the branch instruction when the address is registered Because
Means for generating a random instruction sequence including branch instructions;
The random instruction sequence is given to the device under test for execution, and after execution of the random instruction sequence, the random instruction sequence is shifted by a predetermined number of instructions, and the address position of the branch instruction included in the executed instruction sequence A test execution control means for generating a new instruction sequence updated and executing the new instruction sequence again;
A test apparatus for a branch prediction circuit of an information processing apparatus, comprising: verification means for verifying an operation of a branch prediction circuit of the device under test based on an execution result of the random instruction sequence by the device under test .

(付記2)上記試験実行制御手段は、更に、上記新たな命令列が実行された後に、該新たな命令列を上記シフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置に実行させる
ことを特徴とする付記1に記載の情報処理装置の分岐予測回路の試験装置。
(Appendix 2) The test execution control means further returns the new instruction sequence to the state before the shift after the execution of the new instruction sequence, and receives the instruction sequence that has been returned to the state before the shift. The apparatus for testing a branch prediction circuit of an information processing apparatus according to appendix 1, wherein the apparatus to be tested is executed.

(付記3)上記試験実行制御手段は、上記命令列に含まれる分岐命令の分岐条件を規定するデータを、上記ランダム命令列を実行する毎に変更する
ことを特徴とする付記1又は付記2に記載の情報処理装置の分岐予測回路の試験装置。
(Additional remark 3) The said test execution control means changes the data which prescribes | regulates the branch conditions of the branch instruction contained in the said instruction sequence every time the said random instruction sequence is executed to the additional notes 1 or 2 A test apparatus for a branch prediction circuit of the information processing apparatus described.

(付記4)上記検証手段は、
前記命令列の実行中にトラップが発生したことを契機として、該トラップ発生時のログ情報を生成するログ情報生成手段と、
前記命令列の実行後に、前記生成されたログ情報と予め記憶手段に記憶された期待値もしくは先の試験時に生成されたログ情報とを比較し、該比較結果に基づいて該命令列の実行結果を検証する比較手段とを備えた
ことを特徴とする付記1,2,又は付記3に記載の情報処理装置の分岐予測回路の試験装置。
(Appendix 4) The verification means
Log information generating means for generating log information at the time of the occurrence of a trap, triggered by the occurrence of a trap during execution of the instruction sequence;
After the execution of the instruction sequence, the generated log information is compared with the expected value stored in advance in the storage means or the log information generated during the previous test, and the execution result of the instruction sequence is based on the comparison result. 4. A test apparatus for a branch prediction circuit of an information processing apparatus according to appendix 1, 2, or appendix 3, characterized by comprising comparison means for verifying.

(付記5)分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験方法であって、
分岐命令を含むランダム命令列を生成し、
上記ランダム命令列を被試験対象装置に与えて実行させ、該ランダム命令列の実行後、上記ランダム命令列を所定数シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させ、
上記被試験対象装置による上記ランダム命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する
ことを特徴とする情報処理装置の分岐予測回路の試験方法。
(Supplementary Note 5) Correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the branch instruction is stored in the storage means. Branch address prediction circuit test method in an information processing apparatus having a branch prediction circuit that executes an instruction at a branch destination address registered in the storage means without executing the branch instruction when the address is registered Because
Generate a random instruction sequence including branch instructions,
The random instruction sequence is given to the device under test for execution, and after execution of the random instruction sequence, the random instruction sequence is shifted by a predetermined number to update the address position of the branch instruction included in the executed instruction sequence. Generating a new instruction sequence, executing the new instruction sequence again,
A test method for a branch prediction circuit of an information processing device, wherein the operation of the branch prediction circuit of the device under test is verified based on an execution result of the random instruction sequence by the device under test.

(付記6)上記新たな命令列が実行された後に、該新たな命令列を上記シフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置に実行させる
ことを特徴とする付記5に記載の情報処理装置の分岐予測回路の試験方法。
(Supplementary note 6) After the new instruction sequence is executed, the new instruction sequence is returned to the state before the shift, and the apparatus under test is executed with the instruction sequence returned to the state before the shift. The test method of the branch prediction circuit of the information processing apparatus according to appendix 5.

(付記7)上記命令列に含まれる分岐命令の分岐条件を規定するデータを、上記ランダム命令列を実行する毎に変更する
ことを特徴とする付記5又は付記6に記載の情報処理装置の分岐予測回路の試験方法。
(Supplementary note 7) The branch of the information processing apparatus according to Supplementary note 5 or 6, wherein the data defining the branch condition of the branch instruction included in the instruction sequence is changed every time the random instruction sequence is executed. Test method for prediction circuit.

(付記8)分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験プログラムであって、
コンピュータに、
分岐命令を含むランダム命令列を生成する処理と、
上記ランダム命令列を被試験対象装置に与えて実行させ、該ランダム命令列の実行後、上記ランダム命令列を所定数シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させる処理と、
上記被試験対象装置による上記ランダム命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する処理とを実行させる
ことを特徴とする情報処理装置の分岐予測回路の試験プログラム。
(Supplementary Note 8) Correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the branch instruction is stored in the storage means. Branch address prediction circuit test program in an information processing apparatus having a branch prediction circuit for executing an instruction at a branch destination address registered in the storage means without executing the branch instruction when the address of the information is registered Because
On the computer,
Processing for generating a random instruction sequence including a branch instruction;
The random instruction sequence is given to the device under test for execution, and after execution of the random instruction sequence, the random instruction sequence is shifted by a predetermined number to update the address position of the branch instruction included in the executed instruction sequence. Generating a new instruction sequence and executing the new instruction sequence again;
A test program for a branch prediction circuit of an information processing apparatus, which executes a process of verifying an operation of a branch prediction circuit of the device under test based on an execution result of the random instruction sequence by the device under test.

(付記9)新たな命令列を再度実行させる処理は、更に、上記新たな命令列が実行された後に、該新たな命令列を上記シフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置に実行させる
ことを特徴とする付記8に記載の情報処理装置の分岐予測回路の試験プログラム。
(Supplementary Note 9) The process of executing the new instruction sequence again is such that after the new instruction sequence is executed, the new instruction sequence is returned to the state before the shift, and returned to the state before the shift. 9. A test program for a branch prediction circuit of an information processing apparatus according to appendix 8, wherein the instruction sequence is executed by a device under test.

(付記10)新たな命令列を再度実行させる処理は、上記命令列に含まれる分岐命令の分岐条件を規定するデータを、上記ランダム命令列を実行する毎に変更する
ことを特徴とする付記8又は付記9に記載の情報処理装置の分岐予測回路の試験プログラム。
(Additional remark 10) The process of re-executing a new instruction sequence changes the data defining the branch condition of the branch instruction included in the instruction sequence every time the random instruction sequence is executed. Or a test program for the branch prediction circuit of the information processing apparatus according to attachment 9.

以上、説明したように、本発明によれば、ランダム命令列をシフトすることによって、該ランダム命令列に含まれる分岐命令のアドレス位置が更新され、結果的に分岐命令の元のアドレス位置に他の命令を上書きしたことと同じ状態を作ることができる。その結果、分岐ポイントを特定して分岐命令を他の命令で置き換える処理を行う必要がなくなり、容易に、かつ効率的に被試験対象装置の分岐予測回路の検証をすることが可能となる。また、本発明は、上記シフトされた命令列が実行された後に、該新たな命令列をシフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置に実行させる。従って、本発明によれば、例えば、シフト前の状態に戻した命令列が実行された時のログ情報と、該元の命令列が実行された時のログ情報とが一致するかを検証することによって、精度良く被試験対象装置の分岐予測回路の動作を検証することができる。   As described above, according to the present invention, by shifting the random instruction sequence, the address position of the branch instruction included in the random instruction sequence is updated, and as a result, the original address position of the branch instruction is changed. You can create the same state as overwriting the command. As a result, there is no need to specify a branch point and replace the branch instruction with another instruction, and the branch prediction circuit of the device under test can be verified easily and efficiently. Further, according to the present invention, after the shifted instruction sequence is executed, the new instruction sequence is returned to the state before the shift, and the device under test is executed with the instruction sequence returned to the state before the shift. Therefore, according to the present invention, for example, it is verified whether the log information when the instruction sequence returned to the state before the shift is executed matches the log information when the original instruction sequence is executed. As a result, the operation of the branch prediction circuit of the device under test can be verified with high accuracy.

また、本発明によれば、分岐条件を規定するデータを変更した上で同じ命令列を繰り返し実行することを通じて、被試験対象装置の分岐予測回路の動作を検証することができる。その結果、効率良く被試験対象装置の分岐予測回路の動作を検証することが可能となる。
また、本発明は、命令列の実行中にトラップが発生したことを契機として、該トラップ発生時のログ情報を記憶し、上記命令列の実行後に、上記記憶されたログ情報と予め用意された期待値もしくは先の試験時に取得したログ情報とを比較し、該比較結果に基づいて該命令列の実行結果を検証する。従って、本発明によれば、被試験対象装置の分岐予測回路の動作が正常であるか否かを自動的に検証することが可能となる。
Further, according to the present invention, the operation of the branch prediction circuit of the device under test can be verified by repeatedly executing the same instruction sequence after changing the data defining the branch condition. As a result, it is possible to efficiently verify the operation of the branch prediction circuit of the device under test.
Further, the present invention stores log information at the time of the occurrence of a trap when a trap occurs during execution of an instruction sequence, and is prepared in advance with the stored log information after execution of the instruction sequence. The expected value or the log information acquired during the previous test is compared, and the execution result of the instruction sequence is verified based on the comparison result. Therefore, according to the present invention, it is possible to automatically verify whether or not the operation of the branch prediction circuit of the device under test is normal.

本発明のシステム構成の一例を示す図である。It is a figure which shows an example of the system configuration | structure of this invention. 分岐命令と該分岐命令の分岐条件の一例を示す図である。It is a figure which shows an example of a branch instruction and the branch conditions of the branch instruction. 被試験対象装置が備える分岐予測回路の動作処理を説明する図である。It is a figure explaining the operation | movement process of the branch prediction circuit with which a to-be-tested apparatus is provided. 本発明の第1の実施の形態に係る分岐予測回路の試験処理フローの一例を示す図である。It is a figure which shows an example of the test processing flow of the branch prediction circuit which concerns on the 1st Embodiment of this invention. ランダム命令列を示す図(1)である。It is a figure (1) which shows a random instruction sequence. 分岐予測管理テーブルに登録される分岐命令のアドレスと分岐先アドレスの例を示す図(1)である。It is a figure (1) which shows the example of the address of a branch instruction registered in a branch prediction management table, and a branch destination address. 本発明の第2の実施の形態に係る分岐予測回路の試験処理フローの一例を示す図である。It is a figure which shows an example of the test processing flow of the branch prediction circuit which concerns on the 2nd Embodiment of this invention. ランダム命令列を示す図(2)である。It is a figure (2) which shows a random instruction sequence. 分岐予測管理テーブルに登録される分岐命令のアドレスと分岐先アドレスの例を示す図(2)である。It is a figure (2) which shows the example of the address of a branch instruction registered in a branch prediction management table, and a branch destination address. 本発明の第3の実施の形態に係る分岐予測回路の試験処理フローの一例を示す図である。It is a figure which shows an example of the test processing flow of the branch prediction circuit which concerns on the 3rd Embodiment of this invention. ランダム命令列を示す図(3)である。It is a figure (3) which shows a random instruction sequence. 命令Cと分岐命令Xの処理フローを示す図The figure which shows the processing flow of the instruction C and the branch instruction X 本発明の第4の実施の形態を説明する図である。It is a figure explaining the 4th Embodiment of this invention. 本発明の実施例に係る期待値記憶部のデータ構成例を示す図である。It is a figure which shows the data structural example of the expected value memory | storage part which concerns on the Example of this invention. データ格納域に格納されているデータの更新を示す図である。It is a figure which shows the update of the data stored in the data storage area. 本発明の実施例に係る情報処理装置の分岐予測回路の試験処理フローを示す図である。It is a figure which shows the test processing flow of the branch prediction circuit of the information processing apparatus which concerns on the Example of this invention. 従来の分岐予測回路の試験方法を示す図である。It is a figure which shows the test method of the conventional branch prediction circuit.

符号の説明Explanation of symbols

1 分岐予測回路試験装置
11 ランダム命令生成部
12 試験実行制御部
13 検証部
21 分岐予測回路
22 命令実行部
100 命令格納域
101 データ格納域
131 チェックサム生成部
132 期待値記憶部
133 比較部
200 トータルchecksum
201 期待値
211 分岐予測管理テーブル
DESCRIPTION OF SYMBOLS 1 Branch prediction circuit test apparatus 11 Random instruction generation part 12 Test execution control part 13 Verification part 21 Branch prediction circuit 22 Instruction execution part 100 Instruction storage area 101 Data storage area 131 Checksum generation part 132 Expected value storage part 133 Comparison part 200 Total checksum
201 Expected value 211 Branch prediction management table

Claims (6)

分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験装置であって、
分岐命令を含むランダムな命令列を生成する手段と、
上記ランダムな命令列を被試験対象装置に与えて実行させ、該ランダムな命令列の実行後、上記ランダムな命令列を所定の命令数分シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させる試験実行制御手段と、
上記被試験対象装置による上記ランダムな命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する検証手段とを備えた
ことを特徴とする情報処理装置の分岐予測回路の試験装置。
The correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the address of the branch instruction is registered in the storage means A branch prediction circuit test apparatus in an information processing apparatus having a branch prediction circuit for executing an instruction of a branch destination address registered in the storage means without executing the branch instruction,
Means for generating a random instruction sequence including branch instructions;
A branch instruction included in the executed instruction sequence by shifting the random instruction sequence by a predetermined number of instructions after the random instruction sequence is executed by giving the device under test the random instruction sequence A test execution control means for generating a new instruction sequence in which the address position of is updated and executing the new instruction sequence again;
A test of a branch prediction circuit of an information processing device, comprising: verification means for verifying an operation of a branch prediction circuit of the device under test based on a result of execution of the random instruction sequence by the device under test apparatus.
上記試験実行制御手段は、更に、上記新たな命令列が実行された後に、該新たな命令列を上記シフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置に実行させる
ことを特徴とする請求項1に記載の情報処理装置の分岐予測回路の試験装置。
The test execution control unit further returns the new instruction sequence to the state before the shift after the new instruction sequence is executed, and the instruction sequence returned to the state before the shift to the device under test. The branch prediction circuit test apparatus for an information processing apparatus according to claim 1, wherein the test apparatus is executed.
上記試験実行制御手段は、上記命令列に含まれる分岐命令の分岐条件を規定するデータを、上記ランダムな命令列を実行する毎に変更する
ことを特徴とする請求項1又は請求項2に記載の情報処理装置の分岐予測回路の試験装置。
3. The test execution control unit changes data defining a branch condition of a branch instruction included in the instruction sequence every time the random instruction sequence is executed. Test apparatus for branch prediction circuit of information processing apparatus.
上記検証手段は、
前記命令列の実行中にトラップが発生したことを契機として、該トラップ発生時のログ情報を生成するログ情報生成手段と、
前記命令列の実行後に、前記生成されたログ情報と予め記憶手段に記憶された期待値もしくは先の試験時に生成されたログ情報とを比較し、該比較結果に基づいて該命令列の実行結果を検証する比較手段とを備えた
ことを特徴とする請求項1,2,又は請求項3に記載の情報処理装置の分岐予測回路の試験装置。
The verification means is
Log information generating means for generating log information at the time of the occurrence of a trap, triggered by the occurrence of a trap during execution of the instruction sequence;
After the execution of the instruction sequence, the generated log information is compared with the expected value stored in advance in the storage means or the log information generated during the previous test, and the execution result of the instruction sequence is based on the comparison result. 4. A test apparatus for a branch prediction circuit of an information processing apparatus according to claim 1, 2 or 3, further comprising a comparison means for verifying.
分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験方法であって、
分岐命令を含むランダムな命令列を生成し、
上記ランダムな命令列を被試験対象装置に与えて実行させ、該ランダムな命令列の実行後、上記ランダムな命令列を所定数シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させ、
上記被試験対象装置による上記ランダムな命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する
ことを特徴とする情報処理装置の分岐予測回路の試験方法。
The correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the address of the branch instruction is registered in the storage means A branch prediction circuit test method in an information processing apparatus having a branch prediction circuit for executing an instruction of a branch destination address registered in the storage means without executing the branch instruction,
Generate a random instruction sequence including branch instructions,
The random instruction sequence is given to the device under test for execution, and after execution of the random instruction sequence, the random instruction sequence is shifted by a predetermined number, and the address position of the branch instruction included in the executed instruction sequence Generate a new instruction sequence updated, and execute the new instruction sequence again.
A test method for a branch prediction circuit of an information processing apparatus, comprising: verifying an operation of a branch prediction circuit of the device under test based on an execution result of the random instruction sequence by the device under test.
分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を記憶手段に記憶し、分岐命令を実行する際、上記記憶手段を参照し、該記憶手段に当該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該記憶手段に登録された分岐先アドレスの命令を実行対象とする分岐予測回路を有する情報処理装置における分岐予測回路の試験プログラムであって、
コンピュータに、
分岐命令を含むランダムな命令列を生成する処理と、
上記ランダムな命令列を被試験対象装置に与えて実行させ、該ランダムな命令列の実行後、上記ランダムな命令列を所定数シフトさせて上記実行された命令列に含まれる分岐命令のアドレス位置が更新された新たな命令列を生成させ、該新たな命令列を再度実行させる処理と、
上記被試験対象装置による上記ランダムな命令列の実行結果に基づき上記被試験対象装置の分岐予測回路の動作を検証する処理とを実行させる
ことを特徴とする情報処理装置の分岐予測回路の試験プログラム。
The correspondence information between the address of the branch instruction and the branch destination address branched by the branch instruction is stored in the storage means, and when executing the branch instruction, the storage means is referred to and the address of the branch instruction is registered in the storage means A branch prediction circuit test program in an information processing apparatus having a branch prediction circuit for executing an instruction of a branch destination address registered in the storage means without executing the branch instruction,
On the computer,
A process for generating a random instruction sequence including a branch instruction;
The random instruction sequence is given to the device under test for execution, and after execution of the random instruction sequence, the random instruction sequence is shifted by a predetermined number, and the address position of the branch instruction included in the executed instruction sequence Generating a new instruction sequence updated and executing the new instruction sequence again;
A test program for a branch prediction circuit of an information processing apparatus, which executes a process for verifying an operation of a branch prediction circuit of the device under test based on an execution result of the random instruction sequence by the device under test .
JP2007064793A 2007-03-14 2007-03-14 Test apparatus for branch prediction circuit of information processing apparatus, test method for branch prediction circuit of information processing apparatus, and test program for branch prediction circuit of information processing apparatus Expired - Fee Related JP4854551B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007064793A JP4854551B2 (en) 2007-03-14 2007-03-14 Test apparatus for branch prediction circuit of information processing apparatus, test method for branch prediction circuit of information processing apparatus, and test program for branch prediction circuit of information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007064793A JP4854551B2 (en) 2007-03-14 2007-03-14 Test apparatus for branch prediction circuit of information processing apparatus, test method for branch prediction circuit of information processing apparatus, and test program for branch prediction circuit of information processing apparatus

Publications (2)

Publication Number Publication Date
JP2008225978A JP2008225978A (en) 2008-09-25
JP4854551B2 true JP4854551B2 (en) 2012-01-18

Family

ID=39844502

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007064793A Expired - Fee Related JP4854551B2 (en) 2007-03-14 2007-03-14 Test apparatus for branch prediction circuit of information processing apparatus, test method for branch prediction circuit of information processing apparatus, and test program for branch prediction circuit of information processing apparatus

Country Status (1)

Country Link
JP (1) JP4854551B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63170739A (en) * 1987-01-09 1988-07-14 Nec Corp Branch forecast test system
JPH01296343A (en) * 1988-05-25 1989-11-29 Nec Corp Data processor
JPH02115942A (en) * 1988-10-25 1990-04-27 Nec Corp Information processor test system
JPH11232131A (en) * 1998-02-13 1999-08-27 Hitachi Ltd Testing method for data processing equipment
US6327559B1 (en) * 1999-05-04 2001-12-04 International Business Machines Corporation Method for creating a simulation environment for enhanced logic verification of a branch history table

Also Published As

Publication number Publication date
JP2008225978A (en) 2008-09-25

Similar Documents

Publication Publication Date Title
CN106371940B (en) Method and device for solving program crash
US9910743B2 (en) Method, system and device for validating repair files and repairing corrupt software
US8589892B2 (en) Verification of speculative execution
CN115268983A (en) Hot repair method and device for embedded Internet of things equipment vulnerability
US8719788B2 (en) Techniques for dynamically determining test platforms
CN110515647A (en) A kind of static resource management method, device, equipment and storage medium
JP2001222442A (en) Pipeline test method, pipeline test instruction generation method, and storage medium therefor
US9117023B2 (en) Dynamic generation of test segments
US8438000B2 (en) Dynamic generation of tests
JP6903249B2 (en) Test case generator, test case generator, and test case generator
JP4759546B2 (en) Specification defect verification system, method and program
US7539851B2 (en) Using register readiness to facilitate value prediction
JP4854551B2 (en) Test apparatus for branch prediction circuit of information processing apparatus, test method for branch prediction circuit of information processing apparatus, and test program for branch prediction circuit of information processing apparatus
KR100404284B1 (en) Method for creating a simulation environment for enhanced logic verification of a branch history table
JP6812826B2 (en) Storage method, storage device and storage program
US20080109793A1 (en) Verifying loaded module during debugging
US20080320461A1 (en) Method and Apparatus for Reliable In-Place Update
CN119249430A (en) An automated vulnerability exploit construction method based on symbolic solution
US8352234B2 (en) Model generation based on a constraint and an initial model
US11156663B2 (en) Generating a test sequence of code based on a directed sequence of code and randomly selected instructions
US6886125B2 (en) Testing a processor using a random code generator
JP2012160101A (en) Information processing unit, software testing method and software testing program
JP6583033B2 (en) Driver generation program, apparatus, and method
CN116245053B (en) Simulation verification method and system for dynamic loading
US6564178B1 (en) Method and apparatus for evaluating processors for architectural compliance

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111017

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: 20111025

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111025

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141104

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4854551

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees