JP5387521B2 - Logic verification scenario generation device and logic verification scenario generation program - Google Patents

Logic verification scenario generation device and logic verification scenario generation program Download PDF

Info

Publication number
JP5387521B2
JP5387521B2 JP2010149501A JP2010149501A JP5387521B2 JP 5387521 B2 JP5387521 B2 JP 5387521B2 JP 2010149501 A JP2010149501 A JP 2010149501A JP 2010149501 A JP2010149501 A JP 2010149501A JP 5387521 B2 JP5387521 B2 JP 5387521B2
Authority
JP
Japan
Prior art keywords
instruction
verification
expected value
external input
address
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
JP2010149501A
Other languages
Japanese (ja)
Other versions
JP2012014364A (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 Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor 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 Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2010149501A priority Critical patent/JP5387521B2/en
Publication of JP2012014364A publication Critical patent/JP2012014364A/en
Application granted granted Critical
Publication of JP5387521B2 publication Critical patent/JP5387521B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Tests Of Electronic Circuits (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Description

本発明は、論理検証シナリオ生成装置、及び、論理検証シナリオ生成プログラムに関する。   The present invention relates to a logic verification scenario generation device and a logic verification scenario generation program.

近年、電子機器等に用いられている集積回路(例えばLSI:Large Scale Integration)は、一般的にHDL(Hardware Description Language)を用いたRTL(Register Transfer Level)記述によって設計されている。そして、設計された集積回路が正常に動作するか否かを確認するために、論理検証が行われる。   In recent years, an integrated circuit (for example, LSI: Large Scale Integration) used in an electronic device or the like is generally designed by RTL (Register Transfer Level) description using HDL (Hardware Description Language). Then, logic verification is performed in order to check whether the designed integrated circuit operates normally.

集積回路の論理検証は、例えば、コンピューター上に構築されたシミュレータ等の論理検証環境上で行われる。検証者は、仕様書等に基づいて、手作業によって入力信号パターン等を含むテストパターンを用意し、テストパターンを元にシミュレータ上で検証対象の集積回路を実行して検証する。また、検証者は、シミュレーションの結果、出力が想定される出力値を期待値として予め用意しておき、シミュレーションの結果得られた出力値と期待値とが一致するか否かを検証する。   The logic verification of the integrated circuit is performed in a logic verification environment such as a simulator constructed on a computer, for example. The verifier manually prepares a test pattern including an input signal pattern or the like based on a specification or the like, and executes and verifies the integrated circuit to be verified on the simulator based on the test pattern. In addition, the verifier prepares in advance an expected output value as a result of the simulation, and verifies whether or not the output value obtained as a result of the simulation matches the expected value.

ただし、近年、集積回路の大規模集積化、機能の複雑化により、テストパターンの数が膨大になり、生成にかかる負荷が高くなっている。また、手作業によりテストパターンを生成することに因る検証漏れや検証ミスも課題となっていた。そこで、検証対象の集積回路に接続される周辺デバイスリスト、当該デバイスリストのパラメータ設定情報等の入力条件情報を予め用意しておき、当該入力条件情報に基づいて、シミュレータが実行する検証シナリオを自動生成する技術が知られている(特許文献1)。   However, in recent years, the number of test patterns has become enormous due to large-scale integration of integrated circuits and complicated functions, and the load on generation has increased. In addition, there are problems with verification omissions and verification errors caused by manually generating test patterns. Therefore, input condition information such as a peripheral device list connected to the integrated circuit to be verified and parameter setting information of the device list is prepared in advance, and the verification scenario executed by the simulator is automatically based on the input condition information. The technique to generate | occur | produce is known (patent document 1).

特開2008−210004号公報JP 2008-210004 A

しかしながら、検証対象の集積回路がCPU(Central Processing Unit)である場合、入力信号に基づく集積回路の処理動作は、CPUに実行させる命令に加え、その前後に実行させる命令の組合せの影響を受ける。従って、検証対象の集積回路がCPUである場合、複数の命令を有するテストプログラムに基づいた論理検証が必要となる。さらに、CPUの入力信号に基づく処理動作は、命令実行時に発生する割り込み命令等の外部入力要因にも影響を受ける。従って、複数の命令の組合せに加え、外部入力要因に対する論理検証も必要である。   However, when the integrated circuit to be verified is a CPU (Central Processing Unit), the processing operation of the integrated circuit based on the input signal is affected by a combination of instructions executed before and after the instruction executed by the CPU. Therefore, when the verification target integrated circuit is a CPU, logic verification based on a test program having a plurality of instructions is required. Further, the processing operation based on the input signal of the CPU is also affected by external input factors such as an interrupt instruction generated when the instruction is executed. Therefore, in addition to the combination of a plurality of instructions, logic verification for an external input factor is also necessary.

また、集積回路の大規模化、複雑化によるテストパターンの増加に伴い、シミュレーションの出力値を検証するための期待値の量も膨大となり、期待値の生成にかかる負荷が高かった。   In addition, with the increase in test patterns due to the increase in scale and complexity of integrated circuits, the amount of expected values for verifying simulation output values has become enormous, and the load on generating expected values has been high.

そこで、本発明では、RTL(Register Transfer Level)記述されたCPUの論理検証に用いる検証シナリオ、及び期待値の生成負荷を抑えた論理検証シナリオ生成装置、論理検証シナリオ生成プログラムを提供することを目的とする。   SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a verification scenario used for CPU logic verification described in RTL (Register Transfer Level), a logic verification scenario generation device and a logic verification scenario generation program that suppress generation load of expected values. And

第1の側面は、RTL記述されたCPUの論理検証のためのテストプログラムを生成する論理検証シナリオ生成装置であって、
検証命令を複数有する検証命令リストと、前記検証命令の前に実行する前命令、及び後に実行する後命令の前後命令組合せを複数有する前後命令組合せリストとを格納するテストライブラリと、
前記CPUが前記命令を実行して出力するひとつまたは複数の出力信号項目を有する期待値フォーマットを格納する期待値フォーマット記憶部と、
前記検証命令を記憶するための検証命令アドレスと、前記前命令を格納する前命令空間と、前記後命令を格納する後命令空間と、前記命令がデータアクセス命令である場合のアクセス対象のデータ空間と、前記命令が分岐命令である場合の分岐先命令を格納する分岐命令空間と、前記命令が分岐後復帰命令である場合に復帰情報を格納するスタック空間とを有するメモリモジュールであって、前記テストライブラリから順次選択した前記検証命令と前記前後命令組合せとに基づいて、前記検証命令アドレスに前記検証命令を、前記前命令空間に前記前命令を、前記後命令空間に前記後命令を記憶すると共に、前記前命令が前記分岐命令である場合に前記前命令の分岐先アドレスに前記検証命令アドレスを記憶したメモリモジュールを前記テストプログラムとして生成するテストプログラム生成部と、
前記生成したテストプログラムの各命令について、当該命令に対応する前記期待値フォーマットを前記期待値フォーマット記憶部から取得し、当該命令をデコードしたデコード情報に基づいて前記出力信号項目に対応する期待値を生成する期待値生成部と、
を有する。
A first aspect is a logic verification scenario generation device for generating a test program for CPU logic verification described in RTL,
A test library for storing a verification instruction list having a plurality of verification instructions, a front instruction executed before the verification instruction, and a front and rear instruction combination list having a plurality of front and rear instruction combinations of subsequent instructions executed after the verification instruction;
An expected value format storage unit that stores an expected value format having one or a plurality of output signal items that the CPU executes and outputs the instructions;
A verification instruction address for storing the verification instruction, a previous instruction space for storing the previous instruction, a subsequent instruction space for storing the subsequent instruction, and a data space to be accessed when the instruction is a data access instruction A memory module having a branch instruction space for storing a branch destination instruction when the instruction is a branch instruction, and a stack space for storing return information when the instruction is a return instruction after branching, Based on the verification instruction sequentially selected from the test library and the combination of the preceding and following instructions, the verification instruction is stored in the verification instruction address, the previous instruction is stored in the previous instruction space, and the subsequent instruction is stored in the subsequent instruction space. In addition, when the previous instruction is the branch instruction, a memory module storing the verification instruction address in the branch destination address of the previous instruction is stored in the test module. And test program generation unit for generating as a program,
For each instruction of the generated test program, the expected value format corresponding to the instruction is acquired from the expected value format storage unit, and an expected value corresponding to the output signal item is obtained based on decoding information obtained by decoding the instruction. An expected value generator to generate;
Have

第1の側面によれば、検証シナリオ、及び期待値の生成にかかる負荷を抑えることができる。   According to the first aspect, it is possible to suppress the load for generating the verification scenario and the expected value.

論理検証対象のCPUの入出力信号の一例を表す図である。It is a figure showing an example of the input-output signal of CPU for logic verification. 本実施の形態例におけるRTL記述されたCPUの一例を表す図である。It is a figure showing an example of CPU described in RTL in this embodiment. シミュレータが実行するモジュール、テストベンチの一例を表す図である。It is a figure showing an example of the module and the test bench which a simulator performs. 本実施の形態例における論理検証シナリオ生成装置の構成を表す図である。It is a figure showing the structure of the logic verification scenario production | generation apparatus in this Example. 論理検証シナリオ生成部の処理を表すフローチャート図である。It is a flowchart figure showing the process of a logic verification scenario production | generation part. テストライブラリを表す図である。It is a figure showing a test library. 本実施の形態例におけるメモリモジュールが定義するメモリ空間を表す図である。It is a figure showing the memory space which the memory module in this embodiment defines. 第1の実施の形態例におけるテストプログラムの一例である。It is an example of the test program in a 1st embodiment. 期待値生成の処理を表すフローチャート図である。It is a flowchart figure showing the process of expected value generation. 期待値生成部の検証シナリオ要素分解処理を表すフローチャート図である。It is a flowchart figure showing the verification scenario element decomposition | disassembly process of an expected value production | generation part. 期待値フォーマット選択処理を表すフローチャート図である。It is a flowchart figure showing expected value format selection processing. 本実施の形態例における期待値フォーマットを表す図である。It is a figure showing the expected value format in the example of this Embodiment. 図8のテストプログラムに対応する期待値フォーマットを表す図である。It is a figure showing the expectation value format corresponding to the test program of FIG. 図8のテストプログラムに対応する期待値を表す図である。It is a figure showing the expectation value corresponding to the test program of FIG. 外部入力要因リスト、外部入力タイミングリストを表す図である。It is a figure showing an external input factor list | wrist and an external input timing list | wrist. 割り込みの外部入力信号生成モジュールの一例を表す図である。It is a figure showing an example of the external input signal generation module of interruption. 第2の実施の形態例におけるテストプログラムの一例である。It is an example of a test program in the second embodiment. 図17のテストプログラムに対応する期待値フォーマットを表す図である。It is a figure showing the expected value format corresponding to the test program of FIG. 図17のテストプログラムに対応する期待値を表す図である。It is a figure showing the expected value corresponding to the test program of FIG. 本実施の形態例におけるシミュレータが動作するコンピューターの構成図である。It is a block diagram of the computer with which the simulator in this embodiment operates.

以下、図面にしたがって本発明の実施の形態について説明する。ただし、本発明の技術的範囲はこれらの実施の形態に限定されず、特許請求の範囲に記載された事項とその均等物まで及ぶものである。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the technical scope of the present invention is not limited to these embodiments, but extends to the matters described in the claims and equivalents thereof.

本実施の形態例における論理検証シナリオ生成装置は、「検証命令」、「検証命令」を記憶する「検証アドレス」、「検証命令」の前後に実行する「前後命令組合せ」等の検証シナリオ条件をテストライブラリから選択する。そして、論理検証シナリオ生成装置は、予め用途別に区分されたメモリ空間を定義し、「検証命令アドレス」に「検証命令」が、前命令空間に前命令が、後命令空間に後命令が記憶され、前命令が分岐命令である場合に前命令の分岐先アドレスに「検証命令アドレス」が記憶されるように記述したメモリモジュールをテストプログラムとして生成することにより、テストプログラムを生成する。そして、論理検証シナリオ生成装置は、テストプログラムの各命令について、当該命令に対応する期待値フォーマットを期待値フォーマット記憶部から取得し、命令をデコードしたデコード情報に基づいて期待値フォーマットの有する出力信号項目に対応する期待値を生成するものである。   The logic verification scenario generation device according to the present exemplary embodiment includes verification scenario conditions such as “verification instruction”, “verification instruction” stored before and after “verification instruction”, and “verification instruction combination” executed before and after “verification instruction”. Select from the test library. Then, the logic verification scenario generation device defines a memory space that is divided in advance according to usage, and stores the “verification instruction” in the “verification instruction address”, the previous instruction in the previous instruction space, and the subsequent instruction in the subsequent instruction space. When the previous instruction is a branch instruction, a test program is generated by generating, as a test program, a memory module described so that “verification instruction address” is stored in the branch destination address of the previous instruction. Then, the logic verification scenario generation device acquires, for each instruction of the test program, an expected value format corresponding to the instruction from the expected value format storage unit, and an output signal of the expected value format based on the decode information obtained by decoding the instruction An expected value corresponding to the item is generated.

図1は、論理検証対象のCPU(Central Processing Unit)10の入出力信号の一例を表す図である。同図において、CPU10はRTL(Register Transfer Level)記述されており、同様にそれぞれRTL記述されたメモリモジュール12、外部入力信号生成モジュール11、出力信号トレースモジュール13とバスを介して信号を入出力する。   FIG. 1 is a diagram illustrating an example of input / output signals of a CPU (Central Processing Unit) 10 to be logically verified. In the figure, the CPU 10 is described in RTL (Register Transfer Level), and similarly inputs / outputs signals to / from the memory module 12, external input signal generation module 11, and output signal trace module 13 described in RTL via a bus. .

一般的に、CPU10は、メモリと信号を入出力することによって、命令のフェッチ、デコード、実行等の命令サイクルを行う。具体的に、メモリモジュール12からCPU10への入力信号には、命令フェッチ用、命令の実行によって生じるデータアクセス用のリードデータ信号等がある。また、CPU10からメモリモジュール12への出力信号には、アクセスストローブ信号、アクセスサイズ信号、リード/ライト信号、ライトデータ信号、アドレス信号等がある。   In general, the CPU 10 performs an instruction cycle such as fetching, decoding, and executing an instruction by inputting and outputting signals to and from a memory. Specifically, the input signal from the memory module 12 to the CPU 10 includes a read data signal for instruction fetch and a data access generated by execution of the instruction. Output signals from the CPU 10 to the memory module 12 include an access strobe signal, an access size signal, a read / write signal, a write data signal, an address signal, and the like.

また、CPU10は、外部入力信号生成モジュール11から割り込み要求やCPU10の状態を制御する外部入力信号が入力される。具体的に、外部入力信号生成モジュール11からCPU10への入力信号には、クロック信号CLK、リセット信号RST、モード信号、割り込み信号、例外信号、ブレーク信号等の信号がある。CPU10は、外部入力信号を受け付けると、実行中の処理を中断し、例えば、外部入力信号に応じた所定の処理ルーチンの実行やCPU状態の制御等を行う。   Further, the CPU 10 receives an interrupt request from the external input signal generation module 11 and an external input signal for controlling the state of the CPU 10. Specifically, input signals from the external input signal generation module 11 to the CPU 10 include signals such as a clock signal CLK, a reset signal RST, a mode signal, an interrupt signal, an exception signal, and a break signal. When the CPU 10 receives the external input signal, the CPU 10 interrupts the process being executed, for example, executes a predetermined processing routine according to the external input signal, controls the CPU state, and the like.

本実施の形態例のメモリモジュール12はRTL記述されたRAM(Random Access Memory)等のメモリであり、CPU10を論理検証するテストプログラムが格納される。CPU10は、当該テストプログラムの命令の実行を通して、図1のような信号を入出力する。また、外部信号生成モジュール11はRTL記述された擬似的な、タイマー、割り込みコントローラ、デバッガ等の周辺リソースであり、図1のような外部入力信号をCPU10に入力する。   The memory module 12 of the present embodiment is a memory such as a RAM (Random Access Memory) described in RTL, and stores a test program for logically verifying the CPU 10. The CPU 10 inputs and outputs signals as shown in FIG. 1 through execution of instructions of the test program. The external signal generation module 11 is a peripheral resource such as a pseudo timer, interrupt controller, and debugger described in RTL, and inputs an external input signal as shown in FIG.

出力信号トレースモジュール13は、命令の実行を通してCPU10からメモリモジュール12に出力されるデータアクセス時のアクセスサイズ信号や、リード/ライト信号、ライトデータ信号、アドレス信号等を取得する。また、出力信号トレースモジュール13は、CPU10から実行命令のアドレスを表す命令アドレス信号や、当該命令が分岐元、分岐先であることを示す分岐情報信号、分岐要因を示す分岐要因信号、命令に外部入力信号が発生した場合の割り込みや例外等の要因を表すEIT要因信号、デバッグモード等のCPU10の状態を表すCPU状態信号等を取得する。出力信号トレースモジュール13の取得する出力信号は、CPU10の命令処理の論理正当性を検証するため、後述する期待値と比較される。   The output signal trace module 13 acquires an access size signal, a read / write signal, a write data signal, an address signal, and the like at the time of data access that are output from the CPU 10 to the memory module 12 through execution of the instruction. The output signal trace module 13 also outputs an instruction address signal indicating the address of the execution instruction from the CPU 10, a branch information signal indicating that the instruction is a branch source and a branch destination, a branch factor signal indicating a branch factor, and an instruction externally. An EIT factor signal indicating a factor such as an interrupt or an exception when an input signal is generated, a CPU status signal indicating a state of the CPU 10 such as a debug mode, and the like are acquired. The output signal acquired by the output signal trace module 13 is compared with an expected value to be described later in order to verify the logical correctness of the instruction processing of the CPU 10.

図2は、本実施の形態例におけるRTL記述されたCPU10の一例を表す図である。CPU10は、例えば、verilog HDL(Hardware Description Language)やVHDL(VHSIC Hardware Description Language)等のRTLレベルのHDLで記述され、同図に示すような各ブロックの機能を備える。   FIG. 2 is a diagram illustrating an example of the CPU 10 described in RTL according to the present embodiment. The CPU 10 is described in RTL level HDL such as verilog HDL (Hardware Description Language) and VHDL (VHSIC Hardware Description Language), and has the function of each block as shown in FIG.

「信号の定義」ブロック101では、CPU10が入出力する信号と、CPU10の内部で使用される信号が宣言される。「命令のフェッチ」ブロック102では、実行対象の命令をメモリモジュール12から読み出す処理が、「デコード」ブロック103では、フェッチによって読み出された命令をCPU10が実行可能な命令にデコードする処理、及び、演算処理に必要なデータの選択処理が記述される。また、「演算」ブロック104では、数値演算やPC(プログラムカウンター)の計算処理が、「メモリアクセス」ブロック105では、実行命令がロード・ストア系の命令である場合のメモリの読み書き処理が記述される。さらに、「ライトバック」ブロック106では、レジスタへのデータの書き込み処理が記述される。   In the “definition of signal” block 101, signals input / output by the CPU 10 and signals used in the CPU 10 are declared. In the “instruction fetch” block 102, a process of reading out an instruction to be executed from the memory module 12, and in a “decode” block 103, a process of decoding an instruction read out by the fetch into an instruction executable by the CPU 10, and A data selection process necessary for the arithmetic process is described. The “arithmetic” block 104 describes numerical arithmetic and PC (program counter) calculation processing, and the “memory access” block 105 describes memory read / write processing when the execution instruction is a load / store instruction. The Further, the “write back” block 106 describes a process of writing data to the register.

また、図示しないが、メモリモジュール12、外部入力信号生成モジュール11、出力信号トレースモジュール13も同様に、verilog HDLやVHDL等のHDLで記述される。   Although not shown, the memory module 12, the external input signal generation module 11, and the output signal trace module 13 are similarly described in HDL such as verilog HDL and VHDL.

図1、2で述べたCPU10、メモリモジュール12、外部入力信号生成モジュール11、出力信号トレースモジュール13は、コンピューター上のOSで動作するシミュレータ等のソフトウェアによって実行される。シミュレータは、各モジュールの初期値設定やシミュレーション手順を記述したテストベンチに基づいて、各モジュールをシミュレーションする。なお、テストベンチも同様にHDLによって記述される。   The CPU 10, memory module 12, external input signal generation module 11, and output signal trace module 13 described in FIGS. 1 and 2 are executed by software such as a simulator that runs on an OS on a computer. The simulator simulates each module based on a test bench describing initial value settings and simulation procedures for each module. The test bench is also described in HDL.

図20は、シミュレータが動作するコンピューター200の構成を表す図である。コンピューター200は、CPU202、RAM203、外部I/F204、メモリ(ファイル群)205を有する。シミュレータは、CPU202が、メモリ(ファイル群)205に記憶された論理検証シミュレーションプログラム201を実行することによって実現される。   FIG. 20 is a diagram illustrating a configuration of a computer 200 on which a simulator operates. The computer 200 includes a CPU 202, a RAM 203, an external I / F 204, and a memory (file group) 205. The simulator is realized by the CPU 202 executing the logic verification simulation program 201 stored in the memory (file group) 205.

本実施の形態例におけるシミュレータには、論理検証対象のCPU(RTL)10と、検証命令群等を有するテストライブラリ214、期待値フォーマット記憶部221が提供される。そして、シミュレータは、まず、論理検証シナリオ生成プログラム(RTL)21、22を実行し、テストライブラリ214、期待値フォーマット記憶部221に基づいて、CPU(RTL)10の論理検証に用いるテストプログラムを格納するメモリモジュール(RTL)12、CPU(RTL)10への外部入力信号を生成する外部入力信号生成モジュール(RTL)11、シミュレーションによってCPU(RTL)10が出力する信号の期待値を有する期待値データ(データファイル)25を生成する(206)。   The simulator according to the present embodiment is provided with a CPU (RTL) 10 to be logically verified, a test library 214 having a verification instruction group and the like, and an expected value format storage unit 221. The simulator first executes logic verification scenario generation programs (RTL) 21 and 22, and stores a test program used for logic verification of the CPU (RTL) 10 based on the test library 214 and the expected value format storage unit 221. Memory module (RTL) 12, external input signal generation module (RTL) 11 that generates an external input signal to CPU (RTL) 10, and expected value data having an expected value of a signal output from CPU (RTL) 10 by simulation (Data file) 25 is generated (206).

そして、シミュレータは、メモリモジュール12に格納されたテストプログラムをCPU(RTL)10に実行させ、また、外部入力信号モジュール(RTL)11に外部入力信号を入力させることにより、CPU(RTL)10の論理検証を行う(207)。また、シミュレータは、出力信号トレースモジュール(RTL)13を実行して、CPU(RTL)10からの出力信号を取得する(207)。   Then, the simulator causes the CPU (RTL) 10 to execute the test program stored in the memory module 12, and also causes the external input signal module (RTL) 11 to input an external input signal. Logic verification is performed (207). Further, the simulator executes the output signal trace module (RTL) 13 and acquires an output signal from the CPU (RTL) 10 (207).

図3は、本実施の形態例におけるシミュレータが実行するモジュールとテストベンチ30の一例を表す図である。論理検証シナリオ生成部21、及び、期待値生成部22は、本実施の形態例の論理検証シナリオ生成装置の一例であり、図20の論理検証シナリオ生成プログラム(RTL)21、22がシミュレータにより実行されることによって実現される。   FIG. 3 is a diagram illustrating an example of a module and a test bench 30 executed by the simulator according to the present embodiment. The logic verification scenario generation unit 21 and the expected value generation unit 22 are an example of the logic verification scenario generation device according to the present embodiment. The logic verification scenario generation programs (RTL) 21 and 22 in FIG. 20 are executed by a simulator. It is realized by doing.

論理検証シナリオ生成部21は、順次選択した検証シナリオ条件に基づいて、テストプログラムを記憶したメモリモジュール12と、外部入力信号生成モジュール11とを生成する。そして、期待値生成部22は、生成されたテストプログラムの各命令について、各命令に対応する期待値フォーマットを期待値フォーマット記憶部221から取得し、期待値フォーマットの有する出力信号項目に対応する期待値データ25を生成する。期待値とは、CPU10がテストプログラムの命令を実行して出力する出力信号を予め予測した値である。各部の処理の詳細については、後述する。   The logic verification scenario generation unit 21 generates the memory module 12 storing the test program and the external input signal generation module 11 based on the sequentially selected verification scenario conditions. Then, the expected value generation unit 22 obtains an expected value format corresponding to each instruction from the expected value format storage unit 221 for each instruction of the generated test program, and expects an output signal item corresponding to the expected value format. Value data 25 is generated. The expected value is a value obtained by predicting in advance an output signal output by the CPU 10 by executing a test program instruction. Details of the processing of each unit will be described later.

結果比較部23は、出力信号トレースモジュール13によって取得された出力信号を有するトレースデータと、期待値生成部22によって生成された期待値データ25とを比較し、その比較結果をシミュレータ出力部24のログファイルに書き込む。ただし、結果比較部23の代わりに、検証者がトレースデータと期待値データ25を比較してもよい。結果比較部23も同様にHDLで記述される。   The result comparison unit 23 compares the trace data having the output signal acquired by the output signal trace module 13 with the expected value data 25 generated by the expected value generation unit 22, and compares the comparison result with the simulator output unit 24. Write to log file. However, instead of the result comparison unit 23, the verifier may compare the trace data with the expected value data 25. The result comparison unit 23 is similarly described in HDL.

第1の実施の形態例における論理検証シナリオ生成部21及び期待値生成部22は、検証シナリオ条件として、CPU10に実行させる「検証命令」、「検証命令」のメモリモジュール12における格納アドレスである「検証命令アドレス」、及び、「検証命令」の前にCPU10実行させる前命令、及び、後に実行させる後命令の組合せを表す「前後命令組合せ」の組合せに基づいて、テストプログラムを格納したメモリモジュール12と期待値データ25とを生成する。   The logic verification scenario generation unit 21 and the expected value generation unit 22 in the first embodiment are storage addresses in the memory module 12 of “verification instructions” and “verification instructions” to be executed by the CPU 10 as verification scenario conditions. A memory module 12 storing a test program based on a combination of “verification instruction address” and a “previous instruction combination” representing a combination of a previous instruction to be executed by the CPU 10 before the “verification instruction” and a subsequent instruction to be executed later. And expected value data 25 are generated.

第2の実施の形態例における論理検証シナリオ生成部21及び期待値生成部22は、さらに、検証シナリオ条件として、「検証命令」に対して入力する「外部入力要因」と、当該「外部入力要因」の「外部入力タイミング」とを加えた検証シナリオ条件の組合せに基づいて、テストプログラムを格納したメモリモジュール12と期待値データ25、及び、外部入力信号生成モジュール11を生成する。   The logic verification scenario generation unit 21 and the expected value generation unit 22 in the second embodiment further include an “external input factor” input to the “verification instruction” as the verification scenario condition, and the “external input factor” The memory module 12 storing the test program, the expected value data 25, and the external input signal generation module 11 are generated based on the combination of the verification scenario conditions including the “external input timing”.

[第1の実施の形態例]
図4は、本実施の形態例における論理検証シナリオ生成装置の構成を表す図である。なお、同図において、点線で表された外部入力信号生成部213、外部入力信号生成モジュール11については、第2の実施の形態例において後述する。
[First Embodiment]
FIG. 4 is a diagram illustrating the configuration of the logic verification scenario generation device according to the present embodiment. In the figure, the external input signal generation unit 213 and the external input signal generation module 11 represented by dotted lines will be described later in the second embodiment.

論理検証シナリオ生成部21は、テストライブラリ214、検証シナリオ条件入力部210、プログラム条件判定部211、テストプログラム生成部212を有し、テストプログラムを格納したメモリモジュール12を生成する。また、期待値生成部22は、テストプログラムの各命令について、期待値フォーマット記憶部221から対応する期待値フォーマットを選択し、期待値フォーマットが有する出力信号項目に対応する期待値データ25を生成する。   The logic verification scenario generation unit 21 includes a test library 214, a verification scenario condition input unit 210, a program condition determination unit 211, and a test program generation unit 212, and generates the memory module 12 storing the test program. In addition, the expected value generation unit 22 selects the corresponding expected value format from the expected value format storage unit 221 for each instruction of the test program, and generates expected value data 25 corresponding to the output signal item of the expected value format. .

図5は、本実施の形態例における論理検証シナリオ生成部21の処理を表すフローチャート図である。以下、フローチャート図に基づいて説明する。まず、論理検証シナリオ生成部21の検証シナリオ条件入力部210は、検証シナリオ条件215の入力を受け付ける(S101)。検証シナリオ条件入力部210は、テストライブラリ214に格納された「検証命令」、「検証命令アドレス」、「前後命令組合せ」の組合せを検証シナリオ条件215として受け付ける。   FIG. 5 is a flowchart showing processing of the logic verification scenario generation unit 21 in the present embodiment. Hereinafter, description will be given based on a flowchart. First, the verification scenario condition input unit 210 of the logic verification scenario generation unit 21 receives an input of the verification scenario condition 215 (S101). The verification scenario condition input unit 210 receives a combination of “verification instruction”, “verification instruction address”, and “previous instruction combination” stored in the test library 214 as the verification scenario condition 215.

図6は、テストライブラリ214を表す図である。テストライブラリ214には、「検証命令」を複数有する検証命令リストCM、「検証命令アドレス」を複数有する検証命令アドレスリストCM@、「前後命令組合せ」を複数有する前後命令組合せリストCMLが格納される。各リストは、例えば、検証者等によって予め用意される。   FIG. 6 is a diagram illustrating the test library 214. The test library 214 stores a verification instruction list CM having a plurality of “verification instructions”, a verification instruction address list CM @ having a plurality of “verification instruction addresses”, and a front / rear instruction combination list CML having a plurality of “front / rear instruction combinations”. . Each list is prepared in advance by a verifier or the like, for example.

具体的に「検証命令」は、例えば、「ADD R1,R2」「JMP @R6」等の命令であり、「検証命令アドレス」は、メモリモジュール12が定義するメモリ空間上のアドレス、例えば「0x00000100」「0x00000050」である。「前後命令組合せ」は、「検証命令」の前後にCPU10に実行させる処理の組合せであって、例えば、「(前命令)演算処理A/(後命令)演算処理B」「(前命令)演算処理A/(後命令)分岐処理A」等である。前命令、後命令は、それぞれひとつまたは複数の命令を有する。   Specifically, the “verification instruction” is an instruction such as “ADD R1, R2”, “JMP @ R6”, and the “verification instruction address” is an address on the memory space defined by the memory module 12, for example, “0x00000100” "0x00000050". The “front / rear instruction combination” is a combination of processes to be executed by the CPU 10 before and after the “verification instruction”. For example, “(previous instruction) arithmetic processing A / (post instruction) arithmetic processing B” “(previous instruction) arithmetic” Process A / (post instruction) branch process A ”and the like. Each of the front instruction and the rear instruction has one or a plurality of instructions.

図6のように、テストライブラリ214において、「検証命令」、「検証命令アドレス」、「前後命令組合せ」は、それぞれ、例えば、「1〜n」の数字等の識別記号に対応付けられる。検証シナリオ条件入力部210は、識別記号の組合せを検証シナリオ条件215として受け付ける。   As shown in FIG. 6, in the test library 214, “verification instruction”, “verification instruction address”, and “before / after instruction combination” are associated with identification symbols such as numbers “1 to n”, for example. The verification scenario condition input unit 210 receives a combination of identification symbols as the verification scenario condition 215.

図5のフローチャート図に戻り、検証シナリオ条件入力部210は、選択された検証シナリオ条件215がCPU10の仕様制限に該当するか否かを検証する(S102)。検証シナリオ条件入力部210は、選択した検証シナリオの識別記号の組合せを、仕様制限に該当する検証シナリオ条件の識別記号の組合せと比較し一致する場合は(S102のYES)、テストプログラムの生成処理を終了する。仕様制限に該当する検証シナリオ条件の組合せ情報は、検証者等によって予め用意される。   Returning to the flowchart of FIG. 5, the verification scenario condition input unit 210 verifies whether or not the selected verification scenario condition 215 corresponds to the specification restriction of the CPU 10 (S102). The verification scenario condition input unit 210 compares the combination of identification symbols of the selected verification scenario with the combination of identification symbols of the verification scenario condition corresponding to the specification restriction (YES in S102), and generates a test program Exit. The combination information of the verification scenario conditions corresponding to the specification restriction is prepared in advance by a verifier or the like.

一方、選択された検証シナリオ条件がCPU10の仕様制限に該当しない場合(S102のNO)、検証シナリオ条件入力部210は、検証シナリオ条件判定処理として、選択した検証シナリオ条件215を分割し、「検証命令」を検証命令選択処理S104へ、「前後命令組合せ」を前後命令選択処理S105へ、「検証命令アドレス」を検証命令アドレス選択処理S106へ渡す(S103)。そして、プログラム条件判定部211は、検証命令選択処理として、「検証命令」の識別記号に基づいてテストライブラリ214から「検証命令」を選択する(S104)。同様に、論理検証シナリオ生成部21は、前後命令選択処理として「前後命令組合せ」の識別記号に基づいて前命令と後命令とを(S105)、検証命令アドレス選択処理として「検証命令アドレス」の識別記号に基づいて「検証命令アドレス」を(S106)、テストライブラリ214からそれぞれ選択する。   On the other hand, when the selected verification scenario condition does not correspond to the specification limitation of the CPU 10 (NO in S102), the verification scenario condition input unit 210 divides the selected verification scenario condition 215 as the verification scenario condition determination process, The “instruction” is passed to the verification instruction selection process S104, the “front and rear instruction combination” is passed to the front and rear instruction selection process S105, and the “verification instruction address” is passed to the verification instruction address selection process S106 (S103). Then, the program condition determination unit 211 selects “verification instruction” from the test library 214 based on the identification symbol of “verification instruction” as verification instruction selection processing (S104). Similarly, the logic verification scenario generation unit 21 sets the previous instruction and the subsequent instruction based on the identification symbol of “front / rear instruction combination” as the preceding / following instruction selection process (S105) and sets the “verification instruction address” as the verification instruction address selection process. Based on the identification symbol, “verification instruction address” is selected from the test library 214 (S106).

続いて、論理検証シナリオ生成部21のテストプログラム生成部212は、選択した「検証命令」、「検証命令アドレス」、「前後命令組合せ」に基づいて、テストプログラムを生成する(S107)。テストプログラム生成部212は、「検証命令」をメモリモジュール12が定義する用途別に区分されたメモリ空間上の「検証命令アドレス」に、「前後命令組合せ」の前命令、後命令をそれぞれメモリ空間の前命令用空間、後命令用空間に記憶されるようにメモリモジュール12を記述し生成する。即ち、テストプログラムの生成とは、シミュレーション対象のCPU10がアクセスするメモリモジュール12の生成を意味し、RTL記述されたメモリモジュール12の定義する各空間アドレスにテストプログラムが対応付けて記述される。   Subsequently, the test program generation unit 212 of the logic verification scenario generation unit 21 generates a test program based on the selected “verification instruction”, “verification instruction address”, and “before / after instruction combination” (S107). The test program generating unit 212 assigns the “verification instruction address” in the memory space to the “verification instruction address” on the memory space divided according to the use defined by the memory module 12, and the previous instruction and the subsequent instruction of the “previous instruction combination” in the memory space. The memory module 12 is described and generated so as to be stored in the preceding instruction space and the subsequent instruction space. That is, the generation of the test program means generation of the memory module 12 accessed by the simulation target CPU 10, and the test program is described in association with each space address defined by the memory module 12 described in RTL.

図7は、本実施の形態例におけるメモリモジュール12が定義するメモリ空間を表す図である。本実施の形態例におけるメモリ空間は用途別に区分され、各空間のアドレスは予め決められている。まず、「前命令空間」71は前命令を、「後命令空間」72は後命令を記憶するための空間であり、「分岐先命令空間」73は、テストプログラムの命令が分岐命令である場合の分岐先命令が予め格納される。また、「データ空間」74は、テストプログラムの命令がデータアクセス命令である場合のアクセス用の空間であり、例えば、アクセス用のデータが予め格納される。   FIG. 7 is a diagram showing a memory space defined by the memory module 12 in the present embodiment. The memory space in this embodiment is divided according to use, and the address of each space is determined in advance. First, the “preceding instruction space” 71 is a space for storing the preceding instruction, the “following instruction space” 72 is a space for storing the following instruction, and the “branch destination instruction space” 73 is a case where the instruction of the test program is a branch instruction. Branch destination instructions are stored in advance. The “data space” 74 is an access space when the test program instruction is a data access instruction. For example, access data is stored in advance.

そして、「スタック空間」75は、例えば、テストプログラムの命令が分岐命令である場合に、分岐元への復帰情報として、分岐元の次命令の情報等が記憶される空間である。また、「ブレーク空間」76は、テストプログラムの命令が例えば、デバッグ用のブレーク命令である場合の分岐先命令が予め格納される。そして、「ベクタテーブル」78は、例えば、トラップ命令等の分岐命令が実行された場合の分岐後命令を格納する「EITルーチン空間」77のアドレスが格納される。また、「ベクタテーブル」78は、外部入力要因が発生した場合にも参照されるが、詳細は第2の実施の形態例において後述する。   The “stack space” 75 is a space in which, for example, information on the next instruction at the branch source is stored as return information to the branch source when the instruction of the test program is a branch instruction. Further, the “break space” 76 stores in advance branch destination instructions when the test program instruction is, for example, a break instruction for debugging. The “vector table” 78 stores the address of the “EIT routine space” 77 that stores the post-branch instruction when a branch instruction such as a trap instruction is executed. The “vector table” 78 is also referred to when an external input factor occurs, but details will be described later in the second embodiment.

具体的に、テストプログラム生成部212は、メモリ空間上の「検証命令アドレス」に「検証命令」、「前命令空間」71に前命令、「後命令空間」72に後命令が記憶されるようにメモリモジュール12を記述する。また、テストプログラム生成部212は、前命令が分岐命令である場合、前命令の分岐先アドレスに「検証命令アドレス」が記憶されるようにメモリモジュール12を記述する。これにより、論理検証シミュレート時、CPU10は、前命令が分岐命令である場合、分岐命令によって「検証命令アドレス」に分岐し「検証命令」を実行する。   Specifically, the test program generation unit 212 stores “verification instruction” in the “verification instruction address” in the memory space, the previous instruction in the “previous instruction space” 71, and the subsequent instruction in the “rear instruction space” 72. Describes the memory module 12. In addition, when the previous instruction is a branch instruction, the test program generation unit 212 describes the memory module 12 so that the “verification instruction address” is stored in the branch destination address of the previous instruction. Thus, during the logic verification simulation, when the previous instruction is a branch instruction, the CPU 10 branches to the “verification instruction address” by the branch instruction and executes the “verification instruction”.

ここで、具体例に基づいて、論理検証シナリオ生成部21のテストプログラム生成処理を述べる。例えば、検証シナリオ条件入力部210は、図6の検証命令リストの「3(CALL @R6)」、検証命令アドレスリストの「1(0x00000100)」、前後命令組合せリストの「3((前命令)分岐処理A/(後命令)演算処理A)」の組合せの検証シナリオ条件を受け付ける(S101)。受け付けた検証シナリオ条件がCPU10の仕様制限に該当しない場合(S102のNO)、プログラム条件判定部211は、分割した検証シナリオ条件を各選択処理に渡す(S103)。   Here, a test program generation process of the logic verification scenario generation unit 21 will be described based on a specific example. For example, the verification scenario condition input unit 210 includes “3 (CALL @ R6)” in the verification instruction list, “1 (0x00000100)” in the verification instruction address list, and “3 ((previous instruction) in the preceding and following instruction combination list” in FIG. A verification scenario condition of a combination of “branch process A / (post instruction) arithmetic process A)” is received (S101). When the received verification scenario condition does not correspond to the specification limitation of the CPU 10 (NO in S102), the program condition determination unit 211 passes the divided verification scenario condition to each selection process (S103).

続いて、プログラム条件判定部211は、図6のテストライブラリ214から、検証命令リストCMの「3」に対応する「CALL @R6」を、検証命令アドレスリストCM@の「1」に対応する「0x00000100」を、前後命令組合せリストCMLの「3」に対応する「(前命令)分岐処理A/(後命令)演算処理A」を取得する(S104〜106)。なお、具体的に、分岐処理Aは、次の命令である。
「LDI:32 (分岐先アドレス),R5」
「LDI:32 0x00000500,R6」
「JMP @R5」
また、演算処理Aは、次の命令である。
「LDI:320x00000300,R1」
そして、テストプログラム生成部212は、メモリ空間の検証命令アドレス「0x00000100」に検証命令「CALL @R6」が、「前命令空間」71に分岐処理A「LDI:32 (分岐先アドレス),R5」「LDI:32 0x00000500,R6」「JMP @R5」が、「後命令空間」72に演算処理A「LDI:32 0x00000300,R1」が記憶されるようにメモリモジュール12を記述する。また、前命令が分岐命令であるため、テストプログラム生成部212は、前命令の(分岐先アドレス)81に検証命令アドレス「0x00000100」が記憶されるようにメモリモジュール12を記述する。
Subsequently, the program condition determination unit 211 sets “CALL @ R6” corresponding to “3” in the verification instruction list CM to “1” in the verification instruction address list CM @ from the test library 214 of FIG. “0x00000100” is acquired as “(previous instruction) branch process A / (post instruction) arithmetic process A” corresponding to “3” in the preceding / following instruction combination list CML (S104 to 106). Specifically, the branch process A is the next instruction.
“LDI: 32 (branch destination address), R5”
“LDI: 32 0x00000500, R6”
"JMP @ R5"
The arithmetic processing A is the next instruction.
“LDI: 320 × 00000300, R1”
Then, the test program generation unit 212 sends the verification instruction “CALL @ R6” to the verification instruction address “0x00000100” in the memory space, and the branch process A “LDI: 32 (branch destination address), R5” to the “previous instruction space” 71. “LDI: 32 0x00000500, R6” and “JMP @ R5” describe the memory module 12 so that arithmetic processing A “LDI: 32 0x00000300, R1” is stored in the “rear instruction space” 72. Further, since the previous instruction is a branch instruction, the test program generating unit 212 describes the memory module 12 so that the verification instruction address “0x00000100” is stored in the (branch destination address) 81 of the previous instruction.

図8は、検証シナリオ条件に基づいて生成されたテストプログラムを格納したメモリモジュール12の一例である。同図のように、「前命令空間」71に分岐処理Aが、「後命令空間」72に演算処理Aが、検証命令アドレス「0x00000100」に検証命令「CALL @R6」が記憶される。また、分岐処理Aの(分岐先アドレス)81に検証命令アドレス「0x00000100」が記憶される。   FIG. 8 is an example of the memory module 12 that stores a test program generated based on the verification scenario condition. As shown in the figure, the branch processing A is stored in the “previous instruction space” 71, the arithmetic processing A is stored in the “following instruction space” 72, and the verification instruction “CALL @ R6” is stored in the verification instruction address “0x00000100”. Further, the verification instruction address “0x00000100” is stored in the (branch destination address) 81 of the branch process A.

図8のメモリモジュール12によると、論理検証シミュレーションにおいて、CPU10は、まず前命令「LDI:32 0x00000100,R5」「LDI:32 0x00000500,R6」「JMP @R5」を実行する。「JMP @R5」が分岐命令であるため、続いて、CPU10は「@R5」の示す分岐先アドレスに分岐する。「@R5」には検証命令アドレス「0x00000100」81が割り当てられているため、CPU10は検証命令アドレスに分岐し、検証命令「CALL @R6」を実行する。   According to the memory module 12 of FIG. 8, in the logic verification simulation, the CPU 10 first executes the previous instructions “LDI: 32 0x00000100, R5”, “LDI: 32 0x00000500, R6”, and “JMP @ R5”. Since “JMP @ R5” is a branch instruction, the CPU 10 then branches to the branch destination address indicated by “@ R5”. Since the verification instruction address “0x00000100” 81 is assigned to “@ R5”, the CPU 10 branches to the verification instruction address and executes the verification instruction “CALL @ R6”.

そして、検証命令「CALL @R6」もまた分岐命令であるため、CPU10は「@R6」の示す分岐先アドレス「0x00000500」82、つまり、「分岐先命令空間」73のアドレスに分岐し、当該空間に格納された「ADD R7,R8」「RET」を実行する。「RET」は分岐元への復帰命令であるため、CPU10は分岐元に戻り、次の命令である後命令の「LDI:32 0x00000300,R1」を実行する。このようにしてテストプログラムが実行される。   Since the verification instruction “CALL @ R6” is also a branch instruction, the CPU 10 branches to the branch destination address “0x00000500” 82 indicated by “@ R6”, that is, the address of the “branch destination instruction space” 73, “ADD R7, R8” and “RET” are stored. Since “RET” is a return instruction to the branch source, the CPU 10 returns to the branch source and executes the next instruction “LDI: 32 0x00000300, R1” which is the next instruction. In this way, the test program is executed.

このように、テストプログラム生成部212は、RTL記述されたメモリモジュール12において、前命令が分岐命令である場合、前命令の分岐先アドレスに「検証命令アドレス」を記述することによって、前命令が分岐命令(上記の例ではJMP)であっても、前命令の後「検証命令」、後命令の順に命令が実行されるテストプログラムのメモリモジュール12を生成することができる。   As described above, when the previous instruction is a branch instruction in the memory module 12 described in RTL, the test program generation unit 212 describes the “verification instruction address” in the branch destination address of the previous instruction, so that the previous instruction is Even for a branch instruction (JMP in the above example), it is possible to generate a memory module 12 of a test program in which instructions are executed in the order of “verification instruction” after the previous instruction and then the subsequent instruction.

また、「検証命令」や後命令が分岐命令の場合、命令(上記の例ではCALL)の分岐先アドレスに、予め分岐先の命令が格納された「分岐先命令空間」73のアドレスが指定されていることにより、テストプログラム生成部212は、予め用意された分岐先の命令を利用することができ、分岐先の命令を生成しなくてもよい。   When the “verification instruction” or the subsequent instruction is a branch instruction, the address of the “branch destination instruction space” 73 in which the branch destination instruction is stored in advance is specified as the branch destination address of the instruction (CALL in the above example). Therefore, the test program generation unit 212 can use a branch destination instruction prepared in advance, and does not have to generate a branch destination instruction.

このように、テストプログラム生成部212は、分岐先アドレスに分岐先の命令を格納した空間アドレスを指定した分岐命令(分岐命令やブレーク命令等)を、アクセスアドレスにデータアクセス用の空間アドレスを指定したデータアクセス命令を、「検証命令」及び前後命令として予め用意する。これにより、テストプログラム生成部212は、メモリモジュール12が定義するメモリ空間について、「検証命令アドレス」に「検証命令」を、「前命令空間」71「後命令空間」72に前後命令が記憶されるように、また、前命令が分岐命令である場合に、当該前命令の分岐先アドレスに「検証命令アドレス」が記憶されるように記述するだけで、複数の命令を有するテストプログラムのメモリモジュール12を生成できる。   In this way, the test program generation unit 212 designates a branch instruction (branch instruction, break instruction, etc.) that designates a space address that stores a branch destination instruction as a branch destination address, and designates a space address for data access as an access address. The data access command thus prepared is prepared in advance as a “verification command” and a front and rear command. As a result, the test program generation unit 212 stores “verification instruction” in “verification instruction address” and “previous instruction space” 71 “after instruction space” 72 in the memory space defined by the memory module 12. In addition, when the previous instruction is a branch instruction, the memory module of the test program having a plurality of instructions is simply described so that the “verification instruction address” is stored in the branch destination address of the previous instruction. 12 can be generated.

続いて、期待値生成処理について述べる。   Next, expected value generation processing will be described.

図9は、期待値生成の処理を表すフローチャート図である。まず、期待値生成部22は、メモリモジュール12のテストプログラムにおける開始アドレスから初めの命令を読み出す(S121)。次に、期待値生成部22は、読み出した命令の要素分解処理を行う(S122)。   FIG. 9 is a flowchart showing the expected value generation process. First, the expected value generation unit 22 reads the first instruction from the start address in the test program of the memory module 12 (S121). Next, the expected value generation unit 22 performs element decomposition processing on the read instruction (S122).

図10は、期待値生成部22の検証シナリオ要素分解処理(図9のS122)を表すフローチャート図である。期待値生成部22は、読み出した命令をデコードしてデコード情報を生成し、命令種別判定処理S123に渡す(S141)。S142の処理については、第2の実施の形態例にて説明する。次に、期待値生成部22は、デコード情報に基づいて、当該命令の分岐の有無情報を分岐判定処理S125へ渡し(S143)、デコード情報と命令のアドレス情報とをデータ抽出処理S126へ渡す(S144)。   FIG. 10 is a flowchart showing the verification scenario element decomposition process (S122 in FIG. 9) of the expected value generation unit 22. The expected value generation unit 22 decodes the read instruction to generate decode information, and passes it to the instruction type determination process S123 (S141). The process of S142 will be described in the second embodiment. Next, based on the decode information, the expected value generation unit 22 passes the branch presence / absence information of the instruction to the branch determination process S125 (S143), and passes the decode information and the address information of the instruction to the data extraction process S126 ( S144).

図9に戻り、続いて、期待値生成部22は、命令種別判定処理として、デコード情報に基づいて命令種別を判定し、当該命令種別に対応する期待値フォーマットのフォーマット番号を期待値フォーマット選択処理S127に渡す(S123)。この場合、期待値生成部22は、命令のデコード情報に基づいて、当該命令の内容、及び、演算系、ロード/ストア系、分岐系(1〜4)、トラップ系等の命令種別を判別できる。また、期待値生成部22は、分岐判定処理として、分岐の有無情報に基づいて、分岐有の場合に分岐用のフォーマット番号を期待値フォーマット選択処理S127に渡す(S125)。   Returning to FIG. 9, subsequently, the expected value generation unit 22 determines the instruction type based on the decode information as the instruction type determination process, and sets the format number of the expected value format corresponding to the instruction type as the expected value format selection process. It passes to S127 (S123). In this case, the expected value generation unit 22 can determine the content of the instruction and the instruction type such as the operation system, the load / store system, the branch system (1 to 4), and the trap system based on the instruction decode information. . In addition, as the branch determination process, the expected value generation unit 22 passes the branch format number to the expected value format selection process S127 when there is a branch based on the branch presence / absence information (S125).

図12は、期待値フォーマットを表す図である。期待値フォーマットは、CPU10がある命令を実行して出力するひとつまたは複数の出力信号項目を有し、同じ出力信号項目を出力する命令種別毎に用意される。また、期待値フォーマットの出力信号項目には、期待値が命令種別及び外部入力要因に基づいて予め予測される固定値と、命令のデコード情報等に基づいて生成される非固定値とがある。同図において、固定値は下線付き、非固定値は斜体によって表される。なお、出力信号項目は同図の例に限定されるものではなく、検証対象のCPU10によって異なる。   FIG. 12 is a diagram illustrating an expected value format. The expected value format is prepared for each instruction type having one or a plurality of output signal items to be output by executing a certain instruction by the CPU 10 and outputting the same output signal item. The output signal item in the expected value format includes a fixed value in which the expected value is predicted in advance based on the instruction type and the external input factor, and a non-fixed value generated on the basis of instruction decoding information and the like. In the figure, fixed values are underlined and unfixed values are italicized. The output signal items are not limited to the example shown in the figure, and differ depending on the CPU 10 to be verified.

各出力信号項目について説明する。「命令アドレス」は、命令が格納されるメモリ空間のアドレスである。また、「分岐情報」は、命令が分岐元、分岐先であるか否かの情報であり、「分岐要因」はその分岐要因である。「EIT要因」は、第2の実施の形態例で後述する。「CPU状態」は、CPU10の状態を表す情報である。「アクセスアドレス」はデータアクセス系命令のアクセス対象のデータが格納されたアドレス、「RW情報」は書き込みか読み出しかの情報、「アクセスサイズ」はアクセス対象のデータサイズ、「ライトデータ」「リードデータ」はアクセス対象のデータ情報である。   Each output signal item will be described. The “instruction address” is an address of a memory space where an instruction is stored. The “branch information” is information indicating whether the instruction is a branch source or a branch destination, and “branch factor” is the branch factor. The “EIT factor” will be described later in the second embodiment. “CPU state” is information representing the state of the CPU 10. “Access address” is the address at which the data to be accessed by the data access instruction is stored, “RW information” is information about writing or reading, “Access size” is the data size to be accessed, “Write data” “Read data” "Is data information to be accessed.

「(1)演算系」種別の命令用の期待値フォーマットは、例えば「命令アドレス」、「CPU状態」の出力信号項目を有する。「(2)ロード系」「(3)ストア系」種別の命令に対応する期待値フォーマットは、「命令アドレス」、「CPU状態」に加え、ロード、ストア処理における「アクセスアドレス」、「RW情報」、「アクセスサイズ」、「リードデータ/ライトデータ」の出力信号項目を有する。なお、「RW情報」は、「(2)ロード系」、「(3)ストア系」それぞれの種別に基づいて予め予測可能であることにより固定値である。   The expected value format for an instruction of the “(1) arithmetic system” type has output signal items of “instruction address” and “CPU state”, for example. The expected value format corresponding to the “(2) load type” and “(3) store type” instructions includes “access address” and “RW information” in the load and store processes in addition to “instruction address” and “CPU state”. ”,“ Access size ”, and“ read data / write data ”output signal items. The “RW information” is a fixed value because it can be predicted in advance based on the types of “(2) load system” and “(3) store system”.

そして、「(4)分岐1(JMP系)」種別の命令用の期待値フォーマットは、例えば「命令アドレス」、「CPU状態」に加え、「分岐情報」、「分岐要因」の出力信号項目を有する。JMP系の命令では、必ず「分岐情報/分岐元」、「分岐要因/命令分岐」であるため、「分岐情報」「分岐要因」は固定値である。   The expected value format for an instruction of the type “(4) Branch 1 (JMP system)” includes, for example, “branch information” and “branch factor” output signal items in addition to “instruction address” and “CPU state”. Have. Since JMP instructions always have “branch information / branch source” and “branch factor / instruction branch”, “branch information” and “branch factor” are fixed values.

また、CALL系命令を実行すると、CPU10は、CALL命令による分岐からの復帰情報(次命令のアドレス)を「スタック空間」75に書き込む。そのため、「(5)分岐2(CALL系)」種別の命令用の期待値フォーマットは、例えば、「(4)分岐1(JMP系)」と同様の出力信号項目に加え、2行目に「スタック空間」75への復帰情報の書き込み処理における「アクセスアドレス」、「RW情報」、「アクセスサイズ」、「ライトデータ」の出力信号項目を有する。なお、復帰情報の書き込み処理における「RW情報」は固定値「W」であり、「アクセスサイズ」はCPU10の仕様に基づいて決められた固定値「4」である。   When the CALL instruction is executed, the CPU 10 writes the return information (address of the next instruction) from the branch by the CALL instruction in the “stack space” 75. Therefore, the expected value format for an instruction of the type “(5) Branch 2 (CALL type)” is, for example, in addition to the output signal item similar to “(4) Branch 1 (JMP type)”, It has output signal items of “access address”, “RW information”, “access size”, and “write data” in the process of writing the return information to the “stack space” 75. Note that “RW information” in the restoration information writing process is a fixed value “W”, and “access size” is a fixed value “4” determined based on the specifications of the CPU 10.

RET命令(リターン命令)は、分岐先から分岐元に戻るために実行される命令であり、「スタック空間」75から復帰情報(分岐元の次の命令のアドレス)を読み出すことにより、分岐元に復帰する。そのため、「(6)分岐3(RET)」種別の命令用の期待値フォーマットは、1行目の「命令アドレス」、「分岐情報」、「分岐要因」、「CPU状態」に加え、2行目の「スタック空間」75から復帰情報の読み出し処理における「アクセスアドレス」、「RW情報」、「アクセスサイズ」、「リードデータ」の出力信号項目を有する。なお、同様にして、「分岐情報」、「分岐要因」、「RW情報」、「アクセスサイズ」は命令種別により予め期待値が予測される固定値である。   The RET instruction (return instruction) is an instruction executed to return from the branch destination to the branch source. By reading the return information (the address of the next instruction of the branch source) from the “stack space” 75, the branch source is read. Return. Therefore, the expected value format for the instruction of the type “(6) Branch 3 (RET)” includes two lines in addition to “instruction address”, “branch information”, “branch factor”, and “CPU state” on the first line. It has output signal items of “access address”, “RW information”, “access size”, and “read data” in the read information read processing from the “stack space” 75 of the eye. Similarly, “branch information”, “branch factor”, “RW information”, and “access size” are fixed values for which expected values are predicted in advance depending on the instruction type.

RETI命令は、RET命令と同様に、分岐先から分岐元に戻るために実行される命令であり、「スタック空間」75から復帰情報として次の命令のアドレスに加えプログラムステータスを読み出す。そのため、「(7)分岐4(RETI)」種別の命令用の期待値フォーマットは、「(6)分岐3(RET)」種別の期待値フォーマットと同様の1、2行目の出力信号項目を有し、さらに3行目のプログラムステータスの読み出し処理における出力信号項目を有する。固定値は「(6)分岐3(RET)」種別の期待値フォーマットと同様である。   Similar to the RET instruction, the RETI instruction is an instruction executed to return from the branch destination to the branch source, and reads the program status from the “stack space” 75 in addition to the address of the next instruction as return information. Therefore, the expected value format for the instruction of the “(7) Branch 4 (RETI)” type is the same as the expected value format of the “(6) Branch 3 (RET)” type. And an output signal item in the program status read processing in the third row. The fixed value is the same as the expected value format of “(6) Branch 3 (RET)” type.

「(8)トラップ系」種別の命令を実行する場合、CPU10は、「ベクタテーブル」78から「EITルーチン空間」77のトラップルーチンのアドレスを読み出すと共に、トラップ命令による分岐からの復帰情報(プログラムステータス、次の命令のアドレス)を「スタック空間」75に書き込む。そのため、「(8)トラップ系」種別の命令用の期待値フォーマットは、1行目の「命令アドレス」、「分岐情報」、「分岐要因」、「CPU状態」に加え、2行目の「ベクタテーブル」78からの読み出し処理、3、4行目の「スタック空間」75への復帰情報書き込み処理における出力信号項目を有する。固定値は「(6)分岐3(RET)」種別の期待値フォーマットと同様の出力信号項目に加え、「EIT要因/トラップ」である。   When executing an instruction of “(8) trap system” type, the CPU 10 reads out the address of the trap routine in the “EIT routine space” 77 from the “vector table” 78 and returns information (program status) from the branch by the trap instruction. , The address of the next instruction) is written into the “stack space” 75. Therefore, the expected value format for the instruction of the “(8) trap system” type includes “instruction address”, “branch information”, “branch factor”, and “CPU state” in the first line, It has an output signal item in the read processing from the “vector table” 78 and the return information write processing in the “stack space” 75 in the third, fourth and fourth lines. The fixed value is “EIT factor / trap” in addition to the output signal item similar to the expected value format of the “(6) branch 3 (RET)” type.

なお、「(12)分岐命令用」期待値フォーマットは、命令が分岐命令である場合に付加される分岐用の期待値フォーマットであり、他の期待値フォーマットの「フォーマット合成」項目の値が「OFF」であるのに対し、当該項目の値が「ON」である。「(12)分岐命令用」期待値フォーマットは、命令が分岐命令である場合、命令種別に対応する期待値フォーマットに付加され、その次に実行される命令の期待値フォーマットに合成される。なお、外部入力要因に対応する期待値フォーマット(9〜11)については、第2の実施の形態例で後述する。   Note that the “(12) branch instruction” expected value format is an expected value format for branch added when the instruction is a branch instruction, and the value of the “format composition” item of the other expected value formats is “ In contrast to “OFF”, the value of the item is “ON”. The expected value format “(12) for branch instruction” is added to the expected value format corresponding to the instruction type when the instruction is a branch instruction, and is synthesized with the expected value format of the instruction to be executed next. Note that the expected value format (9 to 11) corresponding to the external input factor will be described later in the second embodiment.

図9に戻り、期待値生成部22は、期待値フォーマット選択処理として、命令種別判定処理によるフォーマット番号と、分岐判定処理による分岐用のフォーマット番号とに基づいて、命令の期待値フォーマットを選択する(S127)。   Returning to FIG. 9, the expected value generation unit 22 selects the expected value format of the instruction based on the format number by the instruction type determination process and the format number for branch by the branch determination process as the expected value format selection process. (S127).

図11は、期待値フォーマット選択処理(S127)を表すフローチャート図である。期待値生成部22は、期待値フォーマット記憶部221から、命令種別に対応するフォーマット番号の期待値フォーマットを取得する(S151)。そして、期待値生成部22は、分岐有の場合、(S152のYES)、期待値フォーマット記憶部221から分岐用の期待値フォーマットを取得して命令種別に対応する期待値フォーマットに付加し(S153)、フォーマットを確定する(S154)。一方、期待値生成部22は、分岐無の場合(S152のNO)、命令種別に対応する期待値フォーマットを、フォーマットとして確定する(S154)。   FIG. 11 is a flowchart showing the expected value format selection process (S127). The expected value generation unit 22 acquires the expected value format of the format number corresponding to the instruction type from the expected value format storage unit 221 (S151). Then, if there is a branch (YES in S152), the expected value generation unit 22 acquires the expected value format for branch from the expected value format storage unit 221 and adds it to the expected value format corresponding to the instruction type (S153). ), And confirms the format (S154). On the other hand, when there is no branch (NO in S152), the expected value generation unit 22 determines the expected value format corresponding to the instruction type as the format (S154).

