【0001】
【発明の属する技術分野】
本発明は、半導体装置の設計データを機能シミュレーションによって検証する半導体装置の設計検証方法にかかわり、特には、設計データの効率的検証のための技術に関する。
【0002】
【従来の技術】
従来より、ハードウェア設計記述により表された半導体装置の設計データが仕様通りであるかどうかの検証は、計算機上でそのハードウェア設計記述の動作をシミュレートすることにより行われている。この場合、一般的に、検証対象となる半導体装置の設計データと、この設計データと同じ動作が期待される参照データとを同時にシミュレートし、両者の出力結果を比較することにより、設計データが仕様通りであるかどうかを検証する。出力結果が一致すれば仕様通りであると判断し、一致しなければ仕様通りでないと判断する(例えば、特許文献1参照)。
【0003】
【特許文献1】
特開平10−23104号公報(第2−3頁、図1)
【0004】
【発明が解決しようとする課題】
ある時刻で出力結果に不一致が生じた場合、実際には、その時刻以前の段階ですでに設計データの内部状態に不一致が生じている可能性が高い。また、設計データ内のメモリ上のデータにも不一致が生じている可能性がある。
【0005】
この場合、実際に設計データ上で問題となるのは、つまり設計ミスが存在する可能性が高いのは、設計データの内部状態に不一致が生じた時刻付近の動作や、メモリ上に間違ったデータを書き込んだ時刻付近の動作である。
【0006】
ところが、上記従来の半導体装置の設計検証方法では、比較対象が設計データの出力結果と参照データの出力結果とだけである。したがって、問題個所を特定するには、出力結果の不一致が発生した時刻から遡って特定するしかない。
【0007】
しかしながら、その遡る過程はステップ的に長いものとならざるを得ない。出力結果不一致発生時点または偽データ書き込み時点から内部状態不一致発生時点まで遡り、さらに内部状態不一致発生時点を起点にして問題個所を探索しなければならない。このような処理では、全体の工数が非常に大きなものになってしまう。
【0008】
その上、設計データの内部状態に一旦問題が発生すると、それ以降のシミュレーションによる出力結果の比較には意味はなく、内部状態不一致または偽データ書き込みの原因となった設計ミス以外の設計ミスを発見することは非常に困難である。このような場合、設計者は一つの設計ミスを修正した後、別の設計ミスがあるかどうかを確かめるために、さらに最初からシミュレーションを実行する必要があり、これを設計ミスの数だけ繰り返す必要があった。
【0009】
本発明は、このような事情に鑑みて創案されたものであり、問題個所の特定を効率的に行えるようにするとともに、設計ミス特定率の向上を図ることを目的としている。
【0010】
【課題を解決するための手段】
上記の課題を解決するために、本発明は次のような手段を講じる。すなわち、ハードウェア設計記述により表された半導体装置の設計データとその設計データと同じ動作が期待される参照データとを同時にシミュレートする機能シミュレーションにおいて、前記設計データの内部状態を計算するステップと、前記参照データの内部状態を計算するステップと、前記2者の内部状態及び内部状態の状態遷移を比較するステップと、前記比較で不一致が生じる場合にその差異について報告を行うステップとを含むことを特徴とする。ここで、設計データの内部状態の計算ステップと参照データの内部状態の計算ステップとの前後関係については、いずれを先にしてもよく、また両ステップ同時進行の並行処理でもかまわない。
【0011】
この構成による作用は次のとおりである。出力結果のみを比較していた従来技術に対して、計算によって刻々の設計データおよび参照データの内部状態を求め、それら両内部状態どうしの比較および内部状態の状態遷移を比較し、不一致があれば、その旨の報告を行うので、不一致発生時刻付近にある問題個所を効率良く特定することができる。
【0012】
上記において好ましい態様は、さらに、前記設計データと前記参照データとの内部状態どうし間に不一致が生じたときは、その不一致発生時刻における前記設計データの内部状態を前記参照データの内部状態と同一に書き換えるステップと、その書き換え状態で前記不一致発生時刻以降の機能シミュレーションを続行するステップとを含むことである。
【0013】
これによれば、内部状態どうし間で不一致が生じた場合には、設計データの内部状態を参照データの内部状態と同じに書き換えた上で機能シミュレーションを続行するため、不一致の原因となった設計ミス以外の設計ミスの発見も可能となり、1回のシミュレーションでの設計ミス特定率を向上させることができる。
【0014】
別の解決手段として、本発明は次のような手段を講じる。すなわち、ハードウェア設計記述により表された半導体装置の設計データとその設計データと同じ動作が期待される参照データとを同時にシミュレートする機能シミュレーションにおいて、前記設計データ内のメモリと前記参照データ内のメモリの少なくともいずれか一方に書き込みイベントが発生する毎に、前記両メモリへの書き込みデータどうしを比較するステップと、前記比較で不一致が生じる場合にその差異について報告を行うステップとを含むことを特徴とする。
【0015】
この構成による作用は次のとおりである。出力結果のみを比較していた従来技術に対して、書き込みイベントが発生するたびに、両メモリへの書き込みデータどうしを直接に比較し、不一致があれば、その旨の報告を行うので、不一致発生時刻付近にある書き込みイベントにかかわる問題個所を効率良く特定することができる。
【0016】
上記において好ましい態様は、さらに、前記両メモリへの書き込みデータどうし間に不一致が生じたときは、前記設計データ内のメモリを前記参照データ内のメモリへの書き込みデータと同一に書き換えるステップと、その書き換え状態で前記不一致発生時刻以降の機能シミュレーションを続行するステップとを含むことである。
【0017】
これによれば、書き込みデータどうし間で不一致が生じた場合には、設計データ内のメモリを参照データ内のメモリと同じに書き換えた上で機能シミュレーションを続行するため、不一致の原因となった設計ミス以外の設計ミスの発見も可能となり、1回のシミュレーションでの設計ミス特定率を向上させることができる。
【0018】
【発明の実施の形態】
以下、本発明にかかわる半導体装置の設計検証方法の実施の形態について図面に基づいて詳細に説明する。なお、本発明は、以下の実施の形態に何ら限定されるものではなく、要旨を逸脱しない範囲においては様々なる態様で実施し得る。
【0019】
(実施の形態1)
図1は本発明の実施の形態1における半導体装置の設計検証方法の手順を示すフローチャートである。
【0020】
機能シミュレーションを開始して、まず、ステップ101において、半導体装置の設計データの内部状態を計算する。また、ステップ102において、参照データの内部状態を計算する。なお、ステップ101とステップ102との順序関係は任意であり、図示の通りに並行処理でもよいし、あるいは前後関係があるとして、いずれが先行してもよい。
【0021】
次に、ステップ103において、前記の計算によって求めた設計データの内部状態と参照データの内部状態とを比較し、ステップ104において、両内部状態が等しいかどうかの判定を行う。
【0022】
このとき、差異が生じていれば、ステップ105において、その差異を報告し、設計データの内部状態を参照データの内部状態と同じものに書き換える。
【0023】
そして、ステップ106において、機能シミュレーション時刻が終了したか否かの判断を行って、終了するまで、上記のステップ101,102からステップ105までの処理を繰り返す。繰り返しにより、設計データの内部状態の状態遷移と参照データの内部状態の状態遷移との比較も行われる。
【0024】
以上のように本実施の形態の半導体装置の設計検証方法によれば、機能シミュレーションの実行中に、設計データの内部状態と参照データの内部状態とを比較することにより、設計上で問題となる可能性の高い、設計データの内部状態に不一致が生じた時刻付近の動作を特定しやすくなる。
【0025】
さらに、設計データの内部状態と参照データの内部状態に不一致が生じた場合、設計データの内部状態を参照データの内部状態に書き換えることにより、1回の機能シミュレーションで、より多くの設計ミスを検出することが可能となる。
【0026】
図2は、本発明による半導体装置の設計検証方法をハードウェア記述言語の一つであるVerilogHDLを用いて実施した例である。なお、この例では、VerilogHDLコードの説明に必要な部分のみを明示し、必要でない部分は「…」を示して省略している。この例では、設計データのみではなく、参照データもVerilogHDLで実現されているものとする。
【0027】
この例において、201は半導体装置の設計データである。便宜上、“dut”という名前を付けている。この設計データ201の内部状態を表すレジスタとして、“dut_state”が定義されている。202は参照データである。この参照データ202の内部に、レジスタ“ref_state”が定義されており、このレジスタが参照データ202の内部状態を表す。設計データ201におけるレジスタdut_stateは、その状態が参照データ202におけるref_stateの状態と常に同一であることが要求される。
【0028】
203〜206は機能シミュレーション用の記述である。記述204の部分で、設計データの内部状態と参照データの内部状態とを比較する。この比較の結果、不一致が発生した場合には、記述205の部分で、不一致が発生した旨の報告を行う。さらに、記述206の部分で、設計データの内部状態を参照データの内部状態に書き換え、その上で機能シミュレーションを続行する。
【0029】
(実施の形態2)
図3は本発明の実施の形態2における半導体装置の設計検証方法の手順を示すフローチャートである。
【0030】
機能シミュレーションを開始して、まず、ステップ303において、設計データ内でメモリへの書き込みイベントが発生した場合、ステップ305において、参照データ内でも同様の書き込みイベントが発生しているかを調べる。もし、参照データ内で書き込みイベントが発生していなかった場合、ステップ308において、その書き込みイベントの発生の有無の差異を報告し、設計データ内への書き込みを中止する。
【0031】
一方、ステップ304において、参照データ内でメモリへの書き込みイベントが発生した場合、ステップ306において、設計データ内でも同様の書き込みイベントが発生しているかを調べる。もし、設計データ内に書き込みイベントが発生していなかった場合、ステップ310において、その書き込みイベントの発生の有無の差異を報告し、設計データ内へのメモリへ、参照データ内のメモリと同様の書き込みを行う。
【0032】
設計データ内と参照データ内とで同様のメモリへの書き込みイベントが発生した場合、ステップ307において、書き込みデータが同一かどうかを調べる。差異が生じている場合、ステップ309において、その差異を報告し、設計データ内の書き込みデータを参照データ内のものと同一にする。
【0033】
これらの処理の後、ステップ301において、さらに機能シミュレーションを続行する。
【0034】
そして、ステップ302において、機能シミュレーション時刻が終了したか否かの判断を行って、終了するまで、上記のステップ303,304からステップ301までの処理を繰り返す。シミュレーション時刻が終了すれば、シミュレーションを終了する。
【0035】
以上のように本実施の形態の半導体装置の設計検証方法によれば、機能シミュレーションの実行中に、各メモリへの書き込みデータどうしを比較することにより、設計上で問題となる可能性の高い、メモリへの書き込みデータに不一致が生じた時刻付近の動作を特定しやすくなる。
【0036】
さらに、設計データ内のメモリへの書き込みと参照データ内のメモリへの書き込みに不一致が生じた場合、設計データ内のメモリの値を参照データ内のメモリの値に書き換えることにより、1回の機能シミュレーションで、より多くの設計ミスを検出することが可能となる。
【0037】
【発明の効果】
以上のように本発明によれば、機能シミュレーションの実行中に、刻々に計算で求めた設計データの内部状態と参照データの内部状態どうし及び状態遷移を比較し、不一致が生じる場合にその差異について報告を行うので、出力結果のみを比較していた従来技術に比べて、不一致発生時刻付近にある問題個所を効率良く特定することができる。
【0038】
また、設計データ内のメモリや参照データ内のメモリに書き込みイベントが発生するたびに、書き込みデータどうしを比較し、不一致が生じる場合にその差異について報告を行うので、出力結果のみを比較していた従来技術に比べて、不一致発生時刻付近にある書き込みイベントにかかわる問題個所を効率良く特定することができる。
【0039】
さらに、不一致が生じた場合には、設計データの内部状態を参照データの内部状態と同じに書き換え、あるいは、設計データ内のメモリを参照データ内のメモリへの書き込みデータと同一に書き換えた上で、機能シミュレーションを続行するため、不一致の原因となった設計ミス以外の設計ミスの発見も可能となり、1回のシミュレーションでの設計ミス特定率を向上させることができる。
【図面の簡単な説明】
【図1】本発明の実施の形態1における半導体装置の設計検証方法の手順を示すフローチャート
【図2】本発明による半導体装置の設計検証方法をVerilogHDLで記述した例の説明図
【図3】本発明の実施の形態2における半導体装置の設計検証方法の手順を示すフローチャート
【符号の説明】
101 設計データの内部状態を計算するステップ
102 参照データの内部状態を計算するステップ
103 設計データの内部状態と参照データの内部状態とを比較するステップ105 両内部状態の差異を報告し、設計データの内部状態を参照データの内部状態に書き換えるステップ
201 設計データ
202 参照データ
305 参照データ内でも同様の書き込みイベントが発生しているかを調べるステップ
306 設計データ内でも同様の書き込みイベントが発生しているかを調べるステップ
307 書き込みデータが同一かどうかを調べるステップ
309 両書き込みデータの差異を報告し、設計データ内の書き込みデータを参照データと同一にするステップ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a semiconductor device design verification method for verifying design data of a semiconductor device by functional simulation, and more particularly, to a technique for efficiently verifying design data.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, verification of whether or not design data of a semiconductor device represented by a hardware design description conforms to specifications has been performed by simulating the operation of the hardware design description on a computer. In this case, in general, the design data of the semiconductor device to be verified is simulated simultaneously with the reference data that is expected to operate in the same manner as the design data, and the output results of the two are compared. Verify that the specifications are met. If the output results match, it is determined that the specifications are met, and if they do not match, it is determined that the specifications are not met (for example, see Patent Document 1).
[0003]
[Patent Document 1]
JP-A-10-23104 (page 2-3, FIG. 1)
[0004]
[Problems to be solved by the invention]
When a mismatch occurs in the output result at a certain time, it is highly likely that a mismatch has already occurred in the internal state of the design data at a stage before the time. Further, there is a possibility that the data on the memory in the design data also has a mismatch.
[0005]
In this case, what is actually a problem in the design data, that is, the possibility of a design error is high, is that the operation near the time when the internal state of the design data did not match, or the incorrect data in the memory This is an operation near the time at which is written.
[0006]
However, in the above-described conventional semiconductor device design verification method, the comparison target is only the output result of the design data and the output result of the reference data. Therefore, the only way to specify the problem location is to go back from the time when the output result mismatch occurred.
[0007]
However, the process of going back must be long in steps. It is necessary to go back from the time when the output result mismatch occurs or the time when the fake data is written to the time when the internal state mismatch occurs, and to search for the problem part starting from the time when the internal state mismatch occurs. In such a process, the total man-hour becomes very large.
[0008]
In addition, once a problem occurs in the internal state of the design data, comparison of the output results from subsequent simulations has no meaning, and a design error other than the design error that caused the internal state mismatch or fake data writing was found. It is very difficult to do. In such cases, the designer must correct one design error and then run a simulation from the beginning to see if there is another design error, and repeat this as many times as there are design errors. was there.
[0009]
The present invention has been made in view of such circumstances, and has as its object to enable efficient identification of a problem part and to improve a design error identification rate.
[0010]
[Means for Solving the Problems]
In order to solve the above problems, the present invention takes the following measures. That is, in a function simulation for simultaneously simulating the design data of the semiconductor device represented by the hardware design description and reference data expected to have the same operation as the design data, calculating an internal state of the design data; Calculating the internal state of the reference data, comparing the state transitions of the internal state and the internal state of the two parties, and reporting the difference if a mismatch occurs in the comparison. Features. Here, the order of the calculation of the internal state of the design data and the calculation of the internal state of the reference data may be any order, or the two steps may be performed in parallel.
[0011]
The operation of this configuration is as follows. Compared to the conventional technology that compared only the output result, the internal states of the design data and the reference data were calculated every moment, and the comparison between the two internal states and the state transition of the internal states were compared. Since a report to that effect is made, it is possible to efficiently specify a problem location near the mismatch occurrence time.
[0012]
In the above preferred embodiment, further, when a mismatch occurs between the internal states of the design data and the reference data, the internal state of the design data at the time of the mismatch occurrence is set to be the same as the internal state of the reference data. It includes a step of rewriting and a step of continuing the functional simulation after the mismatch occurrence time in the rewritten state.
[0013]
According to this, when a mismatch occurs between the internal states, the function simulation is continued after rewriting the internal state of the design data to be the same as the internal state of the reference data. Design errors other than mistakes can be found, and the design error identification rate in one simulation can be improved.
[0014]
As another solution, the present invention takes the following measures. That is, in a function simulation for simultaneously simulating the design data of the semiconductor device represented by the hardware design description and the reference data expected to have the same operation as the design data, in the memory in the design data and the reference data in the reference data, Each time a write event occurs in at least one of the memories, the method includes a step of comparing write data to the two memories and a step of reporting a difference when a mismatch occurs in the comparison. And
[0015]
The operation of this configuration is as follows. Compared to the conventional technology that compared only the output result, every time a write event occurs, the data written to both memories are directly compared and if there is a mismatch, the fact is reported. It is possible to efficiently specify a problem location related to a write event near the time.
[0016]
In the above preferred embodiment, further, when a mismatch occurs between the write data to the two memories, a step of rewriting the memory in the design data to be the same as the write data to the memory in the reference data, Continuing the functional simulation after the mismatch occurrence time in the rewritten state.
[0017]
According to this, when a mismatch occurs between write data, the memory in the design data is rewritten to be the same as the memory in the reference data, and the function simulation is continued. Design errors other than mistakes can be found, and the design error identification rate in one simulation can be improved.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of a design verification method for a semiconductor device according to the present invention will be described in detail with reference to the drawings. The present invention is not limited to the following embodiments at all, and can be implemented in various modes without departing from the gist.
[0019]
(Embodiment 1)
FIG. 1 is a flowchart showing a procedure of a design verification method for a semiconductor device according to the first embodiment of the present invention.
[0020]
When the function simulation is started, first, in step 101, the internal state of the design data of the semiconductor device is calculated. In step 102, the internal state of the reference data is calculated. Note that the order relationship between step 101 and step 102 is arbitrary, and may be parallel processing as shown in the drawing, or may be preceded by any order given that there is a front-back relationship.
[0021]
Next, in step 103, the internal state of the design data obtained by the above calculation is compared with the internal state of the reference data, and in step 104, it is determined whether or not the two internal states are equal.
[0022]
At this time, if there is a difference, in step 105, the difference is reported, and the internal state of the design data is rewritten to the same as the internal state of the reference data.
[0023]
Then, in step 106, it is determined whether or not the function simulation time has ended, and the processing from steps 101 and 102 to step 105 is repeated until the function simulation time ends. By the repetition, the state transition of the internal state of the design data is compared with the state transition of the internal state of the reference data.
[0024]
As described above, according to the semiconductor device design verification method of the present embodiment, a problem occurs in design by comparing the internal state of design data with the internal state of reference data during execution of a function simulation. It becomes easy to specify an operation near the time when there is a high possibility that the internal state of the design data does not match.
[0025]
Furthermore, if there is a mismatch between the internal state of the design data and the internal state of the reference data, the internal state of the design data is rewritten to the internal state of the reference data to detect more design errors in one functional simulation. It is possible to do.
[0026]
FIG. 2 shows an example in which the semiconductor device design verification method according to the present invention is implemented using Verilog HDL, which is one of the hardware description languages. In this example, only the parts necessary for the description of the Verilog HDL code are shown, and the unnecessary parts are omitted by indicating "...". In this example, it is assumed that not only the design data but also the reference data is realized by Verilog HDL.
[0027]
In this example, reference numeral 201 denotes design data of a semiconductor device. For convenience, the name "dut" is given. “Dut_state” is defined as a register indicating the internal state of the design data 201. Reference numeral 202 denotes reference data. A register “ref_state” is defined inside the reference data 202, and this register indicates the internal state of the reference data 202. It is required that the state of the register dut_state in the design data 201 is always the same as the state of ref_state in the reference data 202.
[0028]
203 to 206 are descriptions for functional simulation. In the description 204, the internal state of the design data is compared with the internal state of the reference data. As a result of the comparison, if a mismatch occurs, a report indicating that the mismatch has occurred is made in the description 205 part. Further, in the description 206, the internal state of the design data is rewritten to the internal state of the reference data, and then the functional simulation is continued.
[0029]
(Embodiment 2)
FIG. 3 is a flowchart showing a procedure of a design verification method for a semiconductor device according to the second embodiment of the present invention.
[0030]
When the functional simulation is started, first, in step 303, when a write event to the memory occurs in the design data, in step 305, it is checked whether a similar write event has occurred in the reference data. If a write event has not occurred in the reference data, in step 308, a difference in the occurrence of the write event is reported, and writing into the design data is stopped.
[0031]
On the other hand, if a write event to the memory has occurred in the reference data in step 304, it is checked in step 306 whether a similar write event has occurred in the design data. If a write event has not occurred in the design data, in step 310, a difference in the occurrence of the write event is reported, and the same write as in the memory in the reference data is performed on the memory in the design data. I do.
[0032]
When a similar write event to the memory occurs in the design data and the reference data, it is checked in step 307 whether the write data is the same. If there is a difference, at step 309, the difference is reported and the write data in the design data is made the same as that in the reference data.
[0033]
After these processes, in step 301, the function simulation is further continued.
[0034]
Then, in step 302, it is determined whether or not the functional simulation time has ended, and the processing of steps 303 and 304 to step 301 is repeated until the function simulation time ends. When the simulation time ends, the simulation ends.
[0035]
As described above, according to the semiconductor device design verification method of the present embodiment, by comparing write data to each memory during execution of a functional simulation, there is a high possibility of a problem in design. It becomes easier to identify the operation near the time when the mismatch occurs in the data written to the memory.
[0036]
Furthermore, when a mismatch occurs between writing to the memory in the design data and writing to the memory in the reference data, the function of the memory in the design data is rewritten with the value of the memory in the reference data, so that one function It is possible to detect more design errors in the simulation.
[0037]
【The invention's effect】
As described above, according to the present invention, during the execution of the functional simulation, the internal state of the design data and the internal state of the reference data, which are calculated every moment, are compared with each other and the state transition is performed. Since the report is made, it is possible to more efficiently identify the problem part near the mismatch occurrence time as compared with the related art in which only the output result is compared.
[0038]
In addition, every time a write event occurs in the memory in the design data or the memory in the reference data, the write data is compared with each other, and if a mismatch occurs, the difference is reported, so only the output result was compared. As compared with the related art, it is possible to more efficiently identify a problem location related to a write event near the mismatch occurrence time.
[0039]
Further, when a mismatch occurs, the internal state of the design data is rewritten to be the same as the internal state of the reference data, or the memory in the design data is rewritten to be the same as the write data to the memory in the reference data. Since the function simulation is continued, it is possible to find a design error other than the design error that caused the mismatch, and it is possible to improve the design error identification rate in one simulation.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a procedure of a semiconductor device design verification method according to a first embodiment of the present invention; FIG. 2 is an explanatory diagram of an example in which a semiconductor device design verification method according to the present invention is described in Verilog HDL; Flowchart showing a procedure of a semiconductor device design verification method according to a second embodiment of the present invention.
101: calculating the internal state of the design data 102: calculating the internal state of the reference data 103: comparing the internal state of the design data with the internal state of the reference data 105: reporting the difference between the two internal states, Step 201 of rewriting the internal state to the internal state of the reference data Design data 202 Reference data 305 Check whether the same write event has occurred in the reference data Step 306 Check whether the same write event has occurred in the design data Step 307: Check whether the write data is the same Step 309: Report the difference between the two write data, and make the write data in the design data the same as the reference data