Xilinx 8.2i manual Get get object properties, Name name of the object, Puts object get $obj $prop

Models: 8.2i

1 422
Download 422 pages 26.35 Kb
Page 89
Image 89

R

Tcl Commands for Advanced Scripting

get (get object properties)

The object get command returns the value of the specified property.

%object get <object_name> <property_name>

object is the name of the Xilinx Tcl command.

name is the name of the object subcommand.

object_name specifies the object to get the property of. The object name will always be a Tcl variable. The set command is used to create a Tcl variable, as shown in the following example.

property_name specifies the name of one of the properties of an object. The properties of an object vary depending on the type of object. Use the object properties command to get a list of valid properties for a specific object.

Example:

% set colVar [search * -type instance]

 

% collection foreach obj $colVar {set objProps

 

[object properties $obj] foreach prop $objProps

 

{puts [object get $obj $prop]}}

 

 

Description:

This example first runs a search to create a collection of all instances

 

in the project. The second statement iterates through the objects in

 

the collection. For each object, the list of available properties on the

 

object are obtained by the object properties command. Then, the value

 

of each property for each of the objects is returned.

Tcl Return:

The value of the specified property.

name (name of the object)

The object name command returns the name of any Xilinx object. This command is useful when manipulating a collection of objects, which may have been returned from a search. The object name command can be used to narrow the collection.

%object name <object_name>

object is the name of the Xilinx Tcl command.

name is the name of the object subcommand.

Development System Reference Guide

www.xilinx.com

89

Page 89
Image 89
Xilinx 8.2i manual Get get object properties, Name name of the object, Collection foreach obj $colVar set objProps