Searching for Pins - 2022.2 English

Vivado Design Suite User Guide: Using Tcl Scripting (UG894)

Document ID
UG894
Release Date
2022-10-19
Version
2022.2 English
Figure 1. Searching for Pin Names

The names of pins are based on the instance they belong to. When searching for pins, you must use the hierarchy separator character to separate the instance name and the pin name patterns. The following examples are illustrated by Searching for Pins.

# Current instance is set to design top-level
get_pins B/* ; # Returns B/clk B/din0 B/din1 B/dout0 B/dout1
get_pins B/b2/*/O ; # Returns B/b2/data_reg_i_1/O
current_instance B/b2 ; # Change scope to B/b2
get_pins *_reg/D ; # Returns B/b2/data_reg/D

You can also use the -hierarchical option when searching for pins:

current_instance ; # Reset to the top-level of the hierarchy
get_pins -hier */D # Returns pin objects for all D pins in the design
Note: -hierarchical and -hier refer to the same option. The Vivado Design Suite Tcl shell completes option names automatically if enough characters are provided to identify a unique option. Therefore, -of_object and -of can also refer to the same option.