JP2004355130A - Design method and apparatus of integrated circuit device - Google Patents

Design method and apparatus of integrated circuit device Download PDF

Info

Publication number
JP2004355130A
JP2004355130A JP2003149549A JP2003149549A JP2004355130A JP 2004355130 A JP2004355130 A JP 2004355130A JP 2003149549 A JP2003149549 A JP 2003149549A JP 2003149549 A JP2003149549 A JP 2003149549A JP 2004355130 A JP2004355130 A JP 2004355130A
Authority
JP
Japan
Prior art keywords
code
description
design data
function
code coverage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003149549A
Other languages
Japanese (ja)
Inventor
Kazuyoshi Takemura
和祥 竹村
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003149549A priority Critical patent/JP2004355130A/en
Publication of JP2004355130A publication Critical patent/JP2004355130A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To achieve code optimizing for both of design data and a software. <P>SOLUTION: A design apparatus of an integrated circuit device optimizes both of design data 100 and a verification vector 101 by being provided with a code optimizing means 104 for deleting or commenting out a non-execution code description and by storing code coverage information generated by a code coverage measuring means 102 into a code coverage database 103 to use the database 103. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、コードカバレッジを利用して設計データおよび検証ベクタのコード記述のコード最適化を行う技術に関するものである。
【0002】
【従来の技術】
従来から、集積回路装置の設計においては、Verilog/VHDLのようなハードウエア記述言語を用いてハードウエア設計を行っている。そして、設計データが機能的に正しく動作するかどうかを確認するために、ハードウエア記述言語やC/C++などのようなソフトウエア言語または検証専用言語などを用いて検証ベクタを作成し検証している。その際、設計データをどの程度まで検証ベクタによって検証できているかを定量的に見積もるために、コードカバレッジという技術が利用されている。
【0003】
コードカバレッジ技術では、検証対象である設計データの全てのコード記述について、検証ベクタで検証を行った場合に、実行された記述(実行コード記述)と実行されない記述(非実行コード記述)とを計測し、全コード中、どれくらいのコードが実行コード記述かというカバレッジ率を計算し、設計データの品質向上に活用している。
【0004】
従来技術を、図11を用いて説明する。RTL(Register TransferLevel:レジスタ転送レベル)で記述されたハードウエアの設計データU1および検証ベクタU2をコードカバレッジ計測手段U3に入力し、コードカバレッジを計測する。設計データU1における冗長記述を計測し、コードカバレッジ情報からコード最適化手段U4において検証ベクタU2の冗長記述を削除する。つまり、コードカバレッジ情報を利用して検証ベクタU2の最適化を図り、検証工数の削減を実現する(例えば、特許文献1参照。)。
【0005】
【特許文献1】
特開2001−14365号公報(第3−4頁、第1−2図)
【0006】
【発明が解決しようとする課題】
しかし、上記従来の構成では、検証ベクタのコード最適化は可能であるが、設計データのコード最適化は不可能という課題がある。また、設計データがハードウエアのみを対象としているために、ソフトウエアには適用できないという課題がある。
【0007】
本発明は、このような事情に鑑みて創作したものであり、設計データについても、また、ソフトウエアについても、そのコード最適化を実現できるようにすることを目的としている。
【0008】
【課題を解決するための手段】
上記の課題を解決するために、本発明は次のような手段を講じる。
【0009】
第1の解決手段として、本発明による集積回路装置の設計方法は、集積回路装置の機能を記述した設計データの各コード記述について検証ベクタによる実行コード記述と非実行コード記述とを計測してコードカバレッジ情報を得る工程と、前記計測で得たコードカバレッジ情報を記憶する工程と、前記コードカバレッジ情報に基づいて前記設計データから前記非実行コード記述を削除してコード最適化を行う工程とを含むことを特徴とする。
【0010】
上記の集積回路装置の設計方法の発明は、集積回路装置の設計装置として、次のように展開することが可能である。すなわち、本発明による集積回路装置の設計装置は、集積回路装置の機能を記述した設計データと前記設計データを検証するための複数の検証ベクタを用いて、前記設計データの各コード記述が前記複数の検証ベクタによる実行コード記述と非実行コード記述とを計測するコードカバレッジ計測手段と、前記コードカバレッジ計測手段によって生成されるコードカバレッジ情報を記憶するコードカバレッジ記憶手段と、前記コードカバレッジ情報に基づいて前記設計データから前記非実行コード記述を削除するコード最適化手段とを備えたことを特徴とする。
【0011】
この構成によれば、検証ベクタを用いた設計データの検証において、設計データ中の一度も実行されなかったコード記述である非実行コード記述については、これをコードカバレッジ情報を利用して冗長な記述として削除する。これにより、設計データについても、そのコード最適化を実現することができる。
【0012】
上記において、前記のコード最適化工程については、前記非実行コード記述の削除の態様を実装形態に応じて可変することが好ましい。すなわち、実装形態としてハードウエアとソフトウエアがあるが、ハードウエアの場合にはハードウエアに適した態様で非実行コード記述の削除を行い、ソフトウエアの場合にはソフトウエアに適した態様で非実行コード記述の削除を行うようにすることが有用である。より具体的レベルで記述すると、次のものが好ましい。
【0013】
すなわち、前記実装形態がハードウエアの場合に、各関数コールをインライン展開する工程と、前記インライン展開した各関数コード記述について個別にコードカバレッジ計測する工程と、前記計測で得たコードカバレッジ情報から関数コード記述ごとに非実行コード記述を削除する工程とを実行することである。インライン展開とは、コード最適化方法の1つで、関数呼び出し位置に関数本体を展開することである。これにより、ハードウエア実装を考慮した最適化が実現される。
【0014】
また、前記実装形態がソフトウエアの場合に、実行速度優先が選択されたときに関数コールをインライン展開する工程と、コードサイズ優先が選択されたときに関数コールにする工程とを実行することである。その関数コールの工程については、関数コールごとの関数コール内のコードカバレッジを計測する工程と、前記計測で得たコードカバレッジ情報に基づいて同一関数の関数コール中で共通する非実行コード記述を削除する工程とを実行する。
【0015】
コードサイズ優先の場合には、インライン展開を行わず関数の実体を1つにまとめ、それを関数コールという形で参照する。コード最適化は、複数の関数コールで1つの関数コードを共有するため、複数の関数コールごとに関数コードのコードカバレッジ情報を記録し、それらで共通の非実行部分のみを関数コードから削除する。複数の関数コールで1つの関数コードを共有した上で非実行コード記述を削除する最適化であるので、コードサイズが優先されることになる。
【0016】
また、実行速度優先の場合には、関数コールではなく、ハードウエアの場合と同様にインライン展開を行い、インライン展開後の個別関数コードで非実行コード記述はすべて削除する。これによって関数ごとに削除する部分が最適化される。関数ごとに非実行コード記述を削除する最適化であるので、実行速度が優先されることになる。
【0017】
以上のように、ハードウエアだけでなくソフトウエアも含めた最適化をそれぞれの実装方法に適した削除方法を選択することによって、より効率の良いコード最適化を行うことができる。
【0018】
なお、上記において、前記コード最適化の工程については、非実行コード記述の削除に代えて、今後のために、非実行コード記述についてのコメントアウトを行うのでもよい。
【0019】
第2の解決手段として、本発明による集積回路装置の設計方法は、集積回路装置の機能を記述した設計データの各コード記述について複数の検証ベクタによる実行コード記述と非実行コード記述とを計測してコードカバレッジ情報を得る工程と、前記計測で得たコードカバレッジ情報を記憶する工程と、前記記憶されたコードカバレッジ情報における前記実行コード記述・非実行コード記述が互いに同一となっている複数の検証ベクタについて、これらを1つに統合する工程とを含むことを特徴とする。この場合に、複数の検証ベクタごとに計測した前記コードカバレッジ情報に基づいて同一のコードカバレッジ情報を持つ複数の検証ベクタを1つに統合することが好ましい。
【0020】
上記の集積回路装置の設計方法の発明は、集積回路装置の設計装置として、次のように展開することが可能である。すなわち、本発明による集積回路装置の設計装置は、集積回路装置の機能を記述した設計データと前記設計データを検証するための複数の検証ベクタを用いて、前記設計データの各コード記述が前記複数の検証ベクタによる実行コード記述と非実行コード記述とを計測するコードカバレッジ計測手段と、前記コードカバレッジ計測手段によって生成されるコードカバレッジ情報を記憶するコードカバレッジ記憶手段と、前記コードカバレッジ記憶手段により記憶された前記コードカバレッジ情報における前記実行コード記述・非実行コード記述が互いに同一となっている複数の検証ベクタについて、これらを1つに統合する統合手段とを備えたことを特徴とする。
【0021】
コードカバレッジ計測で取得し記憶したコードカバレッジ情報を利用して、複数の検証ベクタどうし間で、それぞれの実行コード記述どうしが互いに同一となっており、かつ、それぞれの非実行コード記述どうしが互いに同一となっているときは、それら実質的に同一の複数の検証ベクタを1つに統合する。これにより、検証ベクタについてのコード最適化を実現できる。
【0022】
【発明の実施の形態】
以下、本発明の実施の形態の集積回路装置の設計方法について図1から図10を用いて説明する。なお、本発明はこの実施の形態に何等限定されるものではなく、要旨を逸脱しない範囲においては種々なる態様で実施し得る。
【0023】
図1は、本発明の実施の形態の集積回路装置の設計装置・方法の一例を表したブロック図である。図1において、100はカバレッジの対象であるシステムまたはハードウエアまたはソフトウエアの機能を記述した設計データであり、101は設計データ100の機能を検証するための検証ベクタであり、102は設計データ100と検証ベクタ102を入力として検証ベクタ101によって設計データ100の各コード行が実行されたか実行されなかったかを計測するコードカバレッジ計測手段であり、103はコードカバレッジ計測手段102から出力されるコードカバレッジ情報を格納するコードカバレッジデータベースであり、104はコードカバレッジデータベース情報を用いて設計データ100および検証ベクタ101のコード最適化を行うコード最適化手段である。
【0024】
以上のように構成された集積回路装置の設計方法について、その動作一例を図2から図10を用いて説明する。
【0025】
図2は、コードカバレッジ計測手段102において設計データ100と検証ベクタ101を入力してコードカバレッジを計測し、コード最適化手段104によって設計データ100および検証ベクタ101のコード最適化を行うフローチャートである。
【0026】
ステップ200において、コードカバレッジ計測手段102は設計データ100と検証ベクタ101を入力し、これら設計データ100と検証ベクタ101を用いてコードカバレッジを計測する。
【0027】
次いで、ステップ201において、コードカバレッジ計測結果であるコードカバレッジ情報をコードカバレッジデータベース103に登録する。
【0028】
次いで、ステップ202において、設計データ100についてコード最適化を行うか否かを判断し、コード最適化を行わない場合には処理を終了し、設計データ100のコード最適化を行う場合には次のステップ203に進む。
【0029】
次いで、ステップ203において、コードカバレッジデータベース103の情報を利用して設計データ100のコード最適化を行う。
【0030】
さらに次のステップ204において、検証ベクタ101についてコード最適化を行うか否かを判断し、コード最適化を行わない場合には処理を終了し、検証ベクタ101のコード最適化を行う場合には次のステップ205に進む。
【0031】
次に、ステップS205において、コード最適化手段104は、コードカバレッジデータベース103の情報を利用して検証ベクタ101のコード最適化を行う。
【0032】
図3は、図2のステップ203の設計データ100のコード最適化の処理を詳しく示すフローチャートである。設計データ100を入力し、設計データ100の先頭行から処理を開始する。
【0033】
ステップ300において、コード記述が関数部分か否かを判断し、関数部分でないと判断したときはステップ301に進み、関数部分であると判断したときはステップ304に進む。
【0034】
ステップ301において、その行が実行されたか否かを判断し、実行されなかったときはステップ302に進み、実行されたときはステップ303に進む。
【0035】
上記の流れでコード記述が関数部分でなくかつ非実行コード記述であるときは、ステップ302に進んで、コードを削除または今後のためにコメントアウトをしてコード最適化を実行し、その上でステップ303に進んで、コードを1行進め、ステップ300に戻る。
【0036】
一方、上記の流れでコード記述が関数部分でなくかつその行が実行されたときは、コード最適化のステップ302をジャンプしてステップ303に進み、コードを1行進め、ステップ300に戻る。
【0037】
ステップ300の判断でコード記述部分が関数部分であると判断してステップ304に進んだときは、以下の処理を実行する。
【0038】
ステップ304において、関数の実装がハードウエアで行われるのかソフトウエアで行われるのかを判断し、ハードウエアで実装する場合にはステップ305に進み、ソフトウエアで実装する場合にはステップ308に進む。
【0039】
ハードウエア実装の場合、ステップ305において、関数呼び出し位置に関数本体を展開するインライン展開を行う。
【0040】
次いでステップ306において、インライン展開し関数ごとに非実行コード記述について、削除またはコメントアウトによってコード最適化を実行し、その上でステップ307に進む。
【0041】
ステップ307では、コード最終行か否かを判断し、最終行でなければステップ303に進んで、コードを1行進め、ステップ300に戻る。
【0042】
ステップ304の判断でソフトウエアで実装すると判断した場合には、ステップ308において、コードの最適化方法として実行速度を優先させるかコードサイズを優先させるかを判断する。実行速度優先の場合にはハードウエアのときと同様にステップ305に進み、コードサイズ優先の場合にはステップ309に進む。
【0043】
上記の流れでコード記述部分が関数部分でソフトウエアで実装する場合において、かつコードの最適化方法として実行速度を優先させる場合には、ハードウエアの場合と同様に、ステップ305に進んで、インライン展開を行い、ステップ306で、インライン展開した関数ごとに非実行コード記述について、削除またはコメントアウトによってコード最適化を実行する。その後は、ステップ307のコード最終行の判断を行い、最終行でなければステップ303のコード1行進めをした上でステップ300に戻る。
【0044】
一方、上記の流れでコード記述部分が関数部分でソフトウエアで実装する場合において、かつコードの最適化方法としてコードサイズを優先させる場合には、ステップ309に進んで、関数の実体を1つにしてそれを共通に利用する関数コールに変換する。
【0045】
次いで、ステップ310において、共通で利用する関数内で、すべての関数コールから共通して非実行コード記述について、削除またはコメントアウトによってコード最適化を行う。その後は、ステップ307のコード最終行の判断を行い、最終行でなければステップ303のコード1行進めをした上でステップ300に戻る。
【0046】
図4は、設計データの関数コールを示したブロック図である。400は設計データ、401は設計データ400で呼び出される関数コールの実体を記述したコード記述である。
【0047】
図5は、設計データのインライン展開を示したブロック図である。500は設計データであり、501は設計データ500でインライン展開されている関数の実体宣言部である。インライン展開によって設計データ500の関数コール部分に実体宣言部501の関数実体部分がそのまま展開される。
【0048】
図6は、設計データをインライン展開したときのコード最適化方法を示したブロック図である。600は最適化前の設計データであり、601は設計データ600からコールされる関数本体であり、602は設計データ600の関数コールを関数本体601で実際に実行される部分だけを選んでインライン展開を行うことによって最適化を図った設計データである。これによって関数コールごとに最適化されたインライン展開を行うことができる。関数コールごとにインライン展開した上での最適化であるので、実行速度が優先されることになる。
【0049】
図6においては、一度も実行されない非実行コード記述の“case mode3:”,“code3;break;”は選択されておらず、結果として削除され、これによってコード最適化が行われている。
【0050】
図7は、設計データを関数コールで実装したときのコード最適化方法を示したブロック図である。700は最適化前の設計データであり、701は設計データ700からコールされる関数本体であり、702は設計データ700の関数コールで共通して一度も非実行コード記述を削除することによって最適化を図った設計データである。これによってコードサイズを抑えたまま、さらに最適化することができる。すなわち、複数の関数コールで1つの関数コードを共有した上で非実行コード記述を削除する最適化であるので、コードサイズが優先されることになる。
【0051】
図7においては、非実行コード記述の“case mode3:”,“code3;break;”は削除され、これによってコード最適化が行われている。
【0052】
図8は、コードカバレッジ計測手段102によってコードカバレッジデータベース103に記憶される情報のうち設計データのメイン関数部分のコードカバレッジデータベースを示すブロック図である。800はパラメータflag=0を含む検証ベクタ1であり、801はパラメータflag=1を含む検証ベクタ2であり、802は設計データのメイン関数部分であり、803は設計データメイン関数部分802のコードカバレッジ計測結果を記憶するコードカバレッジデータベースである。
【0053】
コードカバレッジデータベース803は検証ベクタ1(800)および検証ベクタ2(801)のそれぞれのコードカバレッジ情報を記憶し、関数コール部分は別途記憶されているコードカバレッジデータベースへのポインタを示している。
【0054】
図9は、コードカバレッジ計測手段102によってコードカバレッジデータベース103に記憶される情報のうち設計データの関数コール部分のコードカバレッジデータベースを示すブロック図である。900はパラメータflag=0を含む検証ベクタ1であり、901はパラメータflag=1を含む検証ベクタ2であり、902は設計データのメイン関数部分であり、903は設計データから関数コールされる関数本体であり、904はコール関数本体903のコードカバレッジ計測結果を記憶するコードカバレッジデータベースである。
【0055】
コードカバレッジデータベース904は検証ベクタ1(900)および検証ベクタ2(901)のそれぞれのコードカバレッジ情報を記憶し、さらにメイン関数内でコールされる関数コールごとのコードカバレッジ計測結果を記憶している。
【0056】
図9においては、非実行コード記述の“case mode3:”,“code3;break;”については、検証ベクタ1での関数コール1も関数コール2も“0”であり、かつ、検証ベクタ2での関数コール1も関数コール2も“0”となっている。
【0057】
図10は、複数の検証ベクタのコードカバレッジ計測結果を格納したコードカバレッジデータベースを用いて冗長な検証ベクタを削除する方法を示したブロック図である。1000はパラメータflag1=0およびflag2=0を含む検証ベクタ1であり、1001はパラメータflag1=1およびflag2=0を含む検証ベクタ2であり、1002はパラメータflag1=1およびflag2=1を含む検証ベクタ3であり、1003は設計データのメイン関数部分であり、1004は設計データメイン関数部分1003の検証ベクタ1(1000)および検証ベクタ2(1001)および検証ベクタ3(1002)ごとのコードカバレッジ計測結果を記憶したコードカバレッジデータベースである。
【0058】
コードカバレッジデータベース1004の検証ベクタ2(1001)のカバレッジ情報と検証ベクタ3(1002)のカバレッジ情報を比較すると、全く同じカバレッジ情報である。したがって、どちらか一方が冗長な検証ベクタであることが分かるので、どちらか一方を削除し、これによって検証ベクタの最適化を図ることができる。
【0059】
【発明の効果】
本発明によれば、コードカバレッジ情報を利用して、設計データ、検証ベクタについて冗長なコードを削除することにより、コードサイズおよび実行速度を向上させることができるという効果を奏する。
【0060】
また、設計データの関数部分がハードウエアに実装される場合と、ソフトウエアで実装される場合とで、コード最適化の方法を選択することにより、ハードウエア、ソフトウエア双方の設計データを扱うことができるという効果を奏する。
【0061】
さらに、ソフトウエアで実装される場合には、実行速度、コードサイズという評価指標に基づいてコード最適化の方法を選択することにより、さらに優れたコード最適化を行うことができるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の実施の形態の集積回路装置の設計装置・方法の一例を示すブロック図
【図2】本発明の実施の形態におけるコード最適化の処理の一例を示すフローチャート
【図3】本発明の実施の形態における設計データの最適化方法の一例を示すフローチャート
【図4】本発明の実施の形態における設計データの関数コール方法の一例を示す動作説明図
【図5】本発明の実施の形態における設計データのインライン展開の方法の一例を示す動作説明図
【図6】本発明の実施の形態におけるインライン展開時のコード最適化方法の一例を示す動作説明図
【図7】本発明の実施の形態における関数コール時のコード最適化方法の一例を示す動作説明図
【図8】本発明の実施の形態におけるメイン関数のコードカバレッジデータベースの一例を示したブロック図
【図9】本発明の実施の形態における関数コール部分のコード最適化方法の一例を示す動作説明図
【図10】本発明の実施の形態における冗長な検証ベクタのコード最適化の一例を示す動作説明図
【図11】従来のコード最適化方法の一例を示すブロック図
【符号の説明】
100 設計データ
101 検証ベクタ
102 コードカバレッジ計測手段
103 コードカバレッジデータベース
104 コード最適化手段
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technology for performing code optimization of code descriptions of design data and verification vectors using code coverage.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in designing an integrated circuit device, hardware design is performed using a hardware description language such as Verilog / VHDL. Then, in order to confirm whether the design data functions correctly, a verification vector is created and verified using a software language such as a hardware description language or C / C ++ or a verification-only language. I have. At that time, a technique called code coverage is used to quantitatively estimate how much the design data can be verified by the verification vector.
[0003]
In code coverage technology, when all code descriptions of design data to be verified are verified with a verification vector, executed descriptions (executable code descriptions) and non-executable descriptions (non-executable code descriptions) are measured. Then, the coverage ratio of how much of the code is the execution code is calculated and used to improve the quality of design data.
[0004]
The prior art will be described with reference to FIG. The hardware design data U1 and the verification vector U2 described in RTL (Register Transfer Level: register transfer level) are input to the code coverage measuring unit U3, and the code coverage is measured. The redundant description in the design data U1 is measured, and the redundant description of the verification vector U2 is deleted by the code optimizing means U4 from the code coverage information. That is, the verification vector U2 is optimized using the code coverage information, and the number of verification steps is reduced (for example, see Patent Document 1).
[0005]
[Patent Document 1]
JP 2001-14365 A (page 3-4, FIG. 1-2)
[0006]
[Problems to be solved by the invention]
However, the above-described conventional configuration has a problem that code optimization of a verification vector is possible, but code optimization of design data is not possible. In addition, there is a problem that the design data cannot be applied to software because it is intended only for hardware.
[0007]
The present invention has been made in view of such circumstances, and an object of the present invention is to enable code optimization of design data and software.
[0008]
[Means for Solving the Problems]
In order to solve the above problems, the present invention takes the following measures.
[0009]
As a first solution, a method for designing an integrated circuit device according to the present invention is a method for measuring an executable code description and a non-executable code description using a verification vector for each code description of design data describing a function of an integrated circuit device. Obtaining the coverage information, storing the code coverage information obtained by the measurement, and performing code optimization by deleting the non-executable code description from the design data based on the code coverage information. It is characterized by the following.
[0010]
The invention of the above integrated circuit device design method can be developed as an integrated circuit device design device as follows. In other words, the integrated circuit device design apparatus according to the present invention uses design data describing the function of the integrated circuit device and a plurality of verification vectors for verifying the design data, so that each code description of the design data is Code coverage measuring means for measuring an executable code description and a non-executable code description by a verification vector, code coverage storage means for storing code coverage information generated by the code coverage measuring means, and the code coverage information based on the code coverage information. Code optimization means for deleting the non-executable code description from the design data.
[0011]
According to this configuration, in the verification of the design data using the verification vector, the non-executable code description, which is the code description that has never been executed, in the design data is redundantly described using the code coverage information. And delete it. As a result, the code optimization of the design data can be realized.
[0012]
In the above, in the code optimizing step, it is preferable that a mode of deleting the non-executable code description is changed according to an implementation. That is, there are hardware and software as implementation forms. In the case of hardware, non-executable code description is deleted in a mode suitable for hardware, and in the case of software, non-executable code is deleted in a mode suitable for software. It is useful to delete the execution code description. At a more specific level, the following are preferred:
[0013]
That is, when the implementation form is hardware, a step of inlining each function call, a step of individually measuring code coverage for each function code description inlined, and a function from the code coverage information obtained by the measurement. Deleting the non-executable code description for each code description. Inline expansion is one of code optimization methods, and expands a function body at a function call position. Thereby, optimization in consideration of hardware implementation is realized.
[0014]
Further, in the case where the implementation form is software, by executing a step of inlining a function call when execution speed priority is selected and a step of making a function call when code size priority is selected, is there. For the function call step, the step of measuring code coverage in the function call for each function call and the non-executable code description common in the function call of the same function are deleted based on the code coverage information obtained by the measurement. And performing the steps.
[0015]
In the case of giving priority to the code size, the function entities are combined into one without performing inline expansion, and the functions are referred to in the form of a function call. In the code optimization, since one function code is shared by a plurality of function calls, code coverage information of the function code is recorded for each of the plurality of function calls, and only a common non-executable portion is deleted from the function code. Since the optimization is to delete the non-executable code description after sharing one function code by a plurality of function calls, the code size has priority.
[0016]
In the case where execution speed is prioritized, inline expansion is performed in the same way as in the case of hardware, instead of function calls, and all non-executable code descriptions in individual function codes after inline expansion are deleted. This optimizes the part to be deleted for each function. Since the optimization is to delete the non-executable code description for each function, the execution speed is prioritized.
[0017]
As described above, more efficient code optimization can be performed by selecting a deletion method suitable for each mounting method for optimization including not only hardware but also software.
[0018]
In the above, in the code optimizing step, the non-executable code description may be commented out for the future instead of deleting the non-executable code description.
[0019]
As a second solution, the integrated circuit device designing method according to the present invention measures an executable code description and a non-executable code description using a plurality of verification vectors for each code description of design data describing the function of the integrated circuit device. Obtaining code coverage information, storing the code coverage information obtained by the measurement, and verifying the executable code description and the non-executable code description in the stored code coverage information. Integrating the vectors into one. In this case, it is preferable that a plurality of verification vectors having the same code coverage information be integrated into one based on the code coverage information measured for each of the plurality of verification vectors.
[0020]
The invention of the above integrated circuit device design method can be developed as an integrated circuit device design device as follows. In other words, the integrated circuit device design apparatus according to the present invention uses design data describing the function of the integrated circuit device and a plurality of verification vectors for verifying the design data, so that each code description of the design data is Code coverage measuring means for measuring the execution code description and the non-executable code description by the verification vector, code coverage storage means for storing code coverage information generated by the code coverage measurement means, and storage by the code coverage storage means. Integrated means for integrating a plurality of verification vectors having the same executable code description and non-executable code description in the obtained code coverage information into one.
[0021]
Using the code coverage information acquired and stored by the code coverage measurement, the execution code descriptions are the same among the plurality of verification vectors, and the non-execution code descriptions are the same. , The plurality of substantially identical verification vectors are integrated into one. Thus, code optimization for the verification vector can be realized.
[0022]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, a method of designing an integrated circuit device according to an embodiment of the present invention will be described with reference to FIGS. It should be noted that the present invention is not limited to this embodiment at all, and can be implemented in various modes without departing from the gist.
[0023]
FIG. 1 is a block diagram showing an example of an apparatus and method for designing an integrated circuit device according to an embodiment of the present invention. In FIG. 1, reference numeral 100 denotes design data describing a function of a system, hardware, or software to be covered; 101, a verification vector for verifying the function of the design data 100; And a verification vector 102, code coverage measuring means for measuring whether each code line of the design data 100 is executed or not by the verification vector 101, and 103 is code coverage information output from the code coverage measuring means 102. Is a code coverage database that stores code. The code optimization unit 104 performs code optimization of the design data 100 and the verification vector 101 using the code coverage database information.
[0024]
An example of the operation of the method for designing the integrated circuit device configured as described above will be described with reference to FIGS.
[0025]
FIG. 2 is a flowchart for measuring the code coverage by inputting the design data 100 and the verification vector 101 in the code coverage measuring means 102 and optimizing the code of the design data 100 and the verification vector 101 by the code optimizing means 104.
[0026]
In step 200, the code coverage measuring means 102 inputs the design data 100 and the verification vector 101, and measures the code coverage using the design data 100 and the verification vector 101.
[0027]
Next, in step 201, the code coverage information, which is the code coverage measurement result, is registered in the code coverage database 103.
[0028]
Next, in step 202, it is determined whether or not to perform the code optimization on the design data 100. If the code optimization is not performed, the process is terminated. Proceed to step 203.
[0029]
Next, in step 203, the code of the design data 100 is optimized using the information of the code coverage database 103.
[0030]
In the next step 204, it is determined whether or not code optimization is to be performed on the verification vector 101. If code optimization is not performed, the process is terminated. To step 205.
[0031]
Next, in step S205, the code optimizing unit 104 performs code optimization of the verification vector 101 using information of the code coverage database 103.
[0032]
FIG. 3 is a flowchart showing in detail the process of code optimization of the design data 100 in step 203 of FIG. The design data 100 is input, and the processing is started from the first line of the design data 100.
[0033]
In step 300, it is determined whether or not the code description is a function part. If it is determined that the code description is not a function part, the process proceeds to step 301. If it is determined that the code description is a function part, the process proceeds to step 304.
[0034]
In step 301, it is determined whether or not the line has been executed. If the line has not been executed, the process proceeds to step 302. If the line has been executed, the process proceeds to step 303.
[0035]
If the code description is not a function part and a non-executable code description in the above flow, the process proceeds to step 302, where the code is deleted or commented out for the future and code optimization is performed. Proceeding to 303, the code advances one line and returns to step 300.
[0036]
On the other hand, if the code description is not a function part and the line is executed in the above flow, the code optimization step 302 is jumped to the step 303, the code is advanced by one line, and the process returns to the step 300.
[0037]
If it is determined in step 300 that the code description portion is a function portion and the process proceeds to step 304, the following processing is executed.
[0038]
In step 304, it is determined whether the function is implemented by hardware or software. If the function is implemented by hardware, the process proceeds to step 305. If the function is implemented by software, the process proceeds to step 308.
[0039]
In the case of hardware implementation, in step 305, inline expansion for expanding the function body at the function call position is performed.
[0040]
Next, in step 306, code optimization is performed by deleting or commenting out the non-executable code description for each function by performing inline expansion, and then proceed to step 307.
[0041]
In step 307, it is determined whether or not the last line of the code. If not, the process proceeds to step 303, advances the code by one line, and returns to step 300.
[0042]
If it is determined in step 304 that the implementation is implemented by software, in step 308, it is determined whether the execution speed or the code size is prioritized as a code optimization method. If the execution speed is prioritized, the process proceeds to step 305 as in the case of hardware, and if the code size is prioritized, the process proceeds to step 309.
[0043]
In the above flow, when the code description part is implemented by software with a function part, and when the execution speed is prioritized as a code optimization method, as in the case of the hardware, the process proceeds to step 305 and the inline processing is performed. In step 306, code optimization is executed by deleting or commenting out the non-executable code description for each function expanded inline. Thereafter, the last line of the code is determined in step 307, and if it is not the last line, the process advances by one line of code in step 303 and returns to step 300.
[0044]
On the other hand, if the code description part is implemented by software with the function part in the above flow and the code size is prioritized as a code optimization method, the process proceeds to step 309 to reduce the function entity to one. And convert it to a function call that uses it in common.
[0045]
Next, in step 310, code optimization is performed by deleting or commenting out the non-executable code description in common from all the function calls in the commonly used functions. Thereafter, the last line of the code is determined in step 307, and if it is not the last line, the process advances by one line of code in step 303 and returns to step 300.
[0046]
FIG. 4 is a block diagram showing a function call of design data. 400 is design data, and 401 is a code description that describes the substance of the function call called by the design data 400.
[0047]
FIG. 5 is a block diagram showing inline expansion of design data. Reference numeral 500 denotes design data, and reference numeral 501 denotes an entity declaration section of a function which is inline-expanded in the design data 500. The function entity part of the entity declaration part 501 is expanded as it is in the function call part of the design data 500 by inline expansion.
[0048]
FIG. 6 is a block diagram showing a code optimization method when design data is expanded inline. Reference numeral 600 denotes design data before optimization, reference numeral 601 denotes a function body called from the design data 600, and reference numeral 602 denotes inline expansion of a function call of the design data 600 by selecting only a part actually executed by the function body 601. Is the design data that is optimized by performing This makes it possible to perform inline expansion optimized for each function call. Since optimization is performed after inline expansion for each function call, execution speed has priority.
[0049]
In FIG. 6, "case mode3:" and "code3;break;" of the non-executable code description that is never executed are not selected and are deleted as a result, thereby performing the code optimization.
[0050]
FIG. 7 is a block diagram showing a code optimization method when design data is implemented by a function call. Reference numeral 700 denotes design data before optimization, reference numeral 701 denotes a function body called from the design data 700, and reference numeral 702 denotes optimization by deleting a non-executable code description commonly once in a function call of the design data 700. This is the design data that was designed. This allows further optimization while keeping the code size small. That is, since optimization is performed to delete a non-executable code description after sharing one function code by a plurality of function calls, the code size is prioritized.
[0051]
In FIG. 7, "case mode3:" and "code3;break;" of the non-executable code description are deleted, and the code is optimized.
[0052]
FIG. 8 is a block diagram showing the code coverage database of the main function part of the design data in the information stored in the code coverage database 103 by the code coverage measuring means 102. Reference numeral 800 denotes a verification vector 1 including a parameter flag = 0, reference numeral 801 denotes a verification vector 2 including a parameter flag = 1, reference numeral 802 denotes a main function part of the design data, and reference numeral 803 denotes code coverage of the design data main function part 802. It is a code coverage database that stores measurement results.
[0053]
The code coverage database 803 stores the code coverage information of each of the verification vector 1 (800) and the verification vector 2 (801), and the function call portion indicates a pointer to the separately stored code coverage database.
[0054]
FIG. 9 is a block diagram showing the code coverage database of the function call part of the design data in the information stored in the code coverage database 103 by the code coverage measuring means 102. Reference numeral 900 denotes a verification vector 1 including a parameter flag = 0, reference numeral 901 denotes a verification vector 2 including a parameter flag = 1, reference numeral 902 denotes a main function part of design data, and reference numeral 903 denotes a function body called from the design data. 904 is a code coverage database that stores the code coverage measurement result of the call function body 903.
[0055]
The code coverage database 904 stores the code coverage information of each of the verification vector 1 (900) and the verification vector 2 (901), and further stores a code coverage measurement result for each function call called in the main function.
[0056]
In FIG. 9, for “case mode 3:” and “code 3; break;” of the non-executable code description, both the function call 1 and the function call 2 in the verification vector 1 are “0”, and the Both function call 1 and function call 2 are "0".
[0057]
FIG. 10 is a block diagram illustrating a method of deleting redundant verification vectors using a code coverage database storing code coverage measurement results of a plurality of verification vectors. A verification vector 1000 includes parameters flag1 = 0 and flag2 = 0, a verification vector 1001 includes parameters flag1 = 1 and flag2 = 0, and a verification vector 1002 includes parameters flag1 = 1 and flag2 = 1. Reference numeral 1003 denotes a main function part of the design data, and 1004 denotes a code coverage measurement result for each of the verification vector 1 (1000), the verification vector 2 (1001), and the verification vector 3 (1002) of the design data main function part 1003. Is a code coverage database in which is stored.
[0058]
When the coverage information of the verification vector 2 (1001) of the code coverage database 1004 is compared with the coverage information of the verification vector 3 (1002), the coverage information is completely the same. Therefore, it can be seen that one of them is a redundant verification vector, so that one of them can be deleted, thereby optimizing the verification vector.
[0059]
【The invention's effect】
According to the present invention, the code size and the execution speed can be improved by removing redundant codes for design data and verification vectors by using code coverage information.
[0060]
Also, by selecting a code optimization method between the case where the function part of the design data is implemented in hardware and the case where it is implemented in software, it is possible to handle both hardware and software design data. This has the effect that it can be performed.
[0061]
Furthermore, when implemented by software, by selecting a code optimization method based on evaluation indexes such as execution speed and code size, there is an effect that more excellent code optimization can be performed.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an example of an apparatus and method for designing an integrated circuit device according to an embodiment of the present invention. FIG. 2 is a flowchart illustrating an example of a code optimizing process according to an embodiment of the present invention. FIG. 4 is a flowchart illustrating an example of a design data optimizing method according to an embodiment of the present invention. FIG. 4 is an operation explanatory diagram illustrating an example of a design data function calling method according to an embodiment of the present invention. FIG. 6 is an operation explanatory diagram showing an example of a method of inline expansion of design data according to the embodiment. FIG. 6 is an operation explanatory diagram showing an example of a code optimization method at the time of inline expansion according to an embodiment of the present invention. FIG. 8 is an operation explanatory diagram showing an example of a code optimization method at the time of a function call in the embodiment. FIG. 8 shows an example of a code coverage database of a main function in the embodiment of the present invention. FIG. 9 is an operation explanatory diagram showing an example of a code optimization method for a function call part in the embodiment of the present invention. FIG. 10 is an example of code optimization of a redundant verification vector in the embodiment of the present invention. FIG. 11 is a block diagram showing an example of a conventional code optimization method.
REFERENCE SIGNS LIST 100 design data 101 verification vector 102 code coverage measuring means 103 code coverage database 104 code optimizing means