図9に戻り、期待値生成部22は、データ抽出処理として、検証シナリオ要素分解処理(S122)から渡された命令をデコードして得たデコード情報に基づいて、デコード情報、メモリ空間のアドレス、当該アドレスに格納されたメモリ情報等からデータを抽出し期待値生成処理に渡す(S126)。期待値生成部22は、抽出されたデータに基づいて、期待値フォーマットの出力信号項目に対応する期待値を生成し(S128)、期待値データ25としてメモリ等に格納する(S129)。   Returning to FIG. 9, the expected value generation unit 22 performs decoding information, memory space address, based on the decoding information obtained by decoding the instruction passed from the verification scenario element decomposition processing (S122) as the data extraction processing. Data is extracted from the memory information or the like stored at the address and passed to the expected value generation process (S126). The expected value generation unit 22 generates an expected value corresponding to the output signal item in the expected value format based on the extracted data (S128), and stores it as expected value data 25 in a memory or the like (S129).

そして、期待値生成部22は、期待値生成処理の後、テストプログラムの全ての命令について期待値を生成したか否かを確認する(S130)。具体的に、期待値生成部22は、例えば、命令アドレスが「後命令空間」72の末尾に達したか否かによって、テストプログラムの全ての命令について期待値を生成したか否かを判定する。   Then, the expected value generation unit 22 confirms whether expected values have been generated for all the instructions of the test program after the expected value generation processing (S130). Specifically, the expected value generation unit 22 determines whether or not expected values have been generated for all the instructions of the test program depending on, for example, whether or not the instruction address has reached the end of the “rear instruction space” 72. .

