JPH1011311A - Test program generating device for processor - Google Patents

Test program generating device for processor

Info

Publication number
JPH1011311A
JPH1011311A JP8163013A JP16301396A JPH1011311A JP H1011311 A JPH1011311 A JP H1011311A JP 8163013 A JP8163013 A JP 8163013A JP 16301396 A JP16301396 A JP 16301396A JP H1011311 A JPH1011311 A JP H1011311A
Authority
JP
Japan
Prior art keywords
data
instruction
test
test program
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8163013A
Other languages
Japanese (ja)
Inventor
Ken Mabuchi
謙 馬渕
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP8163013A priority Critical patent/JPH1011311A/en
Publication of JPH1011311A publication Critical patent/JPH1011311A/en
Pending legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a test program generating device for a processor which can easily generate a test program in a short time. SOLUTION: An initial test program from the test program generating device 3 is supplied to a processor operation system 1 to be tested and then inside information 11 on a processor operation model 2 obtained by the processor operation system 1 is acquired with it; and an expected value check routine and other process routines are inserted into and added to the initial test program according to the inside information 11 to generate the test program for the processor operation system 1.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、プロセッサを開
発する際に、プロセッサをテストするテストプログラム
を自動生成するプロセッサのテストプログラム生成装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor test program generating apparatus for automatically generating a test program for testing a processor when developing the processor.

【0002】[0002]

【従来の技術】プロセッサのテストプログラムを製作す
るにあたって、テストプログラムが実行されるハードウ
ェアのプロセッサ動作システム100は、図6に示すよ
うに、プロセッサの動作をシミュレートするプロセッサ
動作モデル101と、テストプログラムを実行するため
に必要な周辺装置102を備えたシステムである。この
ようなシステムには、必ず主記憶103となるメモリシ
ステムが存在し、実行ファイル104は予めこのメモリ
システムにロードされた後、プロセッサ動作モデル10
1をリセットしプログラムが実行される。
2. Description of the Related Art In producing a test program for a processor, a processor operation system 100 of hardware for executing the test program includes, as shown in FIG. This is a system including a peripheral device 102 necessary for executing a program. In such a system, there is a memory system that always serves as the main memory 103. After the execution file 104 is loaded in this memory system in advance, the processor operation model 10
1 is reset and the program is executed.

【0003】実行ファイル104は、テストプログラム
のソースコード105をプログラミングツール106に
より機械語に変換したものである。
An execution file 104 is obtained by converting a source code 105 of a test program into a machine language by a programming tool 106.

【0004】テストプログラムのソースコード105
は、人手もしくはプロセッサ動作システム100と独立
なテストプログラム生成ツール107によって製作、生
成される。製作、生成されたテストプログラムの内部に
組み込まれる期待値チェックのためのセルフチェックル
ーチンは、人手もしくはテストプログラム生成ツール1
07により求められて製作、生成される。
The source code 105 of the test program
Are produced and generated manually or by a test program generation tool 107 independent of the processor operation system 100. The self-check routine for checking the expected value incorporated in the manufactured and generated test program is performed manually or by the test program generation tool 1.
07 and produced and generated.

【0005】また、既存のリファレンスとなるプロセッ
サ動作システム100が存在する場合は、図6の破線で
示すように、一度期待値チェックルーチンを含まない試
作テストプログラムを実行し、得られた実行結果108
により期待値チェックルーチンを製作し試作テストプロ
グラムに追加(109)することで制作することができ
る。
When a processor operating system 100 serving as an existing reference exists, as shown by a broken line in FIG. 6, a prototype test program which does not include an expected value check routine is executed once, and the obtained execution result 108 is obtained.
Thus, an expected value check routine is produced and added to the prototype test program (109).

【0006】[0006]

【発明が解決しようとする課題】このようなテストプロ
グラムの製作、生成において、テストプログラムのソー
スコード上に記述される期待値は手計算により求められ
るか、あるいはテストプログラム生成ツールで期待値が
求められる場合には、プロセッサ動作モデルをテストプ
ログラム生成ツール内に実現する必要があった。しか
し、このような方法では、テストプログラム生成ツール
の実現にコストがかかり、検証作業を複雑にし、バグ発
生の確率を上げることになる。
In the production and generation of such a test program, the expected value described in the source code of the test program is obtained by manual calculation, or the expected value is obtained by a test program generation tool. In such a case, it was necessary to implement the processor operation model in the test program generation tool. However, such a method is costly to implement a test program generation tool, complicates verification work, and increases the probability of bug occurrence.

