can_resolve_reference - 2022.1 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2022-05-05
Version
2022.1 English

Check if a module can be referenced

Syntax

can_resolve_reference [‑quiet] [‑verbose] <module>...

Usage

Name Description
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<module> module name

Categories

Object, Project

Description

This command is used to validate reference to modules prior to trying to import them into the design. Its primary use is in scripts like the script produced by the write_bd_tcl command, though you can use it in your own scripts as well.

This command returns 0 if the reference cannot be resolved, or returns 1 if it can be resolved.

Arguments

-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.

<module> - (Required) Specifies the name of the module to validate. The module name is referenced from a loaded RTL design source file.

Examples

This example determines if the reference to the specified module can be resolved:
can_resolve_reference clk_div