The user proc's command line arguments must be described with the meta-comment Argument Usage
inside the user procs. This meta-comment is used by the Help system to generate the message when <
command
> -help
is executed by the user or when the proc help is displayed in the GUI. For example:
# Argument Usage:
# [-verbose]: Verbose mode
# [-file <arg>]: Report file name
# [-append]: Append to file
# [-return_string]: Return report as string
# [-usage]: Usage information
The above meta-comment Argument Usage
generates the following message from the Help system:
Syntax:
xilinx::designutils::write_template [-verbose] [-file <arg>] [-append]
[-return_string] [-usage] [-quiet]
Usage:
Name Description
-----------------------------
[-verbose] Verbose mode
Default: 0
[-file] Report file name
Default: None
[-append] Append to file
Default: 0
[-return_string] Return report as string
Default: 0
[-usage] Usage information
Default: 0
[-quiet] Ignore command errors
It is important to keep in mind that the meta-comment Argument Usage
is not a preprocessing of the command line argument by
Vivado before calling the Tcl proc. It is only used by the Help
system. The Tcl code of the proc has to handle the complete processing of the command
line arguments.