【0007】また、既存のリファレンスとなるプロセッ
サ動作モデルを用いてシミュレーションで求める場合
は、始め試作テストプログラムを製作し、リファレンス
モデルで一度実行して実行結果を求め、テストプログラ
ムにセルフチェックルーチンを挿入追加し、再度アセン
ブル、実行しなければならなかった。このため、テスト
プログラムの製作に時間と手間、ならびにコストがかか
っていた。
[0007] When a simulation is to be performed by using an existing reference processor operation model, a prototype test program is first produced, executed once with the reference model to obtain an execution result, and a self-check routine is inserted into the test program. Had to add and reassemble and run again. For this reason, it took time, effort, and cost to produce a test program.

【0008】さらに、リファレンスとなるプロセッサ動
作システムによってメモリシステムの構成が決められて
いるため、メモリマップ上の任意の場所にテストプログ
ラムをロードすることができず、テストプログラムの製
作に制約があった。
Further, since the configuration of the memory system is determined by the processor operation system serving as a reference, the test program cannot be loaded to an arbitrary location on the memory map, and there is a limitation in the production of the test program. .

【0009】そこで、この発明は、上記に鑑みてなされ
たものであり、その目的とするところは、テストプログ
ラムを短時間で容易に製作できるプロセッサのテストプ
ログラム生成装置を提供することにある。
Accordingly, the present invention has been made in view of the above, and it is an object of the present invention to provide a processor test program generation device capable of easily producing a test program in a short time.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、プロセッサの動作をシミュ
レートするプロセッサ動作モデルと、主記憶を除く周辺
装置を備えて構成されるプロセッサ動作システムから命
令/データの要求を受けて、命令/データの生成要求を
出力し、該生成要求に応じて生成された命令/データを
記憶して前記プロセッサ動作システムに出力するテスト
データ記憶装置と、前記テストデータ記憶装置から出力
される命令/データ生成要求を受けて、外部から与えら
れるテスト仕様に基づいて初期のテストプログラムとな
る命令/データを逐次生成し、前記テストデータ記憶装
置から出力される命令/データが前記プロセッサ動作シ
ステムで実行されて得られる前記プロセッサ動作モデル
の内部情報を受けて、該内部情報に基づいて期待値チェ
ックルーチンを含む処理プログラムを前記初期のテスト
プログラムとなる命令/データに挿入追加するデータ生
成装置と、前記データ生成装置により生成、挿入追加さ
れた命令/データを受けて、テストプログラムの命令
列、データ列としてソースコードを生成できるデータ構
造で記憶するテストプログラム記憶装置とを有して構成
される。
According to one aspect of the present invention, there is provided a processor comprising a processor operation model for simulating the operation of a processor and a peripheral device excluding a main memory. A test data storage device for receiving an instruction / data request from an operation system, outputting an instruction / data generation request, storing the instruction / data generated in response to the generation request, and outputting the instruction / data to the processor operation system; Receiving an instruction / data generation request output from the test data storage device, sequentially generating instructions / data serving as an initial test program based on a test specification provided from the outside, and outputting the instruction / data from the test data storage device. Receiving internal information of the processor operation model obtained by executing the instruction / data in the processor operation system. A data generating device that inserts and adds a processing program including an expected value check routine to the instruction / data serving as the initial test program based on the internal information; and generates and inserts / adds the instruction / data generated by the data generating device. And a test program storage device for storing a test program instruction sequence and a data sequence in a data structure capable of generating a source code.

【0011】請求項2記載の発明は、請求項1記載のプ
ロセッサのテストプログラム生成装置において、データ
生成装置は、外部から与えられるテスト仕様を解析する
テスト仕様解析装置と、前記テスト仕様解析装置でなさ
れたテスト仕様の解析結果を記憶する解析結果記憶装置
と、前記解析結果記憶装置に記憶された解析結果に基づ
いて初期の命令/データを生成し、前記プロセッサ動作
モデルの内部情報に基づいて期待値チェックルーチンを
含む処理プログラムを生成する命令/データ生成装置
と、前記命令/データ生成装置で生成された期待値チェ
ックルーチンを含む処理プログラムを初期の命令/デー
タに挿入追加してテストプログラムを修正し、修正した
テストプログラムを前記テストプログラム記憶装置及び
前記命令/データ生成装置に出力するプログラム修正装
置と、前記命令/データ生成装置によって生成された命
令/データを機械語に変換して前記テストデータ記憶装
置に出力する機械語変換装置とを有して構成される。
According to a second aspect of the present invention, in the test program generation device for a processor according to the first aspect, the data generation device includes a test specification analysis device for analyzing a test specification supplied from outside, and the test specification analysis device. An analysis result storage device for storing analysis results of the performed test specifications, and initial instructions / data generated based on the analysis results stored in the analysis result storage device, and expected based on internal information of the processor operation model. An instruction / data generation device for generating a processing program including a value check routine, and a processing program including an expected value check routine generated by the instruction / data generation device are inserted into an initial instruction / data to correct the test program. The modified test program is stored in the test program storage device and the instruction / data generator. And fix device that outputs to a device configured to have a machine language conversion apparatus that outputs an instruction / data generated by the instruction / data generation apparatus converts the machine language into the test data storage device.

