JP2008134808A - Function verification device for logic circuit, verification method for function coverage system, and program - Google Patents

Function verification device for logic circuit, verification method for function coverage system, and program Download PDF

Info

Publication number
JP2008134808A
JP2008134808A JP2006320279A JP2006320279A JP2008134808A JP 2008134808 A JP2008134808 A JP 2008134808A JP 2006320279 A JP2006320279 A JP 2006320279A JP 2006320279 A JP2006320279 A JP 2006320279A JP 2008134808 A JP2008134808 A JP 2008134808A
Authority
JP
Japan
Prior art keywords
coverage
function
test
logic circuit
functional
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.)
Granted
Application number
JP2006320279A
Other languages
Japanese (ja)
Other versions
JP4652317B2 (en
Inventor
Taichi Miyatake
太一 宮武
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.)
NEC Electronics Corp
Original Assignee
NEC Electronics 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 NEC Electronics Corp filed Critical NEC Electronics Corp
Priority to JP2006320279A priority Critical patent/JP4652317B2/en
Publication of JP2008134808A publication Critical patent/JP2008134808A/en
Application granted granted Critical
Publication of JP4652317B2 publication Critical patent/JP4652317B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent omission of a function coverage item in the logic circuit function verification function of a system LSI using a random test pattern and a function coverage and the overlook of any failure accompanying the omission. <P>SOLUTION: This function verification device of a logic circuit is provided with: a function simulator 6 for calculating the comprehension rate (functional coverage) of the functional coverage item whose correct answer has been acquired by a predetermined test program; a code coverage calculation part for calculating the code coverage of a test by the test program; and an unexpected operation detection part 10 for outputting a test pattern when the code coverage changes and the functional coverage does not change during a test as an unexpected operation test pattern 11. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、システムLSI(半導体集積回路)等に含まれる論理回路の機能検証装置、機能カバレッジアイテムの検証方法及びプログラムに関し、特にランダムなテストパターンを用いて論理回路の機能テストを行うとともに、その網羅率(機能カバレッジ)を測ることのできる論理回路の機能検証装置、機能カバレッジアイテムの検証方法及びプログラムに関する。   The present invention relates to a logic circuit function verification apparatus, a function coverage item verification method, and a program included in a system LSI (semiconductor integrated circuit) and the like, and in particular, performs a logic circuit function test using a random test pattern. The present invention relates to a logic circuit function verification apparatus, a function coverage item verification method, and a program capable of measuring a coverage rate (function coverage).

近年のシステムLSIは、その機能が非常に複雑化しており、開発の現場において機能検証に膨大な手間がかかるようになってきている。実際上、このようなシステムLSIが有するすべての機能を人手で一つ一つ確認することは困難であり、それを解決する方法としてランダムなテストパターンを用いた検証方法が行われるようになってきている。ランダムなテストパターンは人が考えるテストパターンよりも複雑多様であるため、思いがけない論理故障を発見できるという利点がある。また、複雑な論理回路に対してすべての機能を検証するテストパターンを人手で作成することは莫大な時間がかかるため、開発時間の短縮になる。   In recent years, the functions of system LSIs have become very complex, and it has become a lot of work to verify the functions at the development site. In practice, it is difficult to manually check all the functions of such a system LSI one by one, and a verification method using a random test pattern has come to be performed as a method for solving this. ing. Random test patterns are more complex and diverse than human-thinking test patterns, and have the advantage that unexpected logic faults can be found. Moreover, since it takes an enormous amount of time to manually create a test pattern for verifying all functions of a complex logic circuit, the development time is shortened.

ここで、上記テストパターンの完全性が問題となるが、設計仕様において満たさなければならない機能検証項目を機能カバレッジアイテムとして設定し、上記ランダムなテストパターンを生成した際に、その機能カバレッジが満たされたかどうかで機能検証が十分になされたかどうかを判断することが行われている。   Here, although the integrity of the test pattern is a problem, when the function verification item that must be satisfied in the design specifications is set as a function coverage item and the random test pattern is generated, the function coverage is satisfied. Whether or not functional verification has been sufficiently performed is determined based on whether or not

上記ランダムなテストパターンと機能カバレッジを応用したシステムLSIの機能検証を行う装置が特許文献1に記載されている。図5は、特許文献1記載の機能検証装置とほぼ等価のシステム構成図であり、機能シミュレータで、RTL(Register Transfer Level)で記述された論理回路のシミュレーションを行った結果、検出された機能カバレッジアイテムが機能カバレッジに反映される。   An apparatus for performing function verification of a system LSI using the random test pattern and function coverage is described in Patent Document 1. FIG. 5 is a system configuration diagram substantially equivalent to the function verification device described in Patent Document 1. As a result of simulation of a logic circuit described in RTL (Register Transfer Level) by a function simulator, detected function coverage is shown. Items are reflected in functional coverage.

また、特許文献2には、システムLSIの論理回路シミュレーションでコードカバレッジを収集する装置が記載されている。   Patent Document 2 describes an apparatus that collects code coverage by a logic circuit simulation of a system LSI.

特開2004−86838号公報JP 2004-86838 A 特開2001−92873号公報JP 2001-92873 A

上記した従来技術は、上記機能カバレッジにより機能検証の完全性を測っているが、その基準となる機能カバレッジアイテムの完全性を確認することができないという問題点がある。機能カバレッジアイテムに抜けが生ずるということは、当該抜けてしまった機能カバレッジアイテムに対応する機能検証項目が検証されたかどうかが不明のままテストが完了してしまうことを意味する。   The above-described conventional technique measures the completeness of the function verification based on the above function coverage, but has a problem that the completeness of the function coverage item serving as the reference cannot be confirmed. A missing function coverage item means that the test is completed without knowing whether the function verification item corresponding to the missing function coverage item has been verified.

特に、冒頭に述べたとおり、システムLSIの機能が非常に複雑化している中では、設計仕様上の機能のすべてを完全に抜き出すことは困難を極めている。また、上記抜き出した機能を機能カバレッジアイテムとして機能検証装置に設定する際に人為的ミスが生ずることも考えられる。   In particular, as described at the beginning, it is extremely difficult to completely extract all the functions in the design specification while the functions of the system LSI are extremely complicated. It is also conceivable that a human error occurs when the extracted function is set as a function coverage item in the function verification apparatus.

本発明の第1の視点によれば、所定のハードウェア記述言語で記述された論理回路について予め想定した機能カバレッジアイテムに対し、所定のテストプログラムによるテストにより正しい結果が得られた機能カバレッジアイテムの網羅率(機能カバレッジ)を算出する機能シミュレータを備えた論理回路の機能検証装置であって、更に、前記テストプログラムによるテストのコードカバレッジを算出するコードカバレッジ算出部と、テスト中に、前記コードカバレッジに変化があり、かつ、前記機能カバレッジに変化が無かった場合のテストパターンを想定外動作テストパターンとして出力する想定外動作検出部と、を備えたこと、を特徴とする論理回路の機能検証装置及びコンピュータを該機能検証装置として機能させるためのプログラム(あるいは、当該プログラムを格納した記録媒体)が提供される。   According to the first aspect of the present invention, a function coverage item for which a correct result is obtained by a test using a predetermined test program is obtained with respect to a function coverage item assumed in advance for a logic circuit described in a predetermined hardware description language. A function verification apparatus for a logic circuit including a function simulator for calculating a coverage ratio (function coverage), a code coverage calculation unit for calculating code coverage of a test by the test program, and the code coverage during a test And an unexpected operation detector that outputs a test pattern when the function coverage is not changed as an unexpected operation test pattern. And a program for causing a computer to function as the function verification device (Alternatively, the recording medium storing the program) is provided.

本発明の第2の視点によれば、所定のハードウェア記述言語で記述された論理回路について予め想定した機能カバレッジアイテムに対し、所定のテストプログラムによるテストにより正しい結果が得られた機能カバレッジアイテムの網羅率(機能カバレッジ)を算出する機能シミュレータと、前記テストプログラムによるテストのコードカバレッジを算出するコードカバレッジ算出部と、を含んだコンピュータシステムを用いた前記機能カバレッジアイテムの検証方法であって、前記コンピュータシステムが、前記コードカバレッジの変化を検出するステップと、前記コンピュータシステムが、前記機能カバレッジの変化を検出するステップと、前記コンピュータシステムが、テスト中に、前記コードカバレッジに変化があり、かつ、前記機能カバレッジに変化が無かった場合の前記テストプログラムにより生成されたテストパターンを想定外動作テストパターンとして出力するステップと、を含むこと、を特徴とする機能カバレッジアイテムの検証方法が提供される。   According to the second aspect of the present invention, a function coverage item that has obtained a correct result by a test using a predetermined test program with respect to a function coverage item assumed in advance for a logic circuit described in a predetermined hardware description language. A function coverage item verification method using a computer system including a function simulator that calculates a coverage rate (function coverage) and a code coverage calculation unit that calculates code coverage of a test by the test program, A computer system detecting the code coverage change; the computer system detecting the function coverage change; the computer system changing the code coverage during testing; and The machine Include the steps of outputting a test pattern generated by said test program when there is no change in coverage as unexpected operation test pattern, a method of verifying a functional coverage items that feature is provided.

本発明によれば、機能カバレッジアイテムの抜け(設定漏れ)を想定外動作テストパターンとして検出することが可能となる。また、上記想定外動作テストパターンが出力されなければ、機能カバレッジの完全性(設計仕様から設定した検証すべき機能のすべてが網羅された状態)を確認することができる。   According to the present invention, it is possible to detect a missing function coverage item (setting omission) as an unexpected operation test pattern. If the unexpected operation test pattern is not output, it is possible to confirm the completeness of the function coverage (a state in which all the functions to be verified set from the design specifications are covered).

続いて、本発明を実施するための最良の形態について図面を参照して詳細に説明する。図1は、本発明の第1の実施形態に係るシステムLSIの論理回路の機能検証装置の構成を表したブロック図である。図1と図5を比較して明らかなとおり、本実施形態は、機能シミュレータ6にコードカバレッジの算出機能と、前記算出されたコードカバレッジと、機能カバレッジを用いた想定外動作検出機能(想定外動作検出部)を備えたことを大きな特徴としている。   Next, the best mode for carrying out the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a function verification apparatus for a logic circuit of a system LSI according to the first embodiment of the present invention. As is clear from comparison between FIG. 1 and FIG. 5, the present embodiment provides the function simulator 6 with a code coverage calculation function, the calculated code coverage, and an unexpected operation detection function (unexpected) using the function coverage. The main feature is that an operation detection unit) is provided.

機能カバレッジアイテム(機能カバレッジ項目)2は、検証対象のシステムLSIの設計仕様に基づいて設定された検証項目1を、コンピュータ装置が解釈できるような態様にしたデータである。より具体的には、機能カバレッジアイテム2は、検証対象のシステムLSIの論理回路が設計仕様上有さなければならない機能や、入出力信号の条件、内部レジスタの値等の機能の単位を表す。例えば、検証対象が命令コマンドを受けて動作するコントローラのようなものであれば、その命令コマンドの種類一つ一つが機能カバレッジアイテムであり、その命令に対する応答の種類の一つ一つも機能カバレッジアイテムとなる。   The function coverage item (function coverage item) 2 is data in such a manner that the computer device can interpret the verification item 1 set based on the design specification of the system LSI to be verified. More specifically, the function coverage item 2 represents units of functions such as functions that the logic circuit of the system LSI to be verified must have in design specifications, input / output signal conditions, internal register values, and the like. For example, if the verification target is a controller that operates by receiving an instruction command, each instruction command type is a function coverage item, and each type of response to the instruction is also a function coverage item. It becomes.

RTL3は、検証対象となるシステムLSIの論理回路を、レジスタ転送レベルのハードウェア記述言語で表現したものである。   The RTL 3 expresses a logic circuit of a system LSI to be verified in a hardware description language at a register transfer level.

テストプログラム4は、検証対象の論理回路を機能的にランダム動作させるためのランダムなテストパターン(入力信号パターン)を生成するためのプログラムであり、機能シミュレータ6を構成するコンピュータシステムに読み出されてテストパターンを生成する。例えば検証対象が命令コマンドを受けて動作するコントローラのようなものであれば、テストパターン(入力信号パターン)は、命令コマンドを入力するコマンドの種類や組み合わせ、タイミング等がランダムに並べられたパターンとなる。   The test program 4 is a program for generating a random test pattern (input signal pattern) for causing the logic circuit to be verified to function randomly and functionally. The test program 4 is read by a computer system constituting the function simulator 6. Generate a test pattern. For example, if the verification target is a controller that operates in response to an instruction command, the test pattern (input signal pattern) is a pattern in which the command type, combination, timing, etc. for inputting the instruction command are randomly arranged. Become.

機能検証プログラム5は、論理回路の動作が設計仕様に対して正しく動作しているか否かを確認するプログラムであり、機能シミュレータ6を構成するコンピュータシステムに読み出されて検証対象の論理回路の動作を検証する。具体的には、機能検証プログラム5は、入力信号に対する検証対象の論理回路の出力データや内部レジスタの値、内部信号の時間的な変化等を観測して、それらが正しいものであるか否かを判定する。   The function verification program 5 is a program for confirming whether or not the operation of the logic circuit is operating correctly with respect to the design specification. The function verification program 5 is read by the computer system constituting the function simulator 6 and the operation of the logic circuit to be verified. To verify. Specifically, the function verification program 5 observes the output data of the logic circuit to be verified with respect to the input signal, the value of the internal register, the temporal change of the internal signal, etc., and whether or not they are correct. Determine.

機能シミュレータ6及び想定外動作検出部10は、中央処理装置(CPU)及びその周辺回路・周辺装置からなり、内蔵の半導体メモリ(ROM、RAM等)や外部記憶媒体(ハードディスク、光磁気ディスク等)に記録された制御プログラムに基づいて動作するコンピュータシステム上に構成される。   The function simulator 6 and the unexpected operation detection unit 10 include a central processing unit (CPU) and its peripheral circuits / peripheral devices, and include a built-in semiconductor memory (ROM, RAM, etc.) and an external storage medium (hard disk, magneto-optical disk, etc.). It is configured on a computer system that operates based on the control program recorded in the above.

上記機能シミュレータ6への入力データは、検証対象のシステムLSIの論理回路が記述されたRTL3、ランダムなテストパターンを生成させるためのテストプログラム4、検証対象の論理回路の動作が正しいか判断するための機能検証プログラム5、機能カバレッジアイテム2である。   The input data to the function simulator 6 includes RTL 3 in which the logic circuit of the system LSI to be verified is described, the test program 4 for generating a random test pattern, and whether the operation of the logic circuit to be verified is correct. Functional verification program 5 and functional coverage item 2.

また、機能シミュレータ6の出力データは、機能カバレッジ、コードカバレッジ、テストパターンであり、それぞれ機能カバレッジデータベース7、コードカバレッジデータベース8、テストパターン9に出力される。   The output data of the function simulator 6 is function coverage, code coverage, and test pattern, which are output to the function coverage database 7, code coverage database 8, and test pattern 9, respectively.

機能カバレッジは一般に、あるテストが論理回路の機能をどれだけ網羅したかを表す指標として知られている。機能カバレッジが100%であるということは、検証者が設計仕様から設定した検証すべき機能のすべてを網羅したということを意味する。本実施形態では、機能シミュレータ6にて論理回路シミュレーションを行った結果、(正常検出された機能カバレッジアイテム数)/(すべての機能カバレッジアイテム数)[%]を機能カバレッジとしている。   The function coverage is generally known as an index indicating how much a certain test covers the function of the logic circuit. The function coverage of 100% means that all functions to be verified set by the verifier from the design specifications are covered. In the present embodiment, as a result of the logic circuit simulation performed by the function simulator 6, (number of function coverage items detected normally) / (number of all function coverage items) [%] is defined as function coverage.

コードカバレッジは一般に、あるテストプログラムが論理回路をどれだけ活性化するテストパターンを生成できているかを表す指標として知られている。また、コードカバレッジは冗長なRTL記述がどれほど含まれているのかの指標としても用いられる。本実施形態では、機能シミュレータ6にてRTL3の論理回路シミュレーションを行った際に、(検出(実行)された有効なコードの行数)/(すべての有効なコードの行数)[%]をコードカバレッジとしている。ここで、有効なコードとは、RTL記述で論理回路の動作を表していない部分を除いたコードという意味である。   Code coverage is generally known as an index representing how much a test program can generate a test pattern that activates a logic circuit. The code coverage is also used as an index of how much redundant RTL description is included. In the present embodiment, when the logic circuit simulation of RTL3 is performed by the function simulator 6, (number of lines of valid code detected (executed)) / (number of lines of all valid codes) [%] Code coverage. Here, the effective code means a code excluding a part that does not represent the operation of the logic circuit in the RTL description.

図2は、機能シミュレータ6の詳細構成を表したブロック図である。図2を参照すると、機能シミュレータ6は、テストパターンジェネレータ12と、論理回路シミュレータ14と、コードカバレッジチェッカー17と、機能チェッカー18と、機能カバレッジチェッカー19とを備えて構成されている。   FIG. 2 is a block diagram showing a detailed configuration of the function simulator 6. Referring to FIG. 2, the function simulator 6 includes a test pattern generator 12, a logic circuit simulator 14, a code coverage checker 17, a function checker 18, and a function coverage checker 19.

テストパターンジェネレータ12は、入力されたテストプログラム4を実行し、ランダムなテストパターン13を生成する。   The test pattern generator 12 executes the input test program 4 and generates a random test pattern 13.

論理回路シミュレータ14は、検証対象のシステムLSIの論理回路が記述されたRTL3をコンパイルして実行可能なコード(シミュレータの実行コード15)にするとともに、テストパターンジェネレータ12にて生成されたランダムなテストパターン13を用いて検証対象の論理回路を再現動作(シミュレート)し、論理回路信号値16を出力する。   The logic circuit simulator 14 compiles the RTL 3 in which the logic circuit of the system LSI to be verified is described into an executable code (simulator execution code 15), and generates a random test generated by the test pattern generator 12. The logic circuit to be verified is reproduced (simulated) using the pattern 13 and a logic circuit signal value 16 is output.

コードカバレッジチェッカー17は、入力されたRTL3と論理回路シミュレータ14から出力されるシミュレータの実行コード15に基づいて、RTL3におけるどの行が論理回路シミュレータ14で実行されたかを検出し、コードカバレッジデータベース8を更新する。   The code coverage checker 17 detects which line in the RTL 3 is executed by the logic circuit simulator 14 based on the input RTL 3 and the simulator execution code 15 output from the logic circuit simulator 14, and stores the code coverage database 8. Update.

機能チェッカー18には、論理回路シミュレータ14から入力された論理回路信号値16と、そのときのテストパターン13及び機能検証プログラム5が入力される。機能チェッカー18には、テストパターン13と機能検証プログラム5から作られる論理回路の動作期待値と、論理回路信号値16とを比較し、論理回路が正しく動作しているか否かを確認する。   The function checker 18 receives the logic circuit signal value 16 input from the logic circuit simulator 14, the test pattern 13 at that time, and the function verification program 5. The function checker 18 compares the expected operation value of the logic circuit created from the test pattern 13 and the function verification program 5 with the logic circuit signal value 16 to check whether the logic circuit is operating correctly.

機能カバレッジチェッカー19には、論理回路信号値16とテストパターン13、機能カバレッジアイテム2が入力される。機能カバレッジチェッカー19は、機能チェッカー18にてエラーが検出されなかったとき、即ち、論理回路が正しく動作しているときに、当該論理回路信号値16とテストパターン13に対応する機能カバレッジアイテムを検出し、機能カバレッジデータベース7を更新する。   The function coverage checker 19 receives the logic circuit signal value 16, the test pattern 13, and the function coverage item 2. The function coverage checker 19 detects a function coverage item corresponding to the logic circuit signal value 16 and the test pattern 13 when no error is detected by the function checker 18, that is, when the logic circuit is operating correctly. Then, the function coverage database 7 is updated.

想定外動作検出部10は、機能カバレッジデータベース7、コードカバレッジデータベース8、テストパターン9を監視し、機能シミュレータ6にて算出されたコードカバレッジに変化があり、かつ、機能カバレッジに変化が無かった場合のテストパターン13を想定外動作テストパターンとして出力する。   The unexpected operation detection unit 10 monitors the function coverage database 7, the code coverage database 8, and the test pattern 9, and there is a change in the code coverage calculated by the function simulator 6 and there is no change in the function coverage. The test pattern 13 is output as an unexpected operation test pattern.

このような機能シミュレータ6を連続的に実行させると、次々とランダムなテストパターン13が生成され、そのテストパターン毎に機能カバレッジ、コードカバレッジが随時更新される。   When such a function simulator 6 is continuously executed, random test patterns 13 are generated one after another, and the function coverage and code coverage are updated as needed for each test pattern.

図3は、テストパターン13の入力毎に実行される想定外動作検出部10の動作を表したフローチャートである。まず、想定外動作検出部10は、機能シミュレータ6から出力されるテストパターン9及び機能カバレッジデータベース7、コードカバレッジデータベース8のデータを入力する(ステップS1)。   FIG. 3 is a flowchart showing the operation of the unexpected operation detection unit 10 executed every time the test pattern 13 is input. First, the unexpected operation detection unit 10 inputs the test pattern 9 and the data of the function coverage database 7 and the code coverage database 8 output from the function simulator 6 (step S1).

想定外動作検出部10は、今回入力されたコードカバレッジに前回入力されたコードカバレッジから変化があるか否かを判定する(ステップS2)。ここで、コードカバレッジに変化がなければステップS1に戻り、次の入力を待つ。   The unexpected operation detection unit 10 determines whether or not there is a change in the code coverage input this time from the code coverage input last time (step S2). If there is no change in code coverage, the process returns to step S1 and waits for the next input.

一方、コードカバレッジに変化があった場合、想定外動作検出部10は、今回入力された機能カバレッジに、前回入力された機能カバレッジから変化があるか否かを判定する。(ステップS3)。ここで、機能カバレッジに変化があればステップS1に戻り、次の入力を待つ。コードカバレッジと機能カバレッジの双方に変化がある場合は、機能カバレッジアイテムとして想定された機能が動作したことを示し、問題とはならないからである。   On the other hand, when there is a change in the code coverage, the unexpected operation detection unit 10 determines whether or not the function coverage input this time has changed from the function coverage input last time. (Step S3). If there is a change in the function coverage, the process returns to step S1 and waits for the next input. This is because if there is a change in both code coverage and function coverage, it indicates that the function assumed as the function coverage item has been operated and does not cause a problem.

