Product Documentation
Virtuoso Space-based Router Command Reference
Product Version IC23.1, September 2023

make_list

make_list
{d_setObj | d_ctuObjRef} 

Description

Constructs a Tcl list of object identifiers from the given set of objects or from the reference to a list of objects. If no argument is given, the Tcl list for the objects in the selected set is returned.

This command is useful for inspecting properties with the inspect_prop command.

The shorthand version of this command, ml, can also be used.

Arguments

d_ctuObjRef

Is the object reference for a list of objects, such as that returned by "inspect_prop elements" for a net.

d_setObj

Is the identifier for a set of objects, such as the set identifier returned by a find_* command.

Value Returned

d_ctuObj…

Is the Tcl list of object identifiers.

Examples

The following table includes usage examples for make_list.

Usage Description
ml [ip elements $net]

Returns a list of object ids, one for each element in the net

ml [get_selection_set]

Returns a list of object ids, one for each element in the set

ml

Returns the same as above (defaults to elements in the selection set)

Example—Finding Items in a Set

This procedure outputs the type property for all elements in the given set.

proc findItemsInSet {inputSet} {
set instSet [create_set]
foreach inputObject [ml $inputSet] {
puts [ip type $inputObject]
}
puts "[set_count -set $inputSet] items in set."
}

The following example uses the findItemsInSet procedure and shows the output.

findItemsInSet [get_selection_set]
ctuRouteSegment
ctuRouteVia
ctuNet
ctuRoute
4 items in set.

Example—Create a Set Containing Instances Attached to Nets in a Set

This procedure returns a set of instances that are attached to nets in the given set.

proc findInstancesConnectedToNets {inputSet} {
set instSet [create_set]
foreach inputObject [ml $inputSet] {
set inputObjectType [ip type $inputObject]
if {[string compare $inputObjectType "ctuNet"] == 0} {
foreach element [ml [ip elements $inputObject]] {
set elementType [ip type $element]
if {[string compare $elementType "ctuInstTerm"] == 0} {
set elementInst [ip instance $element]
add_object_to_set -object $elementInst -set $instSet
}
}
} else { puts "$inputObjectType: this is not a net" }
}
puts "[set_count -set $instSet] instances are attached to selected nets."
return $instSet
}

The following example uses the findInstancesConnectedToNets procedure and adds the instances that are found to the current highlight set.

replace_set -set1 [findInstancesConnectedToNets [get_selection_set]] -set2 [get_current_highlight]

Related Topics

Edit Commands

hp

inspect_prop


Return to top
 ⠀
X