期待値を生成していない命令がある場合(S130のNO)、期待値生成した命令の命令アドレスに命令長を加算し、次の命令の命令アドレスを取得する(S131)。この時、期待値を生成した命令が分岐命令である場合、分岐命令の分岐先の命令アドレスを取得する。そして、取得した命令アドレスに基づいてメモリモジュール12内のテストプログラムから次の命令を読み出し、期待値を生成する(S121〜S129)。このように、期待値生成部22は、テストプログラムの初めの命令から実行される順に期待値を生成する。   If there is an instruction that has not generated an expected value (NO in S130), the instruction length is added to the instruction address of the instruction that generated the expected value, and the instruction address of the next instruction is acquired (S131). At this time, if the instruction that generated the expected value is a branch instruction, the branch destination instruction address of the branch instruction is acquired. Then, the next instruction is read from the test program in the memory module 12 based on the acquired instruction address, and an expected value is generated (S121 to S129). As described above, the expected value generation unit 22 generates expected values in the order of execution from the first instruction of the test program.

一方、テストプログラムの全ての命令について期待値を生成すると(S130のYES)、期待値生成部22は、期待値生成処理を終了する。そして、シミュレータは、生成されたテストプログラムのメモリモジュール12と期待値とに基づいて、CPU10の論理検証を行う。そして、論理検証の後、論理検証シナリオ生成部21は、次の検証シナリオ条件を受け付け、同様にテストプログラムのメモリモジュール12及び期待値の生成処理を行う。   On the other hand, when expected values are generated for all the instructions of the test program (YES in S130), the expected value generating unit 22 ends the expected value generating process. Then, the simulator performs logic verification of the CPU 10 based on the generated memory module 12 and the expected value of the test program. Then, after the logic verification, the logic verification scenario generation unit 21 receives the next verification scenario condition and similarly performs the generation process of the memory module 12 and the expected value of the test program.

