get_property - 2020.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2020-11-18
Version
2020.2 English

Get properties of object

Syntax

get_property [‑min] [‑max] [‑quiet] [‑verbose] <name> <object>

Returns

property value

Usage

Name Description
[-min] Return only the minimum value
[-max] Return only the maximum value
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<name> Name of property whose value is to be retrieved
<object> Object to query for properties

Description

Gets the current value of the named property from the specified object or objects. If multiple objects are specified, a list of values is returned.

If the property is not currently assigned to the object, or is assigned without a value, then the get_property command returns nothing, or the null string. If multiple objects are queried, the null string is added to the list of values returned.

If multiple objects are passed to the get_property command, you can use the -min or -max options to return the smallest or greatest value of the property specified by name. This feature can be useful when setting timing constraints.
Recommended: For numeric properties, the min/max determination is based on numeric values. For all other properties, the determination is based on string sorting.

This command returns a value, or list of values, or returns an error if it fails.

Arguments

-min - (Optional) When multiple <objects> are specified, this option examines the values of the property specified by <name>, and returns the smallest value from the list of objects. Numeric properties are sorted by value. All other properties are sorted as strings.

-max - (Optional) When multiple <objects> are specified, this option examines the values of the property specified by <name>, and returns the largest value from the list of objects. Numeric properties are sorted by value. All other properties are sorted as strings.

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

<name> - (Required) The name of the property to be returned. The name is not case sensitive.

<objects> - (Required) One or more objects to examine for the specified property.

Examples

The following example gets the NAME property from the specified cell:
get_property NAME [lindex [get_cells] 3]
The following example returns the smallest PERIOD property from the specified clock objects:
get_property -min PERIOD [get_clocks]
This example demonstrates the string based sorting of the SITE property for the specified ports:
get_property SITE [get_ports]  
IOB_X1Y75 IOB_X1Y76 IOB_X1Y98 IOB_X1Y125 IOB_X0Y94 IOB_X1Y95 IOB_X1Y96  
IOB_X1Y93 IOB_X1Y94  
 
get_property -min SITE [get_ports]  
IOB_X0Y94  
 
get_property -max SITE [get_ports]  
IOB_X1Y98
Note: While IOB_X1Y125 is the largest site value on the port objects, the property value IOB_X1Y98 is returned because of the sorting of the property values as strings.