JP2003345855A - Coverage measuring method and apparatus therefor - Google Patents

Coverage measuring method and apparatus therefor

Info

Publication number
JP2003345855A
JP2003345855A JP2002155041A JP2002155041A JP2003345855A JP 2003345855 A JP2003345855 A JP 2003345855A JP 2002155041 A JP2002155041 A JP 2002155041A JP 2002155041 A JP2002155041 A JP 2002155041A JP 2003345855 A JP2003345855 A JP 2003345855A
Authority
JP
Japan
Prior art keywords
coverage
matrix table
combination
test inputs
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002155041A
Other languages
Japanese (ja)
Inventor
Kenji Kiyose
健司 清瀬
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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP2002155041A priority Critical patent/JP2003345855A/en
Publication of JP2003345855A publication Critical patent/JP2003345855A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a coverage measuring method and an apparatus therefor which can measure a coverage regarding a combination of a plurality of test inputs given in time series. <P>SOLUTION: A definition table 20 in which the plurality of test inputs given in time series are defined and an event detecting operation description 22 including a coverage matrix table 22 are generated. The coverage matrix table 22 consists of a plurality of array elements corresponding to the combination of the plurality of test inputs. The event detecting operation description 22 after initializing the coverage matrix table 22 detects the combination of the test inputs, increases array elements corresponding to the detected combination, and counts its detection frequency. Then a coverage is calculated according to the updated coverage matrix table 22. <P>COPYRIGHT: (C)2004,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、カバレージ測定方
法及びその装置に関し、さらに詳しくは、時系列的に与
えられた複数のテスト入力に応じて、所定の言語で記述
された論理回路のシミュレーションを実行する論理シミ
ュレータを用いたカバレージ測定方法及びその装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for measuring coverage, and more particularly, to a simulation of a logic circuit described in a predetermined language in response to a plurality of test inputs given in time series. The present invention relates to a method and an apparatus for measuring a coverage using a logic simulator to be executed.

【0002】[0002]

【従来の技術】HDL(ハードウェア記述言語)による
論理回路の設計が一般化する中で、さまざまなコードカ
バレージツールがEDA(Electronic Design Automatio
n)ベンダから提供されている。その中でも、VHDLや
Verilog−HDLで記述された論理回路用のコードカバ
レージツールは、テストパターンを入力してシミュレー
ションを実行し、HDLの各ステートメントは活性化さ
れたか(コードカバレージ)と、HDLにおける分岐は
全て網羅されたか(パスカバレージ)とを評価する。こ
れらは全て、現在のDUT(Design Under Test)が入力
テストパターンに応じてどのように動作しているかを評
価するものである。
2. Description of the Related Art With the generalization of logic circuit design using HDL (Hardware Description Language), various code coverage tools are being used by EDA (Electronic Design Automation).
n) Provided by the vendor. Among them, VHDL and
The code coverage tool for a logic circuit described in Verilog-HDL executes a simulation by inputting a test pattern, and whether each statement in HDL is activated (code coverage) and whether all branches in HDL are covered. (Pasca coverage) and evaluate. These are all for evaluating how a current DUT (Design Under Test) operates according to an input test pattern.

【0003】図7に、HDL記述の一例を示す。この例
では、5つのステートメントST1〜ST5がある。こ
こで、X=1とすると、パスP1及びP2のうちパスP
1が活性化されるので、パスカバレージは50%(=1
/2)になる。また、5つのステートメントのうち3つ
のステートメントST1〜ST3が活性化されるので、
コードカバレージは60%(=3/5)になる。
FIG. 7 shows an example of an HDL description. In this example, there are five statements ST1 to ST5. Here, assuming that X = 1, the path P among the paths P1 and P2
1 is activated, the pass coverage is 50% (= 1
/ 2). Also, since three statements ST1 to ST3 of the five statements are activated,
Code coverage is 60% (==).

【0004】上記と同様の方法は、特開平8−1800
83号公報に開示されている。この方法は、予め規定さ
れた論理回路の事象(たとえばステートマシン等)がど
のような頻度で発生したかを検証するものである。
A method similar to the above is disclosed in Japanese Patent Laid-Open No.
No. 83 is disclosed. This method verifies how frequently an event (for example, a state machine) of a predetermined logic circuit has occurred.

【0005】その他、検証ツールと呼ばれる最近のED
Aツールの中には、複数のステートマシンの状態の組合
せが網羅されているかを検証可能なカバレージツールも
ある。以下、その一例を図8〜図10を参照して説明す
る。
In addition, a recent ED called a verification tool
Among the A tools, there is a coverage tool that can verify whether a combination of states of a plurality of state machines is covered. Hereinafter, an example thereof will be described with reference to FIGS.

【0006】図8はステートマシン1の状態遷移図を示
し、図9はステートマシン2の状態遷移図を示す。図8
に示すように、ステートマシン1は「0」〜「3」の4
つの状態を有する。図9に示すように、ステートマシン
2は「0」〜「4」の5つの状態を有する。図中、矢印
は状態の遷移方向を示す。
FIG. 8 shows a state transition diagram of the state machine 1, and FIG. 9 shows a state transition diagram of the state machine 2. FIG.
As shown in the figure, the state machine 1 has four “0” to “3”.
It has two states. As shown in FIG. 9, the state machine 2 has five states “0” to “4”. In the figure, arrows indicate the direction of state transition.