以下、図8のテストプログラムに基づく期待値生成の具体例を述べる。期待値生成部22は、テストプログラムの初めの命令「LDI:32 0x100000100,R5」を読み出す(S121)。そして、期待値生成部22は、検証シナリオ要素分解処理として(S122)、当該命令をデコードして命令が「LDI:32」であること、分岐無であることを判別し、命令種別判定処理へ渡すと共に(図10のS141)、分岐無である情報を分岐判定処理へ渡す(図10のS143)。また、期待値生成部22は、デコード情報と命令「LDI:32」のアドレス情報「0x00000000」とをデータ抽出処理へ渡す(図10のS144)。   A specific example of expected value generation based on the test program of FIG. 8 will be described below. The expected value generation unit 22 reads the first instruction “LDI: 32 0x100000100, R5” of the test program (S121). Then, as the verification scenario element decomposition process (S122), the expected value generation unit 22 decodes the instruction to determine that the instruction is “LDI: 32” and that there is no branch, and to the instruction type determination process At the same time (S141 in FIG. 10), the information indicating no branch is passed to the branch determination process (S143 in FIG. 10). Further, the expected value generation unit 22 passes the decode information and the address information “0x00000000” of the instruction “LDI: 32” to the data extraction process (S144 in FIG. 10).

続いて、期待値生成部22は、「LDI:32」命令が演算系の命令であることから、演算系の命令に対応するフォーマット番号「1」を(S123)、分岐無である情報に基づいて分岐用の期待値フォーマット無の情報を(S125)、フォーマット選択処理に渡す。そして、期待値生成部22は、図11のフローチャート図に基づいて、命令種別に対応するフォーマット番号「1」(S151)と分岐用の期待値フォーマット無の情報(S152のNO)に基づいて、期待値フォーマット記憶部221から期待値フォーマット「1」を取得してフォーマットを確定する(S154)。このようにして、命令「LDI:32 0x00000100,R5」に対応する期待値フォーマット「1」が選択される。   Subsequently, since the “LDI: 32” instruction is an arithmetic instruction, the expected value generation unit 22 sets the format number “1” corresponding to the arithmetic instruction (S123), based on information indicating no branching. Then, the information without the expected value format for branching is passed to the format selection process (S125). Then, based on the format number “1” (S151) corresponding to the instruction type and the information on the absence of the expected value format for branching (NO in S152), the expected value generation unit 22 is based on the flowchart of FIG. The expected value format “1” is acquired from the expected value format storage unit 221 to determine the format (S154). In this way, the expected value format “1” corresponding to the instruction “LDI: 32 0x00000100, R5” is selected.

図13は、図8のテストプログラムの各命令に対応する期待値フォーマットを表す図である。前述した通り、命令「LDI:32 0x00000100,R5」に対応する期待値フォーマットは「1」である(a)。また、命令「JMP @R5」は、JMP系の分岐命令であることから期待値フォーマット「(4)分岐1(JMP系)」(c)に加え、分岐用の期待値フォーマット「(12)分岐命令用」(d)が選択される。同様に、検証命令「CALL @R6」はCALL系の分岐命令であることから、期待値フォーマット「(5)分岐2(CALL系)」(e-1,2)に加え、分岐用の期待値フォーマット「(12)分岐命令用」(f)が選択される。   FIG. 13 is a diagram showing an expected value format corresponding to each instruction of the test program of FIG. As described above, the expected value format corresponding to the instruction “LDI: 32 0x00000100, R5” is “1” (a). Since the instruction “JMP @ R5” is a JMP branch instruction, in addition to the expected value format “(4) branch 1 (JMP system)” (c), the expected value format for branch “(12) branch” “For command” (d) is selected. Similarly, since the verification instruction “CALL @ R6” is a CALL branch instruction, in addition to the expected value format “(5) branch 2 (CALL system)” (e−1, 2), the expected value for branching The format “(12) for branch instruction” (f) is selected.

図14は、図8のテストプログラムに対応する期待値を表す図である。同図において、命令「LDI:32 0x00000100,R5」の出力信号項目の期待値として(a)、「命令アドレス/0x00000000」、「CPU状態/状態A」が生成されている。具体的に、期待値生成部22は、命令「LDI:32 0x100000100,R5」のデータ抽出処理として、デコード情報に基づいて、命令「LDI:32」がCPUの状態を制御する命令ではないことにより初期のCPU状態「状態A」と、命令のアドレス「0x00000000」とを抽出する(S126)。そして、期待値生成部22は、抽出したデータに基づいて、期待値フォーマット「1」の出力信号項目の期待値「CPU状態/状態A」、「命令アドレス/0x00000000」を生成する(S128)。   FIG. 14 is a diagram showing expected values corresponding to the test program of FIG. In the drawing, (a) “instruction address / 0x00000000” and “CPU state / state A” are generated as expected values of output signal items of the instruction “LDI: 32 0x00000100, R5”. Specifically, the expected value generation unit 22 performs the data extraction process of the instruction “LDI: 32 0x100000100, R5” based on the fact that the instruction “LDI: 32” is not an instruction that controls the state of the CPU based on the decode information. An initial CPU state “state A” and an instruction address “0x00000000” are extracted (S126). Then, based on the extracted data, the expected value generation unit 22 generates expected values “CPU state / state A” and “instruction address / 0x00000000” of the output signal item of the expected value format “1” (S128).