【0012】請求項3記載の発明は、請求項1記載のプ
ロセッサのテストプログラム生成装置において、データ
生成装置は、外部から与えられるコマンドに基づいてラ
ンダムに命令/データを生成し、前記プロセッサ動作モ
デルの内部情報に基づいて期待値チェックルーチンを含
む処理プログラムを生成するするランダム命令/データ
生成装置と、前記ランダム命令/データ生成装置で生成
された期待値チェックルーチンを含む処理プログラムを
初期の命令/データに挿入追加し、得られたテストプロ
グラムをテストプログラム記憶装置に出力するプログラ
ム追加装置と、前記命令/データ生成装置によって生成
された命令/データを機械語に変換して前記テストデー
タ記憶装置に出力する機械語変換装置とを有して構成さ
れる。
According to a third aspect of the present invention, in the processor test program generating device according to the first aspect, the data generating device randomly generates an instruction / data based on an externally applied command, and the processor operation model And a random instruction / data generating device for generating a processing program including an expected value check routine based on internal information of the random instruction / data generating device. A program addition device that inserts and adds the data into the data and outputs the obtained test program to a test program storage device; and converts the instruction / data generated by the instruction / data generation device into a machine language to the test data storage device. And an output machine language conversion device.

【0013】[0013]

【発明の実施の形態】以下、図面を用いてこの発明の実
施の形態を説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0014】図1は請求項1記載の発明の一実施形態に
係わるプロセッサのテストプログラム生成装置の構成を
示す図である。
FIG. 1 is a diagram showing a configuration of a test program generation device for a processor according to an embodiment of the present invention.

【0015】図1において、図6に示す従来のプロセッ
サ動作システムに対して、以下に示す実施形態のプロセ
ッサ動作システム1は、プロセッサ動作モデル2の主記
憶となるメモリシステムを除いたものと定義する。
In FIG. 1, a processor operation system 1 according to the following embodiment is defined as a processor operation system of the conventional processor operation system shown in FIG. .

【0016】テストプログラム生成装置3は、テスト仕
様4等を入力とし、テストプログラムのソースコード5
を出力する装置であり、テストプログラムをプロセッサ
動作システム1の実行過程によって流動的に、かつ徐々
にテストプログラムを生成する装置である。テストプロ
グラム生成装置3は、データ生成装置6、テストデータ
記憶装置7、テストプログラム記憶装置8から構成され
る。
The test program generating device 3 receives the test specifications 4 and the like as input and generates a test program source code 5.
Is a device that generates a test program fluidly and gradually according to the execution process of the processor operation system 1. The test program generation device 3 includes a data generation device 6, a test data storage device 7, and a test program storage device 8.

【0017】テストデータ記憶装置は、図6の従来例に
示す主記憶となるメモリシステムの機能を果たし、任意
のアドレスに対して存在するデータを記憶する機能を有
した記憶装置である。
The test data storage device is a storage device that fulfills the function of a memory system serving as a main storage shown in the conventional example of FIG. 6 and has a function of storing data existing at an arbitrary address.

【0018】データ生成装置6は、テストデータ記憶装
置7からのデータ生成要求を受けて、命令やデータなど
の所望のデータを生成し、プロセッサ動作モデル1に与
える装置である。データ生成は予め入力されたテスト仕
様4に記述されている規則に基づいて行われる。
The data generation device 6 is a device that receives a data generation request from the test data storage device 7, generates desired data such as instructions and data, and supplies the generated data to the processor operation model 1. The data generation is performed based on the rules described in the test specification 4 input in advance.

【0019】テストプログラム記憶装置8はデータ生成
装置7により生成されたデータをテストプログラムの命
令列、データ列として、最終的にテストプログラムのソ
ースコードを生成できるデータ構造で記憶するための装
置である。
The test program storage device 8 is a device for storing data generated by the data generation device 7 as a test program instruction sequence and a data sequence in a data structure capable of finally generating a source code of the test program. .