【0007】図10に、検証ツールによる検証結果を示
す。たとえば、ステートマシン1の状態が「0」になり
かつステートマシン2の状態が「0」になる場合は3回
起こり、ステートマシン1の状態が「0」になりかつス
テートマシン2の状態が「1」になる場合は5回起こっ
ているが、ステートマシン1の状態が「0」になりかつ
ステートマシン2の状態が「2」になる場合は1回も起
こっていない。
FIG. 10 shows the result of verification by the verification tool. For example, when the state of the state machine 1 becomes “0” and the state of the state machine 2 becomes “0”, it occurs three times, and the state of the state machine 1 becomes “0” and the state of the state machine 2 becomes “0”. When it becomes "1", it has happened five times, but when the state of the state machine 1 becomes "0" and the state of the state machine 2 becomes "2", it has never occurred.

【0008】[0008]

【発明が解決しようとする課題】上記のような従来のカ
バレージツールを用いれば、論理回路の不具合を検出す
ることは可能であるが、全ての不具合を検出することは
不可能である。従来のカバレージツールはいずれも、あ
る時刻のテスト入力に応じてシミュレーションを実行
し、そのとき発生する不具合を検出しているに過ぎず、
テスト入力の時系列的な組合せを考慮していないからで
ある。時間的に異なる複数の入力の組合せにより発生す
る不具合の1つとして、マイクロコントローラのパイプ
ライン動作におけるデータハザードを挙げることができ
る。以下、その一例を図11及び図12を参照して説明
する。
When the conventional coverage tool as described above is used, it is possible to detect a fault in a logic circuit, but it is impossible to detect all faults. All of the conventional coverage tools execute simulations in response to test inputs at a certain time, and only detect defects that occur at that time.
This is because time series combinations of test inputs are not considered. One of the problems caused by a combination of a plurality of inputs that differ in time is a data hazard in a pipeline operation of a microcontroller. Hereinafter, an example thereof will be described with reference to FIGS.

【0009】図11及び図12に示したパイプライン動
作は、デコード、読出、実行及び書込の4つのステージ
から構成される。したがって、各命令はこれら4つのス
テージで処理される。
The pipeline operation shown in FIGS. 11 and 12 includes four stages of decoding, reading, executing, and writing. Therefore, each instruction is processed in these four stages.

【0010】命令「ADD R1,R2」は、レジスタ
R1の値にレジスタR2の値を加算し、その結果をレジ
スタR1に格納することを意味する。命令「SUB R
1,R2」は、レジスタR1の値からレジスタR2の値
を減算し、その結果をレジスタR1に格納することを意
味する。命令「NOP」は、何も処理しないことを意味
する。
The instruction "ADD R1, R2" means that the value of the register R2 is added to the value of the register R1, and the result is stored in the register R1. The instruction "SUB R
"1, R2" means that the value of the register R2 is subtracted from the value of the register R1, and the result is stored in the register R1. The instruction "NOP" means that nothing is processed.

【0011】図11はデータハザードが発生する場合を
示し、図12はデータハザードが発生しない場合を示
す。
FIG. 11 shows a case where a data hazard occurs, and FIG. 12 shows a case where a data hazard does not occur.

【0012】図11の場合、命令「ADD R1,R
2」、命令「SUB R1,R2」、命令「NOP」、
命令「NOP」の順に処理する。この場合、サイクルT
+1では、命令「SUB R1,R2」を処理するため
に、レジスタR1で読出が行われる。その後、サイクル
T+2では、命令「ADD R1,R2」を処理するた
めに、レジスタR1で書込が行われる。すなわち、加算
結果をレジスタR1に書き込んだ後、レジスタR1から
加算結果を読み出して減算を行わなければならないにも
かかわらず、レジスタR1では、減算のための読出が行
われた後に加算結果の書込が行われている。このような
不具合がパイプライン動作におけるデータハザードであ
る。
In the case of FIG. 11, the instruction "ADD R1, R
2 ", the instruction" SUB R1, R2 ", the instruction" NOP ",
Processing is performed in the order of the instruction “NOP”. In this case, the cycle T
At +1, reading is performed in the register R1 in order to process the instruction “SUB R1, R2”. Thereafter, in cycle T + 2, writing is performed in the register R1 in order to process the instruction “ADD R1, R2”. That is, although the addition result must be read from the register R1 after the addition result is written into the register R1, the addition result is written in the register R1 after the reading for the subtraction is performed. Has been done. Such a defect is a data hazard in the pipeline operation.

【0013】一方、図12の場合、命令「ADD R
1,R2」、命令「NOP」、命令「NOP」、命令
「SUB R1,R2」の順に処理する。この場合、サ
イクルT+2では、命令「ADD R1,R2」を処理
するために、レジスタR1で書込が行われる。その後、
サイクルT+3では、命令「SUB R1,R2」を処
理するために、レジスタR1で読出が行われる。すなわ
ち、加算結果をレジスタR1に書き込んだ後、レジスタ
R1から加算結果を読み出している。したがって、上記
のようなデータハザードは発生しない。
On the other hand, in the case of FIG.
1, R2 ", the command" NOP ", the command" NOP ", and the command" SUB R1, R2 ". In this case, in cycle T + 2, writing is performed in the register R1 in order to process the instruction “ADD R1, R2”. afterwards,
In cycle T + 3, reading is performed in the register R1 in order to process the instruction “SUB R1, R2”. That is, after the addition result is written to the register R1, the addition result is read from the register R1. Therefore, the above-mentioned data hazard does not occur.

【0014】従来のコードカバレージツールは、図11
の場合でも図12の場合でも同じ検証結果しか得ること
ができないため、図11の場合に発生するデータハザー
ドを検出することができない。
FIG. 11 shows a conventional code coverage tool.
In either case or FIG. 12, only the same verification result can be obtained, so that the data hazard generated in the case of FIG. 11 cannot be detected.

【0015】本発明の主たる目的は、テスト入力の時系
列的な組合せを考慮したカバレージ測定方法及びその装
置を提供することである。
A main object of the present invention is to provide a method and an apparatus for measuring coverage in consideration of a time-series combination of test inputs.

【0016】本発明の具体的な目的は、論理回路がどの
ように動作したかを測定するだけでなく、テスト入力が
時系列的にどのように与えられたかも測定することが可
能なカバレージ測定方法及びその装置を提供することで
ある。
A specific object of the present invention is to provide a coverage measurement which can measure not only how a logic circuit operates but also how a test input is given in time series. A method and apparatus are provided.

【0017】[0017]

【課題を解決するための手段】本発明によるカバレージ
測定方法は、時系列的に与えられた複数のテスト入力に
応じて、所定の言語で記述された論理回路のシミュレー
ションを実行する論理シミュレータを用いたカバレージ
測定方法であって、検出ステップと、カウントステップ
とを含むことを特徴とする。検出ステップは、テスト入
力の組合せを検出する。カウントステップは、検出した
テスト入力の組合せの検出回数をカウントする。
SUMMARY OF THE INVENTION A coverage measuring method according to the present invention uses a logic simulator for executing a simulation of a logic circuit described in a predetermined language in response to a plurality of test inputs given in time series. A coverage measuring method, comprising a detecting step and a counting step. The detecting step detects a combination of test inputs. The counting step counts the number of times the combination of the detected test inputs is detected.

【0018】本発明によるカバレージ測定装置は、時系
列的に与えられた複数のテスト入力に応じて、所定の言
語で記述された論理回路のシミュレーションを実行する
論理シミュレータを用いたカバレージ測定装置であっ
て、検出手段と、カウント手段とを含むことを特徴とす
る。検出手段は、テスト入力の組合せを検出する。カウ
ント手段は、検出手段により検出されたテスト入力の組
合せの検出回数をカウントする。
A coverage measuring apparatus according to the present invention is a coverage measuring apparatus using a logic simulator for executing a simulation of a logic circuit described in a predetermined language in response to a plurality of test inputs given in time series. And detecting means and counting means. The detecting means detects a combination of test inputs. The counting means counts the number of times the combination of test inputs detected by the detecting means is detected.

【0019】本発明によるカバレージ測定プログラム
は、上記ステップをコンピュータに実行させるためのも
のであり、本発明によるコンピュータ読み取り可能な記
憶媒体は、上記カバレージ測定プログラムを記憶したも
のである。
A coverage measurement program according to the present invention causes a computer to execute the above steps, and a computer readable storage medium according to the present invention stores the coverage measurement program.

【0020】本発明によれば、時系列的に与えられる複
数のテスト入力の組合せを検出し、その検出回数をカウ
ントするようにしているため、テスト入力の時系列的な
組合せに関するカバレージを測定することができ、その
結果、従来のカバレージツールでは検出不可能であった
不具合(パイプラインにおけるデータハザード等)も検
出可能になる。
According to the present invention, a combination of a plurality of test inputs given in time series is detected and the number of times of detection is counted, so that the coverage of the time series combination of test inputs is measured. As a result, a defect (a data hazard or the like in a pipeline) that cannot be detected by the conventional coverage tool can be detected.

【0021】[0021]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して詳しく説明する。図中同一又は相当部分には
同一符号を付してその説明を援用する。
Embodiments of the present invention will be described below in detail with reference to the drawings. In the drawings, the same or corresponding parts have the same reference characters allotted, and description thereof will be referred to.

【0022】図1は、本発明の実施の形態によるカバレ
ージ測定システムの全体構成を示すブロック図である。
図1を参照して、本カバレージ測定システム10は、従
来と同様に、RTL(Register Transfer Level)で記述
されたDUT12のシミュレーションをテストベクタ1
4を用いて実行し、その結果、波形データ16を出力す
る論理シミュレータ18を備える。
FIG. 1 is a block diagram showing an overall configuration of a coverage measuring system according to an embodiment of the present invention.
With reference to FIG. 1, a coverage measurement system 10 performs a simulation of a DUT 12 described in RTL (Register Transfer Level) in a test vector
4 and a logic simulator 18 for outputting waveform data 16 as a result.

【0023】論理シミュレータ18は、HDLで記述さ
れた論理回路の動作を検証するためのプログラムにより
構成され、このプログラムはコンピュータ(図示せず)
にインストールされる。DUT12、テストベクタ14
及び波形データ16は、コンピュータの記憶装置に格納
される。
The logic simulator 18 is composed of a program for verifying the operation of a logic circuit described in HDL, and this program is a computer (not shown).
Installed in DUT 12, test vector 14
And the waveform data 16 are stored in a storage device of the computer.

【0024】本カバレージ測定システム10はさらに、
定義テーブル20と、カバレージマトリクステーブル2
2を含むイベント検出動作記述24とを用いる。これら
は利用者により作成され、コンピュータの記憶装置に格
納される。
The coverage measurement system 10 further includes
Definition table 20 and coverage matrix table 2
2 is used. These are created by the user and stored in the storage device of the computer.

【0025】図2に、定義テーブル20の一例を示す。
定義テーブル20は、検証対象とするテスト入力を定義
するものであるが、ここでは特に、互いに異なる複数の
時刻におけるテスト入力を定義する。全てのテスト入力
を定義してもよいが、一部のテスト入力を定義してもよ
い。ここで定義されたテスト入力は、テストベクタ14
として論理シミュレータ18に与えられる。
FIG. 2 shows an example of the definition table 20.
The definition table 20 defines a test input to be verified. In this case, particularly, the test input at a plurality of different times is defined. All test inputs may be defined, or some test inputs may be defined. The test input defined here is the test vector 14
Is given to the logic simulator 18.