また、命令「JMP @R5」について、期待値生成部22は、同様に、デコード情報に基づいて、命令「JMP」がCPUの状態を制御する命令ではないことにより「状態A」と、命令のアドレス「0x0000000C」とを抽出する。これにより、命令「JMP @R5」の期待値フォーマット(図14のc)について、固定値「分岐情報/分岐元」、「分岐要因/命令分岐」に加え、「命令アドレス/0x0000000C」、「CPU状態/状態A」が期待値として生成される。また、同様に、分岐用の期待値フォーマット(図14のd)について、「分岐情報/分岐先」、「分岐要因/命令分岐」、「CPU状態/状態A」が期待値として生成される。   Further, for the instruction “JMP @ R5”, the expected value generation unit 22 similarly determines that “state A” and the instruction of the instruction “JMP” are not instructions that control the state of the CPU based on the decode information. Extract the address "0x0000000C". As a result, for the expected value format (c in FIG. 14) of the instruction “JMP @ R5”, in addition to the fixed values “branch information / branch source” and “branch factor / instruction branch”, “instruction address / 0x0000000C”, “CPU State / state A "is generated as the expected value. Similarly, for the expected value format for branching (d in FIG. 14), “branch information / branch destination”, “branch factor / instruction branch”, and “CPU state / state A” are generated as expected values.

命令「CALL @R6」について、期待値生成部22は、デコード情報に基づいて、「CPU状態」、「命令アドレス」に加え、CALL命令に伴う復帰情報のスタック空間への書き込み処理における「アクセスアドレス」としてスタック空間の書き込みアドレス「0x000007FC」、「ライトデータ」として分岐元の次命令のアドレス「0x00000102」を抽出する。これにより、命令「CALL @R6」の期待値フォーマット(図14のe-1,2)について、固定値「分岐情報/分岐元」、「分岐要因/命令分岐」「RW情報/W」「アクセスサイズ/4」に加え、「命令アドレス/0x00000100」「CPU状態/状態A」「アクセスアドレス/0x000007FC」「ライトデータ/0x00000102」が期待値として生成される。   With respect to the instruction “CALL @ R6”, the expected value generation unit 22 uses “decoding information” in addition to “CPU state” and “instruction address”, “access address in writing processing of return information accompanying the CALL instruction to the stack space ”Is extracted as the write address“ 0x000007FC ”of the stack space, and“ 0x00000102 ”of the next instruction of the branch source is extracted as“ write data ”. As a result, the fixed value “branch information / branch source”, “branch factor / branch source”, “RW information / W”, “access” for the expected value format (e-1, 2 in FIG. 14) of the instruction “CALL @ R6”. In addition to “size / 4”, “instruction address / 0x00000100”, “CPU state / state A”, “access address / 0x000007FC”, and “write data / 0x00000102” are generated as expected values.

また、期待値生成部22は、フォーマット合成項目が「ON」である分岐用の期待値フォーマット(d)と、次の命令「CALL @R6」の始めの期待値フォーマット(e-1)とを合成して、合成期待値フォーマット(d,e-1)を生成する。具体的に、期待値生成部22は、期待値が同一の出力信号項目については当該期待値を、期待値の異なる出力信号項目については合成した値「分岐情報/分岐先元」(d,e-1)を期待値として生成する。   In addition, the expected value generation unit 22 generates an expected value format (d) for a branch whose format composition item is “ON” and an expected value format (e-1) at the beginning of the next instruction “CALL @ R6”. The combined expected value format (d, e-1) is generated. Specifically, the expected value generating unit 22 combines the expected value for output signal items having the same expected value, and the synthesized value “branch information / branch destination” (d, e) for output signal items having different expected values. -1) is generated as an expected value.

このように、図12で示した「(12)分岐命令用」の期待値フォーマットが次の命令の期待値フォーマットに合成されることにより、期待値生成部22は、分岐先の命令(上記の例では、CALL)について、分岐先の命令である旨の期待値を生成することができる。また、期待値フォーマットが命令種別に基づいて予め予測された固定値(期待値)を有することにより、期待値生成部22は、非固定値に対してのみ期待値を生成すればよい。   As described above, the expected value format of “(12) for branch instruction” shown in FIG. 12 is combined with the expected value format of the next instruction, so that the expected value generation unit 22 can execute the branch destination instruction (above In the example, for CALL), an expected value indicating that it is a branch destination instruction can be generated. In addition, since the expected value format has a fixed value (expected value) predicted in advance based on the instruction type, the expected value generation unit 22 may generate the expected value only for the non-fixed value.

このようにして、期待値生成部22は、命令に対応する出力信号項目を有する期待値フォーマットを取得し、その命令のデコード情報に基づいて出力信号項目に対応する期待値を生成する。また、期待値生成部22は、さらに、命令のアドレス、及び、デコード情報に基づく予め用途別に区分されたメモリ空間のアドレス、当該アドレスに予め格納されたメモリ情報に基づいて期待値を生成する。これにより、期待値生成部22は、CPU10がテストプログラムの各命令を実行して出力する信号を予測した期待値を生成することができる。   In this way, the expected value generation unit 22 acquires an expected value format having an output signal item corresponding to an instruction, and generates an expected value corresponding to the output signal item based on the decode information of the instruction. In addition, the expected value generation unit 22 further generates an expected value based on the address of the instruction, the address of the memory space divided according to the application based on the decode information, and the memory information stored in advance at the address. Thereby, the expected value generation unit 22 can generate an expected value in which a signal output by the CPU 10 executing each instruction of the test program is predicted.

以上のように、本実施の形態例における論理検証シナリオ生成装置は、検証シナリオ条件として、「検証命令」「検証命令アドレス」「前後命令組合せ」の組合せをテストライブラリ214の各リストから順次選択する。そして、論理検証シナリオ生成装置は、選択した検証シナリオ条件に基づいて、用途別に区分されたメモリ空間の「前命令空間」71に前命令を「後命令空間」72に後命令を、「検証命令アドレス」に「検証命令」を、また、前命令が分岐命令である場合の分岐先アドレスに「検証命令アドレス」を記憶するようにメモリモジュール12を記述することによって、テストプログラムを格納するメモリモジュール12生成する。そして、論理検証シナリオ生成装置は、テストプログラムの各命令について、命令のデコード情報に基づいて、期待値フォーマット記憶部221から対応する期待値フォーマットを取得し、当該期待値フォーマットの有する出力信号に対応する期待値を生成する。   As described above, the logic verification scenario generation device according to the present embodiment sequentially selects combinations of “verification instruction”, “verification instruction address”, and “previous instruction combination” from each list of the test library 214 as verification scenario conditions. . Then, the logical verification scenario generation device, based on the selected verification scenario condition, the previous instruction in the “previous instruction space” 71 of the memory space classified by use, the subsequent instruction in the “rear instruction space” 72, and the “verification instruction” A memory module for storing a test program by describing the memory module 12 so as to store “verification instruction” in “address” and “verification instruction address” in the branch destination address when the previous instruction is a branch instruction 12 are generated. Then, the logic verification scenario generation device acquires, for each instruction of the test program, a corresponding expected value format from the expected value format storage unit 221 based on the instruction decoding information, and corresponds to the output signal of the expected value format. Generate the expected value.

これにより、論理検証シナリオ生成装置は、順次選択した検証シナリオ条件の組合せに基づいて、テストプログラムを格納するメモリモジュール12、及びテストプログラムの各命令に対応する期待値を網羅的に自動生成することができ、その生成にかかる負荷やミスを抑えることができる。   As a result, the logic verification scenario generation device comprehensively automatically generates the expected value corresponding to each instruction of the memory module 12 that stores the test program and the test program based on the combination of the verification scenario conditions that are sequentially selected. And can reduce the load and mistakes in the generation.

また、CPU10の出力信号は命令の組合せや順番によっても影響を受ける。そこで、本実施の形態例における論理検証シナリオ生成装置は、「検証命令」と「前後命令組合せ」の検証シナリオ条件を網羅的に組み合わせて複数の命令を有するテストプログラムを格納するメモリモジュール12を生成することにより、CPU10に適した論理検証を実現することができる。   The output signal of the CPU 10 is also affected by the combination and order of instructions. Therefore, the logic verification scenario generation device according to the present embodiment generates a memory module 12 for storing a test program having a plurality of instructions by comprehensively combining the verification scenario conditions of “verification instruction” and “previous instruction combination”. By doing so, logic verification suitable for the CPU 10 can be realized.

また、本実施の形態例における論理検証シナリオ生成装置は、検証シナリオ条件として、「検証命令」を記憶するメモリ空間の「検証命令アドレス」が選択されることにより、命令が格納されるメモリ空間上のアドレスの検証を行うことができる。なお、論理検証シナリオ生成装置は、「検証命令アドレス」に、「分岐先命令空間」73や「ブレーク空間」76のアドレスを選択させてもよい。ただし、「検証命令アドレス」に「分岐先命令空間」73や「ブレーク空間」76のアドレスが選択される場合、前命令には分岐命令やブレーク命令を含む分岐処理が選択される必要がある。   In addition, the logic verification scenario generation device according to the present exemplary embodiment selects the “verification instruction address” of the memory space storing the “verification instruction” as the verification scenario condition, so that the instruction is stored on the memory space. Can be verified. The logic verification scenario generation device may cause the “verification instruction address” to select the address of the “branch destination instruction space” 73 or the “break space” 76. However, when the address of the “branch destination instruction space” 73 or “break space” 76 is selected as the “verification instruction address”, a branch process including a branch instruction or a break instruction needs to be selected as the previous instruction.

さらに、以上、検証シナリオ条件として「検証命令アドレス」が選択される例を述べたが、論理検証シナリオ生成装置は、「検証命令アドレス」を検証シナリオ条件に含まなくてもよい。論理検証シナリオ生成装置は、予め固定の「検証命令アドレス」を決めておき、「検証命令」と「前後組合せ」に基づいてテストプログラムを格納したメモリモジュール12及び期待値を生成してもよい。   Further, the example in which “verification instruction address” is selected as the verification scenario condition has been described above, but the logical verification scenario generation apparatus may not include “verification instruction address” in the verification scenario condition. The logic verification scenario generation device may determine a fixed “verification instruction address” in advance, and generate the memory module 12 storing the test program and the expected value based on the “verification instruction” and the “before / after combination”.

[第2の実施の形態例]
第2の実施の形態例では、検証シナリオ条件として、第1の実施の形態例で述べた「検証命令」「検証命令アドレス」「前後命令組合せ」に加え、さらに、「検証命令」に対して入力する「外部入力要因」と、当該「外部入力要因」の「外部入力タイミング」とが選択される。
[Second Embodiment]
In the second embodiment, in addition to the “verification instruction”, “verification instruction address”, and “before / after instruction combination” described in the first embodiment as verification scenario conditions, The “external input factor” to be input and “external input timing” of the “external input factor” are selected.

本実施の形態例におけるCPU10及びメモリモジュール12は、図1、2と同様である。ただし、本実施の形態例における論理検証シナリオ生成装置は、上記の検証シナリオ条件に基づいて、さらに、RTL記述された外部入力信号生成モジュール11(図3)を生成する。外部入力信号生成モジュール11は、論理検証シミュレーション実行時にCPU10が実行する「検証命令」の「外部入力タイミング」に「外部入力要因」に基づく信号を出力する。   The CPU 10 and the memory module 12 in the present embodiment are the same as those shown in FIGS. However, the logic verification scenario generation device according to the present embodiment further generates the external input signal generation module 11 (FIG. 3) described in RTL based on the verification scenario condition. The external input signal generation module 11 outputs a signal based on the “external input factor” at the “external input timing” of the “verification instruction” executed by the CPU 10 when executing the logic verification simulation.

図15は、テストライブラリ214における外部入力要因リストEX、外部入力タイミングリストEXTを表す図である。テストライブラリ214には、検証命令リストCM、検証命令アドレスリストCM@、前後命令組合せリストCMLに加え、「外部入力要因」を複数有する外部入力要因リストEX、「外部入力タイミング」を複数有する外部入力タイミングリストEXTが検証者等によって予め格納される。また、同図のテストライブラリ214において、それぞれの「外部入力要因」、「外部入力タイミング」は、例えば、「1〜n」の数字等の識別記号に対応付けられる。   FIG. 15 is a diagram showing an external input factor list EX and an external input timing list EXT in the test library 214. The test library 214 includes an external input factor list EX having a plurality of “external input factors” and an external input having a plurality of “external input timings” in addition to the verification command list CM, the verification command address list CM @, and the preceding and following command combination list CML. The timing list EXT is stored in advance by a verifier or the like. Further, in the test library 214 in the figure, each “external input factor” and “external input timing” are associated with an identification symbol such as a number “1 to n”, for example.

「外部入力要因」は、例えば、割り込み、例外、トラップ等の要因に基づく入力信号である。割り込みは、実行中の命令とは関係なく発生する外部からのハードウェア的な割り込みであり、例外は、命令実行に伴うエラーや違反等によって発生するアドレス例外等である。また、トラップは、プログラム中に意図的に発生させる割り込みである。シミュレーション実行時に、命令に割り込みや例外等の「外部入力要因」が発生すると、CPU10は、図7のメモリモジュール12が定義するメモリ空間の「ベクタテーブル」78から当該「外部入力要因」に対応する所定処理(EITルーチン)が予め格納された「EITルーチン空間」77の先頭アドレスを取得し、当該先頭アドレスに分岐してEITルーチンを実行する。   The “external input factor” is an input signal based on factors such as an interrupt, an exception, and a trap. An interrupt is an external hardware interrupt that occurs regardless of the instruction being executed, and an exception is an address exception that occurs due to an error or violation associated with instruction execution. A trap is an interrupt that is intentionally generated during a program. When an “external input factor” such as an interrupt or exception occurs in the instruction during the simulation, the CPU 10 corresponds to the “external input factor” from the “vector table” 78 in the memory space defined by the memory module 12 in FIG. A start address of an “EIT routine space” 77 in which predetermined processing (EIT routine) is stored in advance is acquired, and the EIT routine is executed after branching to the start address.

また、本実施の形態例における「外部入力タイミング」は、CPU10の「検証命令」のパイプライン処理における「外部入力要因」を発生させるステージであり、「検証命令フェッチタイミング」「検証命令デコードタイミング」「検証命令実行タイミング」等である。   The “external input timing” in the present embodiment is a stage for generating “external input factor” in the pipeline processing of the “verification instruction” of the CPU 10, and “verification instruction fetch timing” and “verification instruction decode timing”. “Verification instruction execution timing” or the like.

本実施の形態例におけるテストプログラムを格納するメモリモジュール12、及び、外部入力信号生成モジュール11の生成処理を図5のフローチャート図に基づいて説明する。本実施の形態例の検証シナリオ条件入力部210は、テストライブラリ214から検証シナリオ条件として、「検証命令」「検証命令アドレス」「前後命令組合せ」に加え、「外部入力要因」、「外部入力タイミング」とを受け付ける(S101)。   The generation processing of the memory module 12 for storing the test program and the external input signal generation module 11 in the present embodiment will be described based on the flowchart of FIG. The verification scenario condition input unit 210 according to the present embodiment receives “external input factor” and “external input timing” as verification scenario conditions from the test library 214 in addition to “verification instruction”, “verification instruction address”, and “previous instruction combination”. Is received (S101).

検証シナリオ条件入力部210は、選択された検証シナリオ条件が検証対象のCPU10の仕様制限に該当しない場合(S102のNO)、検証シナリオ条件判定処理として、選択した検証シナリオ条件を分割し、「検証命令」を検証命令選択処理S104へ、「前後命令組合せ」を前後命令選択処理S105へ、「検証命令アドレス」を検証命令アドレス選択処理S106へ渡すと共に、「外部入力要因」を外部入力要因選択処理S110へ、「外部入力タイミング」を外部入力タイミング選択処理S111へ渡す(S103)。   The verification scenario condition input unit 210 divides the selected verification scenario condition as a verification scenario condition determination process when the selected verification scenario condition does not correspond to the specification restriction of the CPU 10 to be verified (NO in S102). The “instruction” is passed to the verification instruction selection process S104, the “front and rear instruction combination” is passed to the front and rear instruction selection process S105, the “verification instruction address” is passed to the verification instruction address selection process S106, and the “external input factor” is passed to the external input factor selection process. The “external input timing” is passed to S110 to the external input timing selection process S111 (S103).

検証命令選択処理(S104)、前後命令選択処理(S105)、及び、テストプログラム生成処理(S107)は、第1の実施の形態例と同様である。ただし、プログラム条件判定部211は、検証命令アドレス選択処理として、「検証命令アドレス」をさらに外部入力信号パラメータ生成処理S112へ渡す(S106)。そして、外部入力信号生成部213は、外部入力要因選択処理として「外部入力要因」の識別記号に基づいて「外部入力要因」を(S110)、外部入力タイミング選択処理として「外部入力タイミング」の識別記号に基づいて「外部入力タイミング」を(S111)、テストライブラリ214から選択する。   The verification instruction selection process (S104), the preceding and following instruction selection process (S105), and the test program generation process (S107) are the same as those in the first embodiment. However, the program condition determination unit 211 further passes “verification instruction address” to the external input signal parameter generation process S112 as the verification instruction address selection process (S106). Then, the external input signal generation unit 213 identifies “external input factor” based on the identification symbol of “external input factor” as the external input factor selection processing (S110), and identifies “external input timing” as the external input timing selection processing. Based on the symbol, “external input timing” is selected from the test library 214 (S111).

