• 検索結果がありません。

DRC は、Tcl のほかのオブジェクトと同様に、プロパティを変更できます。次のコマンドを使用すると、DRC オブジ ェクトのプロパティがリストされます。

Vivado% report_property [get_drc_checks RAMW-1]

Property Type Read-only Visible Value ARCHITECTURES string* true true

CLASS string true true drc_check

DESCRIPTION string true true Block RAM Data Width Check GROUP string true true RAMW

HIERNAME string true true RAMB Checks IS_ENABLED bool false true 1

IS_USER_DEFINED bool true true 1 MESSAGE string true true

MSG_ID int true true 1

NAME string true true RAMW-1 SEVERITY enum false true Advisory

注記: RAMW-1 DRC チェックの 2 つのプロパティ。(IS_ENABLED および SEVERITY) は変更できます。DRC チェッ ク オブジェクトのこれらのプロパティの値を変更するには、ほかのオブジェクトと同様に set_property コマンド を使用します。

RAMW-1 DRC チェックをディスエーブルにするには、次の Tcl コマンドを実行します。

Vivado% set_property IS_ENABLED false [get_drc_checks RAMW-1]

RAMW-1 DRC チェックの重要度を変更するには、次の Tcl コマンドを実行します。

Vivado% set_property SEVERITY {Critical Warning} [get_drc_checks RAMW-1]

これらのプロパティは、ビルトイン DRC ルールでも変更できます。ビルトイン DRC ルールをデフォルトにリセット するには、次の Tcl コマンドを使用します。

Vivado% reset_drc_check [get_drc_checks]

注意: Vivado ではビルトイン DRC オブジェクトをディスエーブルにしたり重要度を下げたりすることが可能 ですが、予期しない結果が発生したり、デバイスを恒久的に破損する可能性があります。ビルトイン DRC オ ブジェクトをディスエーブルにしたり重要度を下げたりしないことを強くお勧めします。

DRC の実行に関する詳細は、 『Vivado Design Suite ユーザー ガイド: システム レベル デザイン入力』 (UG895) を参 照してください。

カスタム GUI ボタン

GUI モードでは、メイン ツールバーにカスタム ボタンを追加できます。これらのボタンは Vivado コマンドまたはユ ーザー プロシージャにリンクさせることができ、引数ありまたはなしで定義できます。カスタム ボタン専用のアイ コンを使用することもできます。ボタンに引数を定義すると、ユーザーがボタンをクリックしたときに簡単なウィジ ェットが開くようになります。

カスタムボタンへの変更は Vivado ツールバージョンのユーザーエリア内で自動的にディスクに保存されます。こ れらの変更は、同じ Vivado ツール バージョンでのその後の実行に反映されます。カスタム ボタンを Vivado Design Suite を起動するたびに定義し直す必要はありません。

カスタム ボタンを定義するには、次の 2 つの方法があります。

• GUI を使用する場合は、[Tools] → [Custom Commands] → [Customize Commands] をクリックします。

• Tcl API を使用します。

次の表に、カスタム GUI ボタン関連の Tcl API を示します。

表 2: カスタム GUI ボタン関連の Tcl API

Tcl API 説明

create_gui_custom_command カスタム GUI ボタンを作成します。

remove_gui_custom_commands カスタム GUI ボタンを削除します。

get_gui_custom_commands カスタム GUI ボタンをリストします。

create_gui_custom_command_arg 既存のカスタム GUI ボタンの引数を作成します。

remove_gui_custom_command_arg 既存のカスタム GUI ボタンの引数を削除します。

get_gui_custom_command_arg 既存のカスタム GUI ボタンの引数をリストします。

カスタム ボタンは、1 つまたは複数の引数を指定して、または引数なしで定義できます。

create_gui_custom_command を使用してカスタム ボタンを作成した後、create_gui_custom_command_arg を使用して引数を追加します。

Vivado Design Suite でカスタム ボタンを削除すると、引数もすべて自動的に削除されます。引数を手動で削除する必 要はありません。

カスタム GUI ボタンの作成

カスタムボタンを作成するには、create_gui_custom_commandコマンドを使用します。

構文は次のとおりです。

create_gui_custom_command -name <arg> [-menu_name <arg>] [-description

<arg>]

[-show_on_toolbar] [-run_proc <arg>]

[-toolbar_icon <arg>] [-command <arg>]

[-tcl_file <arg>] [-quiet] [-verbose]

Usage:

Name Description

-name Unique name of the command to create.

[-menu_name] Menu name for the custom command.

