The Tcl API to the ZDB Find Command
The find API.
The following commands are available:
Find Database Objects
$db find
$db find ?-simple? ?-type $type? ?-case $case? ?-exact? ?-resulttype $resulttype? ?-cellref PATTERN? ?-path PATTERN? ?-top PATTERN? ?-dontmatchhiersep? ?-hiersep $char? $pattern $varName $body
Find objects in the database.
The following options are available:
|
|
|
Search of given type which can be one of |
|
|
|
Do fixed-string matching instead of wild-card-style pattern matching. |
|
$resulttype can be one of |
|
Pattern of the reference cell. See Wildcards. |
|
Pattern of the path. See Wildcards. |
|
Pattern of the top. See Wildcards. |
|
Wild-cards in the pathPattern won’t match any hiersep characters. |
|
Character which should be used to separate |
|
Pattern which should be found in the |
|
|
|
|
Example
# Search (and print) all netlist objects
$db find * oid {
puts $oid
}
Example
# Search for 10 nets named 'clk*'
set clockNets {}
$db find -type net -case insensitive clk* oid {
lappend clockNets $oid
if {[llength $clockNets] == 10} {
break
}
}
# Do something with $clockNets
Example
# Find all instances of '*dffrs*' cells inside the 'top/CPU' hierarchy
$db find -type inst -cellref *dffrs* -path CPU* -top top * oid {
puts $oid
}