続いて、外部入力信号生成部213は、「検証命令アドレス」と「外部入力要因」と「外部入力タイミング」とに基づいて、外部入力信号パラメータを生成する(S112)。外部入力信号生成部213は、生成した外部入力信号パラメータを外部入力信号生成モジュール11に記述する(S113)。   Subsequently, the external input signal generation unit 213 generates an external input signal parameter based on the “verification instruction address”, “external input factor”, and “external input timing” (S112). The external input signal generation unit 213 describes the generated external input signal parameter in the external input signal generation module 11 (S113).

図16は、「外部入力要因」が割り込みである外部入力信号生成モジュール11の一例を表す図である。同図の外部入力信号生成モジュール11は、Verilog HDLによって記述されている。ただし、外部入力信号生成モジュール11は、同図の記述に限定されるものではない。   FIG. 16 is a diagram illustrating an example of the external input signal generation module 11 whose “external input factor” is an interrupt. The external input signal generation module 11 shown in the figure is described in Verilog HDL. However, the external input signal generation module 11 is not limited to the description in FIG.

図16の記述161において、変数「int_addr」「int_stage」が定義され、「int_addr」に割り込みを発生させる「検証命令」の「検証命令アドレス」を示す値が、「int_stage」に「外部入力タイミング」を示す値が入力される。そして、図16の記述162において、シミュレーション実行中、CPU10の「int_stage(外部入力タイミング)」のステージの命令のアドレスが「int_addr(検証命令アドレス)」である場合に、割り込み信号を発生させる処理が記述されている。これにより、外部入力信号生成モジュール11は、論理検証シミュレーション実行時、「int_addr」の示す「検証命令アドレス」が「int_stage」ステージである時に、割り込み信号を生成する。   In the description 161 of FIG. 16, the variables “int_addr” and “int_stage” are defined, and the value indicating the “verification instruction address” of the “verification instruction” that generates an interrupt in “int_addr” is “external input timing” in “int_stage”. A value indicating is input. In the description 162 of FIG. 16, the process of generating an interrupt signal when the instruction address of the “int_stage (external input timing)” stage of the CPU 10 is “int_addr (verification instruction address)” during the simulation is executed. It has been described. Accordingly, the external input signal generation module 11 generates an interrupt signal when the “verification instruction address” indicated by “int_addr” is in the “int_stage” stage during the logic verification simulation.

具体的に、外部入力信号生成部213は、外部入力信号パラメータとして、「外部入力要因」に対応する変数「int_addr」に「検証命令アドレス」を示す値を、「int_stage」に「外部入力タイミング」を示す値を生成する(S112)。そして、生成した外部入力信号パラメータを「外部入力要因」に対応するモジュールに記述して、外部入力信号生成モジュール11を生成する(S113)。   Specifically, the external input signal generation unit 213 sets the value “verification instruction address” in the variable “int_addr” corresponding to “external input factor” as the external input signal parameter, and “external input timing” in “int_stage”. Is generated (S112). Then, the generated external input signal parameter is described in the module corresponding to the “external input factor” to generate the external input signal generation module 11 (S113).

このように、論理検証シナリオ生成部21は、「外部入力要因」、「検証命令アドレス」、「外部入力タイミング」に基づく外部入力信号パラメータを生成して、対応するモジュールに記述し、外部入力信号生成モジュール11を生成する。これにより、外部入力信号生成モジュール11は、論理検証シミュレーション実行時、「検証命令」の「外部入力タイミング」に「外部入力要因」を発生させることができる。   As described above, the logic verification scenario generation unit 21 generates the external input signal parameters based on the “external input factor”, “verification instruction address”, and “external input timing”, and describes them in the corresponding module. A generation module 11 is generated. As a result, the external input signal generation module 11 can generate an “external input factor” at the “external input timing” of the “verification instruction” when executing the logic verification simulation.

図17は、検証シナリオ条件に基づいて生成されたテストプログラムを格納するメモリモジュール12の一例である。同図は、図6の「検証命令」「1(ADD R1,R2)」、「検証命令アドレス」「1(0x00000100)」、「前後命令組合せ」「4((前命令)分岐処理B/(後命令)演算処理A)」、図15の「外部入力要因」「1(割り込み信号)」、「外部入力タイミング」「3(検証命令実行タイミング)」の検証シナリオ条件に基づいて生成されたテストプログラムを格納するメモリモジュール12である。具体的に、分岐処理Bは、次の命令である。
「LDI:32 (分岐先アドレス),R5」
「JMP @R5」
また、演算処理Aは、次の命令である。
「LDI:32 0x00000300,R1」
図17のテストプログラムを格納するメモリモジュール12において、「前命令空間」71に分岐処理Bが、「後命令空間」72に演算処理Aが、検証命令アドレス「0x00000100」に検証命令「ADD R1,R2」が、分岐処理Bの(分岐先アドレス)171に検証命令アドレス「0x00000100」が記憶されるように記述される。同図のテストプログラムによると、論理検証シミュレーション実行時に、CPU10は、まず前命令「LDI:32 0x00000100,R5」「JMP @R5」を実行する。「JMP @R5」が分岐命令であるため、CPU10は「@R5」の示す分岐先アドレス「0x00000100」に分岐し、続いて、検証命令「ADD R1,R2」を実行する。
FIG. 17 is an example of the memory module 12 that stores a test program generated based on the verification scenario condition. In FIG. 6, “verification instruction” “1 (ADD R1, R2)”, “verification instruction address” “1 (0x00000100)”, “preceding instruction combination” “4 ((previous instruction) branch processing B / ( Tests generated based on verification scenario conditions of “post instruction) arithmetic processing A)”, “external input factor” “1 (interrupt signal)”, “external input timing” “3 (verification instruction execution timing)” in FIG. The memory module 12 stores a program. Specifically, the branch process B is the next instruction.
“LDI: 32 (branch destination address), R5”
"JMP @ R5"
The arithmetic processing A is the next instruction.
“LDI: 32 0x00000300, R1”
In the memory module 12 storing the test program of FIG. 17, the branch processing B is in the “previous instruction space” 71, the arithmetic processing A is in the “following instruction space” 72, and the verification instruction “ADD R1, R1” is in the verification instruction address “0x00000100”. R2 ”is described so that the verification instruction address“ 0x00000100 ”is stored in the (branch destination address) 171 of the branch process B. According to the test program of FIG. 6, when executing the logic verification simulation, the CPU 10 first executes the previous instructions “LDI: 32 0x00000100, R5” and “JMP @ R5”. Since “JMP @ R5” is a branch instruction, the CPU 10 branches to the branch destination address “0x00000100” indicated by “@ R5”, and then executes the verification instruction “ADD R1, R2”.

ただし、検証命令「ADD R1,R2」には、「検証命令実行タイミング」に、外部入力信号生成モジュール11から割り込み信号が入力される。CPU10は、割り込み信号が入力されると、「ベクタテーブル」78から「EITルーチン空間」77における割り込み信号ルーチンの先頭アドレス「0x00001000」172を取得し、当該アドレスに予め格納された命令「ADD R3,R4」「RETI」を実行する。「RETI」は分岐先からの復帰命令であるため、CPU10は、分岐元に戻り、次の命令である「LDI:32 0x00000300,R1」を実行する。   However, an interrupt signal is input from the external input signal generation module 11 to the verification instruction “ADD R1, R2” at “verification instruction execution timing”. When the interrupt signal is input, the CPU 10 obtains the start address “0x00001000” 172 of the interrupt signal routine in the “EIT routine space” 77 from the “vector table” 78 and the instruction “ADD R3,” stored in advance at the address. R4 "and" RETI "are executed. Since “RETI” is a return instruction from the branch destination, the CPU 10 returns to the branch source and executes the next instruction “LDI: 32 0x00000300, R1”.

このように、論理検証シナリオ生成部21は、メモリ空間において、「外部入力要因」毎に、当該「外部入力要因」発生時に実行される命令(EITルーチン)を格納した「EITルーチン空間」77の先頭アドレスを「ベクタテーブル」78に予め格納する。これにより、テストプログラム生成部212は、「検証命令」の「外部入力タイミング」に「外部入力要因」が発生する場合のテストプログラムについても、第1の実施の形態例と同様に自動的に生成することができる。   As described above, the logic verification scenario generation unit 21 stores, for each “external input factor” in the memory space, an “EIT routine space” 77 in which an instruction (EIT routine) executed when the “external input factor” occurs is stored. The head address is stored in advance in the “vector table” 78. As a result, the test program generation unit 212 also automatically generates a test program when an “external input factor” occurs in the “external input timing” of the “verification instruction”, as in the first embodiment. can do.

引き続き、期待値生成処理について、図9のフローチャート図に基づいて説明する。期待値生成部22は、テストプログラムの開始アドレスから順に命令を読み出し(S121)、読み出した命令の要素分解処理を行う(S122)。   The expected value generation process will be described based on the flowchart of FIG. The expected value generation unit 22 reads instructions sequentially from the start address of the test program (S121), and performs element decomposition processing of the read instructions (S122).

期待値生成部22は、検証シナリオ要素分解処理として(S122、図10)、第1の実施の形態例と同様に、命令をデコードしてデコード情報を生成し、命令種別判定処理に渡す(図10のS141)。そして、期待値生成部22は、外部入力信号パラメータに基づいて、外部入力信号のEIT要因を抽出してEIT要因判定処理に渡し(図10のS142)、デコード情報とEIT要因の有無とに基づいて、命令の分岐の有無情報を生成して分岐判定処理へ渡す(図10のS143)。なお、EIT要因により分岐が発生するため、EIT要因が有の場合は分岐有となる。そして、期待値生成部22は、第1の実施の形態例と同様に、デコード情報と命令のアドレス情報とをデータ抽出処理へ渡す(図10のS144)。   As the verification scenario element decomposition process (S122, FIG. 10), the expected value generation unit 22 decodes the instruction to generate decode information, and passes it to the instruction type determination process (FIG. 10). 10 S141). Then, the expected value generation unit 22 extracts the EIT factor of the external input signal based on the external input signal parameter, passes it to the EIT factor determination process (S142 in FIG. 10), and based on the decode information and the presence / absence of the EIT factor. Thus, the presence / absence information of the instruction branch is generated and passed to the branch determination process (S143 in FIG. 10). Since a branch occurs due to an EIT factor, the branch is present when the EIT factor is present. Then, the expected value generation unit 22 delivers the decode information and the address information of the instruction to the data extraction process as in the first embodiment (S144 in FIG. 10).

図9に戻り、続いて、期待値生成部22は、第1の実施の形態例と同様に、命令種別判定処理として命令種別に対応するフォーマット番号を(S123)、分岐判定処理として分岐有の場合に分岐用のフォーマット番号を(S125)、期待値フォーマット選択処理(S127)に渡す。そして、期待値生成部22は、EIT要因判定処理として、EIT要因に対応するフォーマット番号を選択し、期待値フォーマット選択処理(S127)へ渡す(S124)。   Returning to FIG. 9, subsequently, the expected value generation unit 22 sets the format number corresponding to the instruction type as the instruction type determination process (S123) and branches as the branch determination process, as in the first embodiment. In this case, the branch format number is passed to the expected value format selection process (S127) (S125). Then, as the EIT factor determination process, the expected value generation unit 22 selects a format number corresponding to the EIT factor and passes it to the expected value format selection process (S127) (S124).

図12の期待値フォーマット「9〜11」は、EIT要因に対応する期待値フォーマットである。EIT要因に対応する期待値フォーマットには、例えば、「(9)非同期EIT」、「(10)同期EIT」「(11)ブレーク」があり、EIT要因に対応して選択される。例えば、EIT要因が「割り込み」の場合、「割り込み」は非同期EITであるため、「(9)非同期EIT」の期待値フォーマットが選択される。   The expected value format “9 to 11” in FIG. 12 is an expected value format corresponding to the EIT factor. Expected value formats corresponding to EIT factors include, for example, “(9) Asynchronous EIT”, “(10) Synchronous EIT”, and “(11) Break”, which are selected according to the EIT factor. For example, when the EIT factor is “interrupt”, since “interrupt” is an asynchronous EIT, an expected value format of “(9) Asynchronous EIT” is selected.

割り込み信号が発生すると、CPU10は、「ベクタテーブル」78から「EITルーチン空間」77の割り込みルーチンのアドレスを読み出すと共に、割り込み信号発生による分岐からの復帰情報(プログラムステータス、次命令のアドレス)を「スタック空間」75に書き込む。そのため、「(9)非同期EIT」外部入力要因用の期待値フォーマットは、1行目に、「ベクタテーブル」78から割り込みルーチンの格納アドレスを読み出す処理における「命令アドレス」、「分岐情報(固定値)」、「分岐要因(固定値)」、「EIT要因」、「CPU状態」、「アクセスアドレス」、「RW情報(固定値)」、「アクセスサイズ(固定値)」、「リードデータ」の出力信号項目を有する。   When the interrupt signal is generated, the CPU 10 reads the address of the interrupt routine in the “EIT routine space” 77 from the “vector table” 78 and also returns the return information (program status, address of the next instruction) from the branch caused by the generation of the interrupt signal. Write to the “stack space” 75. For this reason, the expected value format for “(9) Asynchronous EIT” external input factor is “Instruction address”, “Branch information (fixed value)” in the process of reading the storage address of the interrupt routine from “Vector table” 78 on the first line. ) ”,“ Branch factor (fixed value) ”,“ EIT factor ”,“ CPU state ”,“ access address ”,“ RW information (fixed value) ”,“ access size (fixed value) ”,“ read data ” Has an output signal item.

そして、「(9)非同期EIT」外部入力要因用の期待値フォーマット2〜3行目は、スタック空間に復帰情報を書き込む処理における「CPU状態」、「アクセスアドレス」、「RW情報(固定値)」、「アクセスサイズ(固定値)」、「ライトデータ」の出力信号項目を有する。   Then, “(9) Asynchronous EIT” expected value format for external input factor, the second to third lines are “CPU state”, “access address”, “RW information (fixed value)” in the process of writing the return information to the stack space. , “Access size (fixed value)”, and “write data” output signal items.

続いて、図11において(S127)、期待値生成部22は、命令種別判定処理で選択したフォーマット番号と、EIT要因判定処理で選択したフォーマット番号とに基づいて、フォーマットを選択する(S151)。具体的に、期待値生成部22は、EIT要因に対応するフォーマット番号がある場合は、命令種別ではなくEIT要因に対応するフォーマット番号の期待値フォーマットを取得する。そして、期待値生成部22は、分岐有の場合(S152のYES)、命令種別、EIT要因判定に基づく期待値フォーマットに分岐用の期待値フォーマットを付加して(S153)、期待値フォーマットを確定する(S154)。   Subsequently, in FIG. 11 (S127), the expected value generation unit 22 selects a format based on the format number selected in the instruction type determination process and the format number selected in the EIT factor determination process (S151). Specifically, when there is a format number corresponding to the EIT factor, the expected value generation unit 22 acquires the expected value format of the format number corresponding to the EIT factor instead of the instruction type. Then, when there is a branch (YES in S152), the expected value generation unit 22 adds the expected value format for branching to the expected value format based on the instruction type and EIT factor determination (S153), and determines the expected value format. (S154).

図9に戻り、期待値生成部22は、第1の実施の形態例と同様、データ抽出処理(S126)に基づく抽出データに基づいて、期待値フォーマットの出力信号項目に対応する期待値を生成する(S128、129)。   Returning to FIG. 9, the expected value generation unit 22 generates an expected value corresponding to the output signal item in the expected value format, based on the extracted data based on the data extraction process (S126), as in the first embodiment. (S128, 129).

以下、図17のテストプログラムに基づく期待値生成の具体例を述べる。なお、同図のテストプログラムにおいて、「外部入力要因」の発生しない命令に対する期待値生成処理は、第1の実施の形態例と同様である。従って、以下に「外部入力要因」の発生する検証命令「ADD R1,R2」の期待値生成処理について説明する。   A specific example of expected value generation based on the test program of FIG. 17 will be described below. In the test program of FIG. 8, the expected value generation processing for an instruction in which “external input factor” does not occur is the same as that in the first embodiment. Therefore, an expected value generation process of the verification instruction “ADD R1, R2” in which the “external input factor” is generated will be described below.

期待値生成部22は、命令「ADD R1,R2」を読み出し(S121)、検証シナリオ要素分解処理として(S122)、当該命令をデコードして、命令が「ADD」であるという情報を命令種別判定処理へ渡すと共に(図10のS141)、「外部入力要因」に基づいてEIT要因「割り込み」を抽出してEIT要因判定処理へ渡す(図10のS142)。そして、期待値生成部22は、「ADD」命令が分岐無であるものの、EIT要因「割り込み」に基づいて分岐有という情報を分岐判定処理へ渡す(図10のS143)。また、期待値生成部22は、デコード情報と命令のアドレス情報「0x00000100」とをデータ抽出処理へ渡す(図10のS144)。   The expected value generation unit 22 reads the instruction “ADD R1, R2” (S121), performs verification scenario element decomposition processing (S122), decodes the instruction, and determines that the instruction is “ADD” as an instruction type In addition to the process (S141 in FIG. 10), the EIT factor “interrupt” is extracted based on the “external input factor” and passed to the EIT factor determination process (S142 in FIG. 10). Then, the expected value generation unit 22 passes information indicating that the branch is present to the branch determination process based on the EIT factor “interrupt” although the “ADD” instruction is not branched (S143 in FIG. 10). Further, the expected value generation unit 22 passes the decode information and instruction address information “0x00000100” to the data extraction process (S144 in FIG. 10).

続いて、期待値生成部22は、「ADD」命令が演算系の命令であることを判別し、演算系の命令に対応するフォーマット番号「1」を(S123)、EIT要因「割り込み」に基づいて「(9)非同期」の期待値フォーマットのフォーマット番号「9」を(S124)、分岐有である情報に基づいて分岐用の期待値フォーマット「12」を(S125)、フォーマット選択処理に渡す。   Subsequently, the expected value generation unit 22 determines that the “ADD” instruction is an arithmetic instruction, sets the format number “1” corresponding to the arithmetic instruction (S123), and based on the EIT factor “interrupt”. Then, the format number “9” of the expected value format “(9) Asynchronous” (S124), and the expected value format “12” for branching is passed to the format selection process based on the branching presence information (S125).