[-description] Display this text for the description of the menu item and optionally the toolbar button

[-show_on_toolbar] Add this command to the toolbar

[-run_proc] Needed when '-command' and 'tcl_file' options are both specified.

If true, gui button will run command mentioned in '-command' option otherwise source script mentioned in '-tcl_file' option

[-toolbar_icon] The full path to the PNG or JPEG file to display on the toolbar button

[-command] The command to execute

[-tcl_file] The full path to the Tcl file to source [-quiet] Ignore command errors

[-verbose] Suspend message limits during command execution

-name で指定する名前は固有のものである必要があり、スペースを含めることはできません。この名前は、ボタンに 引数を追加する際に使用します。

例 1: myProc というプロシージャを呼び出すカスタム ボタンを作成:

create_gui_custom_command -name "myButton" \ -menu_name "Do something" \

-command "myProc" \ -show_on_toolbar \ -run_proc true

例 2: 選択したオブジェクトを通過して伝搬されるクロックを Tcl コンソールに表示するボタンを作成:

create_gui_custom_command -name "getClock" \ -menu_name "get_clock" \

-command {get_clocks -of [get_selected_objects]} \

-description {This button returns the clocks going through the selected objects} \

-show_on_toolbar

カスタム GUI ボタンの削除

カスタム ボタンを削除するには、GUI から直接削除するか、remove_gui_custom_command コマンドを使用しま す。

構文は次のとおりです。

remove_gui_custom_commands [-quiet] [-verbose] <names>...

Usage:

Name Description

[-quiet] Ignore command errors

[-verbose] Suspend message limits during command execution <names> name of one or more custom commands to remove create_gui_custom_command -name で定義した名前を指定する必要があります。

カスタム GUI ボタンの作成およびカスタム GUI ボタンの作成で定義したカスタムボタンを削除するには、次のコマ

ンドを使用します。

remove_gui_custom_command myButton remove_gui_custom_command getClock

カスタム ボタンに引数を追加

カスタム ボタンには、1 つまたは複数の引数を指定できます。引数はオプションです。引数を指定すると、ユーザー がボタンをクリックしたときになウィジェットが開くようになります。引数を定義するには、

create_gui_custom_command_arg コマンドを使用します。

構文は次のとおりです。

create_gui_custom_command_arg -command_name <arg> -arg_name <arg>

[-default <arg>] [-comment <arg>] [-optional]

[-quiet] [-verbose]

Usage:

Name Description

-command_name Unique name of the custom command for which an argument is being created.

-arg_name Unique name of the custom command argument to create.

[-default] Default value of the custom command argument.

[-comment] Comment for the custom command argument.

[-optional] Make the custom command argument optional.

[-quiet] Ignore command errors

[-verbose] Suspend message limits during command execution

次の例では、myButton というボタンに 3 つの引数を作成しています。最後の 2 つの引数はオプションです。

create_gui_custom_command -name "myButton" \ -menu_name "Do something" \

-command "myProc" \ -show_on_toolbar \ -run_proc true

create_gui_custom_command_arg -command_name "myButton" -arg_name

"Top_Module" \

-default "\[lindex \[find_top\] 0\]"

create_gui_custom_command_arg -command_name "myButton" -arg_name

"Output_Directory"

\ -default "-output_dir report" -optional

create_gui_custom_command_arg -command_name "myButton" -arg_name "Force" \ -default "-force" -optional

ザイリンクス Tcl Store

Vivado Design Suite では、ザイリンクス コミュニティ内で Tcl コードを配布および共有するためのリポジトリである ザイリンクス Tcl Store が提供されています。ザイリンクス Tcl Store では、アプリ (複数の Tcl スクリプトをグループ 化したもの) やプラグインが提供され、これらのアプリおよびプラグインはザイリンクス コミュニティにより管理さ れます。ザイリンクス ユーザーであれば誰でも投稿できます。詳細は、ザイリンクス Tcl Store Wiki (https://

github.com/Xilinx/XilinxTclStore/wiki/Xilinx-Tcl-Store-Home) を参照してください。

ザイリンクス Tcl Store へのアクセス

ザイリンクス Tcl Store では、ストアに関する情報をユーザーの $HOME/.Xilinx (Linux) または %APPDATA%/

Xilinx (Windows) に保存します。この保存された情報により、Vivado リリースごとにユーザーがインストールした アプリのリストが管理されます。これらのディレクトリは、オンラインのザイリンクス Tcl Store リポジトリから更新 およびアップデートされたアプリをキャッシュするためにも使用されます。

関連したドキュメント