Tool Command Language
4. Examples

4.1 Inspect: Extracting Breakdown Voltage
4.2 Sentaurus Process: Extracting Oxide Thickness

Objectives

4.1 Inspect: Extracting Breakdown Voltage

This example shows how Tcl commands and Inspect commands are mixed in an Inspect input flow to extract the open-base breakdown voltages from a bipolar transistor simulation result. The example can be found in the directory Applications_Library/GettingStarted/tcl/bv_extract.

Different breakdown voltages are extracted:

If the Inspect tool node does not have a "done" status, that is, it is not yellow, first run the node to produce the results. Then, click the Run Selected Visualizer Nodes Together toolbar button to create the plot.

Breakdown voltage extraction

Figure 1. Schematics of the extraction of the BJT breakdown voltage.

Click to view the command file inspect_ins.cmd.

First, the file util_ins.cmd is sourced, which provides the breakdown-voltage extraction procedure EXTRACT_BV:

source util_ins.cmd

Second, a .plt file is loaded and the collector I–V curve is created:

proj_load  break.plt  D
cv_create IcVc "D IcVc(4) x" "D IcVc(4) y" 

Finally, the breakdown voltage is extracted by calling EXTRACT_BV with the current level:

set Ilevel 1e-8
Extract_BV IcVc $Ilevel

The breakdown-voltage extraction procedure EXTRACT_BV is defined in the file util_ins.cmd and reads as follows:

proc Extract_BV { Cname Ilevel } {
  set VList [cv_getValsX $Cname]
  set IList [cv_getValsY $Cname]
 
  set vmax 0.0
  set vi   0.0
  foreach v $VList i $IList {
     if { $v > $vmax } { set vmax $v }
     if { $i >= $Ilevel && $vi == 0.0} { set vi $v}
  }
 
  ft_scalar BV_vmax   $vmax
  ft_scalar BV_Ilevel $vi
  ft_scalar Ilevel    $Ilevel
}

Click to view the command file util_ins.cmd.

As a result, the Inspect node returns the extracted values from "DOE:" output:

DOE: BV_vmax 75.356902
DOE: BV_Ilevel 40.912378
DOE: Ilevel 1e-8

The Inspect commands cv_getValsX and cv_getValsY convert an Inspect curve into a Tcl list, which contains the x- or y-values of the curve.
The Inspect command ft_scalar prints the extracted value and passes it to Sentaurus Workbench.

4.2 Sentaurus Process: Extracting Oxide Thickness

This example demonstrates the use of Tcl scripting within a Sentaurus Process command file. Find the example in Applications_Library/GettingStarted/tcl/tox_extract.

Click to view the master file sprocess_fps.cmd.

After some simulation commands specific to Sentaurus Process, the Sentaurus Process Tcl function layers is used to extract information about the generated layers as a list. Each layer entry is a list containing the top and bottom coordinates, an integral value of the current dataset (not of interest here), and the material:

set LAYERS [layers]
puts "$LAYERS"
#->{         Top                Bottom             Integral            \
 Material }
#->{  -1.584176604347e-02  1.126859234306e-02  6.391490417248e+09 Oxide }
#->{   1.126859234306e-02  5.000000000000e-01  4.360844257716e+10 Silicon }

To extract the oxide thickness, the LAYERS table is reduced to a simple flat list, consisting of the first column, that is the top coordinates, only:

set FirstColumn [list]
foreach Row $LAYERS {
 lappend FirstColumn [lindex $Row 0]
}

Next, you determine the oxide thickness by subtracting the top coordinates of the first layer and the second layer. The result is printed to the log file as DOE: output, such that Sentaurus Workbench can extract it from the output and add it to the result table:

set Tox [expr [lindex $FirstColumn 2] - [lindex $FirstColumn 1]]
puts "The thickness of the grown oxide is \
        [format %.2f [expr 1e3*$Tox]] nm"
#-> The thickness of the grown oxide is 27.20 nm
puts "DOE: Tox $Tox"

Run Sentaurus Process with the command-line option -n to suppress syntax-checking when using Tcl expressions, which use information only available at runtime.

main menu    |   module menu    |   << previous section    |   next section >>