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 PDFInfo
- 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
Links
Images
Landscapes
- Advance Control (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
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に、ランダム命令列を生成し、該命令列内の分岐命令の分岐先をランダムに設定し、分岐命令で比較する条件を初期設定する命令と繰り返しループから抜け出すために比較値を変化させる命令とを上記命令列内に設定し、無条件分岐命令の時ループを抜け出す命令を設定することで、分岐予測機能について試験を行う情報処理装置試験方式に関して記載されている。
In addition, as a specific technique for verifying the branch prediction function, the following
前述した、ランダム命令列に含まれる分岐命令を書き換えるファントムをランダム命令生成時に埋め込んで該命令を実行して分岐予測回路の検証を行う技術は、機能試験レベルと変わらないため、試験のランダム性が失われる。また、命令の書き換え作業に時間を要し、試験効率の低下に繋がる。 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
The random
本発明の一実施形態によれば、試験実行制御部12は、更に、上記新たな命令列が実行された後に、該新たな命令列を上記シフト前の状態に戻し、シフト前の状態に戻した該命令列を被試験対象装置2が備える命令実行部22に実行させる。
また、本発明の一実施形態によれば、試験実行制御部12は、上記命令列に含まれる分岐命令の分岐条件を規定するデータを、上記被試験対象装置2が備える命令実行部22が上記ランダム命令列を実行する毎に変更する。
According to an embodiment of the present invention, the test
Further, according to one embodiment of the present invention, the test
検証部13は、被試験対象装置2による上記ランダム命令列の実行結果に基づいて、該被試験対象装置2が備える分岐予測回路21の動作を検証する。
検証部13は、チェックサム生成部131、期待値記憶部132、比較部133を備える。チェックサム生成部131は、上記ランダム命令列の実行中にトラップが発生したことを契機として、該トラップ発生時の各レジスタ、メモリの内容に基づいてチェックサムを生成し、生成されたチェックサムの値をログ情報として記憶する。チェックサムは、例えば、各レジスタ、メモリの内容を加算して圧縮した形式のデータである。チェックサム生成部131は、ハードトラップ又はソフトトラップが発生したことを契機として、又は、トラップの発生に関係なくランダム命令列の実行終了時に、上記各レジスタ、メモリの内容をログ情報として記憶するようにしてもよい。期待値記憶部132には、上記ログ情報との比較対象となる期待値が予め記憶される。比較部133は、上記ランダム命令列が実行された後に、上記チェックサム生成部131によって生成されたログ情報と上記期待値記憶部132に予め記憶された期待値もしくは先の試験時に生成されたログ情報とを比較し、該比較結果に基づいて該命令列の実行結果の検証(分岐予測回路21の動作の検証)を行う。
The
The
なお、上述した分岐予測回路試験装置1及びその各部の機能は、CPUとその上で実行されるプログラムにより実現される。当該本発明を実現するプログラムは、コンピュータが読み取り可能な記録媒体、例えば半導体メモリ、ハードディスク、CD−ROM、DVD等に格納することができ、これらの記録媒体に記録して提供され、又は、通信インタフェースを介してネットワークを利用した送受信により提供される。
Note that the functions of the branch prediction
被試験対象装置2は、分岐予測回路試験装置1による分岐予測回路の検証処理の対象となる情報処理装置である。被試験対象装置2は、命令実行部22と分岐予測回路21とを備える。
分岐予測回路21は、分岐命令のアドレスと該分岐命令により分岐する分岐先アドレスとの対応情報を分岐予測管理テーブル211に記憶する。また、分岐予測回路21は、分岐命令の実行時に分岐予測管理テーブル211を参照して、該分岐予測管理テーブル211に該分岐命令のアドレスが登録されているとき、該分岐命令を実行することなく、該該分岐予測管理テーブル211に登録された分岐先アドレスの命令を実行対象として命令実行部22に実行させる(分岐予測処理を行う)。命令実行部22は、命令格納域100に格納された命令をフェッチし、データ格納域101に格納されたデータをロードして、該命令を実行する。
The device under
The
図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
[1]: The
[2]: The
[3]: The
[4]: The
上記のように、分岐予測回路21は、一度実行された分岐命令のアドレスと該分岐命令により分岐する分岐アドレスとの対応情報を分岐予測管理テーブル211に登録し、次回同じアドレスの分岐命令を実行する際に、上述した分岐予測処理を行い、予め分岐先アドレスに格納された命令を実行することによって、処理の高速化を図る。
As described above, the
以下に、図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
次に、試験実行制御部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
次に、試験実行制御部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
次に、試験実行制御部12が、ランダム命令生成部11に指示して、ステップS4において実行されたランダム命令列にnop命令を一つ追加させることによって該ランダム命令列をシフトする(ステップS5)。ステップS5の処理によって、例えば、図5(C)に示すような、ステップS4において実行されたランダム命令列が下方向にシフトされた新たなランダム命令列が生成される。図5(C)に示すランダム命令列を参照すると、A’番地に命令Cが格納され、A”番地に分岐命令Xが格納され、B”番地に分岐命令Xの分岐先の命令である命令Yが格納されている。
Next, the test
次に、試験実行制御部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
分岐予測回路試験装置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
以下に、図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
次に、試験実行制御部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
次に、試験実行制御部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
次に、試験実行制御部12が、ランダム命令生成部11に指示して、ステップS14において実行されたランダム命令列からnop命令を一つ削除させることによって、該ランダム命令列を上方向にシフトする(ステップS15)。ステップS15の処理によって、例えば、図8(C)に示すような、ステップS12において実行された命令列(図8(A)に示す命令列)と同じ状態の命令列が生成される。すなわち、図8(B)に示す命令列がシフト前の元の状態に戻る。図8(C)に示すランダム命令列を参照すると、A番地に分岐命令Xが格納され、B番地に分岐命令Xの分岐先の命令である命令Yが格納されている。
Next, the test
次に、試験実行制御部12が、命令実行部22に上記ステップS15の処理によって元の状態に戻ったランダム命令列を再度実行させる(ステップS16)。図8(C)に示すように、A番地には分岐命令Xが格納されているため、該分岐命令Xが実行される。ステップS16の処理によってランダム命令列が実行されると、分岐予測回路21が、図9(C)に示すように、該実行されたランダム命令列に含まれる分岐命令XのアドレスであるA番地と該分岐命令Xにより分岐する分岐先アドレスであるB番地とを分岐予測管理テーブル211に登録する。
Next, the test
分岐予測回路試験装置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
次に、図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
次に、試験実行制御部12が、生成されたランダム命令列を被試験対象装置2の命令実行部22に実行させる(ステップS22)。ここで、図11(A)中のデータ格納域101のC番地には値が0であるデータAが格納されているため、命令Cがロードするデータの値は0である。従って、分岐命令Xが実行されると、前述した図12に示す処理フローに従って、B番地へ分岐する。分岐予測回路21は、分岐命令XのアドレスであるA番地と該分岐命令Xにより分岐する分岐先アドレスであるB番地とを分岐予測管理テーブル211に登録する。
Next, the test
次に、試験実行制御部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
分岐予測回路試験装置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
次に、図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
上記ランダム命令列の実行後、検証部13の比較部133が、上記記憶されたログ情報と予め期待値記憶部132に記憶された期待値とを比較し、該比較結果に基づいて、上記ランダム命令列の実行結果を検証する。例えば、比較部133は、図13中に示すトータルchecksum200と期待値201とを比較して、ランダム命令列の実行結果を検証する。
After execution of the random instruction sequence, the
本発明の一実施形態によれば、各々のトラップに対応付けられた複数の期待値を予め期待値記憶部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
Further, according to an embodiment of the present invention, the instruction
以下に図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
図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
図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
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
次に、比較部133が、上記ステップS35において生成されたチェックサムと前述した図14に示す期待値記憶部132に予め記憶されている期待値とを比較する(ステップS36)。試験実行制御部12が、ランダム命令列を下方向にN回シフトして実行したかを判断する(ステップS37)。試験実行制御部12が、ランダム命令列を下方向にN回シフトして実行していないと判断した場合、試験実行制御部12は、ランダム命令生成部11に指示して、ランダム命令列の先頭にnop命令を一つ追加させることによって該ランダム命令列を1命令分下方向にシフトし(ステップS38)、ステップS33に戻る。
Next, the
試験実行制御部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
Next, the
試験実行制御部12が、ランダム命令列を上方向にN回シフトして実行したと判断した場合、試験実行制御部12は、ランダム命令列に含まれる分岐命令の分岐条件を規定するデータをM回更新したかを判断する(ステップS45)。試験実行制御部12が、ランダム命令列に含まれる分岐命令の分岐条件を規定するデータをM回更新したと判断した場合は、処理を終了する。
試験実行制御部12が、ランダム命令列に含まれる分岐命令の分岐条件を規定するデータをM回更新していないと判断した場合は、試験実行制御部12は、Xのポインタを更新して(Xのポインタの指定によって他のデータを分岐命令の分岐条件を規定するアドレスに設定して)、ステップS33に戻る。
When the test
When the test
以上から把握できるように、本発明の実施形態の特徴を述べると以下の通りである。
(付記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
(付記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
(付記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
(付記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.
1 分岐予測回路試験装置
11 ランダム命令生成部
12 試験実行制御部
13 検証部
21 分岐予測回路
22 命令実行部
100 命令格納域
101 データ格納域
131 チェックサム生成部
132 期待値記憶部
133 比較部
200 トータルchecksum
201 期待値
211 分岐予測管理テーブル
DESCRIPTION OF
201
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 .
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)
| 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 |
-
2007
- 2007-03-14 JP JP2007064793A patent/JP4854551B2/en not_active Expired - Fee Related
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 |