インテルのみ表示可能 — GUID: oog1660743592178
Ixiasoft
インテルのみ表示可能 — GUID: oog1660743592178
Ixiasoft
1.3.3.2. Tclコマンドを使用してのDNIネットリストの走査
基本的なデザイン・オブジェクトの走査
次の表に、デザイン・ネットリストから階層インスタンス、インスタンス・ポート、ネット、およびポートを抽出するTclコマンドの例を示します。
タスク | Tclコマンド例 |
---|---|
最上位モジュール直下にあるすべてのインスタンスの取得 | foreach_in_collection obj [dni::get_cells] { puts $obj; } |
すべての階層のすべてのデザイン・インスタンスの取得 | foreach_in_collection obj [dni::get_cells -hierarchical] { puts $obj; } |
階層インスタンス直下にあるすべてのインスタンスの取得、階層区切り文字 (|) を含むパターンを使用 | foreach_in_collection obj [dni::get_cells auto|*] { puts $obj; } |
特定の階層インスタンス (auto など) の直接的な子インスタンスをすべて取得 | dni::current_instance を使用して、検索範囲を auto 階層インスタンスに移す dni::current_instance auto 階層インスタンス auto の直接的な子インスタンスをすべて取得 foreach_in_collection obj [dni::get_cells] { puts $obj; }範囲を最上位デザインに戻す dni::current_instance |
最上位モジュール直下にあるすべてのネットの取得 | foreach_in_collection obj [dni::get_nets] { puts $obj; } |
すべての階層におけるデザインのすべてのネットの取得 | foreach_in_collection obj [dni::get_nets -hierarchical] { puts $obj; } |
階層インスタンス直下のすべてのネットの取得、階層区切り文字 (|) を含むパターンを使用 | foreach_in_collection obj [dni::get_nets tick|*] { puts $obj; } |
特定の階層インスタンス (tick など) 直下のネットをすべて取得 | dni::current_instance を使用して、検索範囲を tick 階層インスタンスに移す dni::current_instance tick tick 直下のすべてのネットを取得 foreach_in_collection obj [dni::get_nets] { puts $obj; } 範囲を最上位デザインに戻す dni::current_instance |
デザインのすべてのポートの取得 | foreach_in_collection obj [dni::get_ports] { puts $obj; } |
デザインの最上位モジュールの下にある直接的な子インスタンスのすべてのインスタンス・ポートを取得 | foreach_in_collection obj [dni::get_pins] { puts $obj; } |
特定の階層インスタンス (tick など) の下にあるすべての子インスタンスのすべてのインスタンス・ポートを取得 | dni::current_instance を使用して、検索範囲を tick 階層インスタンスに移す dni::current_instance tick tick の下にあるすべてのインスタンス・ポートを取得 foreach_in_collection obj [dni::get_pins] { puts $obj; } 範囲を最上位デザインに戻す dni::current_instance |
すべての子インスタンスのすべてのインスタンス・ポートを取得、DNIオブジェクトID形式を使用して階層インスタンスを指定 | set inst [get_cells tick] foreach_in_collection obj [dni::get_pins -of_objects $inst] { puts $obj; } |
foreach_in_collection obj [dni::get_pins -of_objects tick|ticket[1]] { puts $obj; } |
|
foreach_in_collection obj [dni::get_pins -of_objects instance::chiptrip::tick|ticket[1]] { puts $obj; } |
選択的なデザイン・オブジェクトの取得
次の手法を使用して検索条件を絞り込み、選択したデザイン・オブジェクトをネットリストから抽出することができます。
- <patterns> : dni::get_cells、dni::get_nets、dni::get_pins コマンドの一致パターンによってオブジェクトを抽出します。パターンにはワイルドカード文字 (* または ?) を含めることができます。ワイルドカード文字は階層区切り文字とは一致しません。
デザイン階層内のオブジェクトの場合
- オブジェクトの階層パス名がパターンと照合されます。
- 階層区切り文字 (|) でパターンを個々のサブパターンに分割し、各サブパターンが1つの階層レベルと照合されます。つまり、* は階層に一致しないことを意味します。
- 一致する名前は、現在の検索のルート (デザインの最上位モジュール) に相対します。現在の検索のルートを変更するには、dni::current_instance コマンドを使用します。
<pattern> を使用するタスク | Tclコマンド例 |
---|---|
第1レベルのすべての階層インスタンスとリーフ・インスタンスの取得 | foreach_in_collection obj [dni::get_cells *] { puts $obj; } |
第2レベルのすべての階層インスタンスとリーフ・インスタンスの取得 | foreach_in_collection obj [dni::get_cells *|*] { puts $obj; } |
階層インスタンス (auto など) の下にあるすべてのインスタンスの取得 | foreach_in_collection obj [dni::get_cells auto|*] { puts $obj; } |
最上位モジュールの下にあるすべてのネットの取得 | foreach_in_collection obj [dni::get_nets *] { puts $obj; } |
第1レベルの階層インスタンスとリーフ・インスタンスの下にあるすべてのネットの取得 | foreach_in_collection obj [dni::get_nets *|*] { puts $obj; } |
第1レベルの階層インスタンス (auto など) の下にあるすべてのネットの取得 | foreach_in_collection obj [dni::get_nets auto|*] { puts $obj; } |
第1レベルの階層インスタンスとリーフ・インスタンスにあるすべてのインスタンス・ポートの取得 | foreach_in_collection obj [dni::get_pins *|*] { puts $obj; } |
階層インスタンス (auto など) にあるすべてのインスタス・ポートの取得 | foreach_in_collection obj [dni::get_pins auto|*] { puts $obj; } |
階層インスタンス (auto など) のすべての子インスタンスにあるすべてのインスタンス・ポートの取得 | foreach_in_collection obj [dni::get_pins auto|*|*] { puts $obj; } |
- <-of_objects> : dni::get_cells、dni::get_nets、dni::get_pins、dni::get_ports の入力オブジェクト・コレクションの関連デザイン・オブジェクトを抽出します。次のオブジェクトの関係が考慮されます。
- dni::get_cells -of_objects <inst_port|net>
- dni::get_nets -of_objects <inst_port|port|instance>
- dni::get_pins -of_objects <instance|net>
- dni::get_ports -of_objects <net>
<-of_objects> を使用するタスク | Tclコマンド例 |
---|---|
入力インスタンス・ポートがある階層インスタンスまたはリーフ・インスタンスの取得 |
foreach_in_collection obj [dni::get_cells -of_objects inst_port::chiptrip::auto|dir[0]] { puts $obj; } foreach_in_collection obj [dni::get_cells -of_objects inst_port::chiptrip::auto|street_map[2]|q] { puts $obj; } |
入力ネットが接続されている階層インスタンスまたはリーフ・インスタンスの取得 | foreach_in_collection obj [dni::get_cells -of_objects net::chiptrip::wire_get_ticket1] { puts $obj; } foreach_in_collection obj [dni::get_cells -of_objects net::chiptrip::auto|n5] { puts $obj; } foreach_in_collection obj [dni::get_cells -of_objects [dni::get_nets *]] { puts $obj; } foreach_in_collection obj [dni::get_cells -of_objects [dni::get_nets auto|*]] { puts $obj; } |
リーフ・インスタンス・ポートに接続しているネットの取得 | foreach_in_collection obj [dni::get_nets -of_objects inst_port::chiptrip::auto|street_map[0]|q] { puts $obj; } |
階層インスタンス・ポートに接続しているネットの取得 | foreach_in_collection obj [dni::get_nets -of_objects inst_port::chiptrip::auto|get_ticket] { puts $obj; } |
リーフ・インスタンスのすべてのインスタンス・ポートに接続しているネットの取得 | foreach_in_collection obj [dni::get_nets -of_objects instance::chiptrip::auto|street_map[0]] { puts $obj; } |
階層インスタンスのすべてのインスタンス・ポートに接続しているネットの取得 | foreach_in_collection obj [dni::get_nets -of_objects instance::chiptrip::auto] { puts $obj; } |
デザインの一次ポートに接続しているネットの取得 | foreach_in_collection obj [dni::get_nets -of_objects port::chiptrip::gt1] { puts $obj; } |
リーフ・インスタンスにあるインスタンス・ポートの取得 | foreach_in_collection obj [dni::get_pins -of_objects instance::chiptrip::tick|add_0] { puts $obj; } |
階層インスタンスにあるインスタンス・ポートの取得 | foreach_in_collection obj [dni::get_pins -of_objects instance::chiptrip::tick] { puts $obj; } |
階層インスタンス (instance::chiptrip::autoなど) にあるインスタンス・ポートの取得 | foreach_in_collection obj [dni::get_pins -of_objects [dni::get_cells auto]] { puts $obj; } |
階層ネットで接続されているインスタンス・ポートの取得 | foreach_in_collection obj [dni::get_pins -of_objects net::chiptrip::wire_get_ticket1] { puts $obj; } |
最上位の階層ネットによって接続されている一次ポートの取得 | foreach_in_collection obj [dni::get_ports -of_objects net::chiptrip::wire_get_ticket1] { puts $obj; } |
- <-filter> : dni::get_cells、dni::get_nets、dni::get_pins、dni::get_ports で返されたオブジェクトをフィルター式に基づきフィルタリングして、オブジェクトを抽出します。フィルター式は、他の検索条件を満たすオブジェクトをすべて検証します。オブジェクトがフィルターを満たさない場合は、結果として返されません。
フィルター式は、論理演算子 (&&、and/AND、||、or/OR、! など) を使用して組み合わされた述語で構成されます。式内の丸括弧 () は、優先順位をオーバーライドします。各述語の形式は次のとおりです。
prop_namerelopvalue
- prop_name は、評価するオブジェクト・プロパティーの名前です。
- value は、数値または文字列です。二重引用符で囲まずに、単純な文字列を指定することができます。
- relop は、次の比較演算子のいずれかです。
- == (イコール)
- != (イコールではない)
- =~ (一致、値はパターン)
- !~ (一致しない、値はパターン)
- > (大きい)
- < (小さい)
- >= (以上)
- <= (以下)
例: -filter {name=~"out[*]" && ! (master_name==mod_1 || parent_name != block_1)}
<-filter> を使用するタスク | Tclコマンド例 |
---|---|
トップレベルの下にあるすべての子インスタンスの取得 | foreach_in_collection obj [dni::get_cells *] { puts $obj; } |
インスタンス・オブジェクト・タイプのプロパティーの取得 | dni::list_properties -type instance |
リーフ・インスタンスではないオブジェクトの取得 | foreach_in_collection obj [dni::get_cells * -filter {is_leaf==1}] { puts $obj; } |
階層インスタンスであるすべてのオブジェクトの取得 | foreach_in_collection obj [dni::get_cells * -filter {is_leaf==0}] { puts $obj; } |
デザインの最上位モジュールの下にある、名前のパターン (t* など) に一致する階層インスタンスを返す | foreach_in_collection obj [dni::get_cells * -filter {is_leaf==0 && name=~"t*"}] { puts $obj; } |
階層インスタンス (auto など) の下にある、フィルターのモジュール名と一致するすべてのインスタンスの取得 | foreach_in_collection obj [dni::get_cells auto|*] { puts $obj; } dni::get_property -name module_name -object instance::chiptrip::auto|Mux_0 foreach_in_collection obj [dni::get_cells auto|* -filter {module_name=="primitive_lib_WORKING_LIBRARY_INTERNAL/OPER_(MUX)"}] { puts $obj; } |
net オブジェクトのフィルタリングに使用できるプロパティーを取得し、最上位デザインの下にある、3つのインスタンス・ポートと一次ポートの接続を備えるネットを取得 | dni::list_properties -type net foreach_in_collection obj [dni::get_nets -filter {number_of_ports==3}] { puts $obj; } |
完全なデザイン階層内の、親モジュール (auto_max など) の下にあるすべてのネットの取得 | foreach_in_collection obj [dni::get_nets -hierarchical -filter {parent_name=="auto_max"}] { puts $obj; } |
完全なデザイン階層内の、net_bus (street_map など) に関連付けられているすべてのネットの取得 | foreach_in_collection obj [dni::get_nets -hierarchical -filter {net_bus_name=="street_map"} ] { puts $obj; } |
インスタンス・ポート・オブジェクトのフィルタリングに使用できるプロパティーを取得し、direction プロパティーの値を取得後、最上位デザインの下にあるすべての出力 inst_ports を取得 | dni::list_properties -type inst_port dni::get_property -name direction -object inst_port::chiptrip::auto|get_ticket foreach_in_collection obj [dni::get_pins -filter {direction==output}] { puts $obj; } |
デザイン内のすべての一次入力ポートを取得 | foreach_in_collection obj [dni::get_ports -filter {direction==input}] { puts $obj; } |
- <pattern>、-of_objects <obj_col>、-hierarchical、-filter <filter_expr> を組み合わせて使用する場合
検索条件を組み合わせて使用するタスク | |
---|---|
デザインの最上位モジュールの下にある、組み合わせ検索条件 (-of_objects と -filter) に一致するすべてのインスタンス・ポートを取得 | foreach_in_collection obj [dni::get_pins -of_objects [dni::get_cells *] -filter {direction==input}] { puts $obj; } |
デザインの最上位モジュールの下にある、パターンと -hierarchical に一致するすべてのネットを取得 | foreach_in_collection obj [dni::get_nets time* -hierarchical] { puts $obj; } |
tcl> foreach_in_collection obj [dni::get_pins clk -hierarchical] { puts $obj; } nst_port::chiptrip::auto|clk inst_port::chiptrip::speed|clk inst_port::chiptrip::tick|clk inst_port::chiptrip::time_c|clk tcl> foreach_in_collection obj [dni::get_nets time* -of_objects instance::chiptrip::time_c] { puts $obj; } Arguments '-of_objects' and 'patterns' are mutually exclusive tcl> foreach_in_collection obj [dni::get_pins -hierarchical -of_objects instance::chiptrip::time_c] { puts $obj; } Arguments '-of_objects' and '-hierarchical' are mutually exclusive