アプリをインストールしたら、そのアプリに含まれるすべてのプロシージャにコマンド ラインから次の 2 つの方法でアクセスできます。
-
::<company>::<app>
名前空間から。Vivado IDE を起動すると、インストールされた各アプリに含まれるすべてのプロシージャに対してラッパーが自動的に作成されます。 - アプリの完全名前空間修飾子
::tclapp::<company>::<app>
から (プロシージャが定義されている名前空間)。
たとえば、designutils アプリをインストールすると、ユーザー プロシージャ write_template
には次のコマンドでアクセスできます。
vivado% ::xilinx::designutils::write_template
vivado% ::tclapp::xilinx::designutils::write_template
::tclapp::xilinx
名前空間ではなく ::xilinx
名前空間からプロシージャーを呼び出す利点は、Vivado で作成されるラッパーでは、すべてのビルトイン Vivado コマンドに共通の -help
、-verbose
、-quiet
などの多数のデフォルト コマンド ライン オプションがサポートされることにあります。
次に例を示します。
Vivado% xilinx::designutils::write_template -help
xilinx::designutils::write_template
Description:
(User-written application)
Generates a Verilog/VHDL stub or instantiation template for the current design in
memory (current_instance)
Syntax:
xilinx::designutils::write_template [-type <arg>] [-stub] [-template]
[-language <arg>] [-verilog] [-vhdl]
[-cell <arg>] [-file <arg>] [-append]
[-return_string] [-usage] [-quiet]
[-verbose]
Returns:
template in the case of -return_string, otherwise 0 TCL_ERROR if error
Usage:
Name Description
-----------------------------
[-type] Type of template to create: stub or template
Default: stub
[-stub] Generate a stub (same as -type stub)
[-template] Generate a template (same as -type template)
[-language] Output language of the template: verilog or vhdl
Default: verilog
[-verilog] Verilog language (same as -language verilog)
[-vhdl] VHDL language (same as -language vhdl)
[-cell] Cell to generate template on. If not specified, runs on
current_instance
Default: current_instance
[-file] Output file name
Default: <module>.v or <module>.vhd
[-append] Append to file
[-return_string] Return template as string
[-usage] Usage information
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
Categories:
Description:
Generates a Verilog/VHDL stub or instanciation template for the current design
in memory (current_instance).
This command must be run on a synthesized or implemented design.
Example:
::xilinx::designutils::write_template -verilog -return_string