Introduction

Tcl commands may be used to extract attributes out of the database for any given cell. Tcl stands for Tool Command Language. It is a scripting language that is used to control and extend applications. It is an interpreted language and is run by passing the script file to the Tcl interpreters, and therefore does not need to be compiled.

The LakerTM Layout System Tcl interface provides a means for extracting data from the layout database, and then manipulating that data. There are many cell attributes that are accessible via Tcl commands. Use the Laker Database Model shown in the following figure, to help you find the various attributes.

Tcl And The dbHierDump Output

Each line in a Tcl script begins with a command and a number of arguments. The command is either a built in command or the name of a Tcl procedure. Variables may be used to store values and later retrieved. Format: command arg1 arg2 Examples:

set varName varValue or
set varName [command arg1 arg2]

To find the names of all of the instance ports in a cellview, the following Tcl code may be used:

First get the cellview id. Next, from the cellview id, retrieve the ids of the instance ports and then the names of the instance ports. The output from this script is:

Generating and debugging Tcl scripts that extract information from the Laker Database can be a time consuming task depending on the complexity of the script and the programming ability of the user. How would a user determine if they are retrieving the information they are expecting to retrieve? There is a utility available that can help with the debugging of Tcl scripts that extract information from the cellviews. It is called dbHierDump and is located in the bin directory of the installation directory (<install_dir>/bin). This utility dumps the hierarchy of a cellview and all of the parameters, properties, ports, etc. to a file. The output from this utility may be browsed to locate attributes and then used as a reference when debugging Tcl scripts. To see the usage of the utility, enter dbHierDump on the Unix command line.

The following command:

dbHierDump top_lay -c top -out top.out

will dump the hierarchy of the cell "top" in the library "top_lay" into a file called "top.out". The output file will look similar to:

Note in the above example the ports are listed. These are the same ports listed in the Tcl application, as both the Tcl script and dbHierDump were run on the same cell. The inset image shows more of the top.out file including properties and parameters.

Two arguments are not explained in the usage. They are "-n" and "-d". The "-d" argument is an internal R&D option and should be ignored. The "-n" argument will list the net information as shown in the following example:

In a schematic cellview, the instance has 2 masters, symbol view, and schematic view. The "2nd" option will show the 2nd master information as follows:

Summary

The dbHierDump utility is a very useful utility in that it is invoked from the Unix command line. Laker does not need to be invoked. The utility dumps the information about the cellview into a file. The user may specify a unique filename. The file generated, can be used to assist in the debug of Tcl scripts that query the database, by comparing the output of the Tcl script to the data in the output file of the dbHierDump utility.