JP7112232B2 - Arithmetic unit verification device - Google Patents

Arithmetic unit verification device Download PDF

Info

Publication number
JP7112232B2
JP7112232B2 JP2018073913A JP2018073913A JP7112232B2 JP 7112232 B2 JP7112232 B2 JP 7112232B2 JP 2018073913 A JP2018073913 A JP 2018073913A JP 2018073913 A JP2018073913 A JP 2018073913A JP 7112232 B2 JP7112232 B2 JP 7112232B2
Authority
JP
Japan
Prior art keywords
value
verification
input
arithmetic unit
output
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.)
Active
Application number
JP2018073913A
Other languages
Japanese (ja)
Other versions
JP2019185301A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2018073913A priority Critical patent/JP7112232B2/en
Publication of JP2019185301A publication Critical patent/JP2019185301A/en
Application granted granted Critical
Publication of JP7112232B2 publication Critical patent/JP7112232B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、演算器の検証装置に係り、特に、浮動小数点数を扱う演算器で、内部のとりうる値やおこりうる例外に着目した検証の網羅性を担保して、信頼性の高い検証を行うのに好適な演算器の検証装置に関する。 The present invention relates to a verification device for arithmetic units, and in particular, for arithmetic units that handle floating-point numbers, it is possible to ensure completeness of verification focusing on possible internal values and possible exceptions, and to perform highly reliable verification. The present invention relates to a device for verifying a computing unit suitable for performing

産業機器向けの計装制御装置の一部には、高い安全性が要求される。例えば、原子力発電所が故障した場合には人間社会や周囲の環境に及ぼす影響が大きいため、故障のリスクを許容範囲まで低減することが必須である。このため、これら産業機器向けの計装制御装置上で実行される演算アプリケーションには誤り、すなわちバグがないことが求められる。演算アプリケーションで用いられる多種多様な数値計算関数の演算の中核を担うユニットモジュールは、浮動小数点数演算器であるため、浮動小数点数演算器にバグが発生しないように正しい開発プロセスを踏む必要がある。バグを未然に防ぐ目的においては、浮動小数点数演算器の開発プロセスの中でも特に重要なのは検証である。浮動小数点数演算器は、固定小数点数演算器と比較して非常に複雑であり、また、演算の入力パターンには見落としがちな特殊演算ケースが多数存在する。可能であれば、検証時に浮動小数点数演算器に全入力パターンを入力し出力値の正しさを調べることで設計の正しさを証明すべきである。しかしながら、入力数が二つの加算器や乗算器は、精度が単精度(32ビット)の場合に、入力パターン数が2の64乗通りとなり、全入力パターンに対して特殊演算ケースを調査することは実質的に不可能である。 High safety is required for some of the instrumentation control devices for industrial equipment. For example, if a nuclear power plant fails, it will have a great impact on human society and the surrounding environment, so it is essential to reduce the risk of failure to an acceptable level. Therefore, it is required that the arithmetic applications executed on the instrumentation control device for these industrial equipments are error-free, that is, bug-free. Since the unit module that plays the core of the calculation of various numerical calculation functions used in arithmetic applications is a floating point arithmetic unit, it is necessary to go through the correct development process so that bugs do not occur in the floating point arithmetic unit. . For the purpose of preventing bugs, verification is the most important part of the floating-point arithmetic unit development process. Floating-point calculators are much more complex than fixed-point calculators, and there are many special calculation cases that tend to be overlooked in the calculation input patterns. If possible, the correctness of the design should be proved by inputting all input patterns to the floating-point arithmetic unit and checking the correctness of the output values during verification. However, for adders and multipliers with two inputs, when the precision is single precision (32 bits), the number of input patterns is 2 to the 64th power. is virtually impossible.

したがって、現実的な工数で検証を完了する必要があるため、カバレッジという概念を導入して、全入力パターンを検証する検証全体の母数に対して現状の検証進捗度合が、どの程度十分であるか定量的に測定する必要がある。 Therefore, since it is necessary to complete verification in a realistic number of man-hours, the concept of coverage is introduced to determine how much the current verification progress is sufficient for the overall verification parameters for verifying all input patterns. need to be measured quantitatively.

カバレッジによる検証に関しては、例えば、特許文献1には、RTL(Register Transfer Level)記述を前提とした回路検証において、RTL記述の全記述のうち、シミュレーションで何行実行されたかを計測するラインカバレッジが説明されている(段落番号0002)。 Regarding verification by coverage, for example, in Patent Document 1, in circuit verification on the premise of RTL (Register Transfer Level) description, line coverage that measures how many lines are executed in simulation among all descriptions of RTL description is described. (Paragraph No. 0002).

特開2008-59032号公報JP-A-2008-59032

特許文献1に記載のRTL記述の回路記述言語により記述された回路のラインカバレッジで計測可能な検証進捗度合の適用範囲は、一般的な固定小数点数演算器や制御回路であり、複雑な浮動小数点数演算器の特殊演算ケースには適用不可能な問題がある。これは、浮動小数点数演算器は、動作が複雑であり、上述のように検証すべき入力値の入力パターンの組合せと、その出力値の出力パターンが膨大になることが要因である。 The application range of the verification progress measurable by the line coverage of the circuit described by the circuit description language of the RTL description described in Patent Document 1 is general fixed-point arithmetic units and control circuits, and complex floating-point There are problems that are not applicable to special arithmetic cases of arithmetic units. This is because the operation of the floating-point calculator is complicated, and the combinations of input patterns of input values to be verified and the output patterns of their output values are enormous as described above.

このように、従来のカバレッジの計測においては、入力値の入力パターンの組合せと、その出力値の出力パターンにのみ、着目して、浮動小数点数演算器の内部で取りうる値と、カバレッジの関係については考慮されていない。入力値の入力パターンの組合せと、その出力値の出力パターンの組合せが膨大であっても、浮動小数点数演算器の内部で取りうるある値のパターンが少ないときには、その値に着目して、検証することにより、カバレッジの値を上げることができ、検証の信頼性を向上させることができる。然し、特許文献1の回路検証のカバレッジの計測は、それをどのようにおこなうのか示唆されていない。 Thus, in the conventional coverage measurement, the relationship between the values that can be taken inside the floating-point arithmetic unit and the coverage is focused only on the combination of the input pattern of the input values and the output pattern of the output values. is not considered. Even if the number of combinations of input patterns of input values and output patterns of output values is enormous, when there are few patterns of values that can be taken inside the floating-point arithmetic unit, verification is performed by focusing on the values. By doing so, the coverage value can be increased, and the reliability of verification can be improved. However, the measurement of circuit verification coverage in Patent Document 1 does not suggest how to do it.

また、浮動小数点数演算器には、浮動小数点数演算に際しての様々な例外(例えば、Zero除算(Division by Zero)、オーバーフロー(Overflow))が定義されている。このような例外発生が起こりうる入力値の境界で検証することは、浮動小数点数演算器の信頼性を向上させるのに、重要な意義を有する。しかしながら、特許文献1の回路検証のカバレッジの計測においては、例外発生が起こりうる入力値の境界でのカバレッジをどのように計測すればよいかについては示唆されていない。 In addition, various exceptions (for example, division by zero and overflow) are defined for floating-point arithmetic units. Verification of input value boundaries where such exceptions can occur is of great significance in improving the reliability of floating-point arithmetic units. However, in the coverage measurement of circuit verification in Patent Document 1, there is no suggestion as to how coverage should be measured at boundaries of input values where exceptions can occur.

本発明の目的は、浮動小数点数演算器の特殊演算ケースの検証の進捗度合を定量的に計測可能して、信頼性の高い検証をおこなうことのできる演算器の検証装置を提供することにある。 SUMMARY OF THE INVENTION It is an object of the present invention to provide an arithmetic unit verification apparatus capable of quantitatively measuring the progress of verification of a special operation case of a floating-point arithmetic unit and performing highly reliable verification. .

本発明の演算器の検証装置の構成は、好ましくは、RTL(Register Transfer Level)記述によるハードウェア記述言語により機能を記述された演算器を検証する演算器の検証装置であって、ハードウェア記述言語を解釈実行して、入力値に対して出力値として出力する論理シミュレータと、入力値に対して規定の演算をおこない、期待値として出力する高信頼演算器とを有し、論理シミュレータの出力する出力値と、高信頼演算器の出力する期待値とを比較することにより、ハードウェア記述言語により機能を記述された演算器を検証する演算器を検証するダイナミック検証装置を有し、ダイナミック検証装置は、ハードウェア記述言語により記述されたモジュールの内部に用いられる中間ポートを参照し、ある中間ポートの取りうる値に対しての検証の網羅性を算出して、中間値カバレッジとして出力するようにしたものである。 The configuration of the arithmetic unit verification apparatus of the present invention is preferably an arithmetic unit verification apparatus for verifying an arithmetic unit whose function is described in a hardware description language based on RTL (Register Transfer Level) description, wherein the hardware description It has a logic simulator that interprets and executes a language and outputs an output value for an input value, and a high-reliability arithmetic unit that performs a specified operation on the input value and outputs an expected value, and the output of the logic simulator. A dynamic verification device for verifying a computing unit whose function is described in a hardware description language by comparing the output value of the high-reliability computing unit with the expected value output by the high-reliability computing unit. The device refers to an intermediate port used inside a module described in a hardware description language, calculates the coverage of verification for possible values of a certain intermediate port, and outputs it as intermediate value coverage. It is the one that was made.

また、本発明の演算器の検証装置の構成は、好ましくは、RTL記述によるハードウェア記述言語により機能を記述された演算器を検証する演算器の検証装置であって、ハードウェア記述言語を解釈実行して、入力値に対して出力値として出力する論理シミュレータと、入力値に対して規定の演算をおこない、期待値として出力する高信頼演算器とを有し、論理シミュレータの出力する出力値と、高信頼演算器の出力する期待値とを比較することにより、ハードウェア記述言語により機能を記述された演算器を検証する演算器を検証するダイナミック検証装置を有し、ダイナミック検証装置は、ハードウェア記述言語により記述されたモジュールの入力値における例外が発生する境界値に対しての検証の網羅性を算出して、例外発生境界カバレッジとして出力するようにしたものである。 Further, the configuration of the arithmetic unit verification apparatus of the present invention is preferably an arithmetic unit verification apparatus for verifying an arithmetic unit whose function is described in a hardware description language by RTL description, and interprets the hardware description language. A logic simulator that executes and outputs an output value for an input value, and a highly reliable computing unit that performs a specified operation on the input value and outputs an expected value, and the output value output by the logic simulator and an expected value output from the highly reliable computing unit to verify the computing unit whose function is described in a hardware description language, the dynamic verification unit verifying the computing unit, The coverage of verification with respect to boundary values where exceptions occur in input values of a module described in a hardware description language is calculated and output as exception generation boundary coverage.

本発明によれば、浮動小数点数演算器の特殊演算ケースの検証の進捗度合を定量的に計測可能して、信頼性の高い検証をおこなうことのできる演算器の検証装置を提供することができる。 According to the present invention, it is possible to provide an arithmetic unit verification apparatus capable of quantitatively measuring the progress of verification of a special operation case of a floating-point arithmetic unit and performing highly reliable verification. .

浮動小数点数演算器の検証装置の機能構成図である。1 is a functional configuration diagram of a verification device for a floating-point arithmetic unit; FIG. 検証対象とする浮動小数点数演算器の回路構成と、その回路構成に対応するSVA、RTL、LIBの内容を示す図である。1 is a diagram showing the circuit configuration of a floating-point arithmetic unit to be verified, and the contents of SVA, RTL, and LIB corresponding to the circuit configuration; FIG. 浮動小数点数演算器の検証装置のハードウェア・ソフトウェア構成図である。1 is a hardware/software configuration diagram of a verification device for a floating-point arithmetic unit; FIG. ダイナミック検証装置の機能構成図である。3 is a functional configuration diagram of a dynamic verification device; FIG. ダイナミック検証装置の計側部の機能構成図である。It is a functional block diagram of the measuring side part of a dynamic verification apparatus. 入力生成部の機能構成図である。4 is a functional configuration diagram of an input generation unit; FIG. 浮動小数点数演算器の検証装置の全体処理を示すフローチャートである。10 is a flowchart showing the overall processing of the verification device for floating-point arithmetic units; 形式検証の処理を示すフローチャートである。4 is a flowchart showing formal verification processing; ダイナミック検証装置によるダイナミック検証の処理を示すフローチャートである。4 is a flowchart showing dynamic verification processing by a dynamic verification device; 論理シミュレータにおける中間値指向のダイナミック検証の実行イメージを示す図である。FIG. 10 is a diagram showing an execution image of intermediate-value-oriented dynamic verification in a logic simulator; 中間値指向のダイナミック検証の処理を示すフローチャートである。FIG. 11 is a flow chart showing the process of intermediate value-oriented dynamic verification; FIG. 検査対象ポートについての処理を示すフローチャートである。FIG. 11 is a flowchart showing processing for a port to be inspected; FIG. 検査対象不足中間値の処理を示すフローチャートである。It is a flow chart which shows the processing of the test object shortage median value. 加算器における例外発生境界指向のダイナミック検証の検証内容の例を示す図である。FIG. 10 is a diagram showing an example of verification contents of exception occurrence boundary-oriented dynamic verification in an adder; 加算器における例外発生境界指向のダイナミック検証の処理を示すフローチャートである。FIG. 11 is a flow chart showing a process of exception occurrence boundary-oriented dynamic verification in an adder; FIG. (X1,X2)周辺の境界探索と照合の処理を示すフローチャートである。FIG. 10 is a flow chart showing the process of boundary search and collation around (X1, X2); FIG. 乗算器における例外発生境界指向のダイナミック検証の検証内容の例を示す図である。FIG. 10 is a diagram showing an example of verification contents of exception occurrence boundary-oriented dynamic verification in a multiplier; 乗算器における例外発生境界指向のダイナミック検証の処理を示すフローチャートである。FIG. 11 is a flow chart showing a process of exception occurrence boundary-oriented dynamic verification in a multiplier; FIG. 除算器における例外発生境界指向のダイナミック検証の検証内容の例を示す図である。FIG. 10 is a diagram showing an example of verification contents of exception occurrence boundary-oriented dynamic verification in a divider; 除算器における例外発生境界指向のダイナミック検証の処理を示すフローチャートである。FIG. 11 is a flow chart showing a process of exception occurrence boundary-oriented dynamic verification in a divider; FIG. 完全乱数によるダイナミック検証の処理を示すフローチャートである。10 is a flow chart showing processing of dynamic verification using perfect random numbers.

以下、本発明に係る一実施形態を、図1ないし図21を用いて説明する。 An embodiment according to the present invention will be described below with reference to FIGS. 1 to 21. FIG.

先ず、図1ないし図6を用いて本発明の一実施形態に係る浮動小数点数演算器の検証装置の構成について説明する。
本実施形態で説明する浮動小数点数演算器の検証装置は、検証される浮動小数点数演算器の機能がRTLの記述レベルを有するハードウェア記述言語(例えば、Verilog HDL)で記述されていることを前提とする。
First, the configuration of a verification apparatus for a floating-point arithmetic unit according to an embodiment of the present invention will be described with reference to FIGS. 1 to 6. FIG.
The floating-point arithmetic unit verification apparatus described in this embodiment confirms that the function of the floating-point arithmetic unit to be verified is described in a hardware description language (for example, Verilog HDL) having an RTL description level. It is assumed.

先ず、図1と図2を用いて浮動小数点数演算器の検証装置に入力されるデータと本実施形態に関連するハードウェア記述言語の基礎概念について説明する。
浮動小数点数演算器の検証装置100には、図1に示されるように、RTL400、LIB410、SVA420、検査対象ポートリスト800が入力される。
First, the basic concept of the hardware description language related to the data input to the floating-point arithmetic unit verification device and the present embodiment will be described with reference to FIGS. 1 and 2. FIG.
As shown in FIG. 1, RTL 400, LIB 410, SVA 420, and inspection target port list 800 are input to verification apparatus 100 for floating-point arithmetic units.

ハードウェア記述言語では、ハードウェア記述言語の記述の抽象度(水準)が定義されている。RTLとは、レジスタと演算器とその間の配線(接続)を記述する抽象度のレベルである。RTL400とは、RTLで記述されたハードウェア記述言語のソースコードを意味するものとする。 The hardware description language defines the level of abstraction (level) of the description of the hardware description language. RTL is a level of abstraction that describes registers, arithmetic units, and wiring (connections) therebetween. The RTL 400 means source code of a hardware description language written in RTL.

ハードウェア記述言語におけるアサーションは、設計した回路で期待されている動作や禁止されている動作を記述した文であり、このアサーションをベースとした検証により、RTLで記述されたハードウェア記述言語の論理シミュレータの動作を検証することができる。アサーションを記述する言語としては、代表的なものに、SVA(System Verilog Assertion)があり、SVA420は、SVAで記述されたソースコードを意味するものとする。 Assertions in a hardware description language are statements that describe the behavior expected or prohibited in a designed circuit. The operation of the simulator can be verified. A representative language for writing assertions is SVA (System Verilog Assertion), and SVA 420 means source code written in SVA.

Verilog HDLなどのハードウェア記述言語においては、機能単位を「モジュール」としてとらえ、その入出端子を仮想化したものを「ポート」としている。本実施形態でも、これらの用語を用いることにする。 In a hardware description language such as Verilog HDL, a functional unit is regarded as a "module", and a virtualized input/output terminal is called a "port". These terms will also be used in this embodiment.

浮動小数点数演算器をソフトウェアで記述した機能構成が図2に示される。図2において、入力ポートとしてINPUT_1、INPUT_2の二つを有し、出力ポートとしてOUTPUTを持ち、例外出力ポートとして、EXCEPTIONを有するものとする。 FIG. 2 shows a functional configuration in which the floating-point calculator is written in software. In FIG. 2, it has two input ports INPUT_1 and INPUT_2, an output port OUTPUT, and an exception output port EXCEPTION.

ここで、浮動小数点数演算器の機能を記述するモジュールを「トップモジュール」ということにする。トップモジュールは、その内部構成として、下位モジュールのモジュールA、モジュールB、モジュールC、…、モジュールZと機能ブロックレベルで分割されており、RTL400は、この回路構成のモジュールレベルで記述されている。また、トップモジュールの内部のポート(下位レベルの入力ポート、出力ポートでもある)を「中間ポート」または「内部ポート」ということにする。さらに、中間ポートの取りうる値を「中間値」ということにする。 Here, the module that describes the function of the floating-point calculator is called the "top module". The top module has its internal configuration divided into lower modules module A, module B, module C, . . . , and module Z at the functional block level. Also, ports inside the top module (also lower-level input ports and output ports) will be referred to as "intermediate ports" or "internal ports." Further, the value that the intermediate port can take is called "intermediate value".

形式検証用の検証プログラムのSVA420は、このRTL400のモジュールレベルでの検証をおこなうために、各モジュールに一対一で対応するようにアサーション記述される。すなわち、浮動小数点数演算器はそのサブモジュールそれぞれについて要求仕様が定義されており、モジュールA、モジュールB、モジュールC、…、モジュールZそれぞれに対してその要求仕様を満足するか否かを証明するアサーションA、アサーションB、アサーションC、…、アサーションZが用意してある。また、浮動小数点数演算器のトップモジュールの要求仕様ついては、トップアサーションで動作記述の正しさの証明をおこなう。なお、浮動小数点数演算器の演算内容は、形式検証のアサーション記述では表現不可能のため、トップアサーションではインターフェースプロトコルなど上位階層との接続に必要な機能についての証明をおこなう。 In the verification program SVA 420 for formal verification, assertions are described so as to correspond to each module on a one-to-one basis in order to verify the RTL 400 at the module level. That is, the floating-point arithmetic unit has required specifications defined for each of its submodules, and it is proved whether or not each of the modules A, B, C, . . . , and Z satisfies the required specifications. Assertion A, assertion B, assertion C, . . . , assertion Z are prepared. Also, regarding the required specifications of the top module of the floating-point arithmetic unit, the correctness of the behavioral description is proved by the top assertion. Since the operation contents of the floating-point arithmetic unit cannot be expressed by the assertion description for formal verification, the top assertion proves the functions required for connection with the upper layer such as the interface protocol.

LIB(演算ライブラリ)410は、不足中間値を求める際に、モジュールの出力ポートの値から入力ポートの値を求めるときに使用される(詳細は後述)関数のソースコードであり、RTLの各モジュールと一対一となるように関数が構成されている。各関数は、各モジュールと同一の演算内容となるように設計されている。すなわち、トップモジュールとトップ関数が対応しており、モジュールA、モジュールB、モジュールC、…、モジュールZと関数A、関数B、関数C、…、関数Zの演算内容は、RTLのタイミング情報をのぞき、それぞれ等価である。ここで、等価とは、モジュールと同一の入力値に対して、同じ出力値を返すことを意味する。 LIB (arithmetic library) 410 is the source code of the function (details will be described later) used when obtaining the value of the input port from the value of the output port of the module when obtaining the missing intermediate value. The function is configured so that it is one-to-one with Each function is designed to have the same operation content as each module. That is, the top module corresponds to the top function, and the calculation contents of module A, module B, module C, . . . module Z and function A, function B, function C, . Peeping, respectively, are equivalent. Here, equivalence means returning the same output value for the same input value as the module.

検査対象ポートリスト800は、中間値カバレッジを取得する対象とするポートのリストである(詳細は後述)。 The inspection target port list 800 is a list of ports for which intermediate value coverage is to be acquired (details will be described later).

次に、本実施形態の浮動小数点数演算器の検証装置の構成と、これらのデータを入力しておこなう検証について説明する。
浮動小数点数演算器の検証装置100は、図1に示されるように、制御部110、形式検証装置200、ダイナミック検証装置300、検証結果集約部120からなる。制御部110は、検証装置の全体的な動作を監視し制御する部分である。
Next, the configuration of the verification device for the floating-point arithmetic unit of this embodiment and the verification performed by inputting these data will be described.
A verification device 100 for a floating-point arithmetic unit consists of a control unit 110, a formal verification device 200, a dynamic verification device 300, and a verification result aggregation unit 120, as shown in FIG. The control unit 110 is a part that monitors and controls the overall operation of the verification device.

これまでに述べたとおり、浮動小数点数演算器の検証装置100は、浮動小数点数演算器の信頼性を担保することを目的としている。この目的を達成するために、検証装置は二つの異なる検証方式で浮動小数点数演算器の検証をおこなう。一つは、形式検証であり、今一つは、ダイナミック検証である。浮動小数点数演算器の検証装置100においては、形式検証装置200が、浮動小数点数演算器のRTL400を形式検証し、ダイナミック検証装置300が、浮動小数点数演算器のRTL400をダイナミック検証する。 As described above, the verification apparatus 100 for floating-point arithmetic units aims at ensuring the reliability of floating-point arithmetic units. In order to achieve this purpose, the verification device verifies floating-point arithmetic units by two different verification methods. One is formal verification and the other is dynamic verification. In the floating-point arithmetic unit verification apparatus 100, the formal verification apparatus 200 formally verifies the RTL 400 of the floating-point arithmetic unit, and the dynamic verification apparatus 300 dynamically verifies the RTL 400 of the floating-point arithmetic unit.

形式検証は、RTL400の動作記述が要求仕様を満たしていることを論理的に証明する検証方式であり、形式検証プログラムであるSVA420に証明が記述されている。形式検証ツールがRTL400とそのRTL400に対する証明が記載されているSVA420のセットを読み込むことで証明が実行され、証明が完了すると実行結果のデータとして証明結果630とラインカバレッジ520を得ることができる。証明結果630には、証明が完了したか証明が完了できなかったが記載されており、証明が完了しなかった場合には反例が記載される。ラインカバレッジ520は、形式検証の証明においてSVAが参照したRTLの行数の割合を反映する指標である。浮動小数点数演算器全体としての潜在的なバグの低減を目的とした場合に、浮動小数点数演算器を構成するすべてのRTLのすべての行が要求仕様通りに正しく動作している証明が完了している必要がある。形式検証装置がラインカバレッジを計測しそれが100%を達成していることを確認することにより、浮動小数点数演算器が要求仕様通りに正しく設計されていることが確認可能である。 Formal verification is a verification method that logically proves that the behavioral description of the RTL 400 satisfies the required specifications, and the proof is described in the SVA 420, which is a formal verification program. The proof is executed by the formal verification tool reading the RTL 400 and the set of SVA 420 in which the proof for the RTL 400 is described, and when the proof is completed, proof result 630 and line coverage 520 can be obtained as execution result data. The proof result 630 describes whether the proof was completed or not, and if the proof was not completed, a counterexample is described. The line coverage 520 is a metric that reflects the percentage of lines of RTL referenced by the SVA in the formal verification proof. For the purpose of reducing potential bugs in the floating-point arithmetic unit as a whole, we have completed proof that all lines of all RTL that make up the floating-point arithmetic unit operate correctly according to the required specifications. must be By measuring the line coverage with the formal verification device and confirming that it achieves 100%, it is possible to confirm that the floating-point arithmetic unit is correctly designed according to the required specifications.

しかしながら、形式検証においては、浮動小数点数演算器の入力パターンデータに対する出力パターンデータを網羅的に検証することは非常に困難である。これは浮動小数点数演算器の入力パターンには、非常に多くの特殊演算ケースが存在するため、それらすべての特殊演算ケースを要求仕様として定義し、SVAに記載する数式で網羅的に表現することは非現実的であるからである。そこで、形式検証では網羅しきれない入出力データが正しいか否かを検証するために、浮動小数点数演算器の検証装置100では、ダイナミック検証装置300を導入する。ダイナミック検証装置300は、検証装置に入力される浮動小数点数演算器と同じ種類の使用実績のある演算器を内部に備えている。 However, in formal verification, it is very difficult to comprehensively verify the output pattern data for the input pattern data of the floating-point calculator. This is because the input pattern of the floating-point arithmetic unit has an extremely large number of special operation cases, so all these special operation cases must be defined as required specifications and comprehensively expressed in the formulas described in the SVA. is unrealistic. Therefore, in order to verify whether or not the input/output data that cannot be covered by the formal verification is correct, the verification device 100 for the floating-point arithmetic unit introduces a dynamic verification device 300 . The dynamic verification device 300 is internally provided with the same type of arithmetic unit that has been used as the floating-point arithmetic unit that is input to the verification device.

本明細書では、この使用実績のある演算器を以下、「高信頼モデル」、「高信頼演算器」ということにする。ダイナミック検証装置300は、RTL400と高信頼モデルに同じ入力データを印加し、その結果が一致しているか否かを確認する。これを、検証の規格で定める十分な回数をおこない、各試行の入力データや高信頼モデルとRTL400のそれぞれの出力データやそれらの一致ないし不一致の結果は、照合結果620に保存される。検証対象とする浮動小数点数演算器に設計ミスやバグなどがなければ、全ての入力パターンに対して、RTL400の演算結果が高信頼モデルの演算結果と一致することが期待される。 In this specification, the calculator with a track record of use is hereinafter referred to as a "highly reliable model" and a "highly reliable calculator". The dynamic verification device 300 applies the same input data to the RTL 400 and the high-reliability model, and checks whether the results match. This is performed a sufficient number of times as determined by the verification standard, and the input data of each trial, the output data of the high-reliability model and the RTL 400 , and the results of matching or non-matching of them are saved in the matching result 620 . If there are no design errors or bugs in the floating-point arithmetic unit to be verified, it is expected that the calculation result of the RTL 400 will match the calculation result of the highly reliable model for all input patterns.

例外発生境界カバレッジ510と中間値カバレッジ500は、ともに、ダイナミック検証装置300が、特に重点的に調査すべき特殊なデータ入力パターンの検証の網羅性を示す指標である。 Both the exception occurrence boundary coverage 510 and the intermediate value coverage 500 are indices that indicate the completeness of the verification of special data input patterns that the dynamic verification device 300 should particularly focus on.

浮動小数点数演算器は、演算結果がそのビットフィールドで表現可能な値を逸脱する場合、0で除算するなどの不正な演算が実行された場合に、オーバーフロー例外やZero除算例外などの例外を出力する。高い安全性が要求されるシステムには、例外が発生するデータパターンでは演算器から正しく例外が出力されることが要求される。したがって、例外が発生しない入力データに対しては例外が発生せず、例外が発生する入力データに対しては例外が正しく発生することを検証する必要がある。この目的を達成するために、例外が発生する入力データと例外が発生しない入力データの境界をすべてでダイナミック検証を実行し照合結果も正しい必要がある。例外が発生する境界値の検証の網羅性を確認するために、検証すべき例外の境界すべてを母数とした場合の、母数に対する照合結果の一致数を例外発生境界カバレッジ510として出力する。 Floating-point arithmetic units output exceptions such as overflow exceptions and division-by-zero exceptions when the operation result deviates from the value that can be represented by the bit field, or when an illegal operation such as division by 0 is executed. do. Systems that require high security are required to correctly output exceptions from arithmetic units in data patterns that cause exceptions. Therefore, it is necessary to verify that exceptions do not occur for input data that does not cause exceptions, and that exceptions occur correctly for input data that causes exceptions. In order to achieve this purpose, it is necessary to perform dynamic verification on all boundaries between input data where exceptions occur and input data where exceptions do not occur, and the matching results are also correct. In order to confirm the completeness of the verification of boundary values where exceptions occur, the number of match results of collation against parameters is output as exception occurrence boundary coverage 510 when all boundaries of exceptions to be verified are used as parameters.

また、中間値カバレッジ500は、後に詳しく述べるが、浮動小数点数演算器の内部のポートごとに、その取りうる値に対しての検証の網羅性を示す指標である。中間値カバレッジ500を参照することにより、浮動小数点数演算器の様々な特殊演算ケースについての検証の網羅性が知ることができる。ここで、検査対象ポートリスト800は、中間値カバレッジ500を取得すべき内部ポートの情報のリストである。 Further, the intermediate value coverage 500, which will be described in detail later, is an index indicating the coverage of verification of possible values for each internal port of the floating-point arithmetic unit. By referring to the intermediate value coverage 500, it is possible to know the completeness of verification for various special operation cases of the floating-point arithmetic unit. Here, the inspection target port list 800 is a list of information on internal ports for which the intermediate value coverage 500 should be acquired.

検査対象ポートリスト800は、中間値カバレッジ500を取得する検証プロセスで順番にポートを検査していく。LIB410は、中間値カバレッジ500算出の際に、モジュールに対する出力ポートの値から入力ポートの値を算出するための関数からなるデータである(詳細は後述)。証明結果630、照合結果620、ラインカバレッジ520、例外発生境界カバレッジ510、中間値カバレッジ500の各種検証結果が揃うと、検証結果集約部120がそれらの情報をまとめて人にとってわかりやすい形式で検証結果を出力する。検証結果600内の総合カバレッジ610は、各種カバレッジの状況を数値で示すためのものである。検証結果600内の詳細情報611は、形式検証の証明結果や反例、照合結果それぞれの内容と発生する具体的な条件を示したものである。 The inspection target port list 800 sequentially inspects ports in the verification process for obtaining the intermediate value coverage 500 . The LIB 410 is data consisting of a function for calculating the value of the input port from the value of the output port for the module when calculating the intermediate value coverage 500 (details will be described later). When various verification results of the proof result 630, the matching result 620, the line coverage 520, the exception occurrence boundary coverage 510, and the intermediate value coverage 500 are collected, the verification result aggregating unit 120 summarizes the information and outputs the verification result in a form that is easy for people to understand. Output. A comprehensive coverage 610 in the verification result 600 is for numerically indicating the status of various coverages. Detailed information 611 in the verification result 600 indicates the content of each proof result, counterexample, and matching result of formal verification, and specific conditions that occur.

次に、図3を用いて、浮動小数点数演算器の検証装置のハードウェア・ソフトウェア構成について説明する。
浮動小数点数演算器の検証装置100のハードウェア構成としては、例えば、図3に示されるような一般的な情報処理装置、例えば、パーソナルコンピュータで実現される。
浮動小数点数演算器の検証装置100は、CPU(Central Processing Unit)902、主記憶装置904、ネットワークI/F906、表示I/F908、入出力I/F910、補助記憶I/F912が、バスにより結合された形態になっている。
Next, with reference to FIG. 3, the hardware/software configuration of the floating-point arithmetic unit verification device will be described.
As for the hardware configuration of the floating-point calculator verification device 100, for example, it is realized by a general information processing device such as a personal computer as shown in FIG.
The floating-point arithmetic unit verification device 100 includes a CPU (Central Processing Unit) 902, a main memory device 904, a network I/F 906, a display I/F 908, an input/output I/F 910, and an auxiliary memory I/F 912, which are coupled via a bus. It is in the form of

CPU900は、浮動小数点数演算器の検証装置100の各部を制御し、主記憶装置904に必要なプログラムをロードして実行する。また、CPU900には、コプロセッサとして、FPU902(Floating Point Unit:浮動小数演算ユニット)が内蔵されており、浮動小数点演算の命令語をフッチしたときには、FPU902に処理を依頼して実行させる。FPU902が、ハードウェアで実現した高信頼モデルに該当する。本実施形態では、FPU902をCPU900のコプロセッサとして実現する形式を示したが、I/Oポートを接続して、通常の周辺機器と同様にI/Oポートを介してデータのやり取りをおこなう、いわゆる、I/Oプロセッサ形式でもよい。主記憶装置904は、通常、RAMなどの揮発メモリで構成され、CPU900が実行するプログラム、参照するデータが記憶される。 The CPU 900 controls each part of the floating-point arithmetic unit verification apparatus 100, loads necessary programs into the main memory 904, and executes them. The CPU 900 also incorporates an FPU 902 (Floating Point Unit) as a coprocessor, and when an instruction word for floating point arithmetic is touched, the FPU 902 is requested to execute processing. The FPU 902 corresponds to a highly reliable model realized by hardware. In this embodiment, the FPU 902 is implemented as a coprocessor of the CPU 900. However, an I/O port is connected to exchange data via the I/O port in the same manner as a normal peripheral device. , I/O processor type. The main memory device 904 is normally composed of a volatile memory such as a RAM, and stores programs executed by the CPU 900 and data to be referred to.

ネットワークI/F906は、ネットワークと接続するためのインタフェースである。表示I/F908は、LCD(Liquid Crystal Display)などの表示装置920を接続するためのインタフェースである。入出力I/F910は、入出力装置を接続するためのインタフェースである。図3の例では、キーボード930とポインティングデバイスのマウス932が接続されている。 A network I/F 906 is an interface for connecting with a network. A display I/F 908 is an interface for connecting a display device 920 such as an LCD (Liquid Crystal Display). The input/output I/F 910 is an interface for connecting input/output devices. In the example of FIG. 3, a keyboard 930 and a mouse 932 as a pointing device are connected.

補助記憶I/F912は、HDD(Hard Disk Drive)950やDVDドライブ(Digital Versatile Disk)などの補助記憶装置を接続するためのインタフェースである。 Auxiliary storage I/F 912 is an interface for connecting auxiliary storage devices such as HDD (Hard Disk Drive) 950 and DVD drive (Digital Versatile Disk).

HDD950は、大容量の記憶容量を有しており、本実施形態を実行するためのプログラムが格納されている。浮動小数点数演算器の検証装置100には、論理シミュレータプログラム1000、形式検証プログラム1010、期待値・比較値比較プログラム1020、不足中間値生成プログラム1030、境界値探索プログラム1040、乱数生成プログラム1050がインストールされている。 The HDD 950 has a large storage capacity and stores programs for executing this embodiment. A logic simulator program 1000, a formal verification program 1010, an expected value/comparison value comparison program 1020, an insufficient intermediate value generation program 1030, a boundary value search program 1040, and a random number generation program 1050 are installed in the verification device 100 for a floating-point arithmetic unit. It is

論理シミュレータプログラム1000は、ダイナミック検証装置300における論理シミュレータ(後述)を実行するプログラムである。形式検証プログラム1010は、形式検証装置200における形式検証をおこなうプログラムである。期待値・出力値比較プログラム1020は、高信頼モデルの出力する期待値とを照合し比較するプログラムである。不足中間値生成プログラム1030は、中間値指向のダイナミック検証において、不足中間値(詳細は後述)を生成するプログラムである。境界値探索プログラム1040は、例外発生指向のダイナミック検証において、検証するべき境界値を探索するプログラムである。乱数生成プログラム1050は、検証の対象を求めるための元データとなる乱数を生成するプログラムである。 A logic simulator program 1000 is a program for executing a logic simulator (described later) in the dynamic verification device 300 . The formal verification program 1010 is a program that performs formal verification in the formal verification device 200 . The expected value/output value comparison program 1020 is a program for collating and comparing with the expected value output by the highly reliable model. The missing intermediate value generation program 1030 is a program for generating missing intermediate values (details will be described later) in intermediate value-oriented dynamic verification. The boundary value search program 1040 is a program that searches for boundary values to be verified in exception generation-oriented dynamic verification. The random number generation program 1050 is a program that generates random numbers that serve as original data for obtaining verification targets.

次に、図4を用いてダイナミック検証装置の機能構成について説明する。
ダイナミック検証装置300は、浮動小数点数演算器のRTL400と、それと同種類の演算をおこなう高信頼モデル220の比較をおこなう。比較に際しては、同じ入力データをそれぞれに入力し、RTL400の出力値と高信頼モデル220の期待値が一致するか否かを確かめる。論理シミュレータ230は、RTL400を受け取り、RTL400の動作記述に従って実際の論理回路と同等の動作を提供する機能部である。RTL400は、論理シミュレータ230上で動作し、演算結果としての出力値720や中間ポートの中間値730を出力する。
Next, the functional configuration of the dynamic verification device will be described with reference to FIG.
The dynamic verification device 300 compares the RTL 400 of the floating-point calculator and the high-reliability model 220 that performs the same type of calculation. For comparison, the same input data is input to each of them, and it is confirmed whether or not the output value of the RTL 400 and the expected value of the high reliability model 220 match. The logic simulator 230 is a functional unit that receives the RTL 400 and provides behavior equivalent to an actual logic circuit according to the behavioral description of the RTL 400 . The RTL 400 operates on the logic simulator 230 and outputs an output value 720 as an operation result and an intermediate port intermediate value 730 .

入力生成部210は、主に乱数に基づき入力値を生成する機能部である。本実施形態のダイナミック検証装置300の検証方法は、三種類のダイナミック検証から構成される。三種類のダイナミック検証とは、中間値指向のダイナミック検証と、例外境界値指向のダイナミック検証と、完全乱数のダイナミック検証である(詳細は後述)。 The input generation unit 210 is a functional unit that generates input values mainly based on random numbers. The verification method of the dynamic verification device 300 of this embodiment consists of three types of dynamic verification. The three types of dynamic verification are intermediate value-oriented dynamic verification, exception boundary value-oriented dynamic verification, and completely random number dynamic verification (details will be described later).

中間値指向のダイナミック検証において、入力生成部210は、入力値700を出力し、それを論理シミュレータ230に入力する。中間値指向のダイナミック検証においては、LIB410と不足中間値リスト740を用いて入力値を生成する場合がある(詳細は後述)。 In intermediate-value-oriented dynamic verification, the input generator 210 outputs an input value 700 and inputs it to the logic simulator 230 . In intermediate value-oriented dynamic verification, input values may be generated using the LIB 410 and the missing intermediate value list 740 (details will be described later).

計測部240は、高信頼モデル220から期待値710、論理シミュレータ230から出力値720と中間値730、入力生成部210から入力値700と、検査対象ポートリスト800のポート情報810を受け取り、ダイナミック検証装置300の出力データである照合結果620や例外発生境界カバレッジ510や中間値カバレッジ500を出力する。ここで、ポート情報810とは、検査対象ポートリスト800に挙げられる中間値カバレッジの計測対象とする中間ポートに関する情報である。
なお、これらダイナミック検証装置300の内部に存在する各種下位装置の機能や働きは、後の図9ないし図20に示すフローチャートで詳細に説明する。
The measurement unit 240 receives the expected value 710 from the high-reliability model 220, the output value 720 and the intermediate value 730 from the logic simulator 230, the input value 700 from the input generation unit 210, and the port information 810 of the inspection target port list 800, and performs dynamic verification. The collation result 620, the exception occurrence boundary coverage 510, and the intermediate value coverage 500, which are the output data of the device 300, are output. Here, the port information 810 is information relating to the intermediate ports listed in the inspection target port list 800 and to be measured for intermediate value coverage.
The functions and actions of various sub-devices that exist inside the dynamic verification device 300 will be explained in detail later with reference to flowcharts shown in FIGS.

次に、図5を用いてダイナミック検証装置における計測部の機能構成について説明する。
計測部240は、図5に示されるように、比較部241、検証結果集計部242、中間値集計部243からなる。
Next, the functional configuration of the measurement unit in the dynamic verification device will be described with reference to FIG.
The measurement unit 240 includes a comparison unit 241, a verification result totalization unit 242, and an intermediate value totalization unit 243, as shown in FIG.

比較部241は、高信頼モデル220の演算結果である期待値710とRTL400の論理シミュレータ230上での演算結果である出力値720を比較する。そして、1回分の比較に用いた入力値700と出力値720と期待値710と、それらの比較結果と、ポート情報810と中間値730を、関連付けて検証サンプル770として保存する。検証サンプル770は、検証ログ780に保存され、中間値730は、中間値ログ760に保存される。 The comparison unit 241 compares the expected value 710 that is the calculation result of the high-reliability model 220 and the output value 720 that is the calculation result on the logic simulator 230 of the RTL 400 . Then, the input value 700, the output value 720, and the expected value 710 used for one comparison, the comparison result thereof, the port information 810, and the intermediate value 730 are associated and stored as a verification sample 770. FIG. Validation samples 770 are stored in validation log 780 and intermediate values 730 are stored in intermediate value log 760 .

検証結果集計部242は、中間値指向ダイナミック検証では、検証ログ780から照合結果620と中間値カバレッジ500を出力し、例外発生境界指向ダイナミック検証では、検証ログ780から照合結果620と例外発生境界カバレッジ510を出力し、完全乱数ダイナミック検証では照合結果620のみを出力する。中間値指向ダイナミック検証では、中間値集計部243が中間値ログ760と検査対象ポートのビット幅から不足中間値(詳細は後述)を割り出し、不足中間値リスト740を出力する。 The verification result aggregating unit 242 outputs the matching result 620 and the intermediate value coverage 500 from the verification log 780 in the intermediate value oriented dynamic verification, and outputs the matching result 620 and the exception occurrence boundary coverage from the verification log 780 in the exception occurrence boundary oriented dynamic verification. 510, and only the matching result 620 is output in the fully random dynamic verification. In the intermediate-value-oriented dynamic verification, the intermediate-value aggregating unit 243 calculates missing intermediate values (details will be described later) from the intermediate-value log 760 and the bit width of the inspection target port, and outputs the missing intermediate-value list 740 .

次に、図6を用いてダイナミック検証装置における入力生成部の機能構成について説明する。
入力生成部210は、ライブラリ選択部211、乱数生成部212、不足中間値生成部213、入力値算出部214からなる。
Next, the functional configuration of the input generator in the dynamic verification device will be described with reference to FIG.
The input generation unit 210 includes a library selection unit 211 , a random number generation unit 212 , a missing intermediate value generation unit 213 and an input value calculation unit 214 .

完全乱数ダイナミック検証では、入力値算出部214は、乱数生成部212の出力した乱数から入力値700を出力する。中間値指向ダイナミック検証は、先ず乱数生成部212の生成する乱数から入力値700を生成し、中間値指向ダイナミック検証途中で、不足中間値リスト740が生成された場合には、不足中間値選択部213により、不足中間値750を一つ選択し、ライブラリ選択部211がLIB410からいずれかの関数を呼び出して、入力値算出部214が入力値を算出する(詳細は後述)。 In the complete random number dynamic verification, the input value calculator 214 outputs the input value 700 from the random number output by the random number generator 212 . In the intermediate value-oriented dynamic verification, first, an input value 700 is generated from random numbers generated by the random number generation unit 212. If a missing intermediate value list 740 is generated during the intermediate value-oriented dynamic verification, the missing intermediate value selection unit 213 selects one missing intermediate value 750, the library selection unit 211 calls any function from the LIB 410, and the input value calculation unit 214 calculates an input value (details will be described later).

次に、図7ないし図21を用いて浮動小数点数演算器の検証装置の処理について説明する。
先ず、図7を用いて浮動小数点数演算器の検証装置の全体処理を説明する。
浮動小数点数演算器の検証装置の全体処理では、先ず、形式検証装置200による形式検証処理をおこなう(S200)。
Next, the processing of the verification device for the floating-point arithmetic unit will be described with reference to FIGS. 7 to 21. FIG.
First, referring to FIG. 7, the overall processing of the verification device for floating-point arithmetic units will be described.
In the overall processing of the floating-point arithmetic unit verification device, first, formal verification processing is performed by the formal verification device 200 (S200).

次に、ダイナミック検証装置300によるダイナミック検証をおこなう(S300)。
そして、検証結果600を出力する(S110)。
検証結果600の出力としては、形式検証における全体証明数に対する証明完了数やラインカバレッジ520、ダイナミック検証における全体照合数に対する一致数や例外発生境界カバレッジ510、中間値カバレッジ500を総合カバレッジ610として出力する。詳細情報611には、形式検証で証明の対象にならなかった行や反例が出てしまったモジュールとアサーション情報、ダイナミック検証の照合で不一致となった入出力パターンや不足中間値が出てしまった中間値カバレッジ500の情報を出力する。
Next, dynamic verification is performed by the dynamic verification device 300 (S300).
Then, the verification result 600 is output (S110).
As an output of the verification result 600, the number of proof completions and line coverage 520 with respect to the total number of proofs in formal verification, the matching number with respect to the total number of verifications in dynamic verification, exception occurrence boundary coverage 510, and intermediate value coverage 500 are output as total coverage 610. . The detailed information 611 includes lines that were not subject to proof in the formal verification, modules and assertion information that contained counterexamples, input/output patterns that did not match in the matching of the dynamic verification, and missing intermediate values. Output the information of the median coverage 500 .

次に、図8を用いて形式検証装置による形式検証の処理について説明する。
これは、図7におけるS200の処理である。
先ず、トップモジュールをトップアサーションで形式検証し証明する(S201)。その証明の結果と、証明の対象となったトップモジュールの行数と、トップモジュール全体の行数を記録する。
Next, the formal verification processing by the formal verification device will be described with reference to FIG.
This is the process of S200 in FIG.
First, the top module is formally verified and certified by the top assertion (S201). Record the result of the proof, the number of lines of the top module that is the object of proof, and the number of lines of the entire top module.

次に、初期処理として、モジュールAを検証対象モジュールMODとし、アサーションAを形式検証プログラムASEとする(S202)。
次に、検証対象モジュールMODを形式検証プログラムASEで形式検証し証明する。そして、その証明の結果と、証明の対象となったトップモジュールの行数と、トップモジュール全体の行数を記録する(S203)。
次に、RTL400のすべてのモジュールを形式検証で検証したか否かを判定し(S204)、すべてのモジュールを形式検証で検証した場合には(S204:YES)、S206に進み、そうでない場合には(S204:NO)、S205に進む。
Next, as an initial process, the module A is set as the verification target module MOD, and the assertion A is set as the formal verification program ASE (S202).
Next, the verification target module MOD is formally verified and certified by the formal verification program ASE. Then, the result of the proof, the number of lines of the top module to be proofed, and the number of lines of the entire top module are recorded (S203).
Next, it is determined whether or not all modules of the RTL 400 have been verified by formal verification (S204). (S204: NO), the process proceeds to S205.

形式検証で検証してないないモジュールがあるときには、RTL400の中で形式検証において未検証のモジュールを探し、そのモジュールを検証対象モジュールとし、また、そのモジュールに対応するアサーションを形式検証プログラムASEにする(S205)。なお、図7のNEXT_MOD()は、引数のモジュールの次のモジュールを返す関数、NEXT_ASE()は、引数のアサーションの次のアサーションを返す関数とする。 When there is a module that has not been verified by formal verification, a module that has not been verified by formal verification is searched in the RTL 400, the module is set as a verification object module, and the assertion corresponding to that module is set as a formal verification program ASE. (S205). Note that NEXT_MOD( ) in FIG. 7 is a function that returns the module next to the module of the argument, and NEXT_ASE( ) is a function that returns the assertion next to the assertion of the argument.

すべてのモジュールを形式検証で検証した場合には、各RTL400に対する形式検証の証明の結果を証明結果630として出力する。また、各RTL400の全体の行数に対して証明された行数をラインカバレッジ520として出力する。証明結果630の付随情報として、未証明の行の情報等も含めて出力する。 When all modules are verified by formal verification, the result of proof of formal verification for each RTL 400 is output as proof result 630 . It also outputs the number of lines proven with respect to the total number of lines in each RTL 400 as line coverage 520 . Accompanying information of the certification result 630 is output including information on uncertified rows.

次に、図9を用いてダイナミック検証装置によるダイナミック検証の処理について説明する。
これは、図7におけるS300の処理である。
浮動小数点数演算器のRTL400を動作させるために、RTL400を論理シミュレータ230にセットする(S301)。必要に応じて論理合成をおこなう。
Next, dynamic verification processing by the dynamic verification device will be described with reference to FIG.
This is the process of S300 in FIG.
In order to operate the RTL 400 of the floating point arithmetic unit, the RTL 400 is set in the logic simulator 230 (S301). Logic synthesis is performed as necessary.

次に、中間値指向のダイナミック検証をおこなう(S400)。中間値指向のダイナミック検証においては、照合結果620と中間値カバレッジ500を出力する。なお、詳細は後述する。 Next, intermediate value-oriented dynamic verification is performed (S400). In intermediate-value-oriented dynamic verification, matching result 620 and intermediate-value coverage 500 are output. Details will be described later.

次に、例外発生境界指向のダイナミック検証をおこなう(S500)。例外発生境界指向のダイナミック検証においては、照合結果620と例外発生境界カバレッジを出力する。なお、浮動小数点数演算器の実行する演算の内容が加算か乗算か除算かによって、検査すべき境界の種類が異なる。なお、詳細は後述する。
次に、完全乱数によるダイナミック検証をおこなう(S900)。完全乱数によるダイナミック検証においては、照合結果620のみを出力する。なお、詳細は後述する。
Next, exception generation boundary-oriented dynamic verification is performed (S500). Exception boundary-oriented dynamic verification outputs matching results 620 and exception boundary coverage. Note that the type of boundary to be checked differs depending on whether the content of the operation executed by the floating-point calculator is addition, multiplication, or division. Details will be described later.
Next, dynamic verification using complete random numbers is performed (S900). Only the collation result 620 is output in dynamic verification using perfect random numbers. Details will be described later.

次に、図10を用いて中間値指向のダイナミック検証の実行イメージを示す図である。
中間値指向のダイナミック検証とは、検証の対象となる浮動小数点数演算器のRTL400により、論理シミュレータ230を実行させたときのモジュールにおける中間ポートの中間値の着目したダイナミック検証である
以下では、図10に示されるような浮動小数点数加算器を例にとって説明する。この場合は、浮動小数点数加算器において、桁落ちが発生する演算特殊ケースを重点的に検証する目的で、NUM_LEADING_ZEROの中間ポートを指定してダイナミック検証をおこなうものとする。
Next, FIG. 10 is a diagram showing an execution image of intermediate-value-oriented dynamic verification.
Intermediate-value-oriented dynamic verification is dynamic verification focused on intermediate values of intermediate ports in a module when the logic simulator 230 is executed by the RTL 400 of the floating-point arithmetic unit to be verified. A floating-point adder as shown in 10 will be described as an example. In this case, dynamic verification is performed by designating the intermediate port of NUM_LEADING_ZERO for the purpose of focusing on verifying special cases of operations in which digit loss occurs in the floating-point adder.

桁落ちとは、二つの入力の値が非常に近い場合で、かつ実質減算の場合に発生する浮動小数点数加算器の特殊ケースである。例えば、入力値の値が下記のような値の場合である。
INPUT_1=(-1)^0*2^9*1.01110010101110110111000
INPUT_2=(-1)^1*2^9*1.01110001111011001011010
Precision loss is a special case of floating-point adders that occurs when two inputs are very close in value and are effectively subtracted. For example, when the input value is the following value.
INPUT_1=(-1)^0*2^9*1.01110010101110110111000 2
INPUT_2=(-1)^1*2^9*1.01110001111011001011010 2

ここで、a^bは、aのb乗を表し、インデックスの2は、2進数であることを示している。この場合に、ほぼ同じ大きさの値の引き算のため互い打ち消し合い、非常に小さい値が出力されることとなる。このとき、浮動小数点の位置が大きく変化するため特殊な処理が必要となる。特殊な処理をおこなうモジュールが図中のモジュールXであり、この桁落ちが発生する場合に活性化する中間ポートがNUM_LEADING_ZEROポートである。例えば、INPUT_1、INPUT_2が上記の値のときに、仮数部の「1.01110010101110110111000」と「1.01110001111011001011010」が直接引き算されることでモジュールXの入力値は下記のようになる。
SUMMATION=000000000110011101011110
Here, âb represents a raised to the b-th power, and the index 2 indicates a binary number. In this case, the subtraction of values of approximately the same magnitude cancels each other out, resulting in a very small value being output. At this time, special processing is required because the position of the floating point changes greatly. The module that performs special processing is the module X in the figure, and the intermediate port that is activated when this cancellation occurs is the NUM_LEADING_ZERO port. For example, when INPUT_1 and INPUT_2 are the above values, the input values of the module X are obtained by directly subtracting the mantissas " 1.011100101011101101110002 " and " 1.011100011110110010110102 ".
SUMMATION=000000000110011101011110 2

この上位ビットに並ぶ0の数を数えて、その数をNUM_LEADING_ZEROポートから出力する。
NUM_LEADING_ZERO=01001
これはすなわち、10進数では9である。FRACはSUMMATIONをNUM_LEADING_ZEROだけ左シフトした値となる。この例では、
FRAC=110011101011110000000000
となり、最終的なOUTPUTの値は、
OUTPUT=(-1)^0*2^0*1.10011101011110000000000
である。
Count the number of 0s lined up in the upper bits and output that number from the NUM_LEADING_ZERO port.
NUM_LEADING_ZERO=01001 2
This is 9 in decimal. FRAC is a value obtained by left-shifting SUMMATION by NUM_LEADING_ZERO. In this example,
FRAC=110011101011110000000000 2
and the final OUTPUT value is
OUTPUT=(-1)^0*2^0*1.10011101011110000000000 2
is.

この桁落ちが発生する場合に、浮動小数点数加算器で特徴的に発火するポートは、NUM_LEADING_ZEROである。このため、桁落ちの演算特殊ケースを重点的に検証したい場合には、NUM_LEADING_ZEROが網羅的になるように入力値をうまく生成し、実際にNUM_LEADING_ZEROの値を、中間値として取得し網羅できているかを確認しながら検証を進めることにより、浮動小数点数加算器の演算の信頼性を高めようというのが、中間値指向のダイナミック検証の基本的なアイデアである。 The port that fires characteristically in a floating point adder when this loss occurs is NUM_LEADING_ZERO. For this reason, if you want to focus on verifying the special case of the cancellation of significant digits, check whether the input value is well generated so that NUM_LEADING_ZERO is exhaustive, and whether the value of NUM_LEADING_ZERO is actually obtained as an intermediate value and is exhaustive. The basic idea of intermediate-value-oriented dynamic verification is to improve the reliability of floating-point adder operations by verifying the

また、本実施形態でいう不足中間値とは、検査対象ポート(ここでは、NUM_LEADING_ZEROであり、そのとりうる値は、2^6ある)において、検証していない中間値を意味する。 Also, the missing intermediate value in this embodiment means an unverified intermediate value at the inspection target port (here, it is NUM_LEADING_ZERO, and its possible values are 2̂6).

次に、図11を用いて中間値指向のダイナミック検証処理について説明する。
これは、図9におけるS400の処理である。
先ず、検査対象ポートリスト800から未検査のポートを一つ選択し、検査対象ポートとする(S401)。
Next, intermediate value-oriented dynamic verification processing will be described with reference to FIG.
This is the process of S400 in FIG.
First, one uninspected port is selected from the inspection target port list 800 and set as the inspection target port (S401).

次に、検査対象ポートの中間値について網羅的な検証をおこなう処理を実行する(S600)。
検査対象ポートすべてについて、網羅率の検査が完了しているか否かを判定し(S402)、完了している場合には(S402:YES)、S403に進み、そうでない場合には(S402:NO)、S401に進む。
Next, a process of exhaustively verifying the intermediate value of the port to be inspected is executed (S600).
It is determined whether or not coverage rate inspection has been completed for all ports to be inspected (S402). If completed (S402: YES), proceed to S403. ) and proceed to S401.

検査対象ポートすべてについて、網羅率の検査が完了して場合には、照合結果620を出力し、また、検査が完了した検査対象ポートの網羅率を中間値カバレッジ500として出力する(S403)。 If coverage rate inspection has been completed for all ports to be inspected, a collation result 620 is output, and the coverage rate of inspection ports for which inspection has been completed is output as an intermediate value coverage 500 (S403).

次に、図12を用いて検査対象ポートの中間値について網羅的な検証をおこなう処理について説明する。
これは、図11のS600の処理である。
先ず、変数iを0で初期化する(S601)。
次に、入力値X1とX2を乱数で生成し、高信頼モデル220と論理シミュレータ230のそれぞれに入力し、それぞれ期待値710と出力値720を得る。高信頼モデル220から得た期待値YEと論理シミュレータ230から得た出力値YOと検査対象ポートの中間値IVを計測部240に入力し、内部の検証ログ780と中間値ログ760に保存する(S602)。
Next, the process of comprehensively verifying the intermediate values of the ports to be inspected will be described with reference to FIG. 12 .
This is the process of S600 in FIG.
First, a variable i is initialized to 0 (S601).
Next, input values X1 and X2 are generated as random numbers and input to the high-reliability model 220 and logic simulator 230, respectively, to obtain an expected value 710 and an output value 720, respectively. The expected value YE obtained from the high-reliability model 220, the output value YO obtained from the logic simulator 230, and the intermediate value IV of the inspection target port are input to the measurement unit 240 and stored in the internal verification log 780 and intermediate value log 760 ( S602).

次に、予め定まった検証サンプル数のN回と変数iを比較し(S603)、iが小さいならS604に進み、そうでないならS605に進む。 Next, the predetermined number of verification samples N times is compared with the variable i (S603), and if i is smaller, the process proceeds to S604;

iがNより小さいときには、変数iに1を加算して変数iに保存し(S604)、S602に進む。
iがNと等しくなったときに、検査対象ポートの値の取りうる値の範囲を算出する。その中で中間値ログ760に存在しない未記録の中間値を割り出し、それらすべてを不足中間値として、不足中間値リスト740に登録する(S605)。
When i is smaller than N, 1 is added to the variable i and stored in the variable i (S604), and the process proceeds to S602.
When i becomes equal to N, the range of possible values of the port to be inspected is calculated. Among them, unrecorded intermediate values that do not exist in the intermediate value log 760 are found, and all of them are registered as missing intermediate values in the missing intermediate value list 740 (S605).

次に、不足中間値リスト740から未調査の不足中間値を一つ選択し、検査対象の不足中間値として登録しておく(S606)。
次に、検査対象の不足中間値についての検証の処理を実行する(S700)。
次に、不足中間値リストに登録されているすべての不足中間値について検証が完了したか否かを判定し(S607)、検証が完了している場合には(S607:YES)、処理を終了し、検証が完了していない場合には(S607:NO)、S606に進む。
Next, one unchecked missing intermediate value is selected from the missing intermediate value list 740 and registered as the missing intermediate value to be inspected (S606).
Next, verification processing is executed for the missing intermediate value to be inspected (S700).
Next, it is determined whether or not verification has been completed for all the missing intermediate values registered in the missing intermediate value list (S607), and if the verification has been completed (S607: YES), the process is terminated. However, if the verification is not completed (S607: NO), the process proceeds to S606.

次に、図13を用いて検査対象の不足中間値についての検証の処理について説明する。
先ず、ポート情報とポートの値のリストの組を持つデータ(ポート情報、値リスト)のリストのデータ構造を定義し、そのデータ構造を持つ変数LISTに、{(検査対象ポート,{不足中間値})}を代入する(S701)。
Next, verification processing for the missing intermediate value to be inspected will be described with reference to FIG. 13 .
First, a data structure of a list of data (port information, value list) having a pair of a list of port information and port value is defined, and {(tested port, {missing intermediate value })} is substituted (S701).

次に、S702とS703では、S701のLISTの検査対象ポートの不足中間値に到達しうる値を探索する。
先ず、LISTから要素を一つ取り出し、それをCURとする。LISTからCURを取り除いた状態にする。POにCURのポートをセットし、VOLISTにCURの値リストをセットする。POを出力ポートとするモジュールに対応する関数を、LIB410からロードし、その関数の入力ポートを参照する。入力ポートがN本あった場合にはそれぞれに対応するN個のポート情報PIx(0≦x<N)とN個の空のデータ入力値リストVILISTx={}を用意する(S702)。
Next, in S702 and S703, a search is made for a value that can reach the deficient intermediate value of the inspection target port in the LIST of S701.
First, one element is taken out from LIST and set to CUR. Remove CUR from LIST. Set PO to the port of CUR and set VOLIST to the value list of CUR. A function corresponding to a module with PO as an output port is loaded from LIB 410, and the input port of that function is referenced. If there are N input ports, N port information PIx (0≤x<N) and N empty data input value lists VILISTx={} are prepared (S702).

次に、これら関数の入力ポートの取りうる値すべてを関数に入力する。関数の出力ポートPOの値が、VLISTに存在する値と一致した場合に、そのときのPIxの値VIxをVILISTxに記録する(S703)。図13のappendに関する式は、第一引数のVILISTxのリストの最後に、第二引数のVIxの値を付け加え、それを新たなVILISTxとすることを意味している。 Next, we input all possible values of the input ports of these functions into the function. If the value of the output port PO of the function matches the value existing in VLIST, the value VIx of PIx at that time is recorded in VILISTx (S703). The expression regarding append in FIG. 13 means that the value of the second argument VIx is added to the end of the list of the first argument VILISTx to make it a new VILISTx.

次に、全入力ポートPIxに対して、VLISTxが空であるか否かを判定し(S704)、S703でVLISTxに値が記録されず、VLISTxが空のままであった場合には(S704:YES)、S705に進み、そうでない場合には(S704:NO)、S706に進む。 Next, it is determined whether or not VLISTx is empty for all input ports PIx (S704). YES), proceed to S705; otherwise (S704: NO), proceed to S706.

VLISTxに値が記録されず、VLISTxが空のままのときには、検査対象の不足中間値は取りうる値の範囲になかったと判定する(S705)。
VLISTxに値が記録されているときには、すべての入力ポートPIxについて、{PIx,VILISTx}をLISTに追加する(S706)。
When no value is recorded in VLISTx and VLISTx remains empty, it is determined that the missing intermediate value to be inspected is not within the range of possible values (S705).
When values are recorded in VLISTx, {PIx, VILISTx} is added to LIST for all input ports PIx (S706).

次に、LIST中に演算器の入力ポートINPUT_1、INPUT_2の両方が存在するか否かを判定し(S707)、LIST中に演算器の入力ポートINPUT_1、INPUT_2の両方が存在する場合には(S707:YES)、S708に進み、そうでない場合には(S707:NO)、S702に進む。 Next, it is determined whether or not both the input ports INPUT_1 and INPUT_2 of the arithmetic unit exist in the LIST (S707). : YES), proceed to S708; otherwise (S707: NO), proceed to S702.

そして、LISTに保存されているINPUT_1の取りうる値とINPUT_2の取りうる値の組を1個以上選択し、高信頼モデル220と論理シミュレータ230それぞれに入力し、照合結果620を取得する(S708)。 Then, one or more pairs of possible values of INPUT_1 and INPUT_2 stored in the LIST are selected and input to the high-reliability model 220 and the logic simulator 230, respectively, to obtain a collation result 620 (S708). .

次に、図14ないし図20を用いて例外発生境界指向のダイナミック検証の処理について説明する。
例外発生境界指向のダイナミック検証とは、入力値に対して、例外が発生するか否かの境界に着目して、検証をおこなう手法である。以下では、検証の対象とする浮動小数点数演算器が加算器の場合、乗算器の場合、除算器の場合の例に分けて説明する。これは、図9のS500の処理である。
Next, exception occurrence boundary-oriented dynamic verification processing will be described with reference to FIGS. 14 to 20. FIG.
Exception occurrence boundary-oriented dynamic verification is a method of performing verification by paying attention to the boundary of whether an exception occurs or not for an input value. In the following description, the floating-point arithmetic unit to be verified is an adder, a multiplier, and a divider. This is the process of S500 in FIG.

先ず、図14ないし図16を用いて検証の対象とする浮動小数点数演算器が加算器の場合の例外発生境界指向のダイナミック検証の処理について説明する。
図14には、加算器がオーバーフローする境界が示されている。図中のMAXは、検証の対象とする浮動小数点数演算器が取り扱える浮動小数点数で表現可能な絶対値最大値の値を示している。EPSは、(1+EPS)が1を超える最小の数を示している。そして、浮動小数点数演算器が取り扱う浮動小数点数で表現可能な値は、格子上の離散値として表現される。この格子の間隔は一定ではなく、比にして表現すると、1,(1+EPS),(1+EPS)^2と値が大きくなるにつれて徐々に大きくなる。加算器がオーバーフローしないX1とX2の領域は、-MAX≦X1+X2≦MAXであり、この領域内の格子上の点(X1,X2)を○で示している。これとは、逆に加算器がオーバーフローする領域はX1+X2<-MAXとX1+X2>MAXであり、この領域に存在する格子上の点(X1,X2)を×で示している。本実施形態の例外発生境界指向のダイナミック検証は、こうした境界に隣接する格子上の点を検証対象とするものである。
14 to 16, the exception generation boundary-oriented dynamic verification processing when the floating-point arithmetic unit to be verified is an adder will be described.
FIG. 14 shows the boundaries at which the adder overflows. MAX in the figure indicates the maximum absolute value that can be represented by a floating-point number that can be handled by the floating-point arithmetic unit to be verified. EPS indicates the smallest number that (1+EPS) exceeds one. Values that can be represented by floating-point numbers handled by the floating-point arithmetic units are represented as discrete values on a grid. The grid spacing is not constant, and when expressed as a ratio, it gradually increases as the value increases, such as 1, (1+EPS), and (1+EPS)^2. The region of X1 and X2 where the adder does not overflow is -MAX≤X1+X2≤MAX, and the grid points (X1, X2) in this region are indicated by ◯. Conversely, the areas where the adder overflows are X1+X2<-MAX and X1+X2>MAX, and the points (X1, X2) on the lattice existing in these areas are indicated by x. The exception-occurring boundary-oriented dynamic verification of this embodiment targets points on the grid adjacent to such a boundary.

先ず、検証対象の浮動小数点数演算器の種類が加算器である場合の例外発生境界指向のダイナミック検証の処理では、調査する境界値の初期値のX1座標を設定する(S501)。加算器の場合は、MAX*EPSを初期値として、設定する。 First, in exception generation boundary-oriented dynamic verification processing when the type of floating-point arithmetic unit to be verified is an adder, the X1 coordinate of the initial value of the boundary value to be investigated is set (S501). In the case of an adder, MAX*EPS is set as an initial value.

次に、高信頼モデル220を用いた演算で、X1の値から、第一象限の境界線:X1+X2=MAXのX2の値X2_P=MAX-X1と第三象限の境界線:X1+X2=-MAXのX2の値X2_M=(-1)*MAX+X1の値を求める(S502)。 Next, in the calculation using the high-reliability model 220, from the value of X1, the boundary line of the first quadrant: X1 + X2 = MAX, the X2 value X2_P = MAX - X1, and the boundary line of the third quadrant: X1 + X2 = -MAX The value of X2 X2_M=(-1)*MAX+X1 is obtained (S502).

次に、座標(X1,X2_P)周辺の境界探索と照合処理をおこなう(S800a)。
次に、座標(X1,X2_M)周辺の境界探索と照合処理フローをおこなう(S800b)。
Next, boundary search and matching processing around the coordinates (X1, X2_P) are performed (S800a).
Next, a boundary search and matching process flow around the coordinates (X1, X2_M) is performed (S800b).

そして、X1がMAXより小さいか判定し(S503)、X1がMAXより小さい場合には(S503:YES)、S504に進み、そうでない場合には(S503:YES)、処理を終了する。
X1がMAXより小さい場合には、X1に、X1*(1+EPS)を代入する(S504)。すなわち、X1の値を、X1の隣の点の値に更新する。そして、S502に進む。
Then, it is determined whether X1 is smaller than MAX (S503), and if X1 is smaller than MAX (S503: YES), proceed to S504; otherwise (S503: YES), end the process.
If X1 is smaller than MAX, X1*(1+EPS) is substituted for X1 (S504). That is, the value of X1 is updated to the value of the point next to X1. Then, the process proceeds to S502.

次に、図16を用いて(X1,X2)周辺の境界探索と照合の処理を説明する。
これは、図15のS800a、S800bに該当する処理である。また、後の乗算器の場合の処理の図18のS800c~S800f、除算器の場合の処理の図20のS800g~S800kにもサブルーチンとして用いられる。
Next, the boundary search and collation processing around (X1, X2) will be described with reference to FIG.
This is the processing corresponding to S800a and S800b in FIG. Further, S800c to S800f in FIG. 18 for the later processing of the multiplier and S800g to S800k of FIG. 20 for the later processing of the divider are also used as subroutines.

本実施形態の処理では、予め境界の式によって境界上に存在する格子点(X1,X2)を求めるが、丸め誤差などにより真の境界値から若干のずれが生じることを考慮し、高信頼モデルを用いて調査すべき格子点が境界の周辺であることを確かめてから照合をおこなう。 In the processing of this embodiment, grid points (X1, X2) existing on the boundary are determined in advance by the boundary formula. is used to confirm that the grid points to be investigated are in the vicinity of the boundary, and then matching is performed.

先ず、境界値か否かを調査すべき点を5点に絞り、照合をおこなう(S801)。事前に数式で境界のおおよその位置が判明しているので、5点程度を調べればよい。X2を中心とする隣接5点をX2_0~X2_4に設定する。すなわち、順に、X2_0*(1+EPS)^2=X2,X2_1*(1+EPS)=X2,X2_2=X2,X2_3=X2*(1+EPS),X2_4=X2*(1+EPS)^2になるように、それぞれX2_0~X2_4を定める。 First, the points to be checked for boundary values are narrowed down to five points, and collation is performed (S801). Since the approximate position of the boundary is known in advance by a mathematical formula, it is sufficient to check about five points. Five adjacent points centered on X2 are set to X2_0 to X2_4. That is, in order, X2_0*(1+EPS)^2=X2, X2_1*(1+EPS)=X2, X2_2=X2, X2_3=X2*(1+EPS), X2_4=X2*(1+EPS)^2. Define ~X2_4.

次に、ループ変数iを0で初期化する(S802)。
次に、高信頼モデル220を用いて、期待値YE_A=X op X2_iと、YE_B=X op X2_{i+1}を計算する(S803)。ここで、X2_i、X2_{i+1}は、iに応じて、可変な変数名になっていることに留意する。また、opは、二項演算子であり、検証対象の浮動小数点数の演算の種類が加算なら、op=+、乗算なら、op=*、除算なら、op=/である。
Next, a loop variable i is initialized to 0 (S802).
Next, using the high reliability model 220, the expected values YE_A=X op X2_i and YE_B=X op X2_{i+1} are calculated (S803). Note that X2_i and X2_{i+1} are variable names depending on i. Also, op is a binary operator, and op=+ if the type of floating-point number operation to be verified is addition, op=* if multiplication, and op=/ if division.

次に、YE_Aを求める演算で例外が発生およびYE_Bを求める演算どちらかで例外が発生しない、または、YE_Aを求める演算で例外が発生しないおよびYE_Bを求める演算どちらかで例外が発生したかを判定し(S804)、いずれかの演算で例外が発生している場合には(S804:YES)、S805に進み、そうでない場合には(S804:NO)、S806に進む。 Next, it is determined whether an exception occurs in either the operation for YE_A or the operation for YE_B, or whether the operation for YE_A does not cause an exception or the operation for YE_B causes an exception. (S804), and if an exception has occurred in any of the operations (S804: YES), proceed to S805; otherwise (S804: NO), proceed to S806.

YE_Aを求める演算、YE_Bを求める演算のいずれかで例外が発生している場合には、論理シミュレータ230を用いて、出力値YO_A=X op X2_iと、YO_B=X op X2_{i+1}を計算する(S805)。
YE_Aを求める演算、YE_Bを求める演算のいずれかで例外が発生していない場合には、ループ変数iをi+1で更新する(S806)。そして、S803に進む。
最後に、YE_AとYO_A、YE_BとYO_Bをそれぞれ比較する(S806)。
If an exception occurs in either the operation for obtaining YE_A or the operation for obtaining YE_B, the logic simulator 230 is used to calculate the output values YO_A=X op X2_i and YO_B=X op X2_{i+1}. (S805).
If no exception occurs in either the operation for obtaining YE_A or the operation for obtaining YE_B, the loop variable i is updated to i+1 (S806). Then, the process proceeds to S803.
Finally, YE_A and YO_A and YE_B and YO_B are compared (S806).

次に、図17および図18を用いて検証の対象とする浮動小数点数演算器が乗算器の場合の例外発生境界指向のダイナミック検証の処理について説明する。
図17には、乗算器がオーバーフローする境界が示されている。乗算器がオーバーフローしないX1とX2の領域は、-MAX≦X1*X2≦MAXであり、この領域内の格子上の点(X1,X2)を○で示している。これとは、逆に乗算器がオーバーフローする領域はX1*X2<MAX,X1*X2>-MAXであり、この領域に存在する格子上の点(X1,X2)を×で示している。
Exception generation boundary-oriented dynamic verification processing when the floating-point arithmetic unit to be verified is a multiplier will now be described with reference to FIGS. 17 and 18. FIG.
FIG. 17 shows the boundaries at which the multiplier overflows. The region of X1 and X2 where the multiplier does not overflow is -MAX≤X1*X2≤MAX, and the grid points (X1, X2) in this region are indicated by ◯. Conversely, the area where the multiplier overflows is X1*X2<MAX, X1*X2>-MAX, and the point (X1, X2) on the lattice existing in this area is indicated by x.

先ず、検証対象の浮動小数点数演算器の種類が乗算器である場合の例外発生境界指向のダイナミック検証の処理では、調査する境界値の初期値のX1座標を設定する(S510)。乗算器の場合は、1を初期値として設定する。 First, in exception occurrence boundary-oriented dynamic verification processing when the type of floating-point arithmetic unit to be verified is a multiplier, the X1 coordinate of the initial value of the boundary value to be investigated is set (S510). For multipliers, 1 is set as the initial value.

次に、X1の値から、第一象限と第二象限の境界線のX2の値X2_P=MAX/X1と第三象限と第四象限の境界線のX2の値X2_M=(-1)*MAX/X1の値を求める(S511)。 Next, from the value of X1, the X2 value X2_P=MAX/X1 of the boundary line between the first and second quadrants and the X2 value X2_M=(-1)*MAX of the boundary line between the third and fourth quadrants /X1 is obtained (S511).

次に、座標(X1,X2_P)周辺の境界探索と照合処理をおこなう(S800c)。
次に、座標(X1,X2_M)周辺の境界探索と照合処理をおこなう(S800d)。
次に、座標((-1)*X1,X2_P)周辺の境界探索と照合処理をおこなう(S800e)。
次に、座標((-1)*X1,X2_M)周辺の境界探索と照合処理をおこなう(S800f)。
Next, boundary search and matching processing around the coordinates (X1, X2_P) are performed (S800c).
Next, boundary search and matching processing around the coordinates (X1, X2_M) are performed (S800d).
Next, boundary search and collation processing around the coordinates ((-1)*X1, X2_P) are performed (S800e).
Next, boundary search and matching processing around the coordinates ((-1)*X1, X2_M) are performed (S800f).

次に、X1がMAXより小さいか否かを判定し(S512)、X1がMAXより小さい場合には(S512:YES)、S513に進み、そうでない場合には(S512:NO)、処理を終了する。 Next, it is determined whether or not X1 is smaller than MAX (S512). If X1 is smaller than MAX (S512: YES), proceed to S513; otherwise (S512: NO), end the process. do.

X1がMAXより小さい場合には、 X1に、X1*(1+EPS)を代入する(S513)。すなわち、X1の値を、隣の点の値に更新する。そして、S511に進む。 If X1 is smaller than MAX, X1*(1+EPS) is substituted for X1 (S513). That is, the value of X1 is updated to the value of the next point. Then, the process proceeds to S511.

次に、図19および図20を用いて検証の対象とする浮動小数点数演算器が除算器の場合の例外発生境界指向のダイナミック検証の処理について説明する。
図19には、除算器がオーバーフローする境界が示されている。除算器がオーバーフローしないX1とX2の領域は、-MAX≦X1/X2≦MAXであり、この領域内の格子上の点(X1,X2)を、○で示している。これとは逆に除算器がオーバーフローする領域は、X1/X2<MAX,X1/X2>-MAXであり、この領域に存在する格子上の点(X1,X2)を×で示している。
Exception generation boundary-oriented dynamic verification processing when the floating-point arithmetic unit to be verified is a divider will now be described with reference to FIGS. 19 and 20. FIG.
FIG. 19 shows the boundaries at which the divider overflows. The region of X1 and X2 where the divider does not overflow is -MAX≤X1/X2≤MAX, and the grid points (X1, X2) in this region are indicated by ◯. Conversely, the area where the divider overflows is X1/X2<MAX, X1/X2>-MAX, and the points (X1, X2) on the grid that exist in this area are indicated by x.

先ず、検証対象の浮動小数点数演算器の種類が除算器である場合の例外発生境界指向のダイナミック検証の処理では、座標(0,0)周辺の境界探索と照合処理をおこなう(S800g)。 First, in exception occurrence boundary-oriented dynamic verification processing when the type of floating-point arithmetic unit to be verified is a divider, boundary search and matching processing around coordinates (0, 0) are performed (S800g).

次に、調査する境界値の初期値のX1座標を設定する(S520)。除算器の場合は、MINを初期値とする。MINとは、検証する浮動小数点数演算器における浮動小数点数で表現される最小の正の整数である。 Next, the X1 coordinate of the initial value of the boundary value to be investigated is set (S520). For dividers, MIN is the initial value. MIN is the minimum positive integer expressed in floating-point numbers in the floating-point arithmetic unit to be verified.

次に、X1の値から、第一象限と第二象限の境界線のX2の値X2_P=X1/MAXと、第三象限と第四象限の境界線のX2の値X2_M=(-1)*X1/MAXの値を求める(S521)。 Next, from the value of X1, the X2 value X2_P=X1/MAX of the boundary between the first and second quadrants and the X2 value X2_M of the boundary between the third and fourth quadrants X2_M=(-1)* A value of X1/MAX is obtained (S521).

次に、座標(X1,X2_P)周辺の境界探索と照合処理をおこなう(S800h)。
次に、座標(X1,X2_M)周辺の境界探索と照合処理をおこなう(S800i)。
次に、座標((-1)*X1,X2_P)周辺の境界探索と照合処理をおこなう(S800j)。
次に、座標((-1)*X1,X2_M)周辺の境界探索と照合処理をおこなう(S800k)。
Next, boundary search and matching processing around the coordinates (X1, X2_P) are performed (S800h).
Next, boundary search and matching processing around the coordinates (X1, X2_M) are performed (S800i).
Next, boundary search and matching processing around the coordinates ((-1)*X1, X2_P) are performed (S800j).
Next, boundary search and collation processing around the coordinates ((-1)*X1, X2_M) are performed (S800k).

次に、X1がMAXより小さいか否かを判定し(S522)、X1がMAXより小さい場合には(S522:YES)、S523に進み、そうでない場合には(S522:NO)、処理を終了する。
X1がMAXより小さい場合には、X1に、X1*(1+EPS)を代入する(S523)。すなわちX1の値を、隣の点の値で更新する。そして、S521に進む。
Next, it is determined whether or not X1 is smaller than MAX (S522). If X1 is smaller than MAX (S522: YES), proceed to S523; otherwise (S522: NO), end the process. do.
If X1 is smaller than MAX, X1*(1+EPS) is substituted for X1 (S523). That is, the value of X1 is updated with the value of the neighboring point. Then, the process proceeds to S521.

次に、図21を用いて完全乱数によるダイナミック検証の処理を説明する。
これは、図9のS900の処理である。
完全乱数によるダイナミック検証の処理は、上述の中間値指向のダイナミック検証や例外発生境界指向のダイナミック検証とは異なり、特定の値に着目することなく、完全に乱数により発生した値を、高信頼モデル220と論理シミュレータ230への入力として、それぞれが出力する期待値710、出力値720を比較して、検証する処理である。
完全乱数によるダイナミック検証では、先ず、ループ変数iを0で初期化する(S901)。
Next, dynamic verification processing using perfect random numbers will be described with reference to FIG.
This is the process of S900 in FIG.
Unlike the intermediate value-oriented dynamic verification and the exception generation boundary-oriented dynamic verification described above, the processing of dynamic verification using completely random numbers does not focus on specific values, and uses values generated completely by random numbers as a high-reliability model. 220 and the expected value 710 and the output value 720 respectively output as inputs to the logic simulator 230 are compared and verified.
In dynamic verification using perfect random numbers, first, a loop variable i is initialized to 0 (S901).

次に、乱数を用いて入力値X1,X2を生成する。高信頼モデル220と論理シミュレータ230に、それぞれX1とX2を入力し、それぞれから出力される期待値YEと出力値YOを照合する(S902)。
次に、ループ変数iと規定の検証回数Nを比較し(S903)、i<Nの場合には(S903:YES)、S904に進み,そうでない場合には(S902:NO)、処理を終了する。
次に、i<Nの場合には、ループ変数iをi+1で更新し(S904)、S902に進む。
Next, input values X1 and X2 are generated using random numbers. X1 and X2 are input to the high-reliability model 220 and the logic simulator 230, respectively, and the expected value YE and the output value YO output from each are collated (S902).
Next, the loop variable i is compared with the prescribed number of times of verification N (S903). If i<N (S903: YES), proceed to S904. If not (S902: NO), end the process. do.
Next, if i<N, the loop variable i is updated to i+1 (S904), and the process proceeds to S902.

100…浮動小数点数演算器の検証装置、110…制御部、200…形式検証装置、300…ダイナミック検証装置、120…検証結果集約部、
400…RTL、410…LIB、420…SVA、
500…中間値カバレッジ、510…例外発生境界カバレッジ、520…ラインカバレッジ、
600…検証結果、610…総合カバレッジ、611…詳細情報、620…照合結果、630…証明結果、
700…入力値、710…期待値、720…出力値、730…中間値、740…不足中間値リスト、750…不足中間値、760…中間値ログ、770…検証サンプル、780…検証ログ、
800…検査対象ポートリスト、810ポート情報
DESCRIPTION OF SYMBOLS 100... Verification apparatus of a floating-point arithmetic unit, 110... Control part, 200... Formal verification apparatus, 300... Dynamic verification apparatus, 120... Verification result aggregation part,
400...RTL, 410...LIB, 420...SVA,
500... intermediate value coverage, 510... exception occurrence boundary coverage, 520... line coverage,
600... Verification result, 610... Comprehensive coverage, 611... Detailed information, 620... Verification result, 630... Certification result,
700 Input value 710 Expected value 720 Output value 730 Intermediate value 740 Missing intermediate value list 750 Missing intermediate value 760 Intermediate value log 770 Verification sample 780 Verification log
800 … port list to be inspected, 810 port information

Claims (7)

RTL(Register Transfer Level)記述によるハードウェア記述言語により機能を記述された演算器を検証する演算器の検証装置であって、
前記ハードウェア記述言語を解釈実行して、入力値に対して出力値として出力する論理シミュレータと、
入力値に対して規定の演算を行い、期待値として出力する高信頼演算器とを有し、前記論理シミュレータの出力する出力値と、前記高信頼演算器の出力する期待値とを比較することにより、前記ハードウェア記述言語により機能を記述された演算器を検証する演算器を検証するダイナミック検証装置を有し、
前記ダイナミック検証装置は、前記ハードウェア記述言語により記述されたモジュールの内部に用いられる中間ポートを参照し、
ある中間ポートの取りうる値に対しての検証の網羅性を算出して、中間値カバレッジとして出力することを特徴とする演算器の検証装置。
A calculator verification device for verifying a calculator whose function is described in a hardware description language by RTL (Register Transfer Level) description,
a logic simulator that interprets and executes the hardware description language and outputs an input value as an output value;
a highly reliable calculator that performs a specified operation on an input value and outputs an expected value, and that compares the output value output by the logic simulator with the expected value output by the highly reliable calculator; has a dynamic verification device for verifying a computing unit whose function is described by the hardware description language,
The dynamic verification device refers to an intermediate port used inside the module described in the hardware description language,
A verification apparatus for a computing unit, which calculates coverage of verification for possible values of a certain intermediate port and outputs it as intermediate value coverage.
前記ハードウェア記述言語により機能を記述された演算器は、浮動小数点数演算器であることを特徴とする請求項1記載の演算器の検証装置。 2. The arithmetic unit verification apparatus according to claim 1, wherein said arithmetic unit whose function is described in said hardware description language is a floating-point arithmetic unit. 前記ダイナミック検証装置に、前記ハードウェア記述言語により記述されたモジュールと対応して、前記モジュールの入力ポートの値と同一の入力値に対して同一の出力値を出力する関数が入力され、
前記ダイナミック検証装置は、ある中間ポートの取りうる値に対して、検証していない不足中間値を求め、前記モジュールに対応する関数により、前記不足中間値に対応する入力ポートの値を求めることを特徴とする請求項1記載の演算器の検証装置。
a function that outputs the same output value for the same input value as the input port value of the module corresponding to the module described in the hardware description language is input to the dynamic verification device;
The dynamic verification device obtains an unverified missing intermediate value for possible values of an intermediate port, and obtains a value of an input port corresponding to the missing intermediate value by a function corresponding to the module. 2. A verification device for a calculator according to claim 1.
前記不足中間値に対応する入力ポートの値を、前記論理シミュレータと前記高信頼演算器とに入力し、それぞれの出力する出力値と期待値とを比較することを特徴とする請求項3記載の演算器の検証装置。 4. The method according to claim 3, wherein the value of the input port corresponding to the missing intermediate value is inputted to the logic simulator and the high-reliability calculator, and the output value and the expected value are compared. Arithmetic unit verification device. RTL(Register Transfer Level)記述によるハードウェア記述言語により機能を記述された演算器を検証する演算器の検証装置であって、
前記ハードウェア記述言語を解釈実行して、入力値に対して出力値として出力する論理シミュレータと、
入力値に対して規定の演算を行い、期待値として出力する高信頼演算器とを有し、前記論理シミュレータの出力する出力値と、前記高信頼演算器の出力する期待値とを比較することにより、前記ハードウェア記述言語により機能を記述された演算器を検証する演算器を検証するダイナミック検証装置を有し、
前記ダイナミック検証装置は、前記ハードウェア記述言語により記述されたモジュールの入力値における例外が発生する境界値に対しての検証の網羅性を算出して、例外発生境界カバレッジとして出力することを特徴とする演算器の検証装置。
A calculator verification device for verifying a calculator whose function is described in a hardware description language by RTL (Register Transfer Level) description,
a logic simulator that interprets and executes the hardware description language and outputs an input value as an output value;
a highly reliable calculator that performs a specified operation on an input value and outputs an expected value, and that compares the output value output by the logic simulator with the expected value output by the highly reliable calculator; has a dynamic verification device for verifying a computing unit whose function is described by the hardware description language,
The dynamic verification device is characterized in that it calculates verification coverage with respect to a boundary value at which an exception occurs in the input value of the module described in the hardware description language, and outputs it as exception occurrence boundary coverage. Verification device for computing units.
前記ハードウェア記述言語により機能を記述された演算器は、浮動小数点数演算器であることを特徴とする請求項5記載の演算器の検証装置。 6. The arithmetic unit verification apparatus according to claim 5, wherein the arithmetic unit whose function is described by the hardware description language is a floating-point arithmetic unit. 前記例外は、Zero除算例外、または、オーバーフロー例外であることを特徴とする請求項5記載の演算器の検証装置。 6. The arithmetic unit verification device according to claim 5, wherein the exception is a division by zero exception or an overflow exception.
JP2018073913A 2018-04-06 2018-04-06 Arithmetic unit verification device Active JP7112232B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018073913A JP7112232B2 (en) 2018-04-06 2018-04-06 Arithmetic unit verification device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018073913A JP7112232B2 (en) 2018-04-06 2018-04-06 Arithmetic unit verification device

Publications (2)

Publication Number Publication Date
JP2019185301A JP2019185301A (en) 2019-10-24
JP7112232B2 true JP7112232B2 (en) 2022-08-03

Family

ID=68341274

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018073913A Active JP7112232B2 (en) 2018-04-06 2018-04-06 Arithmetic unit verification device

Country Status (1)

Country Link
JP (1) JP7112232B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114462350B (en) * 2021-12-21 2022-11-15 北京百度网讯科技有限公司 Integrated circuit chip verification method and device, electronic equipment and storage medium
CN116070474B (en) * 2023-04-07 2023-07-07 之江实验室 Verification excitation generation method for AI floating point fusion operation unit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004070457A (en) 2002-08-02 2004-03-04 Fujitsu Ltd Device and method for calculating coverage for simulation
JP2008134808A (en) 2006-11-28 2008-06-12 Nec Electronics Corp Function verification device for logic circuit, verification method for function coverage system, and program
JP2017224060A (en) 2016-06-14 2017-12-21 株式会社日立製作所 Application logic and verification method and configuration method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004070457A (en) 2002-08-02 2004-03-04 Fujitsu Ltd Device and method for calculating coverage for simulation
JP2008134808A (en) 2006-11-28 2008-06-12 Nec Electronics Corp Function verification device for logic circuit, verification method for function coverage system, and program
JP2017224060A (en) 2016-06-14 2017-12-21 株式会社日立製作所 Application logic and verification method and configuration method thereof

Also Published As

Publication number Publication date
JP2019185301A (en) 2019-10-24

Similar Documents

Publication Publication Date Title
US8539451B2 (en) Systems and methods for model checking the precision of programs employing floating-point operations
Boldo et al. Formal verification of floating-point programs
US20100299651A1 (en) Robust testing for discrete-time and continuous-time system models
US8397187B2 (en) Verifying the error bound of numerical computation implemented in computer systems
Clarke et al. Word level model checking—avoiding the Pentium FDIV error
US7458048B2 (en) Computer program product for verification of digital designs using case-splitting via constrained internal signals
Sharangpani et al. Statistical Analysis of Floating Point Flaw in the PentiumΤΜ Processor (1994)
Ahmed et al. Formalization of reliability block diagrams in higher-order logic
Bryant Bit-level analysis of an SRT divider circuit
US20190095303A1 (en) Systems and methods for measuring error in terms of unit in last place
US10936769B2 (en) Systems and methods for measuring error in terms of unit in last place
JP7112232B2 (en) Arithmetic unit verification device
US8312361B2 (en) Arithmetic circuit, arithmetic processing device, and arithmetic processing method
CN102331921A (en) Be used to detect the unusual method and system of decimal system floating-point amount
Zuse Properties of software measures
Kaufmann Formal verification of multiplier circuits using computer algebra
Morrison Values and uncertainty in simulation models
Kuhn et al. Sp 800-142. practical combinatorial testing
Arbel et al. Automated detection and verification of parity-protected memory elements
Falcone et al. Simulation of hybrid systems under Zeno behavior using numerical infinitesimals
CN104731639A (en) Confidence level re-check method for safety indexes of simulation models
CN116243883A (en) Test excitation generation method, test method and related equipment
Dierkes Formal analysis of a triplex sensor voter in an industrial context
Linger et al. Next-generation software engineering: Function extraction for computation of software behavior
Liu et al. Adaptive Monte Carlo simulation method and its applications to reliability analysis of series systems with a large number of components

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201210

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220118

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220222

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220722

R150 Certificate of patent or registration of utility model

Ref document number: 7112232

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150