read_vhdl - 2021.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2021-10-22
Version
2021.2 English

Read one or more VHDL files

Syntax

read_vhdl ‑library <arg> [‑vhdl2008] [‑quiet] [‑verbose] <files>

Returns

List of file objects that were added.

Usage

Name Description
-library VHDL library
[-vhdl2008] VHDL file is version 2008.
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<files> VHDL file name(s)

Categories

FileIO

Description

Reads VHDL source files. This command is similar to the add_files command. The VHDL files are added to the source fileset as the file is read. If the -library argument is specified, the file is added with the Library property defined.

You can use this command to read the contents of source files into the in-memory design, when running the Vivado tool in Non Project mode, in which there is no project file to maintain and manage the various project source files. Refer to the Vivado Design Suite User Guide: Design Flows Overview (UG892) for more information on Non Project mode.

Arguments

-library <arg> - (Optional) The library the VHDL file should reference. The default VHDL library is xil_defaultlib.

-vhdl2008 - (Optional) Identifies the files to be read as VHDL file version 2008.

-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) Names of one or more VHDL files to be read.
Note: If the path is not specified as part of the file name, the tool will search for the specified file in the current working directory and then in the directory from which the tool was launched.

Examples

The following example reads the specified VHDL file and adds it to the source fileset:
read_vhdl C:/Data/FPGA_Design/new_module.vhdl
This example reads multiple specified VHDL 2008 files:
read_vhdl -vhdl2008 {file1.vhd file2.vhd file3.vhd}