【0020】テストプログラム生成装置3とプロセッサ
動作システム1は、データ要求手段9とデータ転送手段
10、及びプロセッサ内部情報11を獲得する情報獲得
手段12を介して接続されている。これら手段は、例え
ばC言語などのプログラミング言語で実現されたシステ
ムではアクセスルーチンで実現され、一方、Verilog な
どのHDL記述言語で実現されたシステムでは専用バス
などを設けて接続される。
The test program generator 3 and the processor operating system 1 are connected via a data requesting unit 9, a data transfer unit 10, and an information acquiring unit 12 for acquiring processor internal information 11. These means are realized by an access routine in a system realized by a programming language such as the C language, for example, and are connected by providing a dedicated bus or the like in a system realized by an HDL description language such as Verilog.

【0021】このような構成において、基本動作を説明
すると、まず、テストプログラム生成装置3にテスト仕
様4が入力され、次にプロセッサ動作システム1がリセ
ットされ動作が開始される。テストプログラム生成装置
3は、プロセッサ動作システム1が発する命令やデータ
等の主記憶に対するデータ要求に対してその都度データ
を生成し、プロセッサ動作システム1に対して生成した
命令/データを与える。この操作と同時に、テストデー
タ記憶装置7に生成したデータの領域を割り当て、その
データを記憶する。
The basic operation of the above configuration will be described. First, the test specification 4 is input to the test program generation device 3, and then the processor operation system 1 is reset and the operation is started. The test program generation device 3 generates data each time a data request for a main memory such as an instruction or data issued by the processor operation system 1 is issued, and gives the generated instruction / data to the processor operation system 1. Simultaneously with this operation, the generated data area is allocated to the test data storage device 7 and the data is stored.

【0022】また、テストプログラム記憶装置8には、
生成した命令、データに対して最終的にテストプログラ
ムのソースコード5として出力するためのデータ形式で
記憶される。テストプログラムの生成段階では、入力さ
れたテスト仕様等によって決められた規則で逐次テスト
プログラムが生成され、適当な箇所で汎用レジスタなど
のプロセッサの内部情報を獲得し、セルフチェックルー
チンが挿入追加される。上記の動作を繰り返すことによ
ってテストプログラムが生成され、最後にプロセッサ動
作システム1の停止条件によりテストプログラムの生成
が完了し、ソースコード5が出力される。
In the test program storage device 8,
The generated instructions and data are stored in a data format for finally outputting as the source code 5 of the test program. In the test program generation stage, a test program is sequentially generated according to rules determined by input test specifications and the like, internal information of the processor such as general-purpose registers is acquired at an appropriate place, and a self-check routine is inserted and added. . By repeating the above operation, a test program is generated. Finally, the generation of the test program is completed according to the stop condition of the processor operation system 1, and the source code 5 is output.

【0023】図2は図1に示す実施形態のより具体的な
一実施形態を示す図である。
FIG. 2 is a diagram showing a more specific embodiment of the embodiment shown in FIG.

【0024】図2に示す実施形態の装置は、テスト仕様
4を入力とし、この仕様に記述されたテストをテストプ
ログラムの初期値として実行し、その実行段階の途中で
期待値チェックルーチンを挿入追加して、テストプログ
ラムを完成させる装置である。
The apparatus of the embodiment shown in FIG. 2 receives a test specification 4 as input, executes a test described in this specification as an initial value of a test program, and inserts an expected value check routine in the middle of the execution stage. Then, the test program is completed.

【0025】テスト仕様4は主に検証する命令、データ
を記述した命令列(例えばアセンブラソースコード)が
記述されているだけで、期待値チェックルーチンは記述
されていない。ここで、テスト仕様4にはラベル又はコ
メントにより期待値チェックを行うか否かを設定するこ
とができる。また、データの場所に関しては同じくラベ
ルで指定することができる。
The test specification 4 mainly describes an instruction sequence (eg, an assembler source code) which describes an instruction to be verified and data, but does not describe an expected value check routine. Here, whether or not to perform the expected value check can be set in the test specification 4 by a label or a comment. Also, the location of the data can be specified by a label.

