The ZDB Command Kit

The Command Kit provides 'high level' commands created by a collection of already existing ZDB database commands.

The following commands are available:

Access Design Object

Basic Access Functions

get_top_design

get_top_design ?-name?

Get the top level design. If no top level design could be found then an empty string is returned.

The following options are available:

-name

Return the name of the top design.

Example
set top  [$db get_top_design]
      set name [$db get_top_design -name]

get_cell

get_cell ?-modbased? pin|port

Get the cell (module or primitive) of a pin or port.

The following options are available:

-modbased

Return a module based OID.

pin|port

Either a pin or port OID for which the cell OID should be returned.

Example
set cell [$db get_cell {pin TOP U1 A}]

get_pins

get_pins ?-addHier? cell|inst|net|signal

Get all pins or ports from a cell/inst/net/signal without having to write a loop.

The following options are available:

-addHier

Only valid for a given signal OID. If present then also add hierarchical ports.

cell|inst|net|signal

OID to get the pins/ports from.

Example
set pins [$db get_pins {signal TOP CLK}]

get_ports

get_ports ?-name? ?-match pattern? cell

Get all ports of the given cell (module, primitive or parasitic).

The following options are available:

-name

Return the names only.

-match pattern

Only return ports matching the given glob style pattern.

cell

Either a primitive, module or parasitic module OID for which the ports should be returned.

Example
set ports [$db get_ports {module AND2 AND2}]

get_all_bits

get_all_bits busOID

Get all bits of the given bus.

The following options are available:

busOID

Either a pinBus, portBus or netBus OID for which the member bits should be returned.

Example
set bits [$db get_all_bits {portBus TOP DATA_IN}]

get_attribute

get_attribute oid attrName

Get the value for an attribute at the given OID.

The following options are available:

oid

Any OID type that supports attributes.

attrName

Name of the requested attribute value.

Example
set value [$db get_attribute {inst TOP U1} width]

get_instances_of_cell

get_instances_of_cell cellName

Get all instances of the given cell type.

The following options are available:

cellName

Name of the requested cell.

Example
set instList [$db get_instances_of_cell "AND2"]

get_inst

get_inst ?-hiersep sep? path

Get the inst for a given partial flat path.

The following options are available:

-hiersep sep

Set hiersep different from default '/'.

path

partial flat path name for which the inst OID should be returned.

Example
set inst [$db get_inst "sub/U1"]

get_net

get_net ?-hiersep sep? path

Get the net or netBus for a given partial flat path.

The following options are available:

-hiersep sep

Set hiersep different from default '/'.

path

partial flat path name for which the net OID should be returned.

Example
set net [$db get_net "sub/n1"]

get_para_port_name

get_para_port_name ?-div d? ?-del d?

Get parasitic port name from given top port or instance pin

The following options are available:

-div d

Use given string instead of divider stored in db.

-del d

Use given string instead of delimiter stored in db.

Example
set name [$db get_para_port_name {pin TOP U1 A}]

get_driver

get_driver ?-flat? ?-stopatfirst? ?-ignorebidir? ?-limit count? net|signal

Get the driver for a given net or signal.

The following options are available:

-flat

Traverse hierarchies when searching for the driver.

-stopatfirst

Stop search at the first driver.

-ignorebidir

Ignore bidirectional pins/ports.

-limit count

Stop search after 'count' pins have been visited.

net|signal

net or signal OID.

Example
set driver  [$db get_driver -flat {net TOP net1}]
      set driver2 [$db get_driver -flat -limit 1000 {net TOP net1}]

get_load

get_load ?-flat? ?-stopatfirst? ?-ignorebidir? ?-limit count? net|signal

Get the load for a given net or signal.

The following options are available:

-flat

Traverse hierarchies when searching for the load.

-stopatfirst

Stop search at the first load.

-ignorebidir

Ignore bidirectional pins/ports.

-limit count

Stop search after 'count' pins have been visited.

net|signal

net or signal OID.

Example
set load  [$db get_load -flat {net TOP net1}]
      set load2 [$db get_load -flat -limit 1000 {net TOP net1}]

print_oid_as_slash_path

print_oid_as_slash_path oid

Print the given oid as a slash separated name.

The following options are available:

oid

The OID to print.

Example
$db print_oid_as_slash_path {net TOP net1}

print_oid_as_spef

print_oid_as_spef oid

Print the given oid as a SPEF name.

The following options are available:

oid

The OID to print.

Example
$db print_oid_as_spef {net TOP net1}