Claims (11)

集積回路装置の機能を記述した設計データの各コード記述について検証ベクタによる実行コード記述と非実行コード記述とを計測してコードカバレッジ情報を得る工程と、
前記計測で得たコードカバレッジ情報を記憶する工程と、
前記コードカバレッジ情報に基づいて前記設計データから前記非実行コード記述を削除してコード最適化を行う工程
とを含むことを特徴とする集積回路装置の設計方法。
Obtaining code coverage information by measuring an executable code description and a non-executable code description by a verification vector for each code description of the design data describing the function of the integrated circuit device;
Storing code coverage information obtained in the measurement,
Removing the non-executable code description from the design data based on the code coverage information and performing code optimization.
前記コード最適化工程は、前記非実行コード記述の削除の態様を実装形態に応じて可変することを特徴とする請求項1に記載の集積回路装置の設計方法。The method of designing an integrated circuit device according to claim 1, wherein in the code optimizing step, an aspect of deleting the non-executable code description is changed according to an implementation form. 前記コード最適化工程は、前記実装形態がハードウエアの場合に、
各関数コールをインライン展開する工程と、
前記インライン展開した各関数コード記述について個別にコードカバレッジ計測する工程と、
前記計測で得たコードカバレッジ情報から関数コード記述ごとに非実行コード記述を削除する工程
とを実行することを特徴とする請求項2に記載の集積回路装置の設計方法。
The code optimizing step, when the mounting form is hardware,
A step of inlining each function call;
A step of individually measuring code coverage for each function code description expanded inline,
And deleting a non-executable code description for each function code description from the code coverage information obtained by the measurement. 3. The method of designing an integrated circuit device according to claim 2, wherein
前記コード最適化工程は、前記実装形態がソフトウエアの場合に、
実行速度優先が選択されたときに関数コールをインライン展開する工程と、
コードサイズ優先が選択されたときに関数コールにする工程
とを実行することを特徴とする請求項2に記載の集積回路装置の設計方法。
The code optimizing step, when the mounting form is software,
A step of inlining function calls when execution speed priority is selected;
The step of making a function call when the code size priority is selected is executed.
前記関数コールの工程は、
関数コールごとの関数コール内のコードカバレッジを計測する工程と、
前記計測で得たコードカバレッジ情報に基づいて同一関数の関数コール中で共通する非実行コード記述を削除する工程と
を実行することを特徴とする請求項4に記載の集積回路装置の設計方法。
The function call process includes:
Measuring code coverage within the function call for each function call;
And deleting a common non-executable code description in a function call of the same function based on the code coverage information obtained by the measurement.
前記コード最適化の工程は、前記非実行コード記述の削除に代えて、前記非実行コード記述についてのコメントアウトを行うことを特徴とする請求項1から請求項5までのいずれかに記載の集積回路装置の設計方法。6. The integrated circuit according to claim 1, wherein the code optimization step includes commenting out the non-executable code description instead of deleting the non-executable code description. How to design the device. 集積回路装置の機能を記述した設計データの各コード記述について複数の検証ベクタによる実行コード記述と非実行コード記述とを計測してコードカバレッジ情報を得る工程と、
前記計測で得たコードカバレッジ情報を記憶する工程と、
前記記憶されたコードカバレッジ情報における前記実行コード記述・非実行コード記述が互いに同一となっている複数の検証ベクタについて、これらを1つに統合する工程
とを含むことを特徴とする集積回路装置の設計方法。
Obtaining code coverage information by measuring an executable code description and a non-executable code description with a plurality of verification vectors for each code description of the design data describing the function of the integrated circuit device;
Storing code coverage information obtained in the measurement,
Integrating a plurality of verification vectors having the same executable code description and non-executable code description in the stored code coverage information into one, and integrating them into one. Design method.
前記検証ベクタの統合の工程は、複数の検証ベクタごとに計測した前記コードカバレッジ情報に基づいて同一のコードカバレッジ情報を持つ複数の検証ベクタを1つに統合することを特徴とする請求項7に記載の集積回路装置の設計方法。The method of claim 7, wherein the step of integrating the verification vectors integrates a plurality of verification vectors having the same code coverage information into one based on the code coverage information measured for each of the plurality of verification vectors. The design method of the integrated circuit device according to the above. 集積回路装置の機能を記述した設計データと前記設計データを検証するための複数の検証ベクタを用いて、前記設計データの各コード記述が前記複数の検証ベクタによる実行コード記述と非実行コード記述とを計測するコードカバレッジ計測手段と、
前記コードカバレッジ計測手段によって生成されるコードカバレッジ情報を記憶するコードカバレッジ記憶手段と、
前記コードカバレッジ情報に基づいて前記設計データから前記非実行コード記述を削除するコード最適化手段
とを備えた集積回路装置の設計装置。
Using the design data describing the function of the integrated circuit device and a plurality of verification vectors for verifying the design data, each code description of the design data is executed code description and non-execution code description by the plurality of verification vectors. Code coverage measurement means for measuring
Code coverage storage means for storing code coverage information generated by the code coverage measurement means,
A code optimizing means for deleting the non-executable code description from the design data based on the code coverage information.
前記コード最適化手段は、前記非実行コード記述の削除に代えて、前記非実行コード記述についてのコメントアウトを行うことを特徴とする請求項9に記載の集積回路装置の設計装置。10. The integrated circuit device designing apparatus according to claim 9, wherein the code optimizing unit performs comment-out on the non-executable code description instead of deleting the non-executable code description. 集積回路装置の機能を記述した設計データと前記設計データを検証するための複数の検証ベクタを用いて、前記設計データの各コード記述が前記複数の検証ベクタによる実行コード記述と非実行コード記述とを計測するコードカバレッジ計測手段と、
前記コードカバレッジ計測手段によって生成されるコードカバレッジ情報を記憶するコードカバレッジ記憶手段と、
前記コードカバレッジ記憶手段により記憶された前記コードカバレッジ情報における前記実行コード記述・非実行コード記述が互いに同一となっている複数の検証ベクタについて、これらを1つに統合する統合手段
とを備えた集積回路装置の設計装置。
Using the design data describing the function of the integrated circuit device and a plurality of verification vectors for verifying the design data, each code description of the design data is executed code description and non-execution code description by the plurality of verification vectors. Code coverage measurement means for measuring
Code coverage storage means for storing code coverage information generated by the code coverage measurement means,
Integrated means for integrating a plurality of verification vectors having the same executable code description and non-executable code description in the code coverage information stored by the code coverage storage means into one; Circuit device design equipment.
JP2003149549A 2003-05-27 2003-05-27 Design method and apparatus of integrated circuit device Pending JP2004355130A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003149549A JP2004355130A (en) 2003-05-27 2003-05-27 Design method and apparatus of integrated circuit device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003149549A JP2004355130A (en) 2003-05-27 2003-05-27 Design method and apparatus of integrated circuit device