【0026】例えば、アドレスのイミディエート値を汎
用レジスタに転送する命令をA、メモリからデータを汎
用レジスタに転送する命令をL、#で始まる行をコメン
トとすると、 のようなソースコードを記述した場合に、DATA0は
あるデータ領域の先頭のアドレス,CHECK[r8]
は汎用レジスタ8番の値のチェックを意味する。また、
#ENDはここにプログラム終了の処理ルーチンを挿入
追加ことを意味する。このように、テスト仕様4はアセ
ンブル記述などの命令列だけでなくラベル、コメントに
より抽象度の高い記述を合せ持ったものであり、テスト
項目本来の意味をより素直に記述したものである。
For example, if an instruction to transfer an immediate value of an address to a general-purpose register is A, an instruction to transfer data from a memory to a general-purpose register is L, and a line beginning with # is commented, Is described, DATA0 is the start address of a certain data area, CHECK [r8]
Means checking the value of general-purpose register 8; Also,
#END means that a processing routine for ending the program is inserted and added here. As described above, the test specification 4 includes not only a sequence of instructions such as an assembly description but also a description with a high degree of abstraction by using labels and comments, and describes the original meaning of the test item more straightforwardly.

【0027】テストプログラム生成装置3の命令/デー
タ合成装置13は、2つの処理を行う。まず、テスト仕
様4を入力し、テストプログラム記憶装置8へテストプ
ログラムの初期値としてロードする。次に、テストプロ
グラム記憶装置8からプロセッサ動作システム1の命令
/データ要求にしたがって命令/データをテストデータ
記憶装置7に送りながら、適当な箇所で期待値チェック
ルーチンやその他の処理プログラムを生成し挿入追加す
る。
The instruction / data synthesizer 13 of the test program generator 3 performs two processes. First, the test specification 4 is input and loaded into the test program storage device 8 as an initial value of the test program. Next, while sending instructions / data from the test program storage device 8 to the test data storage device 7 in accordance with the instruction / data request of the processor operation system 1, an expected value check routine and other processing programs are generated and inserted at appropriate places. to add.

【0028】この処理を行うために、命令/データ合成
装置13は、図3に示すように、テスト仕様4の解析を
行うテスト仕様解析装置15と、テスト仕様の解析結果
を記憶する解析結果記憶装置16と、テストプログラム
記憶装置8の内容を修正するプログラム修正装置17
と、命令/データを生成する命令/データ生成装置18
と、生成した命令/データを機械語に変換してテストデ
ータ記憶装置7に書き込む機械語変換装置19を備えて
構成される このような構成において、テスト仕様4が読み込まれ、
読み込まれたテスト仕様がテスト仕様解析装置15で解
析され、テストプログラム記憶装置8にロードされる。
プロセッサ動作システム1からのデータ要求に対して、
テスト仕様4に書かれた命令列が順次出力される。ま
た、期待値チェックルーチンがテスト仕様4の解析結果
から適当な箇所に挿入追加される。テスト仕様4に記述
された内容がすべて実行されたならばテストプログラム
のソースコード5及びメモリダンプイメージ14が出力
されて終了する。
In order to perform this processing, the instruction / data synthesizing unit 13 includes a test specification analyzing unit 15 for analyzing the test specification 4 and an analysis result storage for storing the analysis result of the test specification, as shown in FIG. Device 16 and program correction device 17 for correcting the contents of test program storage device 8
And an instruction / data generating device 18 for generating an instruction / data
And a machine language conversion device 19 that converts the generated instruction / data into a machine language and writes it into the test data storage device 7. In such a configuration, the test specification 4 is read,
The read test specification is analyzed by the test specification analysis device 15 and loaded into the test program storage device 8.
In response to a data request from the processor operation system 1,
Instruction sequences written in the test specification 4 are sequentially output. Also, an expected value check routine is inserted and added at an appropriate location from the analysis result of the test specification 4. When all the contents described in the test specification 4 have been executed, the source code 5 of the test program and the memory dump image 14 are output and the processing ends.

【0029】図4は図1に示す実施形態のより具体的な
他の実施形態を示す図である。
FIG. 4 is a diagram showing another specific embodiment of the embodiment shown in FIG.

【0030】図4に示す実施形態の装置は、コマンド2
0に即したランダムな命令列を生成しテストプログラム
を生成する装置である。
The apparatus of the embodiment shown in FIG.
This is a device that generates a random instruction sequence based on 0 and generates a test program.

【0031】ランダム生成装置21は、乱数で命令列を
生成するユニットであり、コマンド20を入力とし、コ
マンド20に指定された規則を基にランダムに命令/デ
ータ列を生成する。
The random generation device 21 is a unit that generates a command sequence using random numbers, receives a command 20, and generates a command / data sequence at random based on rules specified in the command 20.