そして、期待値生成部22は、図11のフローチャート図に基づいて、命令種別に対応するフォーマット番号「1」ではなく、EIT要因に対応するフォーマット番号「9」に基づいて、EIT要因に対応する期待値フォーマット「9」を選択する(S151)。また、分岐有により(S152のYES)、期待値生成部22は、期待値フォーマット記憶部221から期待値フォーマット「9」「12」を選択してフォーマットを確定する(S154)。このようにして、割り込み信号が発生する命令「ADD R1,R2」に対応する期待値フォーマットが選択される。   The expected value generation unit 22 responds to the EIT factor based on the format number “9” corresponding to the EIT factor instead of the format number “1” corresponding to the instruction type based on the flowchart of FIG. The expected value format “9” is selected (S151). If the branch is present (YES in S152), the expected value generation unit 22 selects the expected value formats “9” and “12” from the expected value format storage unit 221 to determine the format (S154). In this way, the expected value format corresponding to the instruction “ADD R1, R2” that generates the interrupt signal is selected.

図18は、図17のテストプログラムの各命令に対応する期待値フォーマットを表す図である。前述した通り、「外部入力要因」が発生する検証命令「ADD R1,R2」に対応する期待値フォーマットは「9」「12」である(l-1〜3,m)。   FIG. 18 is a diagram showing an expected value format corresponding to each instruction of the test program of FIG. As described above, the expected value formats corresponding to the verification instruction “ADD R1, R2” in which the “external input factor” is generated are “9” and “12” (l-1 to 3, m).

続いて、図19は、図17のテストプログラムに対応する期待値を表す図である。以下に、検証命令「ADD R1,R2」について、期待値を生成する処理について述べる。   Next, FIG. 19 is a diagram showing expected values corresponding to the test program of FIG. Hereinafter, a process for generating an expected value for the verification instruction “ADD R1, R2” will be described.

期待値生成部22は、命令「ADD R1,R2」のデータ抽出処理として、デコード情報に基づいて、命令「ADD」がCPUの状態を制御する命令ではないことによる初期のCPU状態「状態A」、EIT要因「割り込み」、及び命令アドレス「0x00000100」を抽出する(S126)。また、期待値生成部22は、EIT要因「割り込み」に基づいて、「ベクタテーブル」78からの割り込みルーチンの格納アドレスの読み出し処理における「アクセスアドレス」としてベクタテーブルのアドレス「0xFFFF1000」、「リードデータ」としてベクタテーブルのメモリ情報「0x0001000」を抽出する。さらに、期待値生成部22は、復帰情報のスタック空間への書き込み処理における「アクセスアドレス」として2つ分情報のスタック空間への書き込みアドレス「0x000007F8/0x000007FC」、「ライトデータ」として「PS(プログラムステータス)/次の命令アドレス(0x00000102)」を抽出する。   The expected value generation unit 22 performs, as data extraction processing for the instruction “ADD R1, R2”, based on the decode information, the initial CPU state “state A” due to the fact that the instruction “ADD” is not an instruction for controlling the state of the CPU. The EIT factor “interrupt” and the instruction address “0x00000100” are extracted (S126). Further, the expected value generation unit 22 uses the vector table address “0xFFFF1000”, “read data” as the “access address” in the read processing of the storage address of the interrupt routine from the “vector table” 78 based on the EIT factor “interrupt”. ", The vector table memory information" 0x0001000 "is extracted. Further, the expected value generation unit 22 writes “0x000007F8 / 0x000007FC” as the write address to the stack space for two information as the “access address” in the write processing of the return information to the stack space, and “PS (program) as the“ write data ”. (Status) / next instruction address (0x00000102) ”is extracted.

これにより、分岐用の期待値フォーマット(k)が合成された命令「ADD R1,R2」の期待値フォーマット(図19のk,l-1)について、「RW情報/R」「アクセスサイズ/4」、「命令アドレス/0x00000100」、「EIT要因/割り込み」「CPU状態/状態A」「アクセスアドレス/0xFFFF1000」「リードデータ/0x00001000」が期待値として生成される。また、分岐用の期待値フォーマット(k)が合成されたことにより、「分岐情報/分岐先元」、「分岐要因/命令分岐・非同期EIT」が期待値として生成される。   As a result, for the expected value format (k, l-1 in FIG. 19) of the instruction “ADD R1, R2” synthesized with the expected value format (k) for branching, “RW information / R” “access size / 4” ”,“ Instruction address / 0x00000100 ”,“ EIT factor / interrupt ”,“ CPU state / state A ”,“ access address / 0xFFFF1000 ”, and“ read data / 0x00001000 ”are generated as expected values. Further, by combining the expected value format (k) for branching, “branch information / branch destination” and “branch factor / instruction branch / asynchronous EIT” are generated as expected values.

また、命令「ADD R1,R2」の期待値フォーマット(図19のl-2,3)について、固定値「RW情報/W」「アクセスサイズ/4」に加え、「CPU状態/状態A」「アクセスアドレス/0x000007FC、0x000007F8」「ライトデータ/PS、0x00000102」が期待値として生成される。また、検証命令「ADD R1,R2」の分岐用の期待値フォーマット(m)は、次の命令「ADD R3,R4」に対応する期待値フォーマット(n)に合成される。   Further, regarding the expected value format (l-2, 3 in FIG. 19) of the instruction “ADD R1, R2”, in addition to the fixed values “RW information / W” and “access size / 4”, “CPU state / state A” “ Access address / 0x000007FC, 0x000007F8 "" Write data / PS, 0x00000102 "are generated as expected values. Further, the expected value format (m) for the branch of the verification instruction “ADD R1, R2” is synthesized into the expected value format (n) corresponding to the next instruction “ADD R3, R4”.

このようにして、期待値生成部22は、命令に対して「外部入力要因」が発生する場合、「外部入力要因」に対応する出力信号項目を有する期待値フォーマットを取得し、「外部入力要因」のEIT要因に基づいて出力信号項目に対応する期待値を生成する。また、期待値生成部22は、さらに、EIT要因に基づく予め用途別に区分されたメモリ空間のアドレス、当該アドレスに予め格納されたメモリ情報に基づいて期待値を生成する。これにより、期待値生成部22は、「外部入力要因」が発生する場合においても、CPU10がテストプログラムの各命令を実行して出力する信号を予測した期待値を生成することができる。   In this way, when an “external input factor” is generated for an instruction, the expected value generation unit 22 acquires an expected value format having an output signal item corresponding to the “external input factor”. The expected value corresponding to the output signal item is generated based on the EIT factor. In addition, the expected value generation unit 22 further generates an expected value based on the address of the memory space previously classified according to the use based on the EIT factor, and the memory information stored in advance at the address. Accordingly, the expected value generation unit 22 can generate an expected value in which a signal output by the CPU 10 executing each instruction of the test program is predicted even when an “external input factor” occurs.

また、本実施の形態例における論理検証シナリオ生成装置は、検証シナリオ条件に、「外部入力タイミング」が選択されることにより、「外部入力要因」を「検証命令」に発生させるタイミングを指定した論理検証を行うことができる。ただし、論理検証シナリオ生成装置は、「外部入力タイミング」を検証シナリオ条件に含まなくてもよい。   In addition, the logic verification scenario generation device according to the present exemplary embodiment selects a logic that specifies the timing at which the “external input factor” is generated in the “verification instruction” by selecting “external input timing” as the verification scenario condition. Verification can be performed. However, the logic verification scenario generation device may not include “external input timing” in the verification scenario condition.

また、本実施の形態例の論理検証シナリオ生成装置は、「検証命令アドレス」に「EITルーチン空間」77のアドレスを選択させてもよい。ただし、「検証命令アドレス」に「EITルーチン空間」77のアドレスが選択される場合、前命令には外部入力要因の発生する処理(割り込み処理等)が選択される必要がある。   Further, the logic verification scenario generation device according to the present embodiment may cause the “verification instruction address” to select the address of the “EIT routine space” 77. However, when the address of the “EIT routine space” 77 is selected as the “verification instruction address”, processing (interrupt processing or the like) that causes an external input factor needs to be selected as the previous instruction.

さらに、本実施の形態例における期待値フォーマットは、同じ出力信号項目を出力する命令種別毎に用意されることにより、期待値フォーマット記憶部のデータ容量が抑えられる。しかし、期待値フォーマットは、それぞれの命令、及び、外部入力信号毎に用意されてもよい。   Furthermore, the expected value format in the present embodiment is prepared for each instruction type that outputs the same output signal item, so that the data capacity of the expected value format storage unit can be suppressed. However, the expected value format may be prepared for each command and each external input signal.

なお、本実施の形態例では、図12のような出力信号項目を例示したが、出力信号項目はCPU10によって異なり、同図の例に限定されるものではない。なお、本実施の形態例における出力信号項目は、CPU10の命令サイクル完了時に出力される項目である。しかし、出力信号項目は、例えば、CPU10のクロックサイクル毎に取得される項目でもよいし、取得が有効な特定のサイクルに取得される項目でもよい。   In the present embodiment, the output signal items as illustrated in FIG. 12 are illustrated. However, the output signal items differ depending on the CPU 10 and are not limited to the example in FIG. The output signal item in the present embodiment is an item output when the instruction cycle of the CPU 10 is completed. However, the output signal item may be, for example, an item acquired every clock cycle of the CPU 10 or an item acquired in a specific cycle in which acquisition is effective.

以上の実施の形態をまとめると、次の付記のとおりである。   The above embodiment is summarized as follows.

(付記1)
RTL記述されたCPUの論理検証のためのテストプログラムを生成する論理検証シナリオ生成装置であって、
検証命令を複数有する検証命令リストと、前記検証命令の前に実行する前命令、及び後に実行する後命令の前後命令組合せを複数有する前後命令組合せリストとを格納するテストライブラリと、
前記CPUが前記命令を実行して出力するひとつまたは複数の出力信号項目を有する期待値フォーマットを格納する期待値フォーマット記憶部と、
前記検証命令を記憶するための検証命令アドレスと、前記前命令を格納する前命令空間と、前記後命令を格納する後命令空間と、前記命令がデータアクセス命令である場合のアクセス対象のデータ空間と、前記命令が分岐命令である場合の分岐先命令を格納する分岐命令空間と、前記命令が分岐後復帰命令である場合に復帰情報を格納するスタック空間とを有するメモリモジュールであって、前記テストライブラリから順次選択した前記検証命令と前記前後命令組合せとに基づいて、前記検証命令アドレスに前記検証命令を、前記前命令空間に前記前命令を、前記後命令空間に前記後命令を記憶すると共に、前記前命令が前記分岐命令である場合に前記前命令の分岐先アドレスに前記検証命令アドレスを記憶したメモリモジュールを前記テストプログラムとして生成するテストプログラム生成部と、
前記生成したテストプログラムの各命令について、当該命令に対応する前記期待値フォーマットを前記期待値フォーマット記憶部から取得し、当該命令をデコードしたデコード情報に基づいて前記出力信号項目に対応する期待値を生成する期待値生成部と、
を有することを特徴とする論理検証シナリオ生成装置。
(Appendix 1)
A logic verification scenario generation device for generating a test program for CPU logic verification described in RTL,
A test library for storing a verification instruction list having a plurality of verification instructions, a front instruction executed before the verification instruction, and a front and rear instruction combination list having a plurality of front and rear instruction combinations of subsequent instructions executed after the verification instruction;
An expected value format storage unit that stores an expected value format having one or a plurality of output signal items that the CPU executes and outputs the instructions;
A verification instruction address for storing the verification instruction, a previous instruction space for storing the previous instruction, a subsequent instruction space for storing the subsequent instruction, and a data space to be accessed when the instruction is a data access instruction A memory module having a branch instruction space for storing a branch destination instruction when the instruction is a branch instruction, and a stack space for storing return information when the instruction is a return instruction after branching, Based on the verification instruction sequentially selected from the test library and the combination of the preceding and following instructions, the verification instruction is stored in the verification instruction address, the previous instruction is stored in the previous instruction space, and the subsequent instruction is stored in the subsequent instruction space. In addition, when the previous instruction is the branch instruction, a memory module storing the verification instruction address in the branch destination address of the previous instruction is stored in the test module. And test program generation unit for generating as a program,
For each instruction of the generated test program, the expected value format corresponding to the instruction is acquired from the expected value format storage unit, and an expected value corresponding to the output signal item is obtained based on decoding information obtained by decoding the instruction. An expected value generator to generate;
A logic verification scenario generation device characterized by comprising:

(付記2)
付記1において、
前記テストライブラリは、さらに、前記検証命令アドレスを複数有する検証命令アドレスリストを格納し、
前記テストプログラム生成部は、さらに、前記テストライブラリから前記検証命令アドレスを順次選択することを特徴とする論理検証シナリオ生成装置。
(Appendix 2)
In Appendix 1,
The test library further stores a verification instruction address list having a plurality of verification instruction addresses,
The test program generation unit further selects the verification instruction address sequentially from the test library.

(付記3)
付記1または2において、
前記テストライブラリは、さらに、前記検証命令に対して発生させる外部入力信号を複数有する外部入力信号リストを格納し、
前記テストプログラム生成部は、さらに、前記外部入力信号リストの各前記外部入力信号に対応する外部入力命令を格納する外部入力命令空間と、前記外部入力命令空間における各前記外部入力信号の前記外部入力命令のアドレスを格納するベクタテーブルとを有する前記メモリモジュールをテストプログラムとして生成し、
前記論理検証シナリオ生成装置は、さらに、
前記テストライブラリから順次選択した前記外部入力信号と、前記検証命令アドレスとに基づいて、前記検証命令に対して前記外部入力信号を発生させる外部入力信号生成モジュールを生成する外部入力信号生成部を有し、
前記期待値生成部は、前記検証命令について、前記外部入力信号に対応する前記期待値フォーマットを選択し、前記外部入力信号に基づいて前記期待値を生成することを特徴とする論理検証シナリオ生成装置。
(Appendix 3)
In Appendix 1 or 2,
The test library further stores an external input signal list having a plurality of external input signals to be generated for the verification instruction,
The test program generation unit further includes an external input command space for storing an external input command corresponding to each external input signal in the external input signal list, and the external input of each external input signal in the external input command space Generating the memory module having a vector table for storing an instruction address as a test program;
The logic verification scenario generation device further includes:
An external input signal generation unit that generates an external input signal generation module that generates the external input signal in response to the verification instruction based on the external input signal sequentially selected from the test library and the verification instruction address. And
The expected value generation unit selects the expected value format corresponding to the external input signal for the verification instruction, and generates the expected value based on the external input signal. .

(付記4)
付記3において、
前記テストライブラリは、さらに、前記外部入力信号を発生させる発生タイミングを複数有する発生タイミングリストを格納し、
外部入力信号生成部は、さらに、前記テストライブラリから順次選択した前記発生タイミングに基づいて前記外部入力信号生成モジュールを生成することを特徴とする論理検証シナリオ生成装置。
(Appendix 4)
In Appendix 3,
The test library further stores a generation timing list having a plurality of generation timings for generating the external input signal,
The external input signal generation unit further generates the external input signal generation module based on the generation timing sequentially selected from the test library.

(付記5)
付記1乃至4のいずれかにおいて、
前記期待値生成部の生成する前記期待値は、さらに、前記デコード情報に基づく前記メモリモジュールのアドレス情報、及び、当該アドレス情報に格納されたメモリ情報のいずれかまたは両方であることを特徴とする論理検証シナリオ生成装置。
(Appendix 5)
In any one of supplementary notes 1 to 4,
The expected value generated by the expected value generation unit is further one or both of address information of the memory module based on the decode information and memory information stored in the address information. Logic verification scenario generator.

(付記6)
付記3または4において、
前記期待値生成部の生成する前記期待値は、さらに、前記外部入力信号に基づく前記メモリモジュールのアドレス情報、及び、当該アドレス情報に格納されたメモリ情報のいずれかまたは両方であることを特徴とする論理検証シナリオ生成装置。
(Appendix 6)
In Appendix 3 or 4,
The expected value generated by the expected value generating unit is further one or both of address information of the memory module based on the external input signal and memory information stored in the address information. A logic verification scenario generation device.

(付記7)
付記1乃至6のいずれかにおいて、
前記期待値生成部は、前記命令が分岐命令である場合、前記命令に対応する期待値フォーマットに加えて、分岐先を示す前記出力信号項目を有する分岐先期待値フォーマットを前記期待値フォーマット記憶部から取得し、当該分岐先期待値フォーマットを次命令の前記期待値フォーマットに合成して合成期待値フォーマットを生成し、前記次命令について当該合成期待値フォーマットの前記出力信号項目に対応する期待値を生成することを特徴とする論理検証シナリオ生成装置。
(Appendix 7)
In any one of supplementary notes 1 to 6,
In the case where the instruction is a branch instruction, the expected value generation unit, in addition to the expected value format corresponding to the instruction, adds a branch destination expected value format having the output signal item indicating a branch destination to the expected value format storage unit. And generating the combined expected value format by combining the branch destination expected value format with the expected value format of the next instruction, and regarding the next instruction, the expected value corresponding to the output signal item of the combined expected value format A logic verification scenario generation device characterized by generating.

(付記8)
付記1乃至7のいずれかにおいて、
前記テストライブラリの格納する前記前命令、及び、前記後命令は、ひとつまたは複数の前記命令を有することを特徴とする論理検証シナリオ生成装置。
(Appendix 8)
In any one of appendices 1 to 7,
The logic verification scenario generation device according to claim 1, wherein the pre-instruction and the post-instruction stored in the test library include one or a plurality of the instructions.