Publications (1)

Publication Number Publication Date
JP2004355130A true JP2004355130A (en) 2004-12-16

Family

ID=34045628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003149549A Pending JP2004355130A (en) 2003-05-27 2003-05-27 Design method and apparatus of integrated circuit device

Country Status (1)

Country Link
JP (1) JP2004355130A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007172542A (en) * 2005-12-26 2007-07-05 Fujitsu Ltd Design apparatus, design method, and program therefor
US8813019B1 (en) * 2013-04-30 2014-08-19 Nvidia Corporation Optimized design verification of an electronic circuit
JP6230759B1 (en) * 2016-11-24 2017-11-15 三菱電機株式会社 Circuit design apparatus, circuit design method, and circuit design program
CN115473683A (en) * 2022-08-10 2022-12-13 广西电网有限责任公司电力科学研究院 Interactive web verification optimization method and system
US11669773B2 (en) 2019-10-21 2023-06-06 Samsung Electronics Co., Ltd. Electronic devices generating verification vector for verifying semiconductor circuit and methods of operating the same

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007172542A (en) * 2005-12-26 2007-07-05 Fujitsu Ltd Design apparatus, design method, and program therefor
JP4657912B2 (en) * 2005-12-26 2011-03-23 富士通セミコンダクター株式会社 Design apparatus, design method and program thereof
US8813019B1 (en) * 2013-04-30 2014-08-19 Nvidia Corporation Optimized design verification of an electronic circuit
JP6230759B1 (en) * 2016-11-24 2017-11-15 三菱電機株式会社 Circuit design apparatus, circuit design method, and circuit design program
WO2018096611A1 (en) * 2016-11-24 2018-05-31 三菱電機株式会社 Circuit design device, circuit design method, and circuit design program
US11669773B2 (en) 2019-10-21 2023-06-06 Samsung Electronics Co., Ltd. Electronic devices generating verification vector for verifying semiconductor circuit and methods of operating the same
CN115473683A (en) * 2022-08-10 2022-12-13 广西电网有限责任公司电力科学研究院 Interactive web verification optimization method and system

Similar Documents

Publication Publication Date Title
KR100745959B1 (en) Integrated circuit development method, program recording medium containing integrated circuit development method
US9223921B1 (en) Compilation of HLL code with hardware accelerated functions
US7231627B2 (en) Merging a hardware design language source file with a separate assertion file
US20040049768A1 (en) Method and program for compiling processing, and computer-readable medium recoding the program thereof
US7007261B1 (en) Translation of an electronic integrated circuit design into hardware description language using circuit description template
JPH11500842A (en) Generation of timing shell by netlist reduction
Timmer et al. Conflict modelling and instruction scheduling in code generation for in-house DSP cores
JP2004355130A (en) Design method and apparatus of integrated circuit device
Potkonjak et al. Considering testability at behavioral level: use of transformations for partial scan cost minimization under timing and area constraints
US20090228859A1 (en) Synthesis constraint creating device, behavioral synthesis device, synthesis constraint creating method and recording medium
JP2005071135A (en) Compiling process program for statistically processing variable, its recording media, and its processing method and device
US8352234B2 (en) Model generation based on a constraint and an initial model
US20090235223A1 (en) Program generation apparatus and program generation method
JP5843449B2 (en) Electronic circuit optimization method, electronic circuit optimization device, and program
JP2006268862A (en) System for concurrent development of asic and programmable logic device, development program, and development method
Galuzzi et al. A linear complexity algorithm for the automatic generation of convex multiple input multiple output instructions
Thomas et al. Framework for development and distribution of hardware acceleration
JP2005352894A (en) Performance analysis program, and generation method thereof
US7086037B2 (en) Method and computer program product for localizing an interruption structure included in a hierarchical structure of a specification
JP2008071065A (en) Compile device, method, program and storage medium for performing in-line expansion
JP4556629B2 (en) Data processing system verification apparatus and method and program
JP2011090518A (en) High order synthesis device, high order synthesis method, and high order synthesis program
JP4127720B2 (en) Method for generating FPGA and ASIC netlist
Savaton et al. Behavioral vhdl styles and high-level synthesis for ips
JP2000150659A (en) Method for designing layout of semiconductor integrated circuit device