【0032】このランダム生成装置21は、図5に示す
ように、コマンド20で指定された規則にしたがって命
令/データを乱数により生成するランダム命令/データ
生成装置22と、ランダム命令/データ生成装置22で
生成された命令/データをテストプログラム記憶装置8
の内容に追加するプログラム追加装置23と、生成した
命令/データを機械語に変換してテストデータ記憶装置
7に書き込む機械語変換装置24を備えて構成される。
As shown in FIG. 5, the random generation device 21 includes a random instruction / data generation device 22 for generating an instruction / data by random numbers in accordance with a rule specified by the command 20, and a random instruction / data generation device 22. Instruction / data generated by the test program storage device 8
And a machine language conversion device 24 that converts the generated instruction / data into a machine language and writes it into the test data storage device 7.

【0033】このような構成において、コマンド20に
したがってランダムに命令/データがランダム命令/デ
ータ生成装置22によって生成され、テストプログラム
記憶装置8、テストデータ記憶装置7に順次記憶され
る。また、期待値チェックルーチンが適当な箇所に挿入
される。このような操作が指定された回数だけ行われ
る。テストプログラムの生成が完了すると、テストプロ
グラムのソースコード5、メモリダンプイメージ14が
出力されて終了する。
In such a configuration, a command / data is randomly generated by the random command / data generator 22 in accordance with the command 20, and is sequentially stored in the test program storage 8 and the test data storage 7. Also, an expected value check routine is inserted at an appropriate place. Such operations are performed a specified number of times. When the generation of the test program is completed, the source code 5 of the test program and the memory dump image 14 are output and the process ends.

【0034】上述した実施形態においては、テストプロ
グラムを実行しながら、テストプログラムを生成するの
で、その時点での期待値チェックルーチンを容易に生成
できる。また、見掛上プロセッサ動作システムのメモリ
に制限がなくなるため、テストプログラムの制作の自由
度が高められる。さらに、乱数によるテストプログラム
生成、テスト仕様からのテストプログラムの生成では、
仕様定義からプログラミング、コンパイル、シミュレー
ションを経て行われるテストベクトル生成のパスが短縮
され、テストプログラムの仕様定義からテストベクトル
生成を直接行うことができる。またさらに、試作したテ
ストプログラムに対して、期待値チェックルーチンのた
めの処理ルーチンを自動的に挿入追加することができ
る。
In the above-described embodiment, since the test program is generated while the test program is being executed, the expected value check routine at that time can be easily generated. In addition, since the memory of the processor operating system is apparently unlimited, the degree of freedom in producing a test program is increased. In addition, in generating test programs using random numbers and generating test programs from test specifications,
The test vector generation path that is performed from the specification definition through programming, compilation, and simulation is shortened, and the test vector generation can be directly performed from the test program specification definition. Further, a processing routine for an expected value check routine can be automatically inserted and added to the prototype test program.

【0035】[0035]

【発明の効果】以上説明したように、この発明によれ
ば、テストプログラム生成装置から初期のテストプログ
ラムを被テスト対象のプロセッサ動作システムに与え、
これによってプロセッサ動作システムで得られたプロセ
ッサの内部情報を獲得し、この内部情報に基づいて期待
値チェックルーチンならびに他の処理ルーチンを初期の
テストプログラムに挿入追加して、テストプログラムを
作成するようにしたので、テストプログラムを短時間で
容易に作成することができる。
As described above, according to the present invention, an initial test program is provided from a test program generation device to a processor operation system to be tested.
As a result, internal information of the processor obtained by the processor operating system is obtained, and an expected value check routine and other processing routines are inserted and added to an initial test program based on the internal information to create a test program. Therefore, a test program can be easily created in a short time.

【図面の簡単な説明】[Brief description of the drawings]

【図1】請求項1記載の発明の一実施形態に係わるプロ
セッサのテストプログラム生成装置の構成を示す図であ
る。
FIG. 1 is a diagram showing a configuration of a test program generation device for a processor according to an embodiment of the present invention.

【図2】図1に示す装置のより具体的な一実施形態を示
す図である。
FIG. 2 shows a more specific embodiment of the device shown in FIG.

【図3】図2に示す命令/データ合成装置の構成を示す
図である。
FIG. 3 is a diagram showing a configuration of an instruction / data synthesizing apparatus shown in FIG. 2;

【図4】図1に示す装置のより具体的な他の実施形態を
示す図である。
FIG. 4 is a diagram showing another more specific embodiment of the device shown in FIG. 1;

【図5】図4に示すランダム生成装置の構成を示す図で
ある。
FIG. 5 is a diagram showing a configuration of a random generation device shown in FIG. 4;

【図6】従来のテストプログラム生成装置の構成を示す
図である。
FIG. 6 is a diagram showing a configuration of a conventional test program generation device.

【符号の説明】[Explanation of symbols]

1 プロセッサ動作システム 2 プロセッサ動作モデル 3 テストプログラム生成装置 4 テスト仕様 5 ソースコード 6 データ生成装置 7 テストデータ記憶装置 8 テストプログラム記憶装置 9 データ要求手段 10 データ転送手段 11 プロセッサの内部情報 12 プロセッサ内部情報獲得手段 13 命令/データ合成装置 14 メモリダンプイメージ 15 テスト仕様解析装置 16 解析結果記憶装置 17 プログラム修正装置 18 命令/データ生成装置 19,24 機械語変換装置 20 コマンド 21 ランダム生成装置 22 ランダム命令/データ生成装置 23 プログラム追加装置 DESCRIPTION OF SYMBOLS 1 Processor operation system 2 Processor operation model 3 Test program generation device 4 Test specification 5 Source code 6 Data generation device 7 Test data storage device 8 Test program storage device 9 Data request means 10 Data transfer means 11 Processor internal information 12 Processor internal information Acquisition unit 13 Command / data synthesis device 14 Memory dump image 15 Test specification analysis device 16 Analysis result storage device 17 Program correction device 18 Command / data generation device 19, 24 Machine language conversion device 20 Command 21 Random generation device 22 Random command / data Generator 23 Program addition device

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 プロセッサの動作をシミュレートするプ
ロセッサ動作モデルと、主記憶を除く周辺装置を備えて
構成されるプロセッサ動作システムから命令/データの
要求を受けて、命令/データの生成要求を出力し、該生
成要求に応じて生成された命令/データを記憶して前記
プロセッサ動作システムに出力するテストデータ記憶装
置と、 前記テストデータ記憶装置から出力される命令/データ
生成要求を受けて、外部から与えられるテスト仕様に基
づいて初期のテストプログラムとなる命令/データを逐
次生成し、前記テストデータ記憶装置から出力される命
令/データが前記プロセッサ動作システムで実行されて
得られる前記プロセッサ動作モデルの内部情報を受け
て、該内部情報に基づいて期待値チェックルーチンを含
む処理プログラムを前記初期のテストプログラムとなる
命令/データに挿入追加するデータ生成装置と、 前記データ生成装置により生成、挿入追加された命令/
データを受けて、テストプログラムの命令列、データ列
としてソースコードを生成できるデータ構造で記憶する
テストプログラム記憶装置とを有することを特徴とする
プロセッサのテストプログラム生成装置。
An instruction / data generation request is output from a processor operation model simulating the operation of a processor and an instruction / data request from a processor operation system including a peripheral device excluding a main memory. A test data storage device for storing the instruction / data generated in response to the generation request and outputting the instruction / data to the processor operation system; receiving a command / data generation request output from the test data storage device, , An instruction / data that becomes an initial test program is sequentially generated based on the test specification given by the processor specification, and the instruction / data output from the test data storage device is executed by the processor operation system. Upon receiving the internal information, a processing program including an expected value check routine is performed based on the internal information. A data generating device for inserting add beam to the instruction / data to be the initial test program, generated by the data generation device, inserted additional instruction /
A test program storage device that receives data and stores the data in a data structure capable of generating a source code as an instruction sequence and a data sequence of the test program.
【請求項2】 前記データ生成装置は、 外部から与えられるテスト仕様を解析するテスト仕様解
析装置と、 前記テスト仕様解析装置でなされたテスト仕様の解析結
果を記憶する解析結果記憶装置と、 前記解析結果記憶装置に記憶された解析結果に基づいて
初期の命令/データを生成し、前記プロセッサ動作モデ
ルの内部情報に基づいて期待値チェックルーチンを含む
処理プログラムを生成する命令/データ生成装置と、 前記命令/データ生成装置で生成された期待値チェック
ルーチンを含む処理プログラムを初期の命令/データに
挿入追加してテストプログラムを修正し、修正したテス
トプログラムを前記テストプログラム記憶装置及び前記
命令/データ生成装置に出力するプログラム修正装置
と、 前記命令/データ生成装置によって生成された命令/デ
ータを機械語に変換して前記テストデータ記憶装置に出
力する機械語変換装置とを有することを特徴とする請求
項1記載のプロセッサのテストプログラム生成装置。
2. The data generation device, comprising: a test specification analysis device configured to analyze a test specification provided from outside; an analysis result storage device configured to store an analysis result of a test specification performed by the test specification analysis device; An instruction / data generation device that generates an initial instruction / data based on an analysis result stored in a result storage device and generates a processing program including an expected value check routine based on internal information of the processor operation model; A test program including an expected value check routine generated by the instruction / data generation device is inserted and added to the initial instruction / data to modify the test program, and the modified test program is stored in the test program storage device and the instruction / data generation. A program correction device for outputting to a device; Instruction / data test program generator of the processor according to claim 1, characterized in that it comprises a machine language conversion device is converted into machine language and outputs to the test data storage device.
【請求項3】 前記データ生成装置は、 外部から与えられるコマンドに基づいてランダムに命令
/データを生成し、前記プロセッサ動作モデルの内部情
報に基づいて期待値チェックルーチンを含む処理プログ
ラムを生成するするランダム命令/データ生成装置と、 前記ランダム命令/データ生成装置で生成された期待値
チェックルーチンを含む処理プログラムを初期の命令/
データに挿入追加し、得られたテストプログラムをテス
トプログラム記憶装置に出力するプログラム追加装置
と、 前記命令/データ生成装置によって生成された命令/デ
ータを機械語に変換して前記テストデータ記憶装置に出
力する機械語変換装置とを有することを特徴とする請求
項1記載のプロセッサのテストプログラム生成装置。
3. The data generator randomly generates instructions / data based on externally applied commands and generates a processing program including an expected value check routine based on internal information of the processor operation model. A random instruction / data generation device, and a processing program including an expected value check routine generated by the random instruction / data generation device are initialized by an initial instruction /
A program addition device that inserts and adds the data into the data and outputs the obtained test program to a test program storage device; and converts the instruction / data generated by the instruction / data generation device into a machine language to the test data storage device. 2. The test program generation device for a processor according to claim 1, further comprising a machine language conversion device for outputting.
JP8163013A 1996-06-24 1996-06-24 Test program generating device for processor Pending JPH1011311A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8163013A JPH1011311A (en) 1996-06-24 1996-06-24 Test program generating device for processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8163013A JPH1011311A (en) 1996-06-24 1996-06-24 Test program generating device for processor

