convert_ngc - 2023.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2023-10-18
Version
2023.2 English

(User-written application) Convert all provided NGC files to a supported format

Syntax

convert_ngc [‑output_dir <arg>] [‑format <arg>] [‑add_to_project] [‑force]
    [‑quiet] [‑verbose] <files>

Returns

None

Usage

Name Description
[-output_dir] Directory to place all output, else the output is placed at location of NGC file Default: Script output directory path
[-format] Accepts 'Verilog' or 'EDIF' (Default: EDIF), specifies the desired output format Default: EDIF
[-add_to_project] Adds the output files to the current project, if no project is open, then this option does nothing
[-force] Force overwriting of files that already exist on disk, replaces files in project if add_to_project switch was specified
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<files> A list of NGC files to convert

Description

Converts provided NGC files to a supported format.

Arguments

-output_dir <arg> - (Optional) Directory to place all output. If not specified, the output is placed in the same directory as the input NGC file.

-format [ Verilog | EDIF ] - (Optional) Specifies the desired output format. The default is EDIF.

-add_to_project - (Optional) Adds the output files to the current project, if no project is open, then this option is ignored.

-force - (Optional) Force overwriting of files that already exist on disk, replaces files of the same name in the current project, if the -add_to_project option is specified.

-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.

<files> - (Required) A list of NGC files to convert.

Examples

The following example will convert test.ngc to test.edn, with verbose messaging. The test.edn file will be added to the current open project:

convert_ngc ./test.ngc -add_to_project -verbose

The following example will convert test.ngc to test.edn. The test.edn file will be placed in the ./output directory. If ./output/test.edn exists it will be replaced:

convert_ngc ./test.ngc -output_dir output -force

The following example converts all NGC files in the current directory and in all sub-directories:

convert_ngc [ glob ./**/*.ngc ] [ glob ./*.ngc ]