(付記9)
付記1乃至8のいずれかにおいて、
同種別の命令、または外部入力信号に対応する前記期待値フォーマットは同一であることを特徴とする論理検証シナリオ生成装置。
(Appendix 9)
In any one of appendices 1 to 8,
The logic verification scenario generation device, wherein the expected value formats corresponding to the same type of instruction or the external input signal are the same.

(付記10)
付記9において、
前記期待値の前記出力信号項目は、前記種別に基づいて予め期待値が予測される固定値と、前記デコード情報、または前記外部入力信号に基づいて期待値が生成される非固定値とを有し、
前記期待値生成部は、前記非固定値の前記出力信号項目に対応する期待値を生成することを特徴とする論理検証シナリオ生成装置。
(Appendix 10)
In Appendix 9,
The output signal item of the expected value has a fixed value in which an expected value is predicted in advance based on the type, and a non-fixed value in which an expected value is generated based on the decoding information or the external input signal. And
The expected value generation unit generates an expected value corresponding to the output signal item of the non-fixed value.

(付記11)
付記1において、
前記メモリモジュールはRTL記述されていることを特徴とする論理検証シナリオ生成装置。
(Appendix 11)
In Appendix 1,
A logic verification scenario generation device, wherein the memory module is described in RTL.

(付記12)
付記3において、
前記外部入力信号生成モジュールはRTL記述されていることを特徴とする論理検証シナリオ生成装置。
(Appendix 12)
In Appendix 3,
A logic verification scenario generation device, wherein the external input signal generation module is described in RTL.

(付記13)
RTL記述されたCPUの論理検証のためのテストプログラムを生成する論理検証シナリオ生成処理をコンピューターに実行させるコンピューター読み取り可能な論理検証シナリオ生成プログラムにおいて、
前記論理検証シナリオ生成処理は、
検証命令を複数有する検証命令リストと、前記検証命令の前に実行する前命令、及び後に実行する後命令の前後命令組合せを複数有する前後命令組合せリストとを格納するテストライブラリと、
前記CPUが前記命令を実行して出力するひとつまたは複数の出力信号項目を有する期待値フォーマットを格納する期待値フォーマット記憶部と、
前記検証命令を記憶するための検証命令アドレスと、前記前命令を格納する前命令空間と、前記後命令を格納する後命令空間と、前記命令がデータアクセス命令である場合のアクセス対象のデータ空間と、前記命令が分岐命令である場合の分岐先命令を格納する分岐命令空間と、前記命令が分岐後復帰命令である場合に復帰情報を格納するスタック空間とを有するメモリモジュールであって、前記テストライブラリから順次選択した前記検証命令と前記前後命令組合せとに基づいて、前記検証命令アドレスに前記検証命令を、前記前命令空間に前記前命令を、前記後命令空間に前記後命令を記憶すると共に、前記前命令が前記分岐命令である場合に前記前命令の分岐先アドレスに前記検証命令アドレスを記憶したメモリモジュールを前記テストプログラムとして生成するテストプログラム生成工程と、
前記生成したテストプログラムの各命令について、当該命令に対応する前記期待値フォーマットを前記期待値フォーマット記憶部から取得し、当該命令をデコードしたデコード情報に基づいて前記出力信号項目に対応する期待値を生成する期待値生成工程と、
を有することを特徴とする論理検証シナリオ生成プログラム。
(Appendix 13)
In a computer-readable logic verification scenario generation program for causing a computer to execute a logic verification scenario generation process for generating a test program for logic verification of a CPU described in RTL,
The logic verification scenario generation process includes:
A test library for storing a verification instruction list having a plurality of verification instructions, a front instruction executed before the verification instruction, and a front and rear instruction combination list having a plurality of front and rear instruction combinations of subsequent instructions executed after the verification instruction;
An expected value format storage unit that stores an expected value format having one or a plurality of output signal items that the CPU executes and outputs the instructions;
A verification instruction address for storing the verification instruction, a previous instruction space for storing the previous instruction, a subsequent instruction space for storing the subsequent instruction, and a data space to be accessed when the instruction is a data access instruction A memory module having a branch instruction space for storing a branch destination instruction when the instruction is a branch instruction, and a stack space for storing return information when the instruction is a return instruction after branching, Based on the verification instruction sequentially selected from the test library and the combination of the preceding and following instructions, the verification instruction is stored in the verification instruction address, the previous instruction is stored in the previous instruction space, and the subsequent instruction is stored in the subsequent instruction space. In addition, when the previous instruction is the branch instruction, a memory module storing the verification instruction address in the branch destination address of the previous instruction is stored in the test module. And test program generation step of generating as a program,
For each instruction of the generated test program, the expected value format corresponding to the instruction is acquired from the expected value format storage unit, and an expected value corresponding to the output signal item is obtained based on decoding information obtained by decoding the instruction. An expected value generation process to generate;
A logic verification scenario generation program characterized by comprising:

10:CPU(RTL)、11:外部入力信号生成モジュール(RTL)、12:メモリモジュール(RTL)、13:出力信号トレースモジュール(RTL)、
21:論理検証シナリオ生成部、210:検証シナリオ条件入力部、211:プログラム条件判定部、212:テストプログラム生成部、213:外部入力信号生成部、214:テストライブラリ、
22:期待値生成部、221:期待値フォーマット記憶部
10: CPU (RTL), 11: External input signal generation module (RTL), 12: Memory module (RTL), 13: Output signal trace module (RTL),
21: Logic verification scenario generation unit, 210: Verification scenario condition input unit, 211: Program condition determination unit, 212: Test program generation unit, 213: External input signal generation unit, 214: Test library,
22: Expected value generation unit, 2211: Expected value format storage unit

Claims (5)

RTL記述されたCPUの論理検証のためのテストプログラムを生成する論理検証シナリオ生成装置であって、
検証命令を複数有する検証命令リストと、前記検証命令の前に実行する前命令、及び後に実行する後命令の前後命令組合せを複数有する前後命令組合せリストとを格納するテストライブラリと、
前記CPUが前記命令を実行して出力するひとつまたは複数の出力信号項目を有する期待値フォーマットを格納する期待値フォーマット記憶部と、
前記検証命令を記憶するための検証命令アドレスと、前記前命令を格納する前命令空間と、前記後命令を格納する後命令空間と、前記命令がデータアクセス命令である場合のアクセス対象のデータ空間と、前記命令が分岐命令である場合の分岐先命令を格納する分岐命令空間と、前記命令が分岐後復帰命令である場合に復帰情報を格納するスタック空間とを有するメモリモジュールであって、前記テストライブラリから順次選択した前記検証命令と前記前後命令組合せとに基づいて、前記検証命令アドレスに前記検証命令を、前記前命令空間に前記前命令を、前記後命令空間に前記後命令を記憶すると共に、前記前命令が前記分岐命令である場合に前記前命令の分岐先アドレスに前記検証命令アドレスを記憶したメモリモジュールを前記テストプログラムとして生成するテストプログラム生成部と、
前記生成したテストプログラムの各命令について、当該命令に対応する前記期待値フォーマットを前記期待値フォーマット記憶部から取得し、当該命令をデコードしたデコード情報に基づいて前記出力信号項目に対応する期待値を生成する期待値生成部と、
を有することを特徴とする論理検証シナリオ生成装置。
A logic verification scenario generation device for generating a test program for CPU logic verification described in RTL,
A test library for storing a verification instruction list having a plurality of verification instructions, a front instruction executed before the verification instruction, and a front and rear instruction combination list having a plurality of front and rear instruction combinations of subsequent instructions executed after the verification instruction;
An expected value format storage unit that stores an expected value format having one or a plurality of output signal items that the CPU executes and outputs the instructions;
A verification instruction address for storing the verification instruction, a previous instruction space for storing the previous instruction, a subsequent instruction space for storing the subsequent instruction, and a data space to be accessed when the instruction is a data access instruction A memory module having a branch instruction space for storing a branch destination instruction when the instruction is a branch instruction, and a stack space for storing return information when the instruction is a return instruction after branching, Based on the verification instruction sequentially selected from the test library and the combination of the preceding and following instructions, the verification instruction is stored in the verification instruction address, the previous instruction is stored in the previous instruction space, and the subsequent instruction is stored in the subsequent instruction space. In addition, when the previous instruction is the branch instruction, a memory module storing the verification instruction address in the branch destination address of the previous instruction is stored in the test module. And test program generation unit for generating as a program,
For each instruction of the generated test program, the expected value format corresponding to the instruction is acquired from the expected value format storage unit, and an expected value corresponding to the output signal item is obtained based on decoding information obtained by decoding the instruction. An expected value generator to generate;
A logic verification scenario generation device characterized by comprising:
請求項1において、
前記テストライブラリは、さらに、前記検証命令アドレスを複数有する検証命令アドレスリストを格納し、
前記テストプログラム生成部は、さらに、前記テストライブラリから前記検証命令アドレスを順次選択することを特徴とする論理検証シナリオ生成装置。
In claim 1,
The test library further stores a verification instruction address list having a plurality of verification instruction addresses,
The test program generation unit further selects the verification instruction address sequentially from the test library.
請求項1または2において、
前記テストライブラリは、さらに、前記検証命令に対して発生させる外部入力信号を複数有する外部入力信号リストを格納し、
前記テストプログラム生成部は、さらに、前記外部入力信号リストの各前記外部入力信号に対応する外部入力命令を格納する外部入力命令空間と、前記外部入力命令空間における各前記外部入力信号の前記外部入力命令のアドレスを格納するベクタテーブルとを有する前記メモリモジュールをテストプログラムとして生成し、
前記論理検証シナリオ生成装置は、さらに、
前記テストライブラリから順次選択した前記外部入力信号と、前記検証命令アドレスとに基づいて、前記検証命令に対して前記外部入力信号を発生させる外部入力信号生成モジュールを生成する外部入力信号生成部を有し、
前記期待値生成部は、前記検証命令について、前記外部入力信号に対応する前記期待値フォーマットを選択し、前記外部入力信号に基づいて前記期待値を生成することを特徴とする論理検証シナリオ生成装置。
In claim 1 or 2,
The test library further stores an external input signal list having a plurality of external input signals to be generated for the verification instruction,
The test program generation unit further includes an external input command space for storing an external input command corresponding to each external input signal in the external input signal list, and the external input of each external input signal in the external input command space Generating the memory module having a vector table for storing an instruction address as a test program;
The logic verification scenario generation device further includes:
An external input signal generation unit that generates an external input signal generation module that generates the external input signal in response to the verification instruction based on the external input signal sequentially selected from the test library and the verification instruction address. And
The expected value generation unit selects the expected value format corresponding to the external input signal for the verification instruction, and generates the expected value based on the external input signal. .
請求項3において、
前記テストライブラリは、さらに、前記外部入力信号を発生させる発生タイミングを複数有する発生タイミングリストを格納し、
外部入力信号生成部は、さらに、前記テストライブラリから順次選択した前記発生タイミングに基づいて前記外部入力信号生成モジュールを生成することを特徴とする論理検証シナリオ生成装置。
In claim 3,
The test library further stores a generation timing list having a plurality of generation timings for generating the external input signal,
The external input signal generation unit further generates the external input signal generation module based on the generation timing sequentially selected from the test library.
RTL記述されたCPUの論理検証のためのテストプログラムを生成する論理検証シナリオ生成処理をコンピューターに実行させるコンピューター読み取り可能な論理検証シナリオ生成プログラムにおいて、
前記論理検証シナリオ生成処理は、
検証命令を複数有する検証命令リストと、前記検証命令の前に実行する前命令、及び後に実行する後命令の前後命令組合せを複数有する前後命令組合せリストとを格納するテストライブラリと、
前記CPUが前記命令を実行して出力するひとつまたは複数の出力信号項目を有する期待値フォーマットを格納する期待値フォーマット記憶部と、
前記検証命令を記憶するための検証命令アドレスと、前記前命令を格納する前命令空間と、前記後命令を格納する後命令空間と、前記命令がデータアクセス命令である場合のアクセス対象のデータ空間と、前記命令が分岐命令である場合の分岐先命令を格納する分岐命令空間と、前記命令が分岐後復帰命令である場合に復帰情報を格納するスタック空間とを有するメモリモジュールであって、前記テストライブラリから順次選択した前記検証命令と前記前後命令組合せとに基づいて、前記検証命令アドレスに前記検証命令を、前記前命令空間に前記前命令を、前記後命令空間に前記後命令を記憶すると共に、前記前命令が前記分岐命令である場合に前記前命令の分岐先アドレスに前記検証命令アドレスを記憶したメモリモジュールを前記テストプログラムとして生成するテストプログラム生成工程と、
前記生成したテストプログラムの各命令について、当該命令に対応する前記期待値フォーマットを前記期待値フォーマット記憶部から取得し、当該命令をデコードしたデコード情報に基づいて前記出力信号項目に対応する期待値を生成する期待値生成工程と、
を有することを特徴とする論理検証シナリオ生成プログラム。
In a computer-readable logic verification scenario generation program for causing a computer to execute a logic verification scenario generation process for generating a test program for logic verification of a CPU described in RTL,
The logic verification scenario generation process includes:
A test library for storing a verification instruction list having a plurality of verification instructions, a front instruction executed before the verification instruction, and a front and rear instruction combination list having a plurality of front and rear instruction combinations of subsequent instructions executed after the verification instruction;
An expected value format storage unit that stores an expected value format having one or a plurality of output signal items that the CPU executes and outputs the instructions;
A verification instruction address for storing the verification instruction, a previous instruction space for storing the previous instruction, a subsequent instruction space for storing the subsequent instruction, and a data space to be accessed when the instruction is a data access instruction A memory module having a branch instruction space for storing a branch destination instruction when the instruction is a branch instruction, and a stack space for storing return information when the instruction is a return instruction after branching, Based on the verification instruction sequentially selected from the test library and the combination of the preceding and following instructions, the verification instruction is stored in the verification instruction address, the previous instruction is stored in the previous instruction space, and the subsequent instruction is stored in the subsequent instruction space. In addition, when the previous instruction is the branch instruction, a memory module storing the verification instruction address in the branch destination address of the previous instruction is stored in the test module. And test program generation step of generating as a program,
For each instruction of the generated test program, the expected value format corresponding to the instruction is acquired from the expected value format storage unit, and an expected value corresponding to the output signal item is obtained based on decoding information obtained by decoding the instruction. An expected value generation process to generate;
A logic verification scenario generation program characterized by comprising:
JP2010149501A 2010-06-30 2010-06-30 Logic verification scenario generation device and logic verification scenario generation program Expired - Fee Related JP5387521B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010149501A JP5387521B2 (en) 2010-06-30 2010-06-30 Logic verification scenario generation device and logic verification scenario generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010149501A JP5387521B2 (en) 2010-06-30 2010-06-30 Logic verification scenario generation device and logic verification scenario generation program

Publications (2)

Publication Number Publication Date
JP2012014364A JP2012014364A (en) 2012-01-19
JP5387521B2 true JP5387521B2 (en) 2014-01-15

Family

ID=45600733

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010149501A Expired - Fee Related JP5387521B2 (en) 2010-06-30 2010-06-30 Logic verification scenario generation device and logic verification scenario generation program

Country Status (1)

Country Link
JP (1) JP5387521B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6451989B2 (en) * 2015-03-31 2019-01-16 日本電気株式会社 Information processing apparatus, information processing method, and information processing program
CN112214366B (en) * 2020-09-24 2023-07-28 深圳云天励飞技术股份有限公司 Test method, device, system, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07182202A (en) * 1993-12-24 1995-07-21 Hitachi Ltd Cpu logical simulation system

Also Published As

Publication number Publication date
JP2012014364A (en) 2012-01-19

Similar Documents

Publication Publication Date Title
US6915416B2 (en) Apparatus and method for microcontroller debugging
Thacker et al. Automatic abstraction for verification of cyber-physical systems
US9928150B2 (en) System and method for testing a logic-based processing device
JP5065113B2 (en) Equivalence verification method, equivalence verification program, and equivalence verification program generation method
US8707102B2 (en) Method and program for verifying operation of processor
Herdt et al. Efficient cross-level testing for processor verification: A RISC-V case-study
US10642678B1 (en) PCI/PCIe-non-compliance-vulnerability detection apparatus and method
JP4147842B2 (en) Logic verification system and method, logic cone extraction apparatus and method, logic verification and logic cone extraction program
US20130024178A1 (en) Playback methodology for verification components
CN117094269B (en) Verification method, verification device, electronic equipment and readable storage medium
JP5387521B2 (en) Logic verification scenario generation device and logic verification scenario generation program
US8886512B2 (en) Simulation apparatus, computer-readable recording medium, and method
JP6249827B2 (en) Simulation apparatus and simulation program
JP6667733B2 (en) Simulation apparatus, simulation method, and simulation program
JP2005108007A (en) Lsi design verification apparatus and lsi design verification method
JP6318976B2 (en) DEBUG CIRCUIT, DEBUGGER DEVICE, SEMICONDUCTOR DEVICE, AND DEBUG METHOD
JP6473023B2 (en) Performance evaluation module and semiconductor integrated circuit incorporating the same
JP5120103B2 (en) Debugging method and debugging program
CN117313595B (en) Random instruction generation method, equipment and system for function verification
JP5469106B2 (en) Computer system, test apparatus, test method, and test program
JPH07253909A (en) Microprogram verifying method
JP2012033091A (en) Semiconductor circuit and test method for the same
JP4893028B2 (en) Chipset emulation apparatus and method
JP2011258124A (en) Debug circuit and debug system
JP2009217720A (en) Program generating device and program generating method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130228

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130905

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130923

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees