JP6303509B2 - Circuit verification method and circuit verification program - Google Patents

Circuit verification method and circuit verification program Download PDF

Info

Publication number
JP6303509B2
JP6303509B2 JP2014001643A JP2014001643A JP6303509B2 JP 6303509 B2 JP6303509 B2 JP 6303509B2 JP 2014001643 A JP2014001643 A JP 2014001643A JP 2014001643 A JP2014001643 A JP 2014001643A JP 6303509 B2 JP6303509 B2 JP 6303509B2
Authority
JP
Japan
Prior art keywords
state
circuit
asynchronous
state machine
transition
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
JP2014001643A
Other languages
Japanese (ja)
Other versions
JP2015130104A (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.)
NEC Corp
Original Assignee
NEC 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 Corp filed Critical NEC Corp
Priority to JP2014001643A priority Critical patent/JP6303509B2/en
Publication of JP2015130104A publication Critical patent/JP2015130104A/en
Application granted granted Critical
Publication of JP6303509B2 publication Critical patent/JP6303509B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ハードウェア記述言語を用いたディジタル回路の開発支援に関し、特に非同期の信号変化に起因する問題に対応する回路検証方法、及び回路検証プログラムに関する。   The present invention relates to digital circuit development support using a hardware description language, and more particularly to a circuit verification method and a circuit verification program for dealing with problems caused by asynchronous signal changes.

近年、LSI(Large Scale Integration)、SOC(System-On-a-Chip)、FPGA(Field Programmable Gate Array)等のディジタル回路の開発において、レジスタ−トランスファー・レベル(Register Transfer Level。以下、「RTL」という。)のハードウェア記述言語(Hardware Description Language。以下、「HDL」という。)が一般的に使用されている。HDLの代表的なものとして、VHDL(Very high speed integrated circuit HDL)、Verilog-HDL等がある。以下、RTLのHDLによって回路が記述されたものを、単に「RTL記述」という。本明細書では、主に、VHDLを用いたRTL記述例を示すが、本発明の適用範囲はRTL記述に用いられる具体的なHDLの種類には限定されない。   In recent years, in the development of digital circuits such as LSI (Large Scale Integration), SOC (System-On-a-Chip), FPGA (Field Programmable Gate Array), etc., register transfer level (hereinafter referred to as “RTL”). The hardware description language (hereinafter referred to as “HDL”) is generally used. Typical examples of HDL include VHDL (Very high speed integrated circuit HDL) and Verilog-HDL. Hereinafter, a circuit in which RTL HDL is described is simply referred to as “RTL description”. In this specification, an example of RTL description using VHDL is mainly shown, but the scope of application of the present invention is not limited to a specific type of HDL used for RTL description.

ところで、上記のようなディジタル回路には、非同期リセットの解除タイミングにおける信号間のレーシングに起因して、有限ステートマシン(Finite State Machine。以降、「FSM」という。)回路のデッドロックが発生することがある。   By the way, in the digital circuit as described above, deadlock of a finite state machine (hereinafter referred to as “FSM”) circuit occurs due to the racing between signals at the release timing of the asynchronous reset. There is.

以降、デッドロックが発生する可能性があることを、「デッドロック誘発性がある」という。そして、信号の変化タイミングによって発生するデッドロックを、「タイミング起因のデッドロック」といい、タイミング起因のデッドロックが発生する可能性があることを、「タイミング起因のデッドロック誘発性がある」という。   Hereinafter, the possibility of deadlock occurring is referred to as “deadlock-inducing”. And the deadlock that occurs due to the signal change timing is called “timing-induced deadlock”, and the possibility of timing-induced deadlock is called “timing-induced deadlock” .

「FSM」とは、過去の出力及び入力の、状態及び順序に依存する有限の内部状態をもち、内部状態によってその時点の出力が決定される回路をいう。従って、フリップフロップ(Flip-Flop。以下、「F/F」という。)も、最も小規模なものとしてFSMに含まれる。   “FSM” refers to a circuit having a finite internal state depending on the state and order of past outputs and inputs, and the output at that time is determined by the internal state. Accordingly, flip-flops (hereinafter referred to as “F / F”) are also included in the FSM as the smallest scale.

EDA(Electronic Design Automation。電子的設計自動化)ツールのベンダーが提供するフロントエンド系EDAツールには、「FSM回路の検出」を行うことができるものがある。特に、最近では、Formal Verification(形式的検証。以下、「Formal検証」という。)が論理検証の方法としてトレンドである。Formal検証は、テストパターンを必要することなく機能検証を行うことが可能であり、その検証精度は設計者のスキルに依存しない。   Some front-end EDA tools provided by vendors of EDA (Electronic Design Automation) tools can perform “FSM circuit detection”. In particular, recently, Formal Verification (formal verification, hereinafter referred to as “Formal verification”) is a trend as a method of logical verification. Formal verification enables functional verification without the need for test patterns, and the verification accuracy does not depend on the skill of the designer.

Formal検証ツールには、静的な「FSM回路のデッドロックの検出」が可能なものがある。そのようなツールでは、静的デッドロックの検出機能によって、設計者の意図しない状態遷移に陥り、デバイスが正常に動作しないという問題を回避することができる。さらに、「非同期リセットの検出」を自動的に行い、リセット信号の極性をチェックするFormal検証ツールもある。   Some Formal verification tools are capable of static “detection of FSM circuit deadlock”. In such a tool, the static deadlock detection function can avoid the problem that the device does not operate normally due to a state transition unintended by the designer. In addition, there is a formal verification tool that automatically detects "asynchronous reset" and checks the polarity of the reset signal.

図12は、一般的なFormal検証ツールによるFSM回路の解析手順を示すフローチャートである。このように、一般的なFormal検証ツールが備えるFSM回路の解析機能には、大きく分けて2種類ある。一つは、FSM回路がRTL記述上の全ての状態に遷移することができるか否かをチェックする「リーチャビリティ・チェック(Reachability Check)」である。そしてもう一つが、FSM回路がある状態に遷移した場合、”論理的に”その状態から抜け出すことができるか否か、すなわち、他の状態に遷移することができるか、をチェックする「デッドロック・チェック(Deadlock Check)」である。現在のFormal検証ツールには、上記の両方の機能を具備するものが多い。   FIG. 12 is a flowchart showing an analysis procedure of the FSM circuit by a general Formal verification tool. As described above, the analysis function of the FSM circuit provided in a general Formal verification tool is roughly divided into two types. One is a “reachability check” that checks whether the FSM circuit can transition to all states in the RTL description. The other is “deadlock” that checks whether it is possible to “logically” exit from that state when the FSM circuit transitions to a certain state, that is, whether it can transition to another state. “Deadlock Check”. Many current formal verification tools have both of the above functions.

ただし、上記の「デッドロック・チェック」とは、上述した通り、あくまでも”論理的に”当該状態から抜け出せるか否か、すなわち「論理起因のデッドロック」の発生の有無をチェックするのみである。そのため、非同期リセットの解除タイミングと、クロックの有効エッジ(以下、単に「クロック・エッジ」という。)のレーシングのような、タイミング起因のデッドロックを検出することはできない。   However, as described above, the “deadlock check” only checks whether it is possible to get out of the state “logically”, that is, whether a “logic-induced deadlock” has occurred. Therefore, it is impossible to detect a deadlock due to timing such as the asynchronous reset release timing and the racing of the valid edge of the clock (hereinafter simply referred to as “clock edge”).

「論理起因のデッドロック状態」と「タイミング起因のデッドロック状態」について詳細に説明する。   The “logic-induced deadlock state” and “timing-induced deadlock state” will be described in detail.

図13A、図13Bに、「論理起因のデッドロック状態」が生じるFSM回路の、VHDLによるRTL記述例(以降、「デザイン1」という。)を示す。   FIG. 13A and FIG. 13B show an RTL description example (hereinafter referred to as “design 1”) by VHDL of an FSM circuit in which a “logic-induced deadlock state” occurs.

Line68-75には、STATE3の状態が記述されている。デザイン1の記述の場合、NEXT_STATE信号がSTATE3に遷移してしまうと、NEXT_STATE信号はSTATE3の状態から抜け出すことができない。これは、Line68-75に、STATE3から抜け出す「論理的な記述」が存在しないためである。   Line 68-75 describes the state of STATE3. In the case of the description of the design 1, if the NEXT_STATE signal transits to STATE3, the NEXT_STATE signal cannot get out of the STATE3 state. This is because Line 68-75 does not have a “logical description” that exits from STATE3.

この問題を改善したRTL記述例(以降、「デザイン2」という。)を図14A、図14Bに示す。本記述例では、Line70の記述が変更されている。これにより、NEXT_STATE信号はSTATE3からSTATE1に遷移できるようになり、論理上はデッドロックが起こりえないように見える。実際に、一般的なFormal検証ツールは、デザイン1に対してはデッドロック誘発性を検出することができるが、デザイン2に対してはそれを検出することができない。   An RTL description example (hereinafter referred to as “design 2”) that improves this problem is shown in FIGS. 14A and 14B. In this description example, the description of Line 70 is changed. As a result, the NEXT_STATE signal can transition from STATE3 to STATE1, and it seems logically that no deadlock can occur. In fact, a general Formal verification tool can detect deadlock inductivity for design 1, but not for design 2.

ところが、デザイン2は、タイミング起因のデッドロック誘発性がある。その理由は後述する。このように、一般的なFormal検証ツールでは、タイミング起因のデッドロック誘発性を検出することができない。   However, design 2 has a deadlock-inducing property due to timing. The reason will be described later. As described above, a general Formal verification tool cannot detect deadlock inductivity due to timing.

タイミング起因のデッドロックには、例えば、「非同期リセット解除時のリセット信号とクロック信号のレーシング」により発生するデッドロックがある。すなわち、タイミング起因のデッドロック非同期リセット信号がデアサートされるタイミングとクロック信号のアクティブエッジのタイミングが非常に近いことが原因でデッドロックが発生することがある。   The deadlock caused by timing includes, for example, a deadlock that occurs due to “racing of a reset signal and a clock signal when an asynchronous reset is released”. That is, deadlock may occur due to the timing at which the deadlock asynchronous reset signal due to timing is deasserted and the timing of the active edge of the clock signal is very close.

デザイン2がタイミング起因のデッドロックに陥る原因は、非同期リセットの解除タイミングと、RTL記述内の状態値のエンコーディング・タイプとの関係にある。「状態値」とは、FSMの各状態を特定する値で、「状態変数」とも呼ばれる。   The cause of design 2 falling into a deadlock due to timing is the relationship between the asynchronous reset release timing and the state value encoding type in the RTL description. The “state value” is a value that specifies each state of the FSM, and is also called a “state variable”.

図15に、デザイン2の回路において、非同期にリセットが解除されたとき(以下、「非同期リセット解除時」という。)の、「RTL記述設計者が期待する」状態遷移を示すタイミング・チャートを示す。   FIG. 15 is a timing chart showing the state transition “expected by RTL description designer” when reset is released asynchronously in the circuit of design 2 (hereinafter referred to as “when asynchronous reset is released”). .

図14Aの記述から明らかなように、デザイン2では、リセット期間中は、図14AのLine34の通り、CURRENT_STATE信号はSTATE0状態を維持する。そして、リセットが解除された次のクロック・エッジ(立ち上がりエッジ)のタイミングで、図14AのLine36、図14BのLine44の通りCURRENT_STATE信号はSTATE1状態に遷移する。以上がRTL記述設計者が期待する回路の振る舞いである。   As is apparent from the description of FIG. 14A, in the design 2, the CURRENT_STATE signal maintains the STATE0 state during the reset period as shown in Line 34 of FIG. 14A. Then, at the timing of the next clock edge (rising edge) after reset is released, the CURRENT_STATE signal transitions to the STATE 1 state as shown in Line 36 in FIG. 14A and Line 44 in FIG. 14B. The above is the circuit behavior expected by the RTL description designer.

しかし、非同期リセットの場合、リセットのアサート/デアサート・タイミングは任意であるため、必ずしも図15のタイミングでリセットが解除されるとは限らない。   However, in the case of asynchronous reset, the reset assertion / deassertion timing is arbitrary, and the reset is not necessarily released at the timing of FIG.

図16に、デザイン2の回路における、非同期リセット解除時の、解除タイミングとクロック・エッジのタイミングが非常に近い場合の状態遷移を示すタイミング・チャートを示す。図16の非同期リセットの解除タイミングでは、リセットとクロックとの間でレーシングを起こす可能性がある。   FIG. 16 is a timing chart showing the state transition in the circuit of design 2 when the release timing and the clock edge timing are very close when asynchronous reset is released. In the asynchronous reset release timing of FIG. 16, there is a possibility that racing occurs between the reset and the clock.

図14AのLine21-25の通り、CURRENT_STATE信号は5ビットのone-hotエンコード・タイプで構成されている。すなわち、デザイン2の記述例で定義されたFSMの状態値は、5ビットである。そのため、図16のようなリセット解除タイミングの場合、レーシングの影響で5ビット分のF/Fのすべてが同時にリセット解除されるとは限らない。従って、リセット解除されるF/Fとリセット解除されないF/Fが混在する可能性がある。   As shown in Line 21-25 of FIG. 14A, the CURRENT_STATE signal is composed of a 5-bit one-hot encoding type. That is, the FSM state value defined in the description example of design 2 is 5 bits. For this reason, in the case of the reset release timing as shown in FIG. 16, not all of the F / Fs for 5 bits are simultaneously released from the reset due to the influence of racing. Accordingly, there is a possibility that F / Fs that are reset and F / Fs that are not reset are mixed.

具体的には、CURRENT_STATE信号は、リセット解除のタイミングで、STATE0(“00001”)→STATE1(“00010”)に変化することが期待される。このとき、CURRENT_STATE信号を構成する5ビットの信号のうち、CURRENT_STATE[4:2]は、値が変化しない(‘0’のまま)ため、レーシングの影響を受けない。なぜなら、これらの信号は、リセット解除の如何によらず、'0'のままであるからである。   Specifically, the CURRENT_STATE signal is expected to change from STATE0 (“00001”) to STATE1 (“00010”) at the reset release timing. At this time, the value of CURRENT_STATE [4: 2] among the 5-bit signals constituting the CURRENT_STATE signal is not affected by the racing because the value does not change (it remains “0”). This is because these signals remain '0' regardless of reset release.

CURRENT_STATE[1:0]に関しては、リセット解除後に値が変わることが期待されている(CURRENT_STATE [1]は'0'から'1'へ、 CURRENT_STATE [0]は'1'から'0'へ)。ところが、レーシングの影響で、CURRENT_STATE[1:0]に関しては、リセット解除後の値がどちらになるかは確定しない。つまり、期待した値にならない可能性がある。   For CURRENT_STATE [1: 0], the value is expected to change after reset release (CURRENT_STATE [1] changes from '0' to '1', CURRENT_STATE [0] changes from '1' to '0') . However, for CURRENT_STATE [1: 0], the value after reset is not determined due to racing. In other words, it may not be the expected value.

ただし、リセット解除後のCURRENT_STATE信号の各ビットが取りうる値の候補を推測することは可能である。   However, it is possible to infer candidates for values that can be taken by each bit of the CURRENT_STATE signal after reset release.

図17は、図16の内容に、レーシング発生時のCURRENT_STATE信号が取り得る値、すなわち状態値と、その状態値に対応する遷移後の状態を追記したタイミング・チャートである。   FIG. 17 is a timing chart in which values that can be taken by the CURRENT_STATE signal when racing occurs, that is, state values and states after transition corresponding to the state values are added to the contents of FIG.

上述の通り、CURRENT_STATE信号がレーシングの影響を受けるのはbit1、bit0の2ビットである。従って、リセット解除タイミングでCURRENT_STATE信号が取り得る状態値は、全部で、a)“00001”、b)”00010”、c)”00000”、d)”00011”の4通りであると推測できる。   As described above, the CURRENT_STATE signal is affected by racing in two bits, bit1 and bit0. Accordingly, it can be estimated that there are four possible state values of the CURRENT_STATE signal at the reset release timing: a) “00001”, b) “00010”, c) “00000”, and d) “00011”.

図17を用いて、CURRENT_STATE信号がこの4通りのそれぞれの状態値をとった場合について、状態の遷移タイミングと遷移後の状態について検証する。   With reference to FIG. 17, the state transition timing and the state after the transition are verified in the case where the CURRENT_STATE signal takes each of these four state values.

この結果、デザイン2の回路の、リセット解除時の振る舞いは、CURRENT_STATE信号の値によって以下の通りとなる。   As a result, the behavior of the circuit of design 2 when the reset is released is as follows depending on the value of the CURRENT_STATE signal.

a):当該タイミングの次のクロック・エッジでリセットが解除される。   a): Reset is released at the next clock edge of the timing.

b):当該タイミングでリセットが解除される。   b): Reset is released at this timing.

c)、d):その他の状態(設計者によって定義されいない状態)へ遷移する。   c), d): Transition to another state (state not defined by the designer).

このように、CURRENT_STATE信号がa)、b)の値を取れば、デッドロックは発生しない。   Thus, if the CURRENT_STATE signal takes the values of a) and b), deadlock does not occur.

CURRENT_STATE信号が、c)あるいはd)の値を取った場合について、さらに詳細に検討する。   The case where the CURRENT_STATE signal takes the value of c) or d) will be examined in more detail.

図14AのRTL記述上のLine21-25で定義しているエンコード・リストには、c)、d)の値共に存在しない。すなわち、CURRENT_STATE信号がc)、d)の値を取った場合については、設計者が状態を定義していない。   Both the values c) and d) do not exist in the encoding list defined by Line 21-25 on the RTL description in FIG. 14A. That is, when the CURRENT_STATE signal takes the values of c) and d), the designer does not define the state.

ただし、このRTL記述の設計者は、CURRENT_STATE信号がc)あるいはd)の値を取ったとしても、Line41から始まるprocess文の中で、Line84のothers文にジャンプすることを期待している。すなわち、CURRENT_STATE信号が未定義の値になった場合は、CURRENT_STATEはSTATE0に遷移するように、設計者はRTL記述を作成している。実際に、一般的な論理シミュレータでデザイン2の検証を行うと、期待通りothers文にジャンプするため、デッドロックに陥ることはない。   However, even if the designer of this RTL description takes the value of c) or d), the designer of the RTL description expects to jump to the others statement of Line 84 in the process statement starting from Line 41. That is, when the CURRENT_STATE signal becomes an undefined value, the designer creates the RTL description so that the CURRENT_STATE transitions to STATE0. In fact, when design 2 is verified with a general logic simulator, it jumps to the others statement as expected, so it does not fall into a deadlock.

ところが、実際のデバイスにデザイン2のRTL記述の回路をインプリするために論理合成ツールを用いた場合、others文によるデッドロックの防止が有効に働かない場合がある。その理由を以下に説明する。   However, when a logic synthesis tool is used to implement an RTL description circuit of design 2 on an actual device, prevention of deadlock by the others statement may not work effectively. The reason will be described below.

論理合成ツールは、RTL記述をゲートレベルのネットリストに変換する。その際に、一般的な論理合成ツールのデフォルト設定では、FSM回路と認識されたRTL記述のothers文は論理合成されず、削除されてしまう。なぜなら、FSM回路のothers文の機能をインプリしてしまうと回路規模が非常に大きくなってしまうからである。以上のように、デフォルト設定では、others文の機能はデバイスには実装されない。   The logic synthesis tool converts the RTL description into a gate level netlist. At that time, in the default setting of a general logic synthesis tool, the other sentence of the RTL description recognized as the FSM circuit is not logically synthesized but is deleted. This is because the circuit scale becomes very large if the other sentence function of the FSM circuit is implemented. As described above, in the default setting, the function of others statement is not implemented in the device.

そのため、others文で記述された機能をケアするためには、設計者サイドでRTL記述中にattribute記述を挿入するか、あるいは、論理合成ツール上でothers文をケアするオプションを有効にする必要がある。   Therefore, in order to care for the function described in the others statement, it is necessary to insert an attribute description in the RTL description on the designer side, or to enable the option to care for the others statement on the logic synthesis tool. is there.

設計者がこの措置を怠ってしまうと、図17を用いて説明したように、CURRENT_STATE信号がc)やd)の値を取った場合、実デバイス上ではCURRENT_STATE信号が未定義状態になる。そのため、FSM回路が、デッドロックに陥ってしまう可能性がある。   If the designer neglects this measure, as described with reference to FIG. 17, when the CURRENT_STATE signal takes the values of c) and d), the CURRENT_STATE signal becomes undefined on the actual device. Therefore, the FSM circuit may fall into a deadlock.

非同期信号に起因する問題の検証や、ステートマシンのデッドロックの検出を行うための各種の技術が公開されている。   Various techniques for verifying problems caused by asynchronous signals and detecting deadlocks in state machines have been released.

例えば、非同期回路に起因する障害を回避するために、非同期回路に特徴的な動作をシミュレーションにおいて発生させる技術がある(例えば、特許文献1)。特許文献1の非同期回路検証方法では、非同期動作を行う回路に、シミュレーション段階で遅延を発生させ、非同期回路に起因する障害を発生させる。それにより、非同期回路の動作検証を精度良く行うことができる。   For example, in order to avoid a failure caused by an asynchronous circuit, there is a technique for generating an operation characteristic of the asynchronous circuit in a simulation (for example, Patent Document 1). In the asynchronous circuit verification method of Patent Document 1, a delay is caused in a circuit that performs an asynchronous operation at a simulation stage, and a fault caused by the asynchronous circuit is generated. Thereby, the operation verification of the asynchronous circuit can be performed with high accuracy.

ステートマシンに関するフォーマル検証を効率化する論理回路設計装置もある(例えば、特許文献2)。特許文献2の装置は、ステートマシンの状態数を減らし、フォーマル検証によるデッドロックの検証を効率化する。   There is also a logic circuit design apparatus that improves the efficiency of formal verification related to a state machine (for example, Patent Document 2). The apparatus of Patent Document 2 reduces the number of states of the state machine, and improves the efficiency of deadlock verification by formal verification.

あるいは、ステートマシンのデッドロックを検出し、回路の品質を向上させる回路設計の検証方法もある(例えば、特許文献3)。特許文献3の検証方法では、遷移しないステートに遷移している可能性の有無を判断し、デッドロックを検出する。   Alternatively, there is a circuit design verification method that detects a deadlock of a state machine and improves circuit quality (for example, Patent Document 3). In the verification method of Patent Document 3, it is determined whether or not there is a possibility of transition to a non-transition state, and deadlock is detected.

特開2005−284426号公報 (第8−9頁、図1)Japanese Patent Laying-Open No. 2005-284426 (page 8-9, FIG. 1) 特開2008−304960号公報 (第5−6頁、図2−3)JP 2008-304960 A (page 5-6, FIG. 2-3) 特開2011−134242号公報 (第4−5頁、図2)JP 2011-134242 A (page 4-5, FIG. 2)

特許文献1−3の技術には、タイミング起因のデッドロック誘発性がある記述を、検証対象のRTL記述中から検出することができないという問題がある。   The technique of Patent Documents 1-3 has a problem that it is impossible to detect a description having a deadlock-inducing property due to timing from the RTL description to be verified.

特許文献1の非同期回路検証方法では、非同期回路に起因する障害を、対象回路のシミュレーションにおいて発生させる。つまり、シミュレーションを行わなければ、非同期回路の検証を行うことができない。一般的に、開発の効率化のためには、後戻り工数を極力少なくすることが望ましく、回路の検証は、極力、開発の上流段階で行うことが望まれる。ところが、特許文献1の方法には、RTL記述段階での検証には対応できないという問題がある。   In the asynchronous circuit verification method of Patent Document 1, a failure caused by the asynchronous circuit is generated in the simulation of the target circuit. That is, the asynchronous circuit cannot be verified without simulation. In general, in order to improve the development efficiency, it is desirable to reduce the number of backward steps as much as possible, and it is desirable to verify the circuit at the upstream stage of development as much as possible. However, the method of Patent Document 1 has a problem that it cannot cope with verification at the RTL description stage.

特許文献2の論理回路設計装置や特許文献3の検証方法では、時間の概念のない検証を行う。ところが、上記のように、RTL記述には、論理的には正しく、同期回路では問題が発生しなくても、非同期信号に対してはデッドロックが発生する記述が含まれることがある。従って、特許文献2、3の技術では、タイミング起因のデッドロック発生の有無を検証することにはできない。   In the logic circuit design apparatus of Patent Document 2 and the verification method of Patent Document 3, verification without the concept of time is performed. However, as described above, the RTL description may include a description that is logically correct and causes a deadlock with respect to an asynchronous signal even if a problem does not occur in the synchronous circuit. Therefore, the techniques of Patent Documents 2 and 3 cannot verify the occurrence of timing-induced deadlock.

以上のように、特許文献1−3の技術では、タイミング起因のデッドロック誘発性がある記述を、検証対象のRTL記述中から検出することができない。   As described above, in the technique of Patent Documents 1-3, it is impossible to detect a description having a deadlock-inducing property due to timing from the RTL description to be verified.

タイミング起因でデッドロックに陥ってしまうようなFSMの記述を、RTL記述中から自動的に検出することができない場合、設計者自身が、実装したデバイスの振る舞いからこの問題を探し出すといった方法が考えられる。ところが、この方法では非常に長い開発TAT(Turn Around Time。所要時間)を要し、開発費用もかさんでしまう。   If it is not possible to automatically detect from the RTL description the description of the FSM that would cause deadlock due to timing, the designer himself may find this problem from the behavior of the mounted device. . However, this method requires a very long development TAT (Turn Around Time), and the development cost is also increased.

そのため、RTLのコーディングスタイルをマニュアル化し、設計者がそのマニュアルに従って回路を設計するという設計手法で回避することもある。しかし、この方法でも、デッドロック誘発性の回避のための対策が設計者のスキルに依存し、コーディングの品質にバラつきが出るという問題がある。   For this reason, there is a case where the RTL coding style is made a manual, and the designer uses a design technique to design a circuit according to the manual. However, even with this method, there is a problem that the countermeasures for avoiding the deadlock inducement depend on the skill of the designer and the coding quality varies.

そこで、本来は、タイミング起因のデッドロック誘発性がある記述を検証ツールを用いてRTL記述中から発見できることが望ましいが、特許文献1−3の技術はそのような要求に対応することができない。
(発明の目的)
本発明は上記のような技術的課題に鑑みて行われたもので、タイミング起因のデッドロック誘発性のあるFSM記述をRTL記述中から検出することができる回路検証方法、及び回路検証プログラムを提供することを目的とする。
Therefore, originally, it is desirable that a description having a deadlock-inducing property due to timing can be found from the RTL description using a verification tool, but the technique of Patent Documents 1-3 cannot cope with such a request.
(Object of invention)
The present invention has been made in view of the above technical problems, and provides a circuit verification method and a circuit verification program capable of detecting an FSM description having a deadlock-inducing property caused by timing from an RTL description. The purpose is to do.

本発明の回路検証方法は、レジスタ−トランスファー・レベルのハードウェア記述言語を用いて回路が記述された検証対象記述を検証するコンピュータが、検証対象記述からステートマシンを検出し、ステートマシンの複数の状態から、回路の動作を同期させるクロックに対して非同期に変化する非同期信号を使用して遷移条件が定義された非同期遷移状態を検出し、非同期信号の変化後の最初のクロックの有効エッジと非同期信号の変化のタイミングに依存して、非同期遷移状態から、定義されていない非定義状態遷移へ遷移する可能性の有無を判断し、可能性があると判断したとき、検証対象記述にはデッドロックを発生させる可能性があると判断することを特徴とする。





According to the circuit verification method of the present invention, a computer that verifies a verification target description in which a circuit is described using a register-transfer level hardware description language detects a state machine from the verification target description, and detects a plurality of state machines. Detects an asynchronous transition state with a transition condition defined using an asynchronous signal that changes asynchronously with the clock that synchronizes the operation of the circuit from the state, and is asynchronous with the valid edge of the first clock after the asynchronous signal changes Depending on the timing of the signal change, it is determined whether there is a possibility of transition from an asynchronous transition state to an undefined undefined state transition. It is judged that there is a possibility of generating.





本発明の回路検証プログラムは、レジスタ−トランスファー・レベルのハードウェア記述言語を用いて回路が記述された検証対象記述を検証するコンピュータを、検証対象記述からステートマシンを検出する手段と、ステートマシンの複数の状態から、回路の動作を同期させるクロックに対して非同期に変化する非同期信号を使用して遷移条件が定義された非同期遷移状態を検出する手段と、非同期信号の変化後の最初のクロックの有効エッジと非同期信号の変化のタイミングに依存して、非同期遷移状態から、定義されていない非定義状態遷移へ遷移する可能性の有無を判断する手段と、可能性があると判断したとき、検証対象記述にはデッドロックを発生させる可能性があると判断する手段として機能させることを特徴とする。   A circuit verification program according to the present invention includes a computer for verifying a verification target description in which a circuit is described using a register-transfer level hardware description language, means for detecting a state machine from the verification target description, A means for detecting an asynchronous transition state in which a transition condition is defined using an asynchronous signal that changes asynchronously with respect to a clock that synchronizes the operation of the circuit from a plurality of states, and a first clock after the change of the asynchronous signal Depending on the valid edge and the timing of the asynchronous signal change, a means to determine the possibility of transition from an asynchronous transition state to an undefined undefined state transition, and verification when it is determined The object description is characterized by functioning as means for determining that there is a possibility of causing a deadlock.

本発明の回路検証方法、及び回路検証プログラムは、タイミング起因のデッドロック誘発性のあるFSM記述をRTL記述中から検出することができるという効果がある。   The circuit verification method and the circuit verification program according to the present invention have an effect that it is possible to detect an FSM description that induces deadlock caused by timing from the RTL description.

本発明の回路検証方法の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the circuit verification method of this invention. 本発明の回路検証機能が追加されたFormal検証ツールによるFSM回路の解析手順を示すフローチャートである。It is a flowchart which shows the analysis procedure of the FSM circuit by the Formal verification tool to which the circuit verification function of this invention was added. 本実施形態の回路検証方法の処理手順の、詳細なアルゴリズムの例を示すフローチャートの前半部である。It is the first half of the flowchart which shows the example of the detailed algorithm of the process sequence of the circuit verification method of this embodiment. 本実施形態の回路検証方法の処理手順の、詳細なアルゴリズムの例を示すフローチャートの後半部である。It is the latter half part of the flowchart which shows the example of the detailed algorithm of the process sequence of the circuit verification method of this embodiment. 非同期のリセット入力をもつFSM回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of an FSM circuit with an asynchronous reset input. 同期化されたリセット入力をもつFSM回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of a FSM circuit with the synchronized reset input. エンコード・タイプのアトリビュート宣言が記載されたFSMのRTL記述例である。It is an RTL description example of FSM in which an encoding type attribute declaration is described. 本発明の回路検証方法における、デッドロック誘発性の有無を判断する論理展開を示すための、エンコーディング・デザイン例である。It is an encoding design example for showing the logic expansion | deployment which judges the presence or absence of deadlock inductivity in the circuit verification method of this invention. 本発明の回路検証方法における、第1のエンコーディング・デザインの場合の、デッドロック誘発性の有無を判断する手順を示すフローチャートである。It is a flowchart which shows the procedure which judges the presence or absence of deadlock inductivity in the case of the 1st encoding design in the circuit verification method of this invention. 本発明の回路検証方法における、第2のエンコーディング・デザインの場合の、デッドロック誘発性の有無を判断する手順を示すフローチャートのである。It is a flowchart which shows the procedure which judges the presence or absence of deadlock inductivity in the case of the 2nd encoding design in the circuit verification method of this invention. エンコード・タイプのアトリビュート宣言に加え、アトリビュート定義が記載されたFSMのRTL記述例である。It is an RSM description example of FSM in which attribute definitions are described in addition to encoding type attribute declarations. 本発明の回路検証方法における、リセット解除後の最初のクロック・エッジでの状態遷移の有無を判断する手順を示すフローチャートの前半部である。6 is a first half of a flowchart showing a procedure for determining whether or not there is a state transition at the first clock edge after reset release in the circuit verification method of the present invention. 本発明の回路検証方法における、リセット解除後の最初のクロック・エッジでの状態遷移の有無を判断する手順を示すフローチャートの後半部である。6 is a second half of a flowchart showing a procedure for determining whether or not there is a state transition at the first clock edge after reset release in the circuit verification method of the present invention. 図14A、図14B(デザイン2)のFSM回路のRTL記述に、リセット解除状態へ遷移するための条件式を追加した第1のRTL記述例(デザイン3)の前半部である。14A is the first half of a first RTL description example (design 3) in which a conditional expression for transitioning to a reset release state is added to the RTL description of the FSM circuit of FIGS. 14A and 14B (design 2). デザイン3の中間部である。This is the middle part of design 3. デザイン3の後半部である。This is the second half of Design 3. デザイン2のFSM回路のRTL記述に、リセット解除状態へ遷移するための条件式を追加した第2のRTL記述例(デザイン4)の前半部である。This is the first half of a second RTL description example (design 4) in which a conditional expression for transitioning to the reset release state is added to the RTL description of the FSM circuit of design 2. デザイン4の中間部である。This is the middle part of design 4. デザイン4の後半部である。This is the second half of Design 4. 一般的なFormal検証ツールによるFSM回路の解析手順を示すフローチャートである。It is a flowchart which shows the analysis procedure of the FSM circuit by a general Formal verification tool. 論理起因のデッドロック状態が生じるFSM回路のRTL記述例(デザイン1)の前半部である。This is the first half of an RTL description example (design 1) of an FSM circuit in which a logic-induced deadlock state occurs. デザイン1の後半部である。This is the second half of Design 1. タイミング起因のデッドロック状態が生じる可能性があるFSM回路のRTL記述例(デザイン2)の前半部である。This is the first half of an RTL description example (design 2) of an FSM circuit in which a deadlock state due to timing may occur. デザイン2の後半部である。This is the second half of Design 2. 非同期リセット解除時に期待される状態遷移を示すタイミング・チャートである。It is a timing chart which shows the state transition expected at the time of asynchronous reset cancellation. 非同期リセット解除によるレーシング発生時の状態遷移を示すタイミング・チャートである。It is a timing chart which shows the state transition at the time of the racing by asynchronous reset cancellation. 非同期リセット解除によるレーシング発生時の、遷移後に取り得る状態値とその状態値に対応する遷移後の状態を示すタイミング・チャートである。It is a timing chart which shows the state value which can be taken after transition, and the state after transition corresponding to the state value at the time of racing by asynchronous reset cancellation.

本発明の実施形態について、詳細に説明する。図1は、本発明の回路検証方法の処理手順を示すフローチャートである。   Embodiments of the present invention will be described in detail. FIG. 1 is a flowchart showing a processing procedure of the circuit verification method of the present invention.

本発明の回路検証方法の処理手順では、初めに、レジスタ−トランスファー・レベルのハードウェア記述言語を用いて回路が記述された検証対象記述からステートマシンを検出する(ステップS1)。   In the processing procedure of the circuit verification method of the present invention, first, a state machine is detected from a verification target description in which a circuit is described using a register-transfer level hardware description language (step S1).

次に、前記ステートマシンの複数の状態から、前記回路の動作を同期させるクロックに対して非同期に変化する非同期信号を使用して遷移条件が定義された非同期遷移状態を検出する(ステップS2)。   Next, an asynchronous transition state in which a transition condition is defined is detected from a plurality of states of the state machine using an asynchronous signal that changes asynchronously with respect to a clock that synchronizes the operation of the circuit (step S2).

そして、前記非同期信号の変化後の最初の前記クロックの有効エッジと前記非同期信号の変化のタイミングに依存して、前記非同期遷移状態から、定義されていない非定義状態遷移へ遷移する可能性の有無を判断する(ステップS3)。   And whether there is a possibility of transition from the asynchronous transition state to an undefined undefined state transition depending on the first valid edge of the clock after the asynchronous signal change and the timing of the asynchronous signal change. Is determined (step S3).

最後に、前記可能性があると判断したとき、前記検証対象記述にはデッドロックを発生させる可能性があると判断する(ステップS4)。   Finally, when it is determined that there is the possibility, it is determined that there is a possibility of causing a deadlock in the verification target description (step S4).

図2は、図12のFormal検証ツールに、本発明の回路検証手順が追加されたときの解析手順を示すフローチャートである。   FIG. 2 is a flowchart showing an analysis procedure when the circuit verification procedure of the present invention is added to the Formal verification tool of FIG.

本実施形態の回路検証方法では、図12の一般的なFormal検証ツールの機能である「リーチャビリティ・チェック」、「デッドロック・チェック」に、本発明の回路検証方法を用いた「レーシング・デッドロック・チェック(Racing Deadlock Check)」が追加されている。レーシング・デッドロック・チェックでは、RTL記述のソースファイルを入力情報とし、非同期リセット解除時のレーシングが原因でデッドロックになる可能性、すなわち、デッドロック誘発性のあるFSM回路を検出する。   In the circuit verification method of this embodiment, “racing dead” using the circuit verification method of the present invention is used for “reachability check” and “deadlock check” which are functions of the general formal verification tool of FIG. "Racing Deadlock Check" has been added. In the racing deadlock check, the source file of the RTL description is used as input information, and the possibility of deadlock due to racing at the time of asynchronous reset cancellation, that is, an FSM circuit that induces deadlock is detected.

レーシング・デッドロック・チェックの処理手順の概要は以下の通りである。
1)RTL記述から非同期リセット付きFSM回路の記述を検出する。
The outline of the processing procedure of the racing deadlock check is as follows.
1) The description of the FSM circuit with asynchronous reset is detected from the RTL description.

本処理は、一般的なFormal検証ツールの機能で実現することができる。
2)1)のリセット解除前後の状態遷移を把握する。
3)2)の状態遷移がリセット解除時のレーシングでどのように変化するかを推測する。
4)3)で推測された全ての状態遷移が、RTL記述の条件分岐に記載されているか否かをチェックする。
5)条件分岐に記載されていない状態遷移が見つかった場合、対象RTL記述はデッドロックに誘発性があると判断する。
This process can be realized by the function of a general Formal verification tool.
2) Grasp the state transition before and after reset release in 1).
3) Estimate how the state transition of 2) changes in racing when reset is released.
4) It is checked whether all the state transitions estimated in 3) are described in the conditional branch of the RTL description.
5) When a state transition not described in the conditional branch is found, it is determined that the target RTL description is inducible in deadlock.

本発明では、これらのプログラムを設計する際に必要なFormal検証ツールのアルゴリズムを提供する。   In the present invention, an algorithm of a formal verification tool necessary for designing these programs is provided.

図3A、図3Bは、本実施形態の回路検証方法の処理手順の、詳細なアルゴリズムの例を示すフローチャートである。具体的には、図3A、図3Bは、検証対象のRTL記述内に、非同期リセットが解除されたときにレーシングによりデッドロックが発生するFSM回路が存在するか否かを検証するアルゴリズムを示す。以下に、本実施形態の回路検証方法の処理手順を説明する。
(ステップS01)
初めに、RTL記述中からFSM回路を検出する。
(ステップS02)
検出されたFSM回路が非同期リセットを使用しているかどうかをチェックする。本処理は、処理対象のRTL記述に使用されている言語により具体的なチェック方法が異なる。
3A and 3B are flowcharts showing examples of detailed algorithms of the processing procedure of the circuit verification method of the present embodiment. Specifically, FIGS. 3A and 3B show an algorithm for verifying whether there is an FSM circuit in which deadlock occurs due to racing when the asynchronous reset is released in the RTL description to be verified. Hereinafter, a processing procedure of the circuit verification method of the present embodiment will be described.
(Step S01)
First, an FSM circuit is detected from the RTL description.
(Step S02)
Check whether the detected FSM circuit is using asynchronous reset. The specific check method of this process differs depending on the language used for the RTL description to be processed.

代表的なRTL記述用言語である、VHDL、Verilog-HDLの場合については以下の通りである。
a)VHDLの場合
以下の(1)〜(3)が全て成り立つことをチェックする。
The case of VHDL and Verilog-HDL, which are typical RTL description languages, is as follows.
a) In the case of VHDL It is checked that the following (1) to (3) are all satisfied.

(i)当該process文の引数に複数の信号が定義されている
(ii)process宣言直後のif文にevent文が来ない
(iii)(ii)の後のelsif文でevent文が宣言されている
b)Verilog-HDLの場合
以下が成り立つことをチェックする。
(I) Multiple signals are defined in the argument of the process statement (ii) The event statement does not come to the if statement immediately after the process declaration (iii) The event statement is declared in the elsif statement after (ii) B) Verilog-HDL Check that the following holds.

(i)当該always文の引数に複数の信号が定義されている
ただし、a)、b)の場合ともに、ステップS2の処理では、既存のFormal検証ツール等を用いて、クロック、リセットのバック・トレースを行い、当該リセットが当該クロックに同期していないことを確認する必要がある。
(I) A plurality of signals are defined in the argument of the always statement. However, in both cases a) and b), in the process of step S2, the clock, reset back, It is necessary to perform a trace and confirm that the reset is not synchronized with the clock.

例えば、図4のような構成のFSM回路101が、図14A、図14Bのデザイン2のRTL記述で定義されている場合、FSM回路101に入力されるクロック、リセットはそのまま外部入力となっている。そのため、リセット解除のタイミングはクロックに同期していないと考えてよい。従って、FSM回路101は、一旦、検証対象の候補となる。   For example, when the FSM circuit 101 configured as shown in FIG. 4 is defined by the RTL description of design 2 in FIGS. 14A and 14B, the clock and reset input to the FSM circuit 101 are external inputs as they are. . For this reason, it may be considered that the reset release timing is not synchronized with the clock. Therefore, the FSM circuit 101 is once a candidate for verification.

ところが、図5のように、図4のFSM回路101の外部にシンクロナイザ102を備える場合、FSM回路101に入力されるリセットは、上位階層のシンクロナイザ102から出力された信号である。シンクロナイザ102は、非同期リセットの解除タイミングを当該クロックに同期させる機能を有する(S02:No)。そのため、このような回路が付加されている場合は非同期のリセット解除タイミングでレーシングが発生することがなく、FSM回路101はデッドロックに陥ることがない。従って、この場合、FSM回路101は、以降の検証対象から除外される。   However, as shown in FIG. 5, when the synchronizer 102 is provided outside the FSM circuit 101 of FIG. 4, the reset input to the FSM circuit 101 is a signal output from the synchronizer 102 in the higher hierarchy. The synchronizer 102 has a function of synchronizing the asynchronous reset release timing with the clock (S02: No). Therefore, when such a circuit is added, racing does not occur at the asynchronous reset release timing, and the FSM circuit 101 does not fall into a deadlock. Therefore, in this case, the FSM circuit 101 is excluded from subsequent verification targets.

当然ながら、リセットを同期化する回路が付加されていないとき(S02:Yes)は、FSM回路101は、以降の検証処理の対象となる。
(ステップS03)
リセット解除後の最初のクロック・エッジで状態遷移が発生するか否かをチェックする。具体的には、図9A、図9Bに示された手順でチェックを実施する。詳細な説明は後述する。
(ステップS04)
FSM回路の各状態が、列挙型の状態変数を用いて記述されているか、定数型の状態変数を用いて記述されているかをチェックする。以降、各状態が、列挙型の状態値を用いて記述されているFSMを「列挙型FSM」、定数型の状態値を用いて記述されているFSMを「定数型FSM」という。
Naturally, when the circuit for synchronizing the reset is not added (S02: Yes), the FSM circuit 101 is a target of the subsequent verification processing.
(Step S03)
Check if the state transition occurs at the first clock edge after reset release. Specifically, the check is performed according to the procedure shown in FIGS. 9A and 9B. Detailed description will be given later.
(Step S04)
It is checked whether each state of the FSM circuit is described using an enumerated type state variable or a constant type state variable. Hereinafter, an FSM in which each state is described using an enumerated state value is referred to as “enumerated type FSM”, and an FSM in which each state is described using a constant type state value is referred to as “constant type FSM”.

以下の処理は、RTL記述に含まれるFSMが列挙型FSMか、定数型FSMかによって異なる。以下に、FSMの型ごとに検証方法を説明する。対象FSMが列挙型FSMである場合は、図3AのステップS11へ進む。対象FSM回路が定数型FSMである場合は、図3Bに示した「定数型FSM用処理」のステップS21へ進む。定数型FSM用処理については後述する。
(1)列挙型FSMの場合
(ステップS11)
当該FSMが列挙型FSMの場合、RTL上で状態値のアトリビュート(属性)としてエンコード・タイプが宣言されているか否かをチェックする。具体的には、RTL上のattribute記述の有無を確認する。
The following processing differs depending on whether the FSM included in the RTL description is an enumerated type FSM or a constant type FSM. Hereinafter, a verification method will be described for each type of FSM. If the target FSM is an enumeration type FSM, the process proceeds to step S11 in FIG. 3A. If the target FSM circuit is a constant type FSM, the process proceeds to step S21 of the “constant type FSM processing” shown in FIG. 3B. The constant type FSM processing will be described later.
(1) In the case of enumeration type FSM (step S11)
When the FSM is an enumerated type FSM, it is checked whether or not the encoding type is declared as an attribute of the state value on the RTL. Specifically, the presence or absence of attribute description on RTL is confirmed.

当該記述がない場合(S11:No)、状態値をどのようなエンコード・タイプのアトリビュートとして回路が合成されるかは論理合成ツールに依存するため、「当該FSM回路はデッドロック誘発性がある」と判断される。   If there is no such description (S11: No), the encoding type attribute with which the state value is used depends on the logic synthesis tool, so that “the FSM circuit is deadlock-inducing”. It is judged.

図6のRTL記述例の場合、Line27にエンコード・タイプとして”one-hot”が宣言されている。このように、RTL上で状態値のアトリビュート(属性)としてエンコード・タイプが宣言されている場合(S11:Yes)、この時点では、当該FSM回路はデッドロック誘発性があるとは判断されない。
(ステップS12)
ステップS11のattribute記述の内容をチェックする。
a)エンコード・タイプに”gray”(グレイ・コード)が宣言されている場合
この場合は、「当該FSM回路はデッドロック誘発性がない」と判断する。
In the case of the RTL description example of FIG. 6, “one-hot” is declared as an encoding type in Line 27. As described above, when the encode type is declared as the attribute of the state value on the RTL (S11: Yes), it is not determined that the FSM circuit is deadlock-inducing at this point.
(Step S12)
The contents of the attribute description in step S11 are checked.
a) When “gray” (gray code) is declared as the encoding type In this case, it is determined that “the FSM circuit is not deadlock-inducing”.

そのように判断することができる理由を図7A、図7B、図7Cに示す。詳細な説明は、図中に示したため、ここでの説明は省略する。結論としては、状態値がグレイ・コードである場合、状態値の各ビットの内、レーシングの影響を受けるビットは1ビットのみである。従って、この場合は、デッドロックを起こすことはない。
b)”safe”(Safe State Machine)が宣言されている場合
この場合、FSM回路のothers/default文の記述は、論理合成時に回路に実装されるため、やはり「当該FSM回路はデッドロック誘発性がない」と判断される。
c)”gray”、”safe”以外のエンコード・タイプが宣言されている場合
”gray”、”safe”以外のエンコード・タイプがattributeで宣言されている場合は、デッドロックを起こす可能性がある。例えば、図6のRTL記述の場合、エンコード・タイプとして”one-hot”と宣言されており、図14A、図14B(デザイン2)と同様のエンコード・タイプであるため、「当該FSM回路はデッドロック誘発性がある」と判断される。
(2)定数型FSM回路の場合
(ステップS21)
図3AのS04の判定で、当該FSMが定数型FSMであると判断された場合、初めにアトリビュートとしてエンコード・タイプがRTL上で宣言されているか否かをチェックする。
The reason why such a determination can be made is shown in FIGS. 7A, 7B, and 7C. Since the detailed description is shown in the figure, the description is omitted here. In conclusion, if the state value is a Gray code, only one bit of the state value is affected by racing. Therefore, in this case, no deadlock occurs.
b) When “safe” (Safe State Machine) is declared In this case, the description of the other / default statement of the FSM circuit is implemented in the circuit at the time of logic synthesis. It is judged that there is no.
c) When an encoding type other than “gray” or “safe” is declared If an encoding type other than “gray” or “safe” is declared with attribute, deadlock may occur. . For example, in the case of the RTL description in FIG. 6, the encoding type is declared as “one-hot” and is the same encoding type as in FIGS. 14A and 14B (design 2). It is judged that there is a lock-inducing property.
(2) In the case of a constant type FSM circuit (step S21)
If it is determined in S04 of FIG. 3A that the FSM is a constant type FSM, it is first checked whether the encoding type is declared on the RTL as an attribute.

本来、定数型でエンコード(ビット・アサイン)が宣言されているときはattributeは不要である。それにも関わらず、図8のように、あえてアトリビュート定義が記載されている場合(S21:Yes)は、論理合成ツールによっては定数型のエンコード記述を無視してattributeを優先することがある。   Originally, attribute is not necessary when encoding (bit assignment) is declared in a constant type. Nevertheless, as shown in FIG. 8, when an attribute definition is intentionally written (S21: Yes), depending on the logic synthesis tool, the constant type encoding description may be ignored and the attribute given priority.

そのため、この場合は、エンコード・タイプによらずデッドロックを起こす可能性があるものとみなし、「当該FSM回路はデッドロック誘発性がある」と判断する。
(ステップS22)
リセット期間中の状態値とリセット解除後の状態値の各ビットの排他的論理和を取る。図14A、図14B(デザイン2)のRTL記述の場合、
リセット期間中:STATE0(“00001”)
リセット解除後:STATE1(“00010”)
となることから、STATE0 とSTATE1のビットごとの排他的論理和(EXOR_VALUE)は
EXOR_VALUE = “00011”
となる。
(ステップS23)
EXOR_VALUEの各ビットで、’1’が立っているビットの総数を数える。デザイン2の場合、’1’が立っているビットの総数(HIGH_BIT_COUNT)は、
HIGH_BIT_COUNT = 2
となる(EXOR_VALUEのbit0とbit1に’1’が立っているため)。
(ステップS24)
HIGH_BIT_COUNTが2以上かどうかをチェックする。
Therefore, in this case, it is determined that there is a possibility of deadlock regardless of the encoding type, and it is determined that “the FSM circuit has a deadlock inducing property”.
(Step S22)
The exclusive OR of each bit of the state value during the reset period and the state value after the reset is released is calculated. In the case of the RTL description of FIGS. 14A and 14B (design 2),
During reset: STATE0 (“00001”)
After reset release: STATE1 (“00010”)
Therefore, the exclusive OR (EXOR_VALUE) for each bit of STATE0 and STATE1 is
EXOR_VALUE = “00011”
It becomes.
(Step S23)
For each bit of EXOR_VALUE, count the total number of bits with '1' standing. For design 2, the total number of bits with '1' (HIGH_BIT_COUNT) is
HIGH_BIT_COUNT = 2
(Because '1' stands for bit0 and bit1 of EXOR_VALUE).
(Step S24)
Check if HIGH_BIT_COUNT is 2 or more.

HIGH_BIT_COUNTが1以下であれば(S24:No)、「当該FSM回路はデッドロック誘発性がない」と判断する。   If HIGH_BIT_COUNT is 1 or less (S24: No), it is determined that “the FSM circuit is not deadlock-inducing”.

その理由を図7Cに示す。S12の処理における図7Bについての説明と同様に、結論としては、レーシングの影響を受けるのが1ビット分の場合、デッドロックを起こさない。   The reason is shown in FIG. 7C. Similar to the description of FIG. 7B in the process of S12, as a conclusion, when one bit is affected by racing, no deadlock occurs.

HIGH_BIT_COUNTが2以上であれば(S24:Yes)、この時点では、当該FSM回路はデッドロック誘発性がないとは判断されない。
(ステップS25)
EXOR_VALUEに’1’が立っているビットに対して、’0’及び’1’の両方の値を取り得る場合のEXOR_VALUEの値を推測し、メモリ上に格納する。図14A、図14B(デザイン2)のRTL記述の場合、EXOR_VALUEは以下の4通りの値を取り得るので、これらをメモリ領域(ARRAY_EXOR_VALUE)上に格納する。
If HIGH_BIT_COUNT is 2 or more (S24: Yes), it is not determined at this point that the FSM circuit is not deadlock-inducing.
(Step S25)
Estimate the value of EXOR_VALUE when it can take both values of “0” and “1” for the bit with “1” set in EXOR_VALUE, and store it in the memory. In the case of the RTL description in FIGS. 14A and 14B (design 2), EXOR_VALUE can take the following four values, and these are stored in the memory area (ARRAY_EXOR_VALUE).

EXOR_VALUE = “00001”
“00010”
“00000”
“00011”
(ステップS26)
メモリ領域ARRAY_EXOR_VALUEからEXOR_VALUEを順番に取り出す。取り出した値をtmp_EXOR_VALUEとする。
(ステップS27)
tmp_EXOR_VALUE値が、RTL記述上のFSM回路内のcase文の条件分岐に記述されているか否かをチェックする。
EXOR_VALUE = “00001”
“00010”
“00000”
“00011”
(Step S26)
Extract EXOR_VALUE from memory area ARRAY_EXOR_VALUE in order. The extracted value is tmp_EXOR_VALUE.
(Step S27)
It is checked whether the tmp_EXOR_VALUE value is described in the conditional branch of the case statement in the FSM circuit on the RTL description.

以上のように、tmp_EXOR_VALUE値が、RTL記述上のFSM回路内のcase文の条件分岐に記述されていない場合(S27:Yes)は、「当該FSM回路はデッドロック誘発性がある」と判断される。tmp_EXOR_VALUE値が、RTL記述上のFSM回路内のcase文の条件分岐に記述されている場合(S27:No)は、次の処理へ移る。
(ステップS28)
S27での検査対象のtmp_EXOR_VALUE値が、ARRAY_EXOR_VALUEから取り出した最後のデータであるか否かを確認する。
As described above, when the tmp_EXOR_VALUE value is not described in the conditional branch of the case statement in the FSM circuit on the RTL description (S27: Yes), it is determined that “the FSM circuit has deadlock inducing property”. The When the tmp_EXOR_VALUE value is described in the conditional branch of the case statement in the FSM circuit on the RTL description (S27: No), the process proceeds to the next process.
(Step S28)
It is checked whether or not the tmp_EXOR_VALUE value to be inspected in S27 is the last data extracted from ARRAY_EXOR_VALUE.

検査対象のtmp_EXOR_VALUE値が、ARRAY_EXOR_VALUEから取り出した最後のデータである(S28:Yes)ことは、S25で格納された全てのtmp_EXOR_VALUE値が、RTL記述内の条件分岐に記述されていることを意味する。この場合、状態はothers文へもdefault文へも遷移する可能性がないため、「当該FSM回路はデッドロック誘発性がない」と判断される。   That the tmp_EXOR_VALUE value to be inspected is the last data extracted from ARRAY_EXOR_VALUE (S28: Yes) means that all tmp_EXOR_VALUE values stored in S25 are described in the conditional branch in the RTL description. . In this case, since there is no possibility that the state changes to the others statement or the default statement, it is determined that “the FSM circuit is not deadlock-inducing”.

検査対象のtmp_EXOR_VALUE値が、ARRAY_EXOR_VALUEから取り出した最後のデータでない場合(S28:No)は、S27の処理へ戻る。   When the tmp_EXOR_VALUE value to be inspected is not the last data extracted from ARRAY_EXOR_VALUE (S28: No), the process returns to S27.

以上のように、S27、S28は、全てのtmp_EXOR_VALUE値がFSM回路内のcase文の条件分岐に記述されているか、あるいは、FSM回路内のcase文の条件分岐に記述されていないtmp_EXOR_VALUE値があるかをチェックする処理である。   As described above, in S27 and S28, all tmp_EXOR_VALUE values are described in the conditional branch of the case statement in the FSM circuit, or there are tmp_EXOR_VALUE values not described in the conditional branch of the case statement in the FSM circuit. This is a process of checking whether or not.

S25で格納されたtmp_EXOR_VALUE値に、1つでもRTL記述内の条件分岐に記述されていない場合(S27:Yes)は、「当該FSM回路はデッドロック誘発性がある」と判断される
図14A、図14B(デザイン2)の場合について、上記のEXOR_VALUEの4つの値を上から順に、メモリ領域ARRAY_EXOR_VALUEから取り出したときの、S27、S28の処理は以下の通りである。なお、Line番号は図14A、図14BのRTL記述における行番号である。
1)tmp_EXOR_VALUE = “00001”を読み出す
そして、Line43に、STATE0=”00001”との記述を確認する(S27:No)。2)tmp_EXOR_VALUE = “00010”を読み出す
そして、Line46に、STATE1=”00010”との記述を確認する(S27:No)。
3)tmp_EXOR_VALUE = “00000”を読み出す
このとき、図14A、図14BのRTL記述中にはSTATE1=”00000”との記述がない(S27:Yes)ので、RTL記述としては、状態はothers文の定義箇所に遷移することになる。
If at least one tmp_EXOR_VALUE value stored in S25 is not described in the conditional branch in the RTL description (S27: Yes), it is determined that “the FSM circuit has deadlock inductiveness”. In the case of FIG. 14B (design 2), the processing of S27 and S28 when the above four values of EXOR_VALUE are extracted from the memory area ARRAY_EXOR_VALUE in order from the top are as follows. The line number is a line number in the RTL description of FIGS. 14A and 14B.
1) Read tmp_EXOR_VALUE = “00001” and confirm the description of STATE0 = “00001” in Line 43 (S27: No). 2) Read tmp_EXOR_VALUE = “00010” and confirm the description of STATE1 = “00010” in Line 46 (S27: No).
3) Read tmp_EXOR_VALUE = “00000” At this time, there is no description of STATE1 = “00000” in the RTL description of FIG. 14A and FIG. 14B (S27: Yes). Transition to the definition location.

状態がothers文の定義箇所に遷移する可能性があることが判明したので、「当該FSM回路はデッドロック誘発性がある」との旨をレポートし、処理を終了する。   Since it has been found that there is a possibility that the state transitions to the definition part of the “others” statement, the fact that “the FSM circuit is deadlock-inducing” is reported, and the process ends.

図7Cに、上記のS22〜S28の処理内容をさらに詳細に示す。詳細な説明は、図中に示したため、ここでの説明は省略する。   FIG. 7C shows the processing contents of S22 to S28 in more detail. Since the detailed description is shown in the figure, the description is omitted here.

次に、前述の図3AのS03の処理である、「リセット解除後の最初のクロック・エッジでの状態遷移の有無の判断」の手順について説明する。   Next, a procedure of “determination of state transition at first clock edge after reset release”, which is the process of S03 of FIG. 3A described above, will be described.

図9A、図9Bは、上記判断手順の例を示すフローチャートである。以下に、処理対象のRTL記述として、図14A、図14BのRTL記述(デザイン2)、及びデザイン2のRTL記述に条件式を追加した、図10A、図10B、図10CのRTL記述(デザイン3)、図11A、図11B、図11CのRTL記述(デザイン4)を用いて、処理手順を順に説明する。
(1)デザイン2の場合
(ステップS31)
RTL記述に、リセット解除後(クロック・エッジ発生後)に、リセット解除状態へ遷移するための条件式(以降、単に「条件式」という。)があるか否かを判断する。
9A and 9B are flowcharts showing an example of the determination procedure. In the following, conditional expressions are added to the RTL description (design 2) in FIGS. 14A and 14B as the RTL description to be processed, and the RTL description in FIG. 10A, FIG. 10B, and FIG. 10C (design 3). ), The processing procedure will be described in order using the RTL description (design 4) in FIGS. 11A, 11B, and 11C.
(1) In case of design 2 (step S31)
It is determined whether or not the RTL description has a conditional expression (hereinafter simply referred to as “conditional expression”) for transitioning to the reset release state after reset release (after generation of a clock edge).

デザイン2では、Line43-44に条件式がない(S31:No)。従って、リセット解除後の最初のクロック・エッジで無条件にSTATE1に遷移すると判断し、処理を終了する。   In design 2, there is no conditional expression in Line 43-44 (S31: No). Therefore, it is determined that the state transitions to STATE1 unconditionally at the first clock edge after the reset is released, and the process ends.

この場合は、図17を用いて説明した理由により、「当該FSM回路はデッドロック誘発性がある」可能性があると判断し、図3AのS04の処理へ移る。
(2)デザイン3の場合
(ステップS31)
デザイン3の場合、Line44に条件文がある(S31:Yes))ので、次の処理に移る。
(ステップS32)
条件式にF/Fの出力信号が含まれるか否かを判断する。
デザイン3の場合、Line44の条件式の要素には、入力信号であるINDATA信号は含まれるが、F/Fの出力信号は含まれない(S32:No)。
(ステップS36)
INDATA信号は外部から入力されるため、INDATA=’1’となるタイミングは不明である。そのため、アルゴリズム的には非同期リセット解除タイミングでINDATA=’1’となる可能性がある。従って、「当該FSM回路はデッドロック誘発性がある」可能性があると判断する。そのため、図3AのS04の処理へ移る。
(3)デザイン4の場合
(ステップS31)
デザイン4の場合、Line44に条件文がある(S31:Yes))ので、次の処理に移る。
(ステップS32)
デザイン4の場合、Line44の条件式の要素であるINDATA信号は入力端子、cnt信号はF/F出力信号であり、条件式にF/Fの出力信号が含まれる(ステップS32:Yes)。
(ステップS33)
条件式の要素がF/Fの出力信号のみであるか否かを判断する。
In this case, for the reason described with reference to FIG. 17, it is determined that there is a possibility that “the FSM circuit is deadlock-inducing”, and the process proceeds to S04 in FIG. 3A.
(2) In case of design 3 (step S31)
In the case of design 3, since there is a conditional statement in Line 44 (S31: Yes), the process proceeds to the next process.
(Step S32)
It is determined whether or not the conditional expression includes an F / F output signal.
In the case of design 3, the element of the conditional expression of Line 44 includes the INDATA signal that is the input signal, but does not include the F / F output signal (S32: No).
(Step S36)
Since the INDATA signal is input from the outside, the timing when INDATA = '1' is unknown. Therefore, there is a possibility that INDATA = '1' at the asynchronous reset release timing in terms of algorithm. Therefore, it is determined that there is a possibility that “the FSM circuit has a deadlock-inducing property”. Therefore, the process proceeds to S04 in FIG. 3A.
(3) In case of design 4 (step S31)
In the case of design 4, since there is a conditional statement in Line 44 (S31: Yes), the process proceeds to the next process.
(Step S32)
In the case of design 4, the INDATA signal which is an element of the conditional expression of Line 44 is an input terminal, the cnt signal is an F / F output signal, and the F / F output signal is included in the conditional expression (step S32: Yes).
(Step S33)
It is determined whether or not the conditional expression element is only an F / F output signal.

デザイン4の場合、条件式にF/Fの出力信号以外にINDATA信号が含まれる(ステップS33:No)。   In the case of design 4, the conditional expression includes an INDATA signal in addition to the F / F output signal (step S33: No).

条件式の要素がF/Fの出力信号のみである場合(ステップS33:Yes)は、後述のステップS38の処理へ移る。
(ステップS34)
F/F出力信号が偽であると仮定したとき、F/F出力信号以外の要素の真偽に関わらず、条件式が必ず偽になるか否かを判断する。
When the conditional expression element is only an F / F output signal (step S33: Yes), the process proceeds to step S38 described later.
(Step S34)
When it is assumed that the F / F output signal is false, it is determined whether or not the conditional expression is always false regardless of whether the elements other than the F / F output signal are true or false.

デザイン4の場合、Line44にある「cnt=”100”」が偽であると仮定した場合、Line44の条件式はINDATA信号がどのような値をとっても必ず偽となる(ステップS34:Yes)。
(ステップS37)
非同期リセット解除のタイミングでの条件式の真偽は、F/F出力信号の論理によって決まると判断する。
In the case of the design 4, assuming that “cnt =“ 100 ”” in the Line 44 is false, the conditional expression of the Line 44 is always false regardless of the value of the INDATA signal (step S34: Yes).
(Step S37)
Whether the conditional expression is true or false at the asynchronous reset release timing is determined by the logic of the F / F output signal.

この判断は、デザイン4の場合では、cnt信号が非同期リセット解除タイミングで取る値にのみ依存し、INDATA信号には依存せず、Line44の条件式の真偽が決定されることを意味する。   This determination means that in the case of the design 4, the cnt signal depends only on the value taken at the asynchronous reset release timing, does not depend on the INDATA signal, and the true / false of the conditional expression of the Line 44 is determined.

この場合、以降、F/F出力信号以外の要素(デザイン4の場合はcnt信号)が非同期リセット解除タイミングでどのような値を取り得るかを検証する。
(ステップS38)
F/F出力信号の生成論理に、非同期リセット時の値が存在するか否かを判断する。
In this case, thereafter, it is verified what value other than the F / F output signal (cnt signal in the case of design 4) can take at the asynchronous reset release timing.
(Step S38)
It is determined whether or not a value at the time of asynchronous reset exists in the generation logic of the F / F output signal.

デザイン4の場合では、cnt信号のF/Fが非同期リセット付きF/Fかどうかをチェックする。これは非同期リセット時の値が確定するか否かを確認する必要があるためである。   In the case of design 4, it is checked whether the F / F of the cnt signal is an F / F with asynchronous reset. This is because it is necessary to confirm whether or not the value at the time of asynchronous reset is fixed.

もし値が確定しなければ(ステップS38:No)、リセット解除時のcnt信号の値は不定(‘X’)となることから、1/0どちらも取り得るため図11BのLine44の条件式は真となる可能性があると判断する。従って、「当該FSM回路はデッドロック誘発性がある」可能性があると判断し、図3AのS04の処理へ移る。   If the value is not fixed (step S38: No), the value of the cnt signal at the time of reset release becomes indefinite ('X'). Judge that it may be true. Therefore, it is determined that there is a possibility that “the FSM circuit is deadlock-induced”, and the process proceeds to S04 in FIG. 3A.

しかし、デザイン4の場合では、Line96の通り、cnt信号のF/Fは非同期リセット付きF/Fである(ステップS38:Yes)ため、次の処理に移る。
(ステップS39)
F/F出力信号の非同期リセット時の値と、条件式が真になるためのF/F出力信号の値が一致するか否かを判断する。
However, in the case of design 4, as shown in Line 96, the F / F of the cnt signal is an F / F with asynchronous reset (step S38: Yes), and the process proceeds to the next process.
(Step S39)
It is determined whether or not the value at the time of asynchronous reset of the F / F output signal matches the value of the F / F output signal for the conditional expression to be true.

デザイン4の場合では、cnt信号のリセット初期値を確認する。Line97にある通り、cnt信号のリセット初期値は”000”である。この値は、Line44の条件式が真になるための値である「cnt=”100”」とは一致しない(ステップS39:Yes)。つまり、リセット解除タイミングにおいてcnt信号は”000”であることから、このタイミングで図11BのLine44の条件式は常に偽となる。よって、このタイミングで状態がSTATE0→STATE1に遷移することはないことがわかるので、「当該FSM回路はデッドロック誘発性がない」と判断する。   In the case of design 4, the reset initial value of the cnt signal is confirmed. As shown in Line 97, the reset value of the cnt signal is “000”. This value does not match “cnt =“ 100 ””, which is a value for the conditional expression of Line 44 to be true (step S39: Yes). That is, since the cnt signal is “000” at the reset release timing, the conditional expression of Line 44 in FIG. 11B is always false at this timing. Therefore, since it can be seen that the state does not change from STATE 0 to STATE 1 at this timing, it is determined that “the FSM circuit is not deadlock-inducing”.

もし、仮にデザイン4のLine44の条件式が「INDATA = '1' and cnt = "000"」と記述されていたならば、S39の判定結果は偽となる(ステップS39:No)。つまり、リセット解除タイミングにおいて、状態は必ずSTATE0→STATE1に遷移すると判断する。従って、「当該FSM回路はデッドロック誘発性がある」可能性があると判断し、図3AのS04の処理へ移る。   If the conditional expression of Line 44 of design 4 is described as “INDATA = '1' and cnt =“ 000 ””, the determination result in S39 is false (step S39: No). That is, at the reset release timing, it is determined that the state always changes from STATE0 to STATE1. Therefore, it is determined that there is a possibility that “the FSM circuit is deadlock-induced”, and the process proceeds to S04 in FIG. 3A.

なお、上記の実施形態では、非同期リセットの解除時の振る舞いを例として説明したが、リセット以外の非同期な信号に対する状態遷移が定義されたFSMについても、同様に処理することができる。すなわち、上記の非同期リセット解除を、非同期信号の変化に置き換えて考えればよい。
(実施形態の効果)
本実施形態の回路検証方法によると、検証対象のRTL記述に含まれる、非同期な信号変化によって非定義な状態へ遷移するFSMの記述を検出する。
In the above embodiment, the behavior at the time of releasing the asynchronous reset has been described as an example. However, the FSM in which the state transition for the asynchronous signal other than the reset is defined can be similarly processed. That is, the above asynchronous reset cancellation may be replaced with a change in an asynchronous signal.
(Effect of embodiment)
According to the circuit verification method of the present embodiment, a description of an FSM that transitions to an undefined state due to an asynchronous signal change included in an RTL description to be verified is detected.

従って、非同期な信号変化時、例えば、非同期リセット解除タイミングのレーシングによるFSM回路のデッドロック不具合を、フロントエンド設計フェース、しかもRTLシミュレーション以前で検出することができる。   Accordingly, when the signal changes asynchronously, for example, a deadlock defect of the FSM circuit due to racing of the asynchronous reset release timing can be detected before the front-end design face and before the RTL simulation.

上記の不具合は、これまでは実機評価の段階又はゲート・シミュレーションの段階でしか見つけることができなかったので、後工程でのデバッグにかかる時間を大幅に短縮することができる(TAT改善)という効果がある。   Until now, the above problems could only be found at the actual machine evaluation stage or the gate simulation stage, so that the time required for debugging in the subsequent process can be greatly reduced (TAT improvement). There is.

また、フロント・ローディングの観点から、前工程での品質が改善される(品質向上)という効果もある。   Further, from the viewpoint of front loading, there is an effect that the quality in the previous process is improved (quality improvement).

本実施形態の各フローチャートに示された処理を実行する主体は限定されない。各処理制御は、ハードウェアによって実行されてもよい。あるいは、CPU(Central Processing Unit)(図示なし)を備える装置を回路検証装置として使用し、そのCPUが所定の記憶手段(図示なし)から検証プログラムを読み込んで実行することによって、処理が行われてもよい。   The subject that executes the processes shown in the flowcharts of the present embodiment is not limited. Each processing control may be executed by hardware. Alternatively, a device including a CPU (Central Processing Unit) (not shown) is used as a circuit verification device, and the CPU reads the verification program from a predetermined storage unit (not shown) and executes it to execute processing. Also good.

なお、本プログラムは、ROM(Read Only Memory)、RAM(Random Access Memory)、フラッシュメモリ等の半導体記憶装置、あるいは光ディスク、磁気ディスク、光磁気ディスク等、非一時的な媒体に格納されてもよい。   The program may be stored in a semiconductor storage device such as a ROM (Read Only Memory), a RAM (Random Access Memory), or a flash memory, or a non-transitory medium such as an optical disk, a magnetic disk, or a magneto-optical disk. .

本発明の回路検証方法は、RTL設計を行う半導体デバイスの開発全般において適用することができる。   The circuit verification method of the present invention can be applied in general development of semiconductor devices for RTL design.

また、本発明の回路検証方法を用いる検証手段は、Formal検証用ツール等、半導体デバイス開発用のEDAツールのプログラムに実装されてもよい。すなわち、図2のように、図12のような一般的なFormal検証ツールに追加される形で実装されてもよい。あるいは、単独のEDAツールとして実現されてもよい。   The verification means using the circuit verification method of the present invention may be implemented in a program of an EDA tool for semiconductor device development, such as a formal verification tool. That is, as shown in FIG. 2, it may be implemented in a form added to a general formal verification tool as shown in FIG. Alternatively, it may be realized as a single EDA tool.

101 有限ステートマシン(FSM)
102 シンクロナイザ
101 Finite state machine (FSM)
102 Synchronizer

Claims (10)

レジスタ−トランスファー・レベルのハードウェア記述言語を用いて回路が記述された検証対象記述を検証するコンピュータが、
検証対象記述からステートマシンを検出し、
前記ステートマシンの複数の状態から、前記回路の動作を同期させるクロックに対して非同期に変化する非同期信号を使用して遷移条件が定義された非同期遷移状態を検出し、
前記非同期信号の変化後の最初の前記クロックの有効エッジと前記非同期信号の変化のタイミングに依存して、前記非同期遷移状態から、定義されていない非定義状態遷移へ遷移する可能性の有無を判断し、
前記可能性があると判断したとき、前記検証対象記述にはデッドロックを発生させる可能性があると判断する
ことを特徴とする回路検証方法。
A computer for verifying a verification target description in which a circuit is described using a register-transfer level hardware description language,
Detect the state machine from the verification target description,
Detecting an asynchronous transition state in which a transition condition is defined using an asynchronous signal that changes asynchronously with respect to a clock that synchronizes the operation of the circuit from a plurality of states of the state machine;
Whether there is a possibility of transition from the asynchronous transition state to an undefined undefined state transition is determined depending on the first valid edge of the clock after the asynchronous signal change and the timing of the asynchronous signal change. And
When it is determined that there is the possibility, it is determined that the verification target description may cause a deadlock.
前記複数の状態中に前記非同期遷移状態を含む前記ステートマシンを、前記状態が列挙型の状態値で定義された列挙型ステートマシン、又は前記状態が定数型の状態値で定義された定数型ステートマシンに分類し、
前記列挙型ステートマシン及び前記定数型ステートマシンの各々の前記状態値の属性として、前記状態値を構成する複数のビットのうち1ビットを除き他のビットが偽であるようにコード化されたエンコード型が指定されているか否かに基づいて、前記可能性を判断する
ことを特徴とする請求項1に記載の回路検証方法。
The state machine including the asynchronous transition state among the plurality of states, an enumerated state machine in which the state is defined by an enumerated state value, or a constant type state in which the state is defined by a constant state value Classified into machines
Encoding encoded such that other than one bit of the plurality of bits constituting the state value is false as an attribute of the state value of each of the enumerated state machine and the constant state machine The circuit verification method according to claim 1, wherein the possibility is determined based on whether or not a type is specified.
前記検証対象記述中で、前記列挙型ステートマシンの状態値の属性として前記エンコード型が指定されていない場合、前記列挙型のステートマシンには前記可能性があると判断する
ことを特徴とする請求項2に記載の回路検証方法。
When the encoding type is not specified as an attribute of a state value of the enumerated state machine in the verification target description, it is determined that the enumerated state machine has the possibility. Item 3. The circuit verification method according to Item 2.
前記検証対象記述中で、前記列挙型ステートマシンの状態値の属性として前記エンコード型が指定されている場合、
セーフ又はグレイのいずれかが属性として指定されているときは、前記列挙型のステートマシンには前記可能性がないと判断し、
セーフ又はグレイのいずれも属性として指定されていないときは、前記列挙型のステートマシンには前記可能性があると判断する
ことを特徴とする請求項3に記載の回路検証方法。
In the verification target description, when the encoding type is specified as an attribute of the state value of the enumerated state machine,
When either safe or gray is specified as an attribute, the enumerated state machine determines that there is no such possibility,
If neither safe or gray is not specified as an attribute, circuit verification method of claim 3 wherein the enumeration state machine is characterized in that it is determined that there is the possibility.
前記検証対象記述中で、前記定数型ステートマシンの状態値の属性として前記エンコード型が属性として指定されている場合、前記定数型のステートマシンには前記可能性があると判断する
ことを特徴とする請求項2に記載の回路検証方法。
In the verification target description, when the encoding type is specified as an attribute of the state value of the constant type state machine, it is determined that the constant type state machine has the possibility. The circuit verification method according to claim 2.
前記定数型ステートマシンの状態値の属性として前記エンコード型が指定されていない場合、
前記列挙型ステートマシンの前記状態値の、前記非同期信号の変化の前後において変化する変化ビットの数に基づき、前記列挙型ステートマシンの前記可能性を判断する
ことを特徴とする請求項5に記載の回路検証方法。
When the encoding type is not specified as an attribute of the state value of the constant type state machine,
6. The possibility of the enumeration state machine is determined based on the number of change bits of the state value of the enumeration state machine that change before and after the change of the asynchronous signal. Circuit verification method.
前記定数型ステートマシンの状態値の属性として前記エンコード型が指定され、かつ前記変化ビットの数が2以上である場合、
前記変化ビットの内の複数のビットの各々を真又は偽と仮定して構成した仮想状態値の全てが、前記ステートマシンの前記状態値に含まれるか否かに基づき、前記列挙型ステートマシンの前記可能性を判断する
ことを特徴とする請求項6に記載の回路検証方法。
When the encoding type is specified as an attribute of the state value of the constant type state machine and the number of change bits is 2 or more,
Based on whether or not all of the virtual state values constructed assuming that each of the plurality of bits of the change bits is true or false are included in the state value of the state machine, The circuit verification method according to claim 6, wherein the possibility is determined.
前記ステートマシンの状態が、前記非同期信号の変化前の状態から前記非同期リセットの変化後の状態へ遷移するための条件式が前記検証対象記述に含まれるか否か、及び、
前記条件式に含まれるフリップフロップの出力状態に基づいて、
前記複数の状態に前記非同期遷移状態が含まれるか否かを判断する
ことを特徴とする請求項1乃至7のいずれかに記載の回路検証方法。
Whether the state of the state machine includes a conditional expression for transition from a state before the change of the asynchronous signal to a state after the change of the asynchronous reset in the verification target description; and
Based on the output state of the flip-flop included in the conditional expression,
The circuit verification method according to claim 1, wherein it is determined whether or not the asynchronous transition state is included in the plurality of states.
レジスタ−トランスファー・レベルのハードウェア記述言語を用いて回路が記述された検証対象記述を検証するコンピュータを、
前記検証対象記述からステートマシンを検出する手段と、
前記ステートマシンの複数の状態から、前記回路の動作を同期させるクロックに対して非同期に変化する非同期信号を使用して遷移条件が定義された非同期遷移状態を検出する手段と、
前記非同期信号の変化後の最初の前記クロックの有効エッジと前記非同期信号の変化のタイミングに依存して、前記非同期遷移状態から、定義されていない非定義状態遷移へ遷移する可能性の有無を判断する手段と、
前記可能性があると判断したとき、前記検証対象記述にはデッドロックを発生させる可能性があると判断する手段
として機能させるための回路検証プログラム。
A computer for verifying a verification target description in which a circuit is described using a register-transfer level hardware description language,
Means for detecting a state machine from the verification object description;
Means for detecting an asynchronous transition state in which a transition condition is defined using an asynchronous signal that changes asynchronously with respect to a clock that synchronizes the operation of the circuit from a plurality of states of the state machine;
Whether there is a possibility of transition from the asynchronous transition state to an undefined undefined state transition is determined depending on the first valid edge of the clock after the asynchronous signal change and the timing of the asynchronous signal change. Means to
A circuit verification program for functioning as means for determining that there is a possibility of causing a deadlock in the verification target description when it is determined that there is the possibility.
請求項9に記載の回路検証プログラムがインストールされ、
前記検証対象記述の前記可能性を判断する
ことを特徴とする回路検証装置。
The circuit verification program according to claim 9 is installed,
A circuit verification apparatus for determining the possibility of the verification target description.
JP2014001643A 2014-01-08 2014-01-08 Circuit verification method and circuit verification program Active JP6303509B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014001643A JP6303509B2 (en) 2014-01-08 2014-01-08 Circuit verification method and circuit verification program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014001643A JP6303509B2 (en) 2014-01-08 2014-01-08 Circuit verification method and circuit verification program

Publications (2)

Publication Number Publication Date
JP2015130104A JP2015130104A (en) 2015-07-16
JP6303509B2 true JP6303509B2 (en) 2018-04-04

Family

ID=53760770

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014001643A Active JP6303509B2 (en) 2014-01-08 2014-01-08 Circuit verification method and circuit verification program

Country Status (1)

Country Link
JP (1) JP6303509B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112507641B (en) * 2020-12-17 2022-07-05 中科芯云微电子科技有限公司 Alternating verification method and system for integrated circuit

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011134242A (en) * 2009-12-25 2011-07-07 Fujitsu Semiconductor Ltd Method and program for verifying circuit design
US8302044B2 (en) * 2011-01-27 2012-10-30 Synopsys, Inc. Abstraction-based livelock/deadlock checking for hardware verification

Also Published As

Publication number Publication date
JP2015130104A (en) 2015-07-16

Similar Documents

Publication Publication Date Title
US7890901B2 (en) Method and system for verifying the equivalence of digital circuits
US8572527B1 (en) Generating properties for circuit designs
US7917882B2 (en) Automated digital circuit design tool that reduces or eliminates adverse timing constraints due to an inherent clock signal skew, and applications thereof
US20080201671A1 (en) Method for generating timing exceptions
US20090055781A1 (en) Circuit design device, circuit design program, and circuit design method
US20210224448A1 (en) Circuit design assistance system and computer readable medium
US10831956B2 (en) Efficient execution of alternating automaton representing a safety assertion for a circuit
US8181136B2 (en) Circuit operation verification method and apparatus
US8312403B2 (en) Method of achieving convergence of hold time error, device and program therefor
US20130036394A1 (en) Vectorless IVD Analysis Prior to Tapeout to Prevent Scan Test Failure Due to Voltage Drop
JP6303509B2 (en) Circuit verification method and circuit verification program
US7617466B2 (en) Circuit conjunctive normal form generating method, circuit conjunctive normal form generating device, hazard check method and hazard check device
US20180121584A1 (en) Verification support program medium, verification support method, and information processing device
US7930609B2 (en) Apparatus and method for verifying target circuit
US20110077893A1 (en) Delay Test Apparatus, Delay Test Method and Delay Test Program
US20100269003A1 (en) Delay fault diagnosis program
US20080069277A1 (en) Method and apparatus for modeling signal delays in a metastability protection circuit
US11386251B2 (en) Logic simulation verification system, logic simulation verification method, and program
US8438518B2 (en) Apparatus for designing semiconductor integrated circuit, method of designing semiconductor integrated circuit, and program for designing semiconductor integrated circuit
US20120253712A1 (en) Power consumption calculation method, power consumption calculation apparatus, and non-transitory computer-readble medium storing power consumption calculation program
JP2002259488A (en) Method for verifying clock skew
US9547733B2 (en) Identifying inversion error in logic equivalence check
JP5145167B2 (en) Clock domain check method, clock domain check program, and recording medium
JP5052432B2 (en) Circuit insertion device for improving fault coverage
JP2017146774A (en) Processing apparatus, logic simulator and design verification method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171205

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180118

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180219

R150 Certificate of patent or registration of utility model

Ref document number: 6303509

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150