【0026】図2に示した例では、現サイクルTにおけ
る4通りのテスト入力と、その1つ前のサイクルT−1
における4通りのテスト入力とを定義し、検証対象とし
ている。
In the example shown in FIG. 2, four test inputs in the current cycle T and the immediately preceding cycle T-1
And the four types of test inputs are defined and verified.

【0027】ここで、現サイクルTにおける入力パター
ンは、1つ前のサイクルT−1における入力パターンと
同じである。「STORE R0」は、レジスタR0に
値を格納する命令である。「LOAD R0」は、レジ
スタR0の値を読み出す命令である。「ADD R0,
R1」は、レジスタR0の値にレジスタR1の値を加算
し、その結果をレジスタR0に格納する命令である。
「SUB R0,R1」は、レジスタR0の値からレジ
スタR1の値を減算し、その結果をレジスタR0に格納
する命令である。
Here, the input pattern in the current cycle T is the same as the input pattern in the immediately preceding cycle T-1. “STORE R0” is an instruction to store a value in the register R0. “LOAD R0” is an instruction to read the value of the register R0. "ADD R0,
"R1" is an instruction for adding the value of the register R1 to the value of the register R0 and storing the result in the register R0.
“SUB R0, R1” is an instruction for subtracting the value of the register R1 from the value of the register R0 and storing the result in the register R0.

【0028】図3に、初期のカバレージマトリクステー
ブル22の一例を示す。カバレージマトリクステーブル
22は、定義テーブル20で定義された複数の時刻にお
けるテスト入力の組合せに対応する複数の配列要素CT
_x_y(x=0〜3,y=0〜3)を含む。配列要素
CT_x_y(x=0〜3,y=0〜3)の各々は、対
応するテスト入力の組合せの発生頻度を示す。
FIG. 3 shows an example of the initial coverage matrix table 22. The coverage matrix table 22 includes a plurality of array elements CT corresponding to combinations of test inputs at a plurality of times defined in the definition table 20.
_X_y (x = 0 to 3, y = 0 to 3). Each of array elements CT_x_y (x = 0 to 3, y = 0 to 3) indicates the frequency of occurrence of the corresponding test input combination.

【0029】この例では、サイクルTにおける4通りの
テスト入力と、サイクルT−1における4通りのテスト
入力とを検証対象としているから、カバレージマトリク
ステーブル22は、16(=4×4)の配列要素CT_
x_y(x=0〜3,y=0〜3)を含む。また、配列
要素CT_x_y(x=0〜3,y=0〜3)の各々
は、イベント検出動作記述24により「0」に初期化さ
れる。
In this example, since four test inputs in cycle T and four test inputs in cycle T-1 are to be verified, the coverage matrix table 22 has a 16 (= 4 × 4) array. Element CT_
x_y (x = 0 to 3, y = 0 to 3). Further, each of the array elements CT_x_y (x = 0 to 3, y = 0 to 3) is initialized to “0” by the event detection operation description 24.

【0030】図4に、イベント検出動作記述24の一例
を示す。イベント検出動作記述24は、カバレージマト
リクステーブル22用の配列要素CT_x_y(x=0
〜3,y=0〜3)の定義と、テスト入力(テストベク
タ)の定義と、カバレージマトリクステーブル22の初
期化動作と、テスト入力の組合せ(以下、単に「イベン
ト」ともいう。)の検出動作とを、Verilog−HDLで
記述したものである。以下、イベント検出動作記述24
をより具体的に説明する。
FIG. 4 shows an example of the event detection operation description 24. The event detection operation description 24 includes an array element CT_x_y (x = 0) for the coverage matrix table 22.
, Y = 0 to 3), the definition of a test input (test vector), the initialization operation of the coverage matrix table 22, and the detection of a combination of test inputs (hereinafter, also simply referred to as “event”). The operation is described in Verilog-HDL. Hereinafter, the event detection operation description 24
Will be described more specifically.

【0031】ルーチン(a)では、図2に示した定義テ
ーブル20に基づいて、カバレージマトリクステーブル
22用の配列要素CT_x_y(x=0〜3,y=0〜
3)の定義と、テスト入力OP及びOP−1の定義とを
記述する。「reg[7:0]」は、配列要素CT_x
_y(x=0〜3,y=0〜3)の各々を8ビットの変
数と定義する。「reg[31:0]」は、サイクルT
におけるテスト入力OPと、サイクルT−1におけるテ
スト入力OP−1とをそれぞれ32ビットの変数と定義
する。
In the routine (a), array elements CT_x_y (x = 0 to 3, y = 0 to 0) for the coverage matrix table 22 based on the definition table 20 shown in FIG.
The definition of 3) and the definitions of the test inputs OP and OP-1 are described. “Reg [7: 0]” is an array element CT_x
Each of _y (x = 0 to 3, y = 0 to 3) is defined as an 8-bit variable. “Reg [31: 0]” corresponds to cycle T
And the test input OP-1 in the cycle T-1 are defined as 32-bit variables.

【0032】ルーチン(b)では、配列要素CT_x_
y(x=0〜3,y=0〜3)をそれぞれ「00(16
進数)」(=「00000000(2進数)」)に設定
する旨を記述する。これにより、図3に示したように、
カバレージマトリクステーブル22が初期化されること
になる。
In the routine (b), the array element CT_x_
y (x = 0 to 3, y = 0 to 3) are respectively set to “00 (16
Base number) "(=" 00000000 (binary number) "). Thereby, as shown in FIG.
The coverage matrix table 22 will be initialized.

【0033】ルーチン(c)では、テスト入力OP及び
OP−1の組合せ(イベント)を検出し、検出したイベ
ントに対応する配列要素CT_x_y(x=0〜3,y
=0〜3)をインクリメントする旨を記述する。具体的
には、イベントを検出し、そのイベントの発生回数をカ
ウントする旨を記述する。これにより、たとえば、サイ
クルTにおけるテスト入力OPが「STORE」であ
り、かつ、サイクルT−1におけるテスト入力OP−1
が「STORE」であれば、そのイベントに対応する配
列要素CT_0_0がインクリメントされることにな
る。また、サイクルTにおけるテスト入力OPが「ST
ORE」であり、かつ、サイクルT−1におけるテスト
入力OP−1が「LOAD」であれば、そのイベントに
対応する配列要素CT_1_0がインクリメントされる
ことになる。
In the routine (c), a combination (event) of the test inputs OP and OP-1 is detected, and an array element CT_x_y (x = 0 to 3, y) corresponding to the detected event is detected.
= 0 to 3) is described. Specifically, it describes that an event is detected and the number of occurrences of the event is counted. Thus, for example, test input OP in cycle T is “STORE” and test input OP-1 in cycle T-1
Is "STORE", the array element CT_0_0 corresponding to the event is incremented. Further, the test input OP in the cycle T is “ST
If it is "ORE" and the test input OP-1 in the cycle T-1 is "LOAD", the array element CT_1_0 corresponding to the event is incremented.

【0034】次に、上述したカバレージ測定装置の動作
を説明する。
Next, the operation of the above-described coverage measuring device will be described.

【0035】まず、検証対象のDUT12及びテストベ
クタ14が論理シミュレータ18に与えられる。ここで
は、図2に示した定義テーブル20のテスト入力がテス
トベクタ14として与えられる。また、図4に示したイ
ベント検出動作記述24も論理シミュレータ18に与え
られる。その結果、カバレージ測定装置は以下のように
動作する。
First, the DUT 12 to be verified and the test vector 14 are given to the logic simulator 18. Here, the test input of the definition table 20 shown in FIG. Further, the event detection operation description 24 shown in FIG. As a result, the coverage measurement device operates as follows.

【0036】図5は、コンピュータを本実施の形態によ
るカバレージ測定装置として機能させるためのカバレー
ジ測定プログラムを示すフローチャートである。図5を
参照して、論理シミュレータ18は、与えられたイベン
ト検出動作記述24のルーチン(a)に従って、カバレ
ージマトリクステーブル22の配列要素CT_x_y
(x=0〜3,y=0〜3)を定義し(S1)、さらに
テスト入力OP及びOP−1を定義する(S2)。
FIG. 5 is a flowchart showing a coverage measurement program for causing a computer to function as the coverage measurement device according to the present embodiment. Referring to FIG. 5, logic simulator 18 performs array element CT_x_y of coverage matrix table 22 in accordance with the given event detection operation description 24 routine (a).
(X = 0-3, y = 0-3) are defined (S1), and test inputs OP and OP-1 are further defined (S2).

【0037】続いて、論理シミュレータ18は、与えら
れたイベント検出動作記述24のルーチン(b)に従っ
て、カバレージマトリクステーブル22の配列要素CT
_x_y(x=0〜3,y=0〜3)を「0」に初期化
する(S3)。このとき、全ての配列要素CT_x_y
(x=0〜3,y=0〜3)は「0」になるから、カバ
レージは0%(=0/16)になる。
Subsequently, the logic simulator 18 determines the array element CT of the coverage matrix table 22 in accordance with the given event detection operation description routine 24 (b).
_X_y (x = 0 to 3, y = 0 to 3) is initialized to “0” (S3). At this time, all array elements CT_x_y
Since (x = 0 to 3, y = 0 to 3) becomes “0”, the coverage becomes 0% (= 0/16).

【0038】続いて、論理シミュレータ18は、与えら
れたテストベクタ14(テスト入力)に応じて、DUT
12のシミュレーションを開始する(S4)。
Subsequently, the logic simulator 18 generates a DUT according to the given test vector 14 (test input).
The simulation of No. 12 is started (S4).

【0039】続いて、論理シミュレータ18は、与えら
れたイベント検出動作記述24のルーチン(c)に従っ
て、与えられたテスト入力の組合せ(イベント)を検出
する(S5)。所定のイベントを検出した場合は、その
イベントに対応する配列要素CT_x_y(x=0〜
3,y=0〜3)をインクリメントする。一方、イベン
トを検出しない場合は、ステップS7をスキップし、ス
テップS8に進む。シミュレーションの実行中は、上記
ステップS5〜S7が繰り返され(S8)、これにより
カバレージマトリクステーブル22が更新される。
Subsequently, the logic simulator 18 detects the given combination (event) of the test input according to the routine (c) of the given event detection operation description 24 (S5). When a predetermined event is detected, an array element CT_x_y (x = 0 to 0) corresponding to the event is detected.
3, y = 0-3) is incremented. On the other hand, if no event is detected, the process skips step S7 and proceeds to step S8. During execution of the simulation, the above steps S5 to S7 are repeated (S8), whereby the coverage matrix table 22 is updated.

【0040】シミュレーションが終了すると、論理シミ
ュレータ18は、更新したカバレージマトリクステーブ
ル22を出力する(S9)。図6に、更新したカバレー
ジマトリクステーブル22の一例を示す。
When the simulation is completed, the logic simulator 18 outputs the updated coverage matrix table 22 (S9). FIG. 6 shows an example of the updated coverage matrix table 22.

【0041】そして、更新したカバレージマトリクステ
ーブル22に基づいて、カバレージを計算する。図6に
示した例では、配列要素CT_3_3のみが「0」のま
まで、残りの配列要素は全てインクリメントされている
から、カバレージは93.8%(=15/16)にな
る。
Then, coverage is calculated based on the updated coverage matrix table 22. In the example shown in FIG. 6, only the array element CT_3_3 remains “0” and the remaining array elements are all incremented, so that the coverage is 93.8% (= 15/16).

【0042】以上のように本発明の実施の形態によれ
ば、サイクルTにおけるテスト入力とサイクルT−1に
おけるテスト入力との組合せ(イベント)を検出し、そ
のイベントに対応する配列要素CT_x_y(x=0〜
3,y=0〜3)をインクリメントするようにしている
ため、テスト入力の時系列的な組合せに関するカバレー
ジを測定することができる。したがって、従来のカバレ
ージツールでは検出不可能であった不具合(パイプライ
ンにおけるデータハザード等)も検出可能になる。
As described above, according to the embodiment of the present invention, a combination (event) of a test input in cycle T and a test input in cycle T-1 is detected, and array element CT_x_y (x = 0
Since (3, y = 0 to 3) is incremented, it is possible to measure the coverage of a time-series combination of test inputs. Therefore, a defect (a data hazard or the like in a pipeline) that cannot be detected by the conventional coverage tool can be detected.

【0043】上記実施の形態は、従来のカバレージツー
ルと併用することも可能である。併用すれば、機能検証
の達成度をより正確に測定することができる。
The above embodiment can be used together with a conventional coverage tool. When used together, the degree of achievement of the function verification can be measured more accurately.

【0044】また、ランダムな入力を用いるランダムテ
ストでは、ある時刻における入力パターンの影響による
不具合ではなく、複数の時刻における入力パターンの相
互作用による不具合を検出することができる。ランダム
テストにおいて、従来は適切なカバレージの測定基準が
なかったが、上記実施の形態によるカバレージ測定方法
は、検証の目標設定、進捗度の確認及び終了時期の決定
を行う上で、重要な指標となる。
Further, in the random test using random inputs, it is possible to detect not a defect due to the influence of the input pattern at a certain time but a defect due to the interaction of the input patterns at a plurality of times. Conventionally, in the random test, there was no appropriate coverage measurement standard.However, the coverage measurement method according to the above-described embodiment is an important index for setting the verification target, confirming the progress, and determining the end time. Become.

【0045】なお、上記実施の形態では、イベント検出
動作をHDLで記述しているが、C言語等で記述するこ
とも可能である。C言語で記述した場合、HDLとのイ
ンターフェイスには、PLI(Peripheral Language Int
erface)等の論理シミュレータの標準機能であるC言語
とのインターフェイスを使用する。PLIは、多くの論
理シミュレータで採用されているVerilog−HDLとC
言語とのインターフェイスで、IEEE規格でもある。
また、標準規格ではないが、多くの論理シミュレータで
は独自のVHDLとC言語とのインターフェイスを採用
している。
Although the event detection operation is described in HDL in the above embodiment, it can be described in C language or the like. When written in C language, PLI (Peripheral Language Int.)
interface with C language, which is a standard function of logic simulators such as erface). PLI uses Verilog-HDL and C, which are used in many logic simulators.
It is an interface with languages and is also an IEEE standard.
Although not a standard, many logic simulators employ their own interface between VHDL and C language.

【0046】また、上記実施の形態は、論理回路の入力
を検証対象としているが、論理シミュレータを使用して
いるから、論理回路の内部信号を検証対象とすることも
できる。また、パイプライン動作等においては、実際に
発行または実行された命令の時系列的なカバレージを測
定することもできる。さらに、本発明は、通信や外部バ
ス動作等のように外部要因による影響を受ける論理回路
にも適用可能である。
In the above embodiment, the input of the logic circuit is to be verified. However, since a logic simulator is used, the internal signal of the logic circuit can be verified. In a pipeline operation or the like, it is also possible to measure the time-series coverage of an instruction that is actually issued or executed. Further, the present invention is also applicable to logic circuits that are affected by external factors, such as communication and external bus operation.

【0047】また、上記実施の形態におけるカバレージ
測定プログラムは、コンピュータネットワーク等を通じ
て配信される場合もあり、また、CD−ROM、CD−
R、CD−RW、DVD、フレキシブルディスク等のコ
ンピュータ読み取り可能な記録媒体に記録され、配布さ
れる場合もある。
The coverage measurement program in the above embodiment may be distributed through a computer network or the like.
It may be recorded on a computer-readable recording medium such as R, CD-RW, DVD, or flexible disk and distributed in some cases.

【0048】以上、本発明の実施の形態を説明したが、
上述した実施の形態は本発明を実施するための例示に過
ぎない。よって、本発明は上述した実施の形態に限定さ
れることなく、その趣旨を逸脱しない範囲内で上述した
実施の形態を適宜変形して実施することが可能である。
The embodiment of the present invention has been described above.
The above-described embodiment is merely an example for carrying out the present invention. Therefore, the present invention is not limited to the above-described embodiment, and can be implemented by appropriately modifying the above-described embodiment without departing from the spirit thereof.

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

【図1】本発明の実施の形態によるカバレージ測定装置
の全体構成を示すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of a coverage measuring device according to an embodiment of the present invention.

【図2】図1中の定義テーブルの一例を示す図である。FIG. 2 is a diagram showing an example of a definition table in FIG.

【図3】図1中の初期化されたカバレージマトリクステ
ーブルの一例を示す図である。
FIG. 3 is a diagram illustrating an example of an initialized coverage matrix table in FIG. 1;

【図4】図1中のカバレージマトリクステーブルを含む
イベント検出動作記述の一例を示す図である。
FIG. 4 is a diagram illustrating an example of an event detection operation description including a coverage matrix table in FIG. 1;

【図5】図1に示したカバレージ測定装置としてコンピ
ュータを機能させるためのカバレージ測定プログラムを
示すフローチャートである。
5 is a flowchart showing a coverage measurement program for causing a computer to function as the coverage measurement device shown in FIG.

【図6】図1中のシミュレータにより更新されたカバレ
ージマトリクステーブルの一例を示す図である。
6 is a diagram illustrating an example of a coverage matrix table updated by the simulator in FIG. 1;

【図7】HDLで記述された従来のコードカバレージツ
ールの一例を示す。
FIG. 7 shows an example of a conventional code coverage tool described in HDL.

【図8】従来のカバレージツールで検証対象となる、あ
るステートマシンの状態遷移図である。
FIG. 8 is a state transition diagram of a certain state machine to be verified by a conventional coverage tool.

【図9】図8に示したステートマシンと異なる、もう1
つのステートマシンの状態遷移図である。
9 is another state machine different from the state machine shown in FIG.
FIG. 6 is a state transition diagram of two state machines.

【図10】図8及び図9に示した2つのステートマシン
の状態の組合せを従来のカバレージツールにより検出し
た結果を示す図である。
FIG. 10 is a diagram illustrating a result of detecting a combination of states of the two state machines illustrated in FIGS. 8 and 9 using a conventional coverage tool.

【図11】データハザードが発生する場合のパイプライ
ン動作を示すフローチャートである。
FIG. 11 is a flowchart showing a pipeline operation when a data hazard occurs.

【図12】データハザードが発生しない場合のパイプラ
イン動作を示すフローチャートである。
FIG. 12 is a flowchart showing a pipeline operation when no data hazard occurs.

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

10 カバレージ測定システム 12 DUT 14 テストベクタ 18 論理シミュレータ 20 定義テーブル 22 カバレージマトリクステーブル 24 イベント検出動作記述 10 Coverage measurement system 12 DUT 14 Test Vector 18 Logic simulator 20 Definition table 22 Coverage matrix table 24 Event detection operation description

フロントページの続き (72)発明者 清瀬 健司 滋賀県野洲郡野洲町大字市三宅800番地 日本アイ・ビー・エム株式会社 野洲事業 所内 Fターム(参考) 2G132 AA01 AB02 AC11 AE23 AL11 5B046 AA08 BA09 JA05 Continuation of front page    (72) Inventor Kenji Kiyose             800 Miyake, Yasu, Yasu-cho, Yasu-gun, Shiga Prefecture             IBM Japan Ltd. Yasu Business             Inside F term (reference) 2G132 AA01 AB02 AC11 AE23 AL11                 5B046 AA08 BA09 JA05

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 時系列的に与えられた複数のテスト入力
に応じて、所定の言語で記述された論理回路のシミュレ
ーションを実行する論理シミュレータを用いたカバレー
ジ測定方法であって、 前記テスト入力の組合せを検出する検出ステップと、 前記検出したテスト入力の組合せの検出回数をカウント
するカウントステップとを含むことを特徴とするカバレ
ージ測定方法。
1. A coverage measuring method using a logic simulator for executing a simulation of a logic circuit described in a predetermined language in response to a plurality of test inputs given in time series, wherein: A coverage measuring method, comprising: a detecting step of detecting a combination; and a counting step of counting the number of detections of the detected combination of test inputs.
【請求項2】 請求項1に記載のカバレージ測定方法で
あってさらに、 前記複数のテスト入力の組合せに対応する複数の配列要
素からなるマトリクステーブルを定義する定義ステップ
と、 前記定義したマトリクステーブルを初期化する初期化ス
テップとを含み、 前記カウントステップは、前記検出したテスト入力の組
合せに対応する配列要素をインクリメントすることを特
徴とするカバレージ測定方法。
2. The coverage measurement method according to claim 1, further comprising: defining a matrix table including a plurality of array elements corresponding to the plurality of test input combinations; and defining the defined matrix table. An initializing step of initializing; and the counting step increments an array element corresponding to the detected combination of test inputs.
【請求項3】 請求項2に記載のカバレージ測定方法で
あってさらに、 前記配列要素をインクリメントすることにより更新した
マトリクステーブルを出力する出力ステップと、 前記出力したマトリクステーブルに基づいて、前記イン
クリメントした配列要素の割合を計算するカバレージ計
算ステップとを含むことを特徴とするカバレージ測定方
法。
3. The coverage measurement method according to claim 2, further comprising: outputting an updated matrix table by incrementing the array elements; and performing the increment based on the output matrix table. A coverage calculating step of calculating a ratio of array elements.
【請求項4】 時系列的に与えられた複数のテスト入力
に応じて、所定の言語で記述された論理回路のシミュレ
ーションを実行する論理シミュレータを用いたカバレー
ジ測定装置であって、 前記テスト入力の組合せを検出する検出手段と、 前記検出手段により検出されたテスト入力の組合せの検
出回数をカウントするカウント手段とを含むことを特徴
とするカバレージ測定装置。
4. A coverage measuring device using a logic simulator for executing a simulation of a logic circuit described in a predetermined language in accordance with a plurality of test inputs given in a time series, wherein: A coverage measuring device, comprising: a detecting means for detecting a combination; and a counting means for counting the number of times the combination of test inputs detected by the detecting means is detected.
【請求項5】 請求項4に記載のカバレージ測定装置で
あってさらに、 前記複数のテスト入力の組合せに対応する複数の配列要
素からなるマトリクステーブルを定義する定義手段と、 前記定義手段により定義されたマトリクステーブルを初
期化する初期化手段とを含み、 前記カウント手段は、前記検出手段により検出されたテ
スト入力の組合せに対応する配列要素をインクリメント
することを特徴とするカバレージ測定装置。
5. The coverage measurement device according to claim 4, further comprising: a definition unit that defines a matrix table including a plurality of array elements corresponding to the combination of the plurality of test inputs. Initialization means for initializing a matrix table, wherein the counting means increments an array element corresponding to a combination of test inputs detected by the detection means.
【請求項6】 請求項5に記載のカバレージ測定装置で
あってさらに、 前記配列要素をインクリメントすることにより更新した
マトリクステーブルを出力する出力手段と、 前記出力手段により出力されたマトリクステーブルに基
づいて、前記カウント手段によりインクリメントされた
配列要素の割合を計算するカバレージ計算手段とを含む
ことを特徴とするカバレージ測定装置。
6. The coverage measuring device according to claim 5, further comprising: an output unit that outputs a matrix table updated by incrementing the array element; and a matrix table that is output by the output unit. And a coverage calculating means for calculating a ratio of array elements incremented by the counting means.
【請求項7】 請求項1〜3のいずれか1項に記載のス
テップをコンピュータに実行させるためのカバレージ測
定プログラム。
7. A coverage measurement program for causing a computer to execute the steps according to claim 1. Description:
【請求項8】 請求項7に記載のカバレージ測定プログ
ラムを記憶したコンピュータ読み取り可能な記憶媒体。
8. A computer-readable storage medium storing the coverage measurement program according to claim 7.
JP2002155041A 2002-05-29 2002-05-29 Coverage measuring method and apparatus therefor Pending JP2003345855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002155041A JP2003345855A (en) 2002-05-29 2002-05-29 Coverage measuring method and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002155041A JP2003345855A (en) 2002-05-29 2002-05-29 Coverage measuring method and apparatus therefor

Publications (1)

Publication Number Publication Date
JP2003345855A true JP2003345855A (en) 2003-12-05

Family

ID=29771654

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002155041A Pending JP2003345855A (en) 2002-05-29 2002-05-29 Coverage measuring method and apparatus therefor

Country Status (1)

Country Link
JP (1) JP2003345855A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006010351A (en) * 2004-06-22 2006-01-12 Toshiba Corp Apparatus, method, and program for generating test pattern
CN100456248C (en) * 2005-12-02 2009-01-28 凌阳科技股份有限公司 Simulation device for obtaining applied programe code execution-ratio and method therefor
JP2010003281A (en) * 2008-05-19 2010-01-07 Fujitsu Ltd Verification support program, verification support device and verification support method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006010351A (en) * 2004-06-22 2006-01-12 Toshiba Corp Apparatus, method, and program for generating test pattern
JP4602004B2 (en) * 2004-06-22 2010-12-22 株式会社東芝 Test pattern creation device, test pattern creation method, and test pattern creation program
CN100456248C (en) * 2005-12-02 2009-01-28 凌阳科技股份有限公司 Simulation device for obtaining applied programe code execution-ratio and method therefor
JP2010003281A (en) * 2008-05-19 2010-01-07 Fujitsu Ltd Verification support program, verification support device and verification support method

Similar Documents

Publication Publication Date Title
US7483824B1 (en) Self-checking test generator for partially-modeled processors by propagating fuzzy states
US6074426A (en) Method for automatically generating behavioral environment for model checking
US6993470B2 (en) Method of evaluating test cases in a simulation environment by harvesting
US11003817B2 (en) Hard error simulation and usage thereof
JP2001273165A (en) Method and device for verifying fine-graded validity of behavioral model of central processing unit
US11520963B2 (en) System and method for formal fault propagation analysis
US7213187B2 (en) Digital logic test method to systematically approach functional coverage completely and related apparatus and system
US6934656B2 (en) Auto-linking of function logic state with testcase regression list
Sun et al. Effect-cause intra-cell diagnosis at transistor level
JP2003345855A (en) Coverage measuring method and apparatus therefor
US6748352B1 (en) Method and apparatus for scan design using a formal verification-based process
US11023357B1 (en) Method and system for sequential equivalence checking
US8468409B2 (en) Speed-path debug using at-speed scan test patterns
EP3553681B1 (en) Method and apparatus for error test coverage determination for a circuit by simulation
JP4417084B2 (en) Fault detection simulation system for analog circuits
CN117094269B (en) Verification method, verification device, electronic equipment and readable storage medium
US10853546B1 (en) Method and system for sequential equivalence checking
CN111241766B (en) Test method and test system
CN111539174B (en) Regression testing method, storage medium and system based on proof kernel
EP1259165A2 (en) Modelling and testing of an integrated circuit
Jiang et al. Effective error diagnosis for RTL designs in HDLs
Tzeng et al. A versatile paradigm for scan chain diagnosis of complex faults using signal processing techniques
EP3642637B1 (en) System and method for formal fault propagation analysis
CN112765928A (en) Test pattern generation method and failure model generation method
Toulas et al. Diagnosis with transition faults on embedded segments

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060808

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061108

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070213

RD14 Notification of resignation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7434

Effective date: 20070221