Publications (1)

Publication Number Publication Date
JPH1011311A true JPH1011311A (en) 1998-01-16

Family

ID=15765544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8163013A Pending JPH1011311A (en) 1996-06-24 1996-06-24 Test program generating device for processor

Country Status (1)

Country Link
JP (1) JPH1011311A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012099035A (en) * 2010-11-05 2012-05-24 Fujitsu Ltd Operation verification method for processor, operation verification device for processor and operation verification program for processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012099035A (en) * 2010-11-05 2012-05-24 Fujitsu Ltd Operation verification method for processor, operation verification device for processor and operation verification program for processor
US8707102B2 (en) 2010-11-05 2014-04-22 Fujitsu Limited Method and program for verifying operation of processor

Similar Documents

Publication Publication Date Title
US7895575B2 (en) Apparatus and method for generating test driver
JPH11316696A (en) Relocatable measuring tag for testing and debugging of computer program
JPH11513512A (en) Method of manufacturing digital signal processor
CN111985055B (en) Model packaging method and device and electronic equipment
CN112444731B (en) Chip testing method and device, processor chip and server
CN111523284A (en) Method and device for converting EDA (electronic design automation) simulation configuration of chip and application
CN116090403B (en) Command processing system supporting multiple simulators
JP3018912B2 (en) Verification support system
JPH1011311A (en) Test program generating device for processor
JPH06309193A (en) Method and device for verifying operation of machine language program
US20020004918A1 (en) Method for the preparation and execution of a self-test procedure and associated self-test generating method
JP2004287869A (en) Program execution monitoring device and method
CN117541896B (en) UVM-based rasterization module verification system, method and storage medium
JP4149047B2 (en) Simulator
JPH04367946A (en) Debug information output system
JP2004192139A (en) Debug device, debug method and recording medium
JPH06195216A (en) Automatic generation device for verification program
JP2621555B2 (en) Vectorization processing method
US20030167457A1 (en) System and method for providing an optimizer display tool
JP2004145670A (en) Method and device for generating test bench, and computer program
US20080216075A1 (en) Program creation support apparatus, creation support program and creation support method for the same
CN117873607A (en) Processing method and device for target operation corresponding to custom function
JPH10207738A (en) Language processing system
JP3077627B2 (en) Debugging method and recording medium for recording debug program
JP3047418B2 (en) Vectorization processing method