一方、コードカバレッジに変化があったにも拘わらず機能カバレッジに変化がなかった場合、想定外動作検出部10は、このときのテストパターン9を想定外動作テストパターン11として出力する(ステップS4)。コードカバレッジに変化があったということは、入力されたテストパターン9により新たに動作した機能があったことを示しているが、それにも拘わらず機能カバレッジに変化が無いということは、当該機能が、機能カバレッジアイテムとして想定されていないことを示しているからである。   On the other hand, when there is no change in the function coverage despite the change in the code coverage, the unexpected operation detection unit 10 outputs the test pattern 9 at this time as the unexpected operation test pattern 11 (step S4). . A change in code coverage indicates that there is a function that has been newly operated according to the input test pattern 9, but there is no change in function coverage despite this, This is because it indicates that the function coverage item is not assumed.

[実施例1]
続いて、本発明の理解をより深めるため、簡単な論理回路を検証対象とした場合の上記実施形態に係る論理回路の機能検証装置の動作例を挙げて詳細に説明する。
[Example 1]
Subsequently, in order to deepen the understanding of the present invention, an operation example of the function verification device for a logic circuit according to the above embodiment when a simple logic circuit is a verification target will be described in detail.

本実施例で検証対象とする論理回路の設計仕様は、以下の通りとする。
入力端子:IN1、IN2、CMD
出力端子:OUT
機能:入力データに対し、CMDが表す演算を行い、結果をOUTから出力する。CMDがAのときは演算A、Bのときは演算B、Cのときは演算Cを行うものとする。
The design specifications of the logic circuit to be verified in this embodiment are as follows.
Input terminals: IN1, IN2, CMD
Output terminal: OUT
Function: Performs the operation represented by CMD on the input data and outputs the result from OUT. When the CMD is A, the operation A is performed. When the CMD is B, the operation B is performed. When the CMD is C, the operation C is performed.

図4は上記設計仕様を満たすよう設計された論理回路の図である。図4を参照すると、この論理回路は、演算A、B、Cを行う演算器A、B、Cを備え、CMDの値で各演算器の出力OUT_A、OUT_B、OUT_Cをセレクタで切り替える設計になっている。   FIG. 4 is a diagram of a logic circuit designed to satisfy the above design specifications. Referring to FIG. 4, this logic circuit includes arithmetic units A, B, and C that perform arithmetic operations A, B, and C, and is designed to switch the outputs OUT_A, OUT_B, and OUT_C of each arithmetic unit with a selector according to the value of CMD. ing.

ここで、演算器Cは論理故障していると仮定する。   Here, it is assumed that the arithmetic unit C has a logic failure.

始めに、検証者が機能カバレッジアイテム2を設定する。検証対象の設計仕様から以下の機能カバレッジアイテムが考えられる。
機能カバレッジアイテム001:CMDがAである。
機能カバレッジアイテム002:CMDがBである。
機能カバレッジアイテム003:CMDがCである。
これら機能カバレッジアイテムは、検証者が設計仕様に基づいて設定するため、検証者の設計仕様に対する理解度や人的ミスにより、機能カバレッジアイテム003が抜けてしまったと仮定する。
First, the verifier sets the function coverage item 2. The following functional coverage items can be considered from the design specifications to be verified.
Function coverage item 001: CMD is A.
Function coverage item 002: CMD is B.
Function coverage item 003: CMD is C.
Since these function coverage items are set by the verifier based on the design specifications, it is assumed that the function coverage item 003 has been lost due to the verifier's understanding of the design specifications and human error.

検証対象の論理回路中のセレクタは、RTLで以下のような記述であったとする。
000: case( CMD )
001: A:OUT <= OUT_A;
002: B:OUT <= OUT_B;
003: B:OUT <= OUT_C;
004: endcase
Assume that the selector in the logic circuit to be verified has the following description in RTL.
000: case (CMD)
001: A: OUT <= OUT_A;
002: B: OUT <= OUT_B;
003: B: OUT <= OUT_C;
004: endcase

上記RTL記述の行0、4は論理回路の動作を表していないため、有効なコードは行1、2、3となる。従って、コードカバレッジの対象行は以下のとおりとなる。
コードカバレッジ行001:「 A:OUT <= OUT_A; 」
コードカバレッジ行002:「 B:OUT <= OUT_B; 」
コードカバレッジ行003:「 B:OUT <= OUT_C; 」
Since lines 0 and 4 of the RTL description do not represent the operation of the logic circuit, the valid codes are lines 1, 2, and 3. Therefore, the target lines for code coverage are as follows.
Code coverage line 001: “A: OUT ≦ OUT_A;
Code coverage line 002: “B: OUT ≦ OUT_B;
Code coverage line 003: “B: OUT ≦ OUT_C;

テストプログラム4は、CMDについてA、B、Cを、IN1、IN2について適当なデータをランダムに生成するものとする。機能検証プログラム5は、CMDとINの値に対するOUTの期待値を生成して、論理回路信号値のOUTの値と比較し、不一致ならばエラーを出力する。   It is assumed that the test program 4 randomly generates A, B, and C for CMD and appropriate data for IN1 and IN2. The function verification program 5 generates an expected value of OUT for the values of CMD and IN, compares it with the value of OUT of the logic circuit signal value, and outputs an error if they do not match.

以上の前提でテストを開始する。まず、テストパターンジェネレータ12によりIN1、IN2とCMDについてランダムなテストパターンが生成され、論理回路シミュレータ14に入力される。   The test starts with the above assumptions. First, a random test pattern is generated for IN1, IN2, and CMD by the test pattern generator 12, and is input to the logic circuit simulator 14.

このときのCMDがAだったとすると、コードカバレッジ行001が検出されたという情報がコードカバレッジデータベース8に記録される。これと並行して、機能チェッカー18はOUTの値がIN1、IN2の値の演算Aであるかを確認する。機能チェッカー18による確認の結果、エラーがなければ機能カバレッジチェッカー19は機能カバレッジアイテム001が検出されたと判定し、機能カバレッジデータベース7に記録する。   If the CMD at this time is A, information that the code coverage line 001 is detected is recorded in the code coverage database 8. In parallel with this, the function checker 18 confirms whether the value of OUT is the operation A of the values of IN1 and IN2. If there is no error as a result of confirmation by the function checker 18, the function coverage checker 19 determines that the function coverage item 001 has been detected and records it in the function coverage database 7.

この場合、コードカバレッジ行001が検出されてコードカバレッジが変化しているので図3のステップS2からステップS3に進むが、機能カバレッジアイテム001が検出されて機能カバレッジも変化しているので、想定外動作検出部10は、ステップS4の想定外動作テストパターンの出力は行わない。   In this case, since the code coverage line 001 is detected and the code coverage is changed, the process proceeds from step S2 in FIG. 3 to step S3. However, since the function coverage item 001 is detected and the function coverage is also changed, it is unexpected. The operation detection unit 10 does not output the unexpected operation test pattern in step S4.

次にCMDがBであるテストパターンが入力されたとすると、CMDがAのときと同様にコードカバレッジ行002と機能カバレッジアイテム002がそれぞれ検出される。従って、この場合もコードカバレッジと機能カバレッジの双方が変化するため、想定外動作検出部10は、ステップS4の想定外動作テストパターンの出力は行わない。   Next, assuming that a test pattern in which the CMD is B is input, the code coverage line 002 and the function coverage item 002 are detected as in the case where the CMD is A. Accordingly, in this case as well, both code coverage and function coverage change, so the unexpected operation detection unit 10 does not output the unexpected operation test pattern in step S4.

次にCMDがCであるテストパターンが入力されたとすると、コードカバレッジ行003が検出されたという情報がコードカバレッジデータベース8に記録される。一方、機能カバレッジチェッカー19は、対応する機能カバレッジアイテム003を見つけることができない(上述の前提条件のとおり機能カバレッジアイテム003が設定されていないことによる)ため、機能カバレッジデータベース7上の機能カバレッジを変化させることができない。   Next, assuming that a test pattern whose CMD is C is input, information that the code coverage line 003 is detected is recorded in the code coverage database 8. On the other hand, since the function coverage checker 19 cannot find the corresponding function coverage item 003 (because the function coverage item 003 is not set as described above), the function coverage on the function coverage database 7 is changed. I can't let you.

この場合、図3のステップS2からステップS3、ステップS4と進み、想定外動作検出部10は、想定外動作テストパターンとして、このときのテストパターン(例えば、CMD=C、IN1=X、IN2=Y)を出力する。このように想定外動作パターンが検出されたことで、検証者は、少なくとも機能カバレッジの抜けがあることに気がつくことができる。   In this case, the process proceeds from step S2 in FIG. 3 to step S3 and step S4, and the unexpected operation detection unit 10 uses the test pattern at this time (for example, CMD = C, IN1 = X, IN2 = Y) is output. As the unexpected operation pattern is detected in this manner, the verifier can notice that there is at least a lack of functional coverage.

一方、上記のような機能カバレッジアイテム2の検証機能を持たない従来技術では、すべての機能カバレッジアイテムが検出され、機能カバレッジは100%になったということになる。このことは機能検証が十分になされて完了することを意味している。上記機能カバレッジアイテム2の抜けだけならまだ良いとして、仮にCMDがCのときにOUTがIN1、IN2の演算Cであることを検査するという機能が機能検証プログラム5になければ、機能チェッカー18がエラーを出すこともないため、検証者は演算器Cの論理故障に気がつくことはない。   On the other hand, in the prior art that does not have the function coverage item 2 verification function as described above, all the function coverage items are detected, and the function coverage becomes 100%. This means that the function verification is sufficiently completed. If the above function coverage item 2 is only missing, it is still good. If the function verification program 5 does not have the function of checking that the operation C of OUT1 is IN1 and IN2 when CMD is C, the function checker 18 generates an error. Therefore, the verifier does not notice the logic failure of the arithmetic unit C.

以上のとおり、ランダムなテストパターンと機能カバレッジを利用したシステムLSIの論理機能検証において、機能カバレッジアイテムの設定漏れとなっている機能の有無を確実に検出することが可能となり、また、当該機能を動作させる条件となるテストパターンを検出することができる。   As described above, in the logic function verification of a system LSI using a random test pattern and function coverage, it is possible to reliably detect the presence or absence of a function that is missing the setting of the function coverage item. It is possible to detect a test pattern as a condition for operating.

以上、本発明の好適な実施形態及びその具体例を挙げて詳細に説明したが、本発明の技術的範囲は、上記各記載に限定されるものではなく、その要旨を逸脱しない範囲で様々な変形を施すことが可能である。例えば、上記した実施形態では、機能シミュレータ6と別に、想定外動作検出部10を設けた例を挙げて説明したが、機能シミュレータ6に想定外動作検出部10と同等の想定外動作検出機能を設けることとしても良いことはもちろんである。   The preferred embodiments of the present invention and specific examples thereof have been described above in detail. However, the technical scope of the present invention is not limited to the above descriptions, and various modifications can be made without departing from the spirit of the present invention. Variations can be made. For example, in the above-described embodiment, an example in which the unexpected operation detection unit 10 is provided separately from the function simulator 6 has been described. However, the function simulator 6 has an unexpected operation detection function equivalent to the unexpected operation detection unit 10. Of course, it may be provided.

上記した実施形態及びその具体例では、論理回路をRTLにて記述した例を挙げて説明したが、機能シミュレータにて再現動作(シミュレート)し、機能カバレッジやコードカバレッジを算出可能なその他のハードウェア記述言語でも良いことはもちろんである。   In the above-described embodiments and specific examples thereof, description has been given by taking an example in which a logic circuit is described in RTL. However, other hardware capable of calculating a function coverage and a code coverage by performing a reproduction operation (simulation) with a function simulator. Of course, a hardware description language may be used.

本発明の第1の実施形態に係るシステムLSIの機能検証装置の構成を表したブロック図である。1 is a block diagram illustrating a configuration of a function verification apparatus for a system LSI according to a first embodiment of the present invention. 本発明の第1の実施形態に係るシステムLSIの機能検証装置の機能シミュレータの詳細構成を表したブロック図である。It is a block diagram showing the detailed structure of the function simulator of the function verification apparatus of the system LSI which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係るシステムLSIの機能検証装置の想定外動作検出部の動作を表したフローチャートである。5 is a flowchart showing an operation of an unexpected operation detection unit of the system LSI function verification apparatus according to the first embodiment of the present invention. 本発明の第1の実施形態に係るシステムLSIの機能検証装置の具体的な動作を説明するためのサンプル回路図である。FIG. 3 is a sample circuit diagram for explaining a specific operation of the function verification apparatus for the system LSI according to the first embodiment of the present invention. 従来のシステムLSIの機能検証装置と等価のシステム構成図である。It is a system block diagram equivalent to the function verification apparatus of the conventional system LSI.

符号の説明Explanation of symbols

1 検証項目
2 機能カバレッジアイテム(機能カバレッジ項目)
3 RTL(記述)
4 テストプログラム
5 機能検証プログラム
6 機能シミュレータ
7 機能カバレッジデータベース
8 コードカバレッジデータベース
9、13 テストパターン
10 想定外動作検出部
11 想定外動作テストパターン
12 テストパターンジェネレータ
14 論理回路シミュレータ
15 シミュレータの実行コード
16 論理回路信号値
17 コードカバレッジチェッカー
18 機能チェッカー
19 機能カバレッジチェッカー
1 Verification item 2 Functional coverage item (functional coverage item)
3 RTL (description)
4 Test Program 5 Function Verification Program 6 Function Simulator 7 Function Coverage Database 8 Code Coverage Database 9, 13 Test Pattern 10 Unexpected Operation Detection Unit 11 Unexpected Operation Test Pattern 12 Test Pattern Generator 14 Logic Circuit Simulator 15 Simulator Execution Code 16 Logic Circuit signal value 17 Code coverage checker 18 Function checker 19 Function coverage checker

Claims (4)

所定のハードウェア記述言語で記述された論理回路について予め想定した機能カバレッジアイテムに対し、所定のテストプログラムによるテストにより正しい結果が得られた機能カバレッジアイテムの網羅率(機能カバレッジ)を算出する機能シミュレータを備えた論理回路の機能検証装置であって、更に、
前記テストプログラムによるテストのコードカバレッジを算出するコードカバレッジ算出部と、
テスト中に、前記コードカバレッジに変化があり、かつ、前記機能カバレッジに変化が無かった場合のテストパターンを想定外動作テストパターンとして出力する想定外動作検出部と、を備えたこと、
を特徴とする論理回路の機能検証装置。
A functional simulator that calculates the coverage rate (functional coverage) of functional coverage items for which correct results have been obtained by a test using a predetermined test program with respect to a functional coverage item assumed in advance for a logic circuit described in a predetermined hardware description language A logic circuit functional verification device comprising:
A code coverage calculation unit for calculating code coverage of a test by the test program;
An unexpected operation detection unit that outputs a test pattern as an unexpected operation test pattern when there is a change in the code coverage and no change in the function coverage during the test,
A functional verification device for a logic circuit.
前記機能シミュレータは、
前記所定のテストプログラムによりランダムなテストパターンを出力するテストパターンジェネレータと、
検証対象の論理回路を再現動作する論理回路シミュレータと、
前記機能検証プログラムの出力結果と、前記論理回路シミュレータの出力とを比較することにより、論理回路が正しく動作しているか否かを確認する機能チェッカーと、
前記機能チェッカーにより正常動作が確認されたテストパターンに対応する機能カバレッジアイテムを検出する機能カバレッジチェッカーとを含んで構成されていること、
を特徴とする請求項1に記載の論理回路の機能検証装置。
The functional simulator is
A test pattern generator for outputting a random test pattern by the predetermined test program;
A logic circuit simulator that reproduces the logic circuit to be verified;
A function checker for confirming whether the logic circuit is operating correctly by comparing the output result of the function verification program with the output of the logic circuit simulator;
A function coverage checker for detecting a function coverage item corresponding to a test pattern whose normal operation has been confirmed by the function checker;
The function verification apparatus for a logic circuit according to claim 1.
所定のハードウェア記述言語で記述された論理回路について予め想定した機能カバレッジアイテムに対し、所定のテストプログラムによるテストにより正しい結果が得られた機能カバレッジアイテムの網羅率(機能カバレッジ)を算出する機能シミュレータと、前記テストプログラムによるテストのコードカバレッジを算出するコードカバレッジ算出部と、を含んだコンピュータシステムを用いた前記機能カバレッジアイテムの検証方法であって、
前記コンピュータシステムが、前記コードカバレッジの変化を検出するステップと、
前記コンピュータシステムが、前記機能カバレッジの変化を検出するステップと、
前記コンピュータシステムが、テスト中に、前記コードカバレッジに変化があり、かつ、前記機能カバレッジに変化が無かった場合の前記テストプログラムにより生成されたテストパターンを想定外動作テストパターンとして出力するステップと、を含むこと、
を特徴とする機能カバレッジアイテムの検証方法。
A functional simulator that calculates the coverage rate (functional coverage) of functional coverage items for which correct results have been obtained by a test using a predetermined test program with respect to a functional coverage item assumed in advance for a logic circuit described in a predetermined hardware description language A code coverage calculation unit that calculates code coverage of a test by the test program, and a verification method of the functional coverage item using a computer system,
The computer system detecting a change in the code coverage;
The computer system detecting a change in the functional coverage;
The computer system outputs a test pattern generated by the test program when there is a change in the code coverage and no change in the function coverage during a test as an unexpected operation test pattern; Including,
Functional coverage item verification method characterized by
所定のハードウェア記述言語で記述された論理回路について予め想定した機能カバレッジアイテムに対し、所定のテストプログラムによるテストにより正しい結果が得られた機能カバレッジアイテムの網羅率(機能カバレッジ)を算出する機能シミュレータと、前記テストプログラムによるテストのコードカバレッジを算出するコードカバレッジ算出部と、を含んだコンピュータシステムに実行させるプログラムであって、
前記機能シミュレータ及びコードカバレッジ算出部の出力結果を監視し、前記コードカバレッジに変化があり、かつ、前記機能カバレッジに変化が無かった場合の前記テストプログラムにより生成されたテストパターンを想定外動作テストパターンとして出力する処理をコンピュータシステムに実行させるプログラム。
A functional simulator that calculates the coverage rate (functional coverage) of functional coverage items for which correct results have been obtained by a test using a predetermined test program with respect to a functional coverage item assumed in advance for a logic circuit described in a predetermined hardware description language A code coverage calculation unit that calculates code coverage of a test by the test program, and a program that is executed by a computer system,
The output results of the function simulator and the code coverage calculation unit are monitored, and the test pattern generated by the test program when the code coverage is changed and the function coverage is not changed is an unexpected operation test pattern. A program that causes a computer system to execute processing to be output as
JP2006320279A 2006-11-28 2006-11-28 Logic circuit functional verification apparatus, functional coverage item verification method, and program Expired - Fee Related JP4652317B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006320279A JP4652317B2 (en) 2006-11-28 2006-11-28 Logic circuit functional verification apparatus, functional coverage item verification method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006320279A JP4652317B2 (en) 2006-11-28 2006-11-28 Logic circuit functional verification apparatus, functional coverage item verification method, and program

Publications (2)

Publication Number Publication Date
JP2008134808A true JP2008134808A (en) 2008-06-12
JP4652317B2 JP4652317B2 (en) 2011-03-16

Family

ID=39559629

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006320279A Expired - Fee Related JP4652317B2 (en) 2006-11-28 2006-11-28 Logic circuit functional verification apparatus, functional coverage item verification method, and program

Country Status (1)

Country Link
JP (1) JP4652317B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9280622B2 (en) 2013-06-14 2016-03-08 Nec Corporation Circuit verifying apparatus, circuit verifying method, and circuit verifying program
JP2019185301A (en) * 2018-04-06 2019-10-24 株式会社日立製作所 Calculator verification unit
CN110749813A (en) * 2018-07-24 2020-02-04 华邦电子股份有限公司 Test system and method for generating adaptive test recipe

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001092873A (en) * 1999-09-24 2001-04-06 Toshiba Corp Device and method for fault simulation and computer- readable recording medium storing fault simulation program
JP2004086838A (en) * 2002-07-04 2004-03-18 Toshiba Corp Verification system and verification method of system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001092873A (en) * 1999-09-24 2001-04-06 Toshiba Corp Device and method for fault simulation and computer- readable recording medium storing fault simulation program
JP2004086838A (en) * 2002-07-04 2004-03-18 Toshiba Corp Verification system and verification method of system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9280622B2 (en) 2013-06-14 2016-03-08 Nec Corporation Circuit verifying apparatus, circuit verifying method, and circuit verifying program
JP2019185301A (en) * 2018-04-06 2019-10-24 株式会社日立製作所 Calculator verification unit
JP7112232B2 (en) 2018-04-06 2022-08-03 株式会社日立製作所 Arithmetic unit verification device
CN110749813A (en) * 2018-07-24 2020-02-04 华邦电子股份有限公司 Test system and method for generating adaptive test recipe

Also Published As

Publication number Publication date
JP4652317B2 (en) 2011-03-16

Similar Documents

Publication Publication Date Title
US6074426A (en) Method for automatically generating behavioral environment for model checking
RU2383926C2 (en) Method and system for controlling physical system model robustness
US20080112520A1 (en) Asynchronous interface methods and apparatus
US20030149916A1 (en) Fault verification apparatus
JP2003233639A5 (en)
Pevtsov et al. Design for testability of integrated circuits and project protection difficulties
JP4652317B2 (en) Logic circuit functional verification apparatus, functional coverage item verification method, and program
KR100966010B1 (en) An n-squared algorithm for optimizing correlated events
US8560987B2 (en) Test functionality integrity verification for integrated circuit design
JP2755237B2 (en) Simulation apparatus and method
JP3169930B2 (en) Automatic test pattern generation device and automatic test pattern generation method
JP2005043274A (en) Failure mode specifying method and failure diagnostic device
US7904289B2 (en) Method and system for testing functionality of a chip checker
JP5151216B2 (en) Design method of integrated circuit consisting of logic function circuit and self-diagnosis circuit
Singh et al. Symbolic quick error detection for pre-silicon and post-silicon validation: Frequently asked questions
JP6949440B2 (en) Vector generator and vector generator program
JP2672893B2 (en) Failure simulation processor
JPH07121576A (en) Failure simulation device
JP3112297B2 (en) Method and apparatus for verifying software for programmable controller
CN115374735A (en) Automation for functional safety diagnostic coverage
JP2006153531A (en) Method and apparatus for evaluating test vector of semiconductor integrated circuit and method and apparatus for verifying same
JPH10283388A (en) Logic verifying device
JPH04273382A (en) Logic simulation system of lsi
JPH06324117A (en) Method and device for calculating failure detecting rate
JP2007080183A (en) Data processor and its control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091009

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101215

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131224

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees