Inspect Ug
Inspect Ug
Inspect Ug
Synopsys, Inc.
700 E. Middlefield Road
Mountain View, CA 94043
www.synopsys.com
Creating Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Running Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Saving Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Exporting Curve Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Printing Curves in Plot Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Exporting Curves to Bitmap File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
cv_lineColor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
cv_lineStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
cv_renameCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
cv_set_interpol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
cv_setCurveAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
gb_setpreferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
gr_createLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
gr_deleteLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
gr_mappedAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
gr_setAxisAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
gr_setGeneralAttr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
gr_setGridAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
gr_setLegendAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
gr_setTitleAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Accessing Curve Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
cv_getVals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
cv_getValsX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
cv_getValsY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
cv_getXaxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
cv_getYaxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
cv_printVals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Transforming Curve Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
cv_abs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
cv_delPts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
cv_inv. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
cv_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Extracting Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
f_Gamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
f_gm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
f_hideInternalCurves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
f_IDSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
f_KP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
f_Ron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
f_Rout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
f_showInternalCurves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
f_TetaG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
f_VT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
f_VT1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
f_VT2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Computing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
cv_compute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
cv_getZero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
macro_define . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Controlling Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
script_break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
script_exit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
script_sleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Support for Manual Examples Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
gr_formatAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
gr_precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
gr_setLegend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
gr_setLegendPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Examples of Using Script Language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
cv_exists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
cv_getGlobalExtrema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
cv_getLocalExtrema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
cv_getNames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
cv_getRange. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
cv_getXmax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
cv_getXmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
cv_getYmax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
cv_getYmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
cv_integrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
cv_linFit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
cv_linTrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
cv_monotonicX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
cv_nextColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
cv_nextLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
cv_nextSymbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
cv_resetColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
cv_resetFillColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
cv_resetLine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
cv_resetStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
cv_resetSymbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
cv_scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
cv_setFillColor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
cv_setSymbol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
cv_sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
dbputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
ds_getValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
fi_readTxtFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
fi_readTxtFileHeader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
gr_axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
gr_resetAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
gr_setStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
ldiff. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
lintersect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
ltranspose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
lunion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
proj_check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
proj_datasetExists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
proj_getGroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
proj_groupExists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
The PhysicalConstants Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Maximum Stable Gain, Maximum Available Gain, and Rollett Stability Factor . . . 127
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Related Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Extracting fmax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Related Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Fast Alternative Extraction Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Extracting ft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Related Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Fast Alternative Extraction Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Discussion of Different Cut-off Frequency Extraction Methods. . . . . . . . . . . . . . . . 132
Extracting fK=1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Various Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
RF Extraction Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
RF Data Loading and Exporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
rfx_Export2csv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
rfx_GetFK1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
rfx_GetFmax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
rfx_GetFt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
rfx_GetK_MSG_MAG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
rfx_GetMUG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
rfx_GetNearestIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
rfx_load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
rfx_RFCList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Utility Section A: Parameter Converters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
rfx_S2K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
rfx_Y2H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
rfx_Y2K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
rfx_Y2S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
rfx_Y2U . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
rfx_Y2Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
rfx_Z2U . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Utility Section B: Complex Arithmetic Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
rfx_abs_c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
rfx_abs2_c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
rfx_add_c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
rfx_con_c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
rfx_div_c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
rfx_im_c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
rfx_mag_phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
rfx_mul_c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
rfx_re_c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
rfx_sign. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
rfx_sub_c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Utility Section C: Modifying Curves. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
rfx_ExtractVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
rfx_ReIm2Abs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
rfx_ReIm2Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Utility Section D: Backgrounds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
rfx_PolarBackdrop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
rfx_SmithBackdrop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Formulas Used in RF Extraction Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Y-Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Z-Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
H-Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
S-Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Mason’s Unilateral Gain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Rollett Stability Factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Maximum Stable Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Maximum Available Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Audience
This guide is intended for users of the Inspect software package, which is available in
Sentaurus Workbench Visualization.
Related Publications
For additional information about Inspect, see:
■ The TCAD Sentaurus release notes, available on SolvNet (see Accessing SolvNet on
page xiv).
■ Documentation available through SolvNet at https://solvnet.synopsys.com/DocsOnWeb.
Typographic Conventions
Convention Explanation
{} Braces
Bold text Identifies a selectable icon, button, menu, or tab. It also indicates the name of a field or an
option.
Courier font Identifies text that is displayed on the screen or that the user must type. It identifies the
names of files, directories, paths, parameters, keywords, and variables.
Italicized text Used for emphasis, the titles of books and journals, and non-English words. It also
identifies components of an equation or a formula, a placeholder, or an identifier.
Key+Key Indicates keyboard actions, for example, Ctrl+I (press the I key while pressing the Control
key).
Menu > Command Indicates a menu command, for example, File > New (from the File menu, select New).
Customer Support
Customer support is available through SolvNet online customer support and through
contacting the Synopsys support center.
Accessing SolvNet
SolvNet includes an electronic knowledge base of technical articles and answers to frequently
asked questions about Synopsys tools. SolvNet also gives you access to a wide range of
Synopsys online services, which include downloading software, viewing documentation, and
entering a call to the Synopsys support center.
To access SolvNet:
1. Go to the SolvNet Web page at https://solvnet.synopsys.com.
2. If prompted, enter your user name and password. (If you do not have a Synopsys user name
and password, follow the instructions to register with SolvNet.)
If you need help using SolvNet, click Help on the SolvNet menu bar.
Functionality of Inspect
Inspect can be used to display and analyze curves. It features a graphical user interface (GUI),
a script language, and an interactive language for computations with curves.
Usually, a dataset represents a physical quantity, such as voltage, current, or time. Clusters of
datasets represent functionally related physical quantities, for example, measurements of
current and voltage, and the times at which these measurements are taken. Groups represent
semantically related datasets, for example, enmeshment results at one of several contacts of a
semiconductor device.
In addition to its name, a dataset can have other attributes associated with it, for example, the
name of the physical quantity represented by the dataset, the name of the unit in which this
quantity has been measured, preferred color, and interpolating function. Depending on the
particular input file format, this information can be stored partially in the data file and partially
in separate files.
Inspect can read different data formats and file formats (see Data Files and Supported Data
Formats on page 4).
Data in TDR and TIF formats contains the names of the physical quantities that datasets
represent. The TDR and TIF formats allow you to split a dataset cluster into named groups.
Data in XGRAPH format always has clusters consisting of two datasets only. Additional
dataset attributes are specified inside the file with appropriate keywords.
To distinguish between datasets from different data files, the datasets from one data file are
grouped into a project. The name of the data file without an extension is taken as the project
name. When more than one file with the same name is loaded, Inspect adds a suffix .n to the
project name, where n is the smallest number not yet used as a suffix for another project name.
Menu Bar
Toolbar
Datasets
Group Box
Curves
Group Box
Plot Area
Status
Line
The toolbar buttons and menus are documented in Appendix A on page 157.
The status line at the bottom of the main window displays information about the current Inspect
session and the position of the pointer in the plot area.
The top pane lists the currently loaded data files (also called projects). In the example shown
in Figure 1 on page 2, only one data file n57_des has been loaded (the extension of the data
file is not displayed).
The middle pane lists the names of the dataset groups belonging to the selected data file. A
group containing one or more datasets can correspond to an electrode or a thermode of a device.
Datasets that do not belong to any group are also displayed. In Figure 1, hTave and hTmax are
independent datasets. In addition, drain, source, substrate, and gate are groups, each
containing several datasets.
The bottom pane lists the names of the datasets belonging to the selected group. For example,
if drain is selected in the middle pane, the datasets OuterVoltage, InnerVoltage,
QuasiFermiPotential, DisplacementCurrent, eCurrent, and hCurrent appear in
the bottom pane.
Plot Area
The plot area is where curves are drawn. The toolbar buttons are used to change the coordinate
system for zooming sessions, to display or remove the legend text, to change the order in which
curves are displayed, and to switch between linear and logarithmic scale.
File Types
CSV Comma-delimited format, which is recognized by many applications. The file extension
is .csv.
TDR Format recognized by most Synopsys TCAD tools. The file extension is .tdr.
For a description of the TDR format, refer to the Sentaurus Data Explorer User Guide.
TIF Synopsys TCAD format for I–V curves, recognized by most Synopsys TCAD tools. The file
extension is .ivl. For a description of the TIF format, refer to the Taurus Visual User Guide,
‘Data Formats.’
TXT Tab-delimited text. The file extension is .txt. Each curve is written into a block with the
curve name, and the x- and y-data.
XGRAPH Each curve is written into a block with the curve name, and the x- and y-data. The file
extension is .xy. Typically, there is one xy data–point pair per line. Each value or column is
separated by white space (space or tabs), commas, semicolons, or colons. For more
information, go to http://www.xgraph.org.
XMGR Format used by the shareware xy plotting tool Xmgr. The file extension is .xmgr.
For more information, go to http://plasma-gate.weizmann.ac.il/Xmgr/.
Parameter Files
When Inspect is customized interactively according to user preferences, the current setup can
be stored in a parameter file, which usually has the extension .par. In a parameter file, Inspect
stores the following information:
■ Plot area attributes
■ Coordinate area attributes
■ Axes attributes
■ User-defined macros
■ Printer setup
■ Curve attributes
When Inspect is started, it looks for a parameter file with the file name inspect.par in the
current directory. If a file with this name is found, Inspect loads it and sets the graph settings,
macros, and printer setup according to the values in this file. If no file is found in the current
directory, Inspect looks for a parameter file with the name inspect.par in the STDB
directory. If no file is found, Inspect uses the default values.
A parameter file can also be loaded explicitly on startup or during the execution.
Curve attributes saved in the parameter file are not applied automatically to curves in Inspect.
To do this, the command-line option -applyCurveAttr must be specified when launching
Inspect.
Save Files
The entire current state of Inspect (projects, curves, and settings) can be saved to a save file,
which is used to restore the saved state at any time and usually has the extension .sav.
Data from all loaded projects is also stored in a save file. This means that for restoring the saved
state, the data files are no longer necessary.
Command-Line Options
When starting Inspect from the command line, the following options (which can be obtained
by typing inspect -h) can be used:
Usage: inspect [options] [FILES]
Description:
Inspect is a tool to display and analyze curves, which features
a convenient graphical user interface, a script language,
and an interactive language for computations with curves.
Options:
-h[elp] :
display this help message
-v[ersion] :
print the version of Inspect
-verbose :
display all messages
-geometry :
size and position for window
-display :
display to use
-f FILE :
execute script file after startup
-c FILE :
read setup file after startup
-m FILE :
execute macro after startup
-batch :
do not open graphical user interface while executing
script file
-applyCurveAttr : apply curve attributes saved in parameter file (.par)
and state file (.sav)
-oldInterpol : force Inspect to use interpolation
criteria of earlier versions
-oldplx : load a PLX file, it automatically creates curves with
the old scheme
Arguments:
FILES : simulation results (.plt, .tdr, .ivl) files
and/or save (.sav) files
The remaining command-line arguments can be one or several data files, or a save file that is
loaded when Inspect is started. Inspect distinguishes automatically between data files and save
files.
Example 1
inspect n53_des.plt
Inspect starts in the interactive mode and loads datasets from the file n53_des.plt.
Example 2
inspect file1.plt file2.plt file3.plt -c mySetup.par
Inspect starts in the interactive mode. The data files file1.plt, file2.plt, and
file3.plt are loaded. The plot area, axes, macros, and printer setup are read from the
parameter file mySetup.par.
Example 3
inspect -f bipolar.cmd
When started in interactive mode, Inspect executes the script file bipolar.cmd.
Example 4
inspect -batch -f bipolar.cmd
Inspect starts in batch mode and executes the script file bipolar.cmd.
Reloading Datasets
Displayed datasets can be reloaded if the file is updated while viewing it in Inspect.
To reload a dataset:
■ File > Update Datasets or Ctrl+U.
As the result, all plotting actions are applied to the selected datasets.
This feature is helpful when datasets contain data of a similar structure, for example, projects
with groups of the same names. Otherwise, it may occur that the current dataset does not
contain some data necessary for creating a curve. In this case, Inspect generates an error.
NOTE Inspect stores plotting actions applied to the currently selected dataset
only. When you select another dataset, the accumulated set of stored
actions is cleaned up.
Zoom Operations
To perform zoom operations on curves displayed in the plot area, use the relevant toolbar
buttons (see Table 6 on page 157).
Creating Scripts
To create a script:
1. Script > Record > Start.
The Record Script File dialog box is displayed, which prompts you to select or create a
script file.
2. After selecting the file name, Inspect starts to store every operation until recording is
stopped: Script > Record > Stop.
Running Scripts
To run a script:
1. Script > Run Script or Ctrl+R.
The Run Script File dialog box is displayed.
2. Select a script.
3. Click OK.
Preferences
In Inspect, preferences relate to the precision of values handled for curve coordinates and the
interpolation method used to operate and display curves.
The number entered in the Precision field indicates how many decimal digits are used to
handle coordinates for curve points.
The Use Old Interpolation option forces Inspect to use the interpolation criteria used in earlier
versions to handle all computations with curves.
Saving Files
Two file-saving options are available in Inspect:
■ File > Save Setup saves the current setup in a parameter .par file.
■ File > Save All saves the entire current state of Inspect in a .sav file.
The Write .tdr File dialog box is displayed, which prompts you to select or create a TDR file.
Similarly, files can be exported in other formats.
To print curves:
1. File > Print or Ctrl+P.
The Printer Setup dialog box is displayed where printing settings can be defined. On
Windows, a standard Windows print dialog box is displayed. On UNIX or Linux, a special
print dialog box is shown (see Figure 4).
2. Select the print configuration.
3. Click OK.
NOTE In the Command field, you can specify the command for using the
printer.
You can export the plot area into a PNG file directly from your Inspect script. To do this, use
the script command fi_writeBitmap (see fi_writeBitmap on page 45). This is a screen
image exporting method that works when Inspect starts in the interactive mode.
NOTE Since this exporting method is based on the X11 utility xwd, it works
only if a valid DISPLAY is available, that is, an X server is required.
It is also possible to organize an off-screen image export of the plot area. X11 has a ‘virtual
frame’ buffer, X server utility Xvfb, which can be used to create a temporary virtual display
even if no real screen is available.
The following wrapper script creates an off-screen X server and starts Inspect; using the same
technique as described above for screen export, the image is captured:
#!/bin/sh
# AIX
if [ $arch/$os = "rs6000/aix5.1" ]
then
X -force -vfb -x abx -x dbe -x GLX $DISPLAY &
pid1=$!
fi
# Allow some time for Xvfb to start up
sleep 1
NOTE There is no guarantee that this script will work on any platform. For
some architectures, necessary modifications must be performed.
This chapter describes how to create and work with curves using the
graphical user interface of Inspect.
Projects and groups are selected from the Datasets group box (see Datasets Group Box on
page 3). If more than one group is selected, only the dataset names that exist in all the selected
groups appear in the bottom pane.
In Figure 1 on page 2, if two groups (drain and source) are selected, the dataset names
OuterVoltage, InnerVoltage, QuasiFermiPotential, DisplacementCurrent,
eCurrent, and hCurrent appear in the bottom pane. If the group hTmax is selected, in
addition, no dataset names are displayed in the bottom pane because no datasets with identical
names exist in all the selected groups.
When more than one project is loaded, the same rule applies. Consequently, Inspect only shows
common groups and datasets of multiple-selected projects in the middle and bottom panes of
the Datasets group box.
Creating Curves
The first curve displayed in Figure 1 maps time to the x-axis and TotalCurrent of drain
to the left y-axis.
To create a curve:
1. Select the dataset group time in the middle pane of the Datasets group box.
2. Click the To X-Axis button.
3. Select the dataset group drain in the middle pane of the Datasets group box.
4. Select the dataset TotalCurrent from the bottom pane of the Datasets group box.
5. Click the To Left Y-Axis button.
Inspect draws a curve in the plot area using these two datasets. The name of the curve is
generated automatically using names and other attributes of groups and datasets (and possibly
projects). The upper-right corner of the plot area shows a legend, which displays curve names
and curve drawing styles.
The second curve is created in the same way: time is mapped to the x-axis and
TotalCurrent from source is mapped to the left y-axis. The next curve is created using
time as the x-axis dataset and TotalCurrent from substrate as the right y-axis dataset.
When these steps are completed, the main window of Inspect resembles Figure 1 on page 2.
For example, if the physical quantity name is OuterVoltage and the dataset belongs to a
group named drain, the curve name is OuterVoltage_drain.
With XGRAPH files, a default name is created using the data file name and the comment line
preceding the dataset pair in the file. If the generated curve name already exists, an .n suffix is
added, where n is the smallest number not used in another name.
In addition to a name, a curve has legend text associated with it. The text identifies the curve
in the plot area. When a curve is created, the corresponding text is initialized with the curve
name.
After selection, the curve is highlighted in the Curves group box, plot area, and legend text.
Curve Attributes
A curve is displayed according to attributes associated with it. When a curve is created, default
values are assigned to all attributes. A curve is drawn with lines connecting nodes and,
optionally, with node markers.
The attributes of a curve can be changed using the Curve Attributes dialog box (see Figure 5).
On the Line tab of the Curve Attributes dialog box, you can change the following attributes of
lines:
Color Default color is assigned from a list of colors not assigned to existing
curves.
Style When all available colors are exhausted, a line drawing style is assigned
from a list of styles so that every curve has a unique combination of color
and style.
Width Line width in pixels, 2 by default.
On the Marker tab of the Curve Attributes dialog box, you can change the following attributes
of node markers:
The Curve Attributes dialog box is displayed (see Figure 5 on page 19).
To display a curve with data points and no lines between these points:
1. Click the Marker tab.
2. In the Shape box, select circle.
3. Click the Line tab.
4. Set Width to 0.
5. Click Apply.
6. Click OK.
To change the order of curves, use the toolbar buttons (see Table 6 on page 157). Alternatively,
use the options from the Curve menu (see Table 9 on page 159):
■ Curve > Drawing Order > Move to Front
■ Curve > Drawing Order > Move to Back
■ Curve > Drawing Order > Move Forward
■ Curve > Drawing Order > Move Backward
Any data file not recognized as being in TDR or TIF format is read as an XGRAPH file. When
loading an XGRAPH file, Inspect switches to the XGRAPH mode. Curves are created
automatically from the pairs of datasets defined in the loaded file with the y-dataset being
mapped to the left y-axis. The y-dataset can be remapped later to the right y-axis.
On the left of the Create Curve dialog box, there are two panes: one for existing curves and one
for predefined macros.
There are fields for the name of the new curve (Inspect provides a default) and for the name of
the formula that is used to create the curve.
You can select to map the curve to either the left y-axis or right y-axis.
For more information about using formulas, see Chapter 7 on page 37.
Macros are stored in the file inspect_macro.par in the STDB directory. This file is created
automatically the first time Inspect is run. Initially, it stores predefined macros. You can then
add or modify macros using the Macro Editor.
For more information about using macros, see Chapter 7 on page 37.
Deleting Curves
You can delete either selected curves or all curves shown in the Curves group area.
Scaling an Axis
Inspect allows scaling on three possible axes: x-axis, left y-axis, and right y-axis. The scale of
each axis can be changed independently.
To change the scale of an axis, click the relevant toolbar buttons (see Table 6 on page 157). For
each of the axes, logarithmic scaling can be switched on and off. If the scaling is switched off,
it reverts to linear scaling.
When the axis scale is switched to linear, data is restored to its original values.
For example, to change the position of the legend text in the plot area:
1. Click the Legend tab.
2. In the Position box, select the new position.
3. Click OK or Apply to accept the changes.
For example, to change the linear scale of the x-axis to logarithmic scale:
1. Click the X-Axis tab.
2. Click the Scale tab.
3. Select the Log option.
4. Click OK or Apply to accept the changes.
Adding Labels
Labels can be added to the plot area. These labels provide useful information about the mapped
curves. Labels can be edited and removed from the plot area.
To add a label:
1. Edit > Labels > Add.
The Labels dialog box is displayed (see Figure 10).
2. In the Text field, type the label text.
3. Select a color and font for the label.
4. Click OK or Apply to insert the new label in the plot area.
To move a label:
■ Select a label in the plot area using the middle mouse button.
You can move the label inside the plot area until the middle mouse button is released.
To delete a label:
1. Edit > Labels > Remove.
The pointer changes to the delete mode.
2. In the plot area, click the label to be removed.
When the label is removed, the pointer reverts to the standard mode.
The Curve Data dialog box is displayed, which shows a table of the x-coordinates and
y-coordinates for each point in the datasets represented by the selected curve (see Figure 11).
Positions are represented by circles that are connected by a line. The Inspector dialog box
shows different values calculated from the two selected positions (see Figure 12).
Figure 12 Example of using Inspector dialog box for sampling points in the plot area
Curves
Inspect offers different operations with curves. This requires an efficient and complete way to
handle curves and to create datasets for curves resulting from operations with other curves.
A curve is defined as a set of two or more (x, y) points. Each curve has its own set of points
called datasets. Inspect can display graphically the resulting (continuous) curve by plotting all
dataset points and completing the curve with a graphical linear interpolation method.
Figure 13 shows three different curves, each defined by different datasets. In addition, Inspect
offers operations with curves, some of which result in a new curve or a scalar value. These
operations include the sum of two or more curves, integration, differentiation, and the
maximum value in the y-axis or x-axis.
Limitation of x-Dataset
NOTE Only curve segments that have x-axis values monotonically increasing
or decreasing can be used in a formula.
Curves used in a formula are checked for monotonically increasing or decreasing values inside
the range defined by the current zoom area. This means formulas apply only to the currently
displayed points. By defining appropriate zoom areas, it is possible to cut off curve segments
that do not have monotonically increasing or decreasing x-values.
This general rule has one exception. An Inspect formula can involve only one curve with
nonmonotonous x-axis values. In this case, Inspect splits this curve into monotonous segments
of x-axis values, applies the formula to those segments, and builds the resulting curve
automatically. For example, a scaling formula can be applied to a curve that is nonmonotonous
on the x-axis. However, calculating a sum curve of two curves, where both are nonmonotonous
on the x-axis, is not possible.
The data points of curves A, B, and C are marked with circles, squares, and diamonds,
respectively. The points in the resulting curve are marked with plus signs. The formula used is
A + B + C . The resulting curve includes points of all three input curves:
Resulting Curve
Curve A
Curve B
Curve C
Inspect creates an array of all x-coordinates of all curves that are used in a formula and
interpolates those curves to obtain y-values for each of the new x-values added to each curve.
Resulting
Curve
y = 2x2
Curve 2
y = x2
(log)
Curve 1
y = x2
(lin)
X 1 10 20 30 40 50 60 70
2
Curve 2: y = x , logarithmic scale on x
X 1 2 4 8 16 32 64
The combined set of x-coordinates needed to produce the resulting curve (the sum of both
curves) is:
2
Resulting curve: y = 2x
X 1 2 4 8 10 16 20 30 32 40 50 60 64
Note that the last point of Curve 1 (x = 70) is not included, as no data is available beyond x = 64
in Curve 2.
For y-values, interpolation is performed on Curve 1 and Curve 2 to fill the gaps and sum both
curves. Therefore, y-values for this resulting curve are:
Y 2 8 32 128 200 512 800 1800 2048 3200 5000 7200 8192
The datasets in AuxProject are handled in the same way as datasets from loaded data files.
dy y i1 – y i
= ----------------- (1)
dx x i1 – x i
First, the curve is treated as linear, and the minimum (MinSlope) and maximum (MaxSlope)
slopes are calculated. Second, a quotient is created:
MaxSlope
------------------------ (2)
MinSlope
Of these four values, the one closest to 1.0 indicates the best way of handling the curve.
Formula Syntax
Inspect recognizes two types of variable: curve and scalar.
The binary operators that can be used are +, –, *, /, and ^ (power operator).
Formula Library
The formula library allows some basic calculations to be performed on one or more selected
curves. The result can be a new curve or a scalar (see Table 2 on page 38). The following
examples show how the formula library is used:
sin (<curve_1> + 10) The result is a new curve. Inspect adds 10 to the y-value of each
curve point from curve_1 and computes the sinus.
maxslope(<curve_1>) The result of this formula is a scalar, the maximum slope of
curve_1.
Table 2 on page 38, and Table 3 and Table 4 on page 39 list the functions that can be used in
Inspect formulas. Table 2 lists functions that create a new curve by applying a mathematical
transformation to each element of the curve. These functions can also be applied to scalar
values. Table 3 lists special functions that either require more than one parameter or do not
return a curve. Table 4 lists functions that manage or compute fast Fourier transformation
(FFT) and related operations.
acos curve curve Returns the arc cosine. The returned angle [radian] is given in
the range 0 (zero) to π .
acosh curve curve Returns the inverse hyperbolic cosine. Curve values must be
greater than or equal to 1.
asin curve curve Returns the arc sine. The returned angle [radian] is given in the
range from – π ⁄ 2 to π ⁄ 2 .
atan curve curve Returns the arc tangent. The returned angle [radian] is given in
the range from – π ⁄ 2 to π ⁄ 2 .
atanh curve curve Returns the inverse hyperbolic tangent. Curve values must be
between –1 and 1 (excluding –1 and 1).
ceil curve curve Rounds up each element to the smallest integer not less than
itself.
diff curve only curve Returns the first derivative of the curve.
erfc curve curve Returns the complementary error function of the curve values.
exp curve curve Returns the number raised to the power of each curve value.
floor curve curve Rounds down each element to the largest integer not greater
than itself.
j0 curve curve Returns the Bessel function of the first kind of order 0.
j1 curve curve Returns the Bessel function of the first kind of order 1.
lgamma curve curve Returns the natural logarithm of the absolute value of the
Gamma function.
log curve curve Returns the natural logarithm of the given curve.
log10 curve curve Returns the base 10 logarithm of the given curve.
y0 curve curve Returns the Bessel function of the second kind of order 0.
y1 curve curve Returns the Bessel function of the second kind of order 1.
pow curve, scalar curve Returns the curve raised to the power of the given scalar.
tangent curve, scalar curve Returns a curve that is tangent to the given curve, at the given
x-value.
cfftim curve_real, curve Returns the imaginary part of the FFT of the given complex
curve_imaginary curve.
cfftre curve_real, curve Returns the real part of the FFT of the given complex curve.
curve_imaginary
cifftim curve_real, curve Returns the imaginary part of the inverse FFT of the given
curve_imaginary complex curve.
cifftre curve_real, curve Returns the real part of the inverse FFT of the given complex
curve_imaginary curve.
fftabs curve_real, curve Returns a vector holding the absolute value of the given
curve_imaginary complex curve.
fftim curve curve Returns the imaginary part of the FFT of the given curve.
fftre curve curve Returns the real part of the FFT of the given curve.
ifftim curve curve Returns the imaginary part of the inverse FFT of the given
curve.
ifftre curve curve Returns the real part of the inverse FFT of the given curve.
NOTE A curve can be defined by one point only. In that case, the curve is
treated as a scalar input. Some curves require as input a curve only, that
is, a curve that has at least two points.
Macros
Macros are useful for defining complex formulas. Inspect expands a macro by using the actual
arguments specified in the call to the macro (see Figure 7 on page 23).
In a macro definition, the argument type must be specified. Types can be curve or scalar. This
information is needed to expand the macro into the correct formula. The syntax for argument
placeholder specification is <c n> for curves and <s n> for scalars, where n is an integer
value used to distinguish between different arguments; n must start with 1.
In the Inspect macro parser, the macro prototype is not specified explicitly; it is determined
automatically from the formula that defines the macro. The order of arguments is determined
by their first appearance in the formula and not by numbers in the argument placeholders.
Example 1
The macro ADD is defined as:
<c 1> + <c 2>
This macro adds two curves. The macro prototype looks like:
ADD(<CURVE>, <CURVE>)
Example 2
The macro DIFFMULT is defined as:
diff(<c 1>) + (<s 3> * <c 2>)
This macro takes the derivative of a curve <c 1> and adds to it a curve <c 2> multiplied by a
scalar <s 3>. A call to this macro has the form:
DIFFMULT(<CURVE>, S, <CURVE>)
A formal argument <CURVE> must be replaced by an actual curve name and S must be replaced
by an expression that generates a scalar value.
Script Language
In addition to the graphical user interface (GUI), Inspect can be controlled by using a script
language. For example, a script can load a project, draw curves, and perform some complex
computations on the curves. A script can be written manually or created automatically by
recording actions performed interactively through the GUI.
The script language of Inspect allows you to manipulate and display data without using the
GUI. The script language is very useful for running complex calculations on datasets and
displaying results, for example:
■ Repeated manual actions can be recorded and run afterwards by simple script invocation.
■ Several computations using the formula library can be performed in one run.
■ Results can be automatically written to a file.
Inspect uses the tool command language (Tcl) for its script language. For a detailed explanation
of this language, go to http://www.tcl.tk.
Some commands have been added to Tcl (in the form of Tcl procedures) to perform
application-specific actions. For more specific needs, you can create and add your own
commands.
Most of the additional commands in Inspect return a status string. A return status not equal to 1
indicates an error. If an error occurs, Inspect prints an error message to the standard error output
and aborts the execution of the script.
General-purpose Commands
ft_scalar
ft_scalar variableName variableValue
If the current Inspect command file belongs to a Sentaurus Workbench project, this
output line results in the creation of a new Sentaurus Workbench extracted variable
with the name variableName and the value variableValue
(see Sentaurus Workbench User Guide, Extracted Variables on page 103).
Input: variableName, name of the Sentaurus Workbench variable to extract
variableValue, value of this Sentaurus Workbench variable
Returns: None
cv_write
cv_write type fileName curveList
Action: Writes (exports) the data of the specified curves to a file in the specified format.
Input: type, output format to use: one of the keywords plt, xgraph, or xmgr
fileName, file to write
curveList, list of curve names
Returns: The status of the write operation
fi_writeBitmap
fi_writeBitmap fileName
fi_writeEps
fi_writeEps fileName {orientation portrait} {height ""} {width ""}
Action: Writes the plot area to an EPS file. This command is not generated automatically
when script recording is switched on. When height or width is not specified, the
actual plot size is taken into account. Some examples are:
fi_writeEps test.eps
fi_writeEps test.eps landscape
fi_writeEps test.eps landscape 200 100
fi_writePs
fi_writePs fileName {orientation portrait} {printSize US_LETTER} {height ""} {width ""}
{offsetHeight ""} {offsetWidth ""} {sizeUnit ""}
Action: Writes the plot area to a PostScript® file. This command is not generated
automatically when script recording is switched on. When height or width is not
specified, the actual plot size is taken into account. Some examples are:
fi_writePs test.ps
fi_writePs test.ps landscape
fi_writePs test.ps landscape DIN_A4
fi_writePs test.ps portrait US_LETTER 450 300 5 5 m
graph_load
graph_load fileName
Action: Loads the given save file into Inspect. All currently loaded projects are deleted.
Input: fileName, name of the file to load
Returns: The status of the load operation
graph_write
graph_write fileName
param_load
param_load fileName
param_write
param_write fileName
proj_getDataSet
proj_getDataSet projectName dataSetId
Action: If no dataset is found, the return value is an empty list. For example, the
commands:
set the variable x_data to the values of the dataset time and the variable y_data
to the values of the dataset data_1 of node_A.
Input: projectName, name of the project
dataSetId, name of a dataset including its group name if applicable
Returns: A list of all the values of the dataset
proj_getList
proj_getList
Action: Returns a list of all projects. If no projects are found, an empty list is returned.
Input: None
Returns: A list of all loaded projects
proj_getNodeList
proj_getNodeList projectName
Action: Returns a list of group names of the given project. If no groups have been found,
an empty list is returned.
Input: projectName, name of the project
Returns: A list of group names
proj_load
proj_load fileName
Action: Loads the data file fileName and creates a new project. The base name of the file
is used as the project name (see Data Files and Supported Data Formats on
page 4).
Input: fileName, name of the file to load
Returns: The status of the load operation
proj_unload
proj_unload projectName
Action: Deletes the project projectName and all the project-related curves.
Input: projectName, name of the project to unload
Returns: The status of the unload operation
proj_write
proj_write projectName fileName
cv_create
cv_create curveName xDataPath yDataPath {axis y}
Action: Creates a curve with the given name using the specified datasets without
displaying it. The datasets must be already loaded; otherwise, an error is returned.
For example, the command:
creates a curve mycurve using the dataset time on the x-axis and the dataset
OuterVoltage of the group Gate on the y-axis, with both datasets belonging to
the project nmos_n7_des.
Input: curveName, unique name for the new curve
xDataPath, x-dataset data path
yDataPath, y-dataset data path
axis, optional parameter specifying the axis to use; the default is y
Returns: The status of the create operation
cv_createDS
cv_createDS curveName xDataPath yDataPath {axis y}
cv_createFromScript
cv_createFromScript curveName xdata ydata {axis y}
Action: Creates a curve using the given name and given data. If the number of values for x
and y are not the same, the number of curve points is according to that of the
smaller dataset. Curves created with this command are stored in AuxProject. For
example, the command:
creates the curve mycurve defined by the data given in the command line.
Input: curveName, unique name for the new curve
xdata, list of data to use for the x-dataset
ydata, list of data to use for the y-dataset
axis, optional parameter specifying the axis to use; the default is y; the options
are y or y2
Returns: The status of the create operation
cv_createWithFormula
cv_createWithFormula curveName formula xmin xmax ymin ymax
Action: Computes a new curve using the formula applied to the data of the argument
curves within the given range. Setting the range to any nonnumeric value (for
example, A) instructs Inspect to set no limit in the corresponding direction. For
example, the command:
cv_createWithFormula f3 "<f1>+<f2>+10" A A A A
creates the curve f3 using the whole data range of curves f1 and f2.
Input: curveName, unique name for the new curve
formula, formula or macro
xmin, xmax, ymin, ymax, range for which the formula is applied
Returns: The status of the create operation
cv_delete
cv_delete curveName
cv_display
cv_display curveName {axis y}
cv_logScale, cv_log10Scale
cv_logScale curveName newCurveName {axis x}
cv_log10Scale curveName newCurveName {axis x}
Action: Creates a new curve where all values on a given axis are transformed to a log
(log10) scale.
Input: curveName, curve to transform
newCurveName, name of the new curve
axis, optional parameter specifying axis on which the curve is scaled; the default
is x
Returns: The status of the create operation
cv_split
cv_split curveName axis newCurveList
Action: This command splits the input curve into several curves at the points where the x-
values are nonmonotonic, that is, x [ i + 1 ] < x [ i ] . The number of names for the
new curves must match the actual number of created curves; otherwise, an error is
returned.
This function is similar to the one achieved by selecting Curve > Transform >
Suppress Backtrace (see Table 9 on page 159). The difference is that this function
creates a set of new curves. With Suppress Backtrace selected, the backtrace lines
are suppressed only on the plot.
Input: curveName, curve to split
axis, y-axis to map the new curves onto
newCurveList, list of names for new curves
Returns: The status of the operation
cv_split_disc
cv_split_disc curveName axis newCurveList
Action: This command splits the input curve into several curves at the points where there
are discontinuities, that is, x [ i + 1 ]==x [ i ] and y [ i + 1 ] != y [ i ] . The number of
names for the new curves must match the actual number of created curves;
otherwise, an error is returned.
Input: curveName, curve to split
axis, y-axis to map the new curves onto
newCurveList, list of names for new curves
Returns: The status of the operation
Changing Attributes
This section describes the functions that change the attributes of the title, axes, curves, and
legend.
cv_lineColor
cv_lineColor curveName color
cv_lineStyle
cv_lineStyle curveName style
cv_renameCurve
cv_renameCurve curveName newName
cv_set_interpol
cv_set_interpol curveId axis type
Action: Sets the interpolation method to be applied to each particular dataset of the curve.
Input: curveId, curve identification
axis, axis on which the interpolation is set (X or Y)
type, interpolation method to set (AUTO, LIN, or LOG)
Returns: None
cv_setCurveAttr
cv_setCurveAttr curveName legend color style width shape size outColor outWidth fillColor
gb_setpreferences
gb_setpreferences type val
Action: Sets new values to preference options. The following options can be modified:
precision: Defines the precision used to display coordinate values in the status
line; any integer can be set.
old_interpolation: Defines whether the old interpolation is used for
computing curves.
1: Enables old interpolation.
0: Disables old interpolation.
Input: type, preference option to be modified
val, new value for option
Returns: None
gr_createLabel
gr_createLabel label coordX coordY fontStr color
gr_deleteLabel
gr_deleteLabel labelId
gr_mappedAxis
gr_mappedAxis axis yesno
gr_setAxisAttr
gr_setAxisAttr axis title tfont min max color width font angle div scale {tcolor}
gr_setGeneralAttr
gr_setGeneralAttr {showFrame true} {axesTight true} {backColor white} {selectColor cyan}
gr_setGridAttr
gr_setGridAttr {showGrid false} {gridAlign left} {minorTicks false}
{gridStyle "short dashed"} {gridColor black} {gridWidth 1}
gr_setLegendAttr
gr_setLegendAttr {showFlag true} {fontName helvetica} {fontSize 10} {fontStyle {}}
{backColor white} {foreColor black} {frameColor black} {frameWidth 1} {framePos right}
{frameAnchor n}
gr_setTitleAttr
gr_setTitleAttr title {fontSize 14} {just center}
cv_getVals
cv_getVals curveName
Action: This command returns a list of the x- and y-data. The x- and y-data can be assessed
using:
After this, the variables x and y hold the x- and y-datasets, respectively.
Input: curveName, name of curve
Returns: A list of the x- and y-data
cv_getValsX
cv_getValsX curveName
cv_getValsY
cv_getValsY curveName
cv_getXaxis
cv_getXaxis curveName
Action: The project name and the dataset ID can be extracted using:
cv_getYaxis
cv_getYaxis curveName
Action: The project name and the dataset ID can be extracted as for cv_getXaxis. See
cv_getXaxis.
Input: curveName, name of curve
Returns: A list with the project name and the dataset ID of the y-dataset
cv_printVals
cv_printVals curveName
cv_abs
cv_abs curveName axis
Action: Replaces negative values of the x- or y-dataset by their absolute values, depending
on the axis argument. This command has the same effect as selecting Curve >
Transform > Abs X or Abs Y (see Table 9 on page 159).
Input: curveName, name of curve
axis, axis specifier
Returns: The status of the operation
cv_delPts
cv_delPts curveName indexList
Action: Deletes the points in the indexList from the set of points being displayed.
Input: curveName, name of curve
indexList, list of indices of curve points
Returns: The status of the delete operation
cv_inv
cv_inv curveName axis
Action: Reflects a curve about the specified axis. This command has the same effect as
selecting Curve > Transform > Reflect X or Reflect Y (see Table 9 on page 159).
Input: curveName, name of curve
axis, axis specifier
Returns: The status of the operation
cv_reset
cv_reset curveName
Action: Restores the original appearance of the curve after a transformation. This
command has the same effect as selecting Curve > Restore Data (see Table 9 on
page 159).
Input: curveName, name of curve
Returns: The status of the operation
Extracting Parameters
The following commands extract standard parameters of semiconductor devices. Some
arguments of the commands have default values that are used when an argument is not
specified.
f_Gamma
f_Gamma VT1 VT2 VB1 VB2 const
f_gm
f_gm curveName xmin xmax ymin ymax
f_hideInternalCurves
f_hideInternalCurves
Action: Does not display the internally used curves created by the procedures of this
section.
Input: None
Returns: None
f_IDSS
f_IDSS curveName xmin xmax ymin ymax
f_KP
f_KP gm VDS
f_Ron
f_Ron curveName xmin xmax ymin ymax
f_Rout
f_Rout curveName xmin xmax ymin ymax
f_showInternalCurves
f_showInternalCurves axis
Action: Displays the internally used curves created by the procedures of this section.
Input: axis, axis to use; the default is left
Returns: None
f_TetaG
f_TetaG VT gm idvgs vgsvgs xmin xmax ymin ymax
f_VT
f_VT curveName xmin xmax ymin ymax
Action: Computes the threshold voltage [V] of the given curve. The formula used to
compute the threshold voltage is:
VT = intercept(maxslope(curve))
Example 1: This statement computes Vth using default values for the range:
set vt1 [f_VT idvgs]
Example 2: This statement computes Vth using xmin = 0.1 xmax = 0.3 and
default values for the y-range:
set vt2 [f_VT idvgs 0.1 0.3]
f_VT1
f_VT1 curveName xmin xmax ymin ymax
f_VT2
f_VT2 curveName
Action: Computes the threshold voltage [V] of the given curve. The method used to extract
Vth is the intersection of MaxSlope and MinSlope lines in the log of the given
curve.
Input: curveName, name of curve
Returns: The threshold voltage as a scalar or f_error in the case of an error
Computing
cv_compute
cv_compute formula xmin xmax ymin ymax
cv_getZero
cv_getZero curveName xmin xmax ymin ymax
Action: Computes the x-coordinate of the point where the curve intersects the x-axis. If the
curve does not cross the x-axis, an empty string is returned.
Input: curveName, name of curve
xmin, xmax, ymin, ymax, range for which the command applies
Returns: The x-value where the curve intersects with the x-axis
macro_define
macro_define macroName macroDef
Controlling Scripts
script_break
script_break
Action: This command suspends the execution of a script and passes control to the GUI.
The script execution can be resumed by selecting Script > Continue Script (see
Table 10 on page 160).
Input: None
Returns: None
script_exit
script_exit
script_sleep
script_sleep sec
gr_formatAxis
gr_formatAxis axis format
gr_precision
gr_precision axis prec
gr_setLegend
gr_setLegend status
gr_setLegendPos
gr_setLegendPos x y
Action: Changes the position of the displayed legend in the plot area.
Input: x, new x-coordinate in the plot for the legend
y, new y-coordinate in the plot for the legend
Returns: None
Example 1
# If As_Implant is the name of an As profile previously created
# compute the dose of implanted As by integrating the profile.
# Limit the integration to portions of the curve with
# concentration larger than 1e14 but without other limitations
# in depth or maximum concentration value
#---------------------------------------------------------------
# If IdVg is the name of an Ids vs Vgs curve previously created
# compute a transconductance curve using "diff"
# Limit the computation to the window in the IdVg curve defined
# by Vmin=1.0V, Vmax=4.0V, Id_min=1e-10. Id_max=5e-6
set gm [cv_compute "vecmax(diff(<IdVg>))" 1.0 4.0 1e-10 5e-6]
Example 2
# Create a macro to compute Vt from the maximum of the
# second derivative of an IdVg curve.
# Use <c n> as placeholders for curves and <s n> for scalars.
# "n" represents the argument used in the macro and must start
# at 1. In the example:
# <c 1> should be an IdVg curve
# <s 2> is a multiplication factor
macro_define Vt2d "<s 2>*vecvalx(diff(diff(<c 1>)),
0.999*vecmax(diff(diff(<c 1>))))"
# If IdVg is the name of an Ids vs. Vgs curve previously created
# use the macro created to compute Vt in mV
set Vt2 [cv_compute "Vt2d(<IdVg>,1e3)" A A A A]
Loading Libraries
The script language of Inspect is complemented by libraries that provide additional
functionality for specific topics, such as curve comparison.
load_library
load_library libraryName
All functions of a particular library have a common prefix, for example, iccap for functions
provided by the IC-CAP model parameter extraction library (see IC-CAP Model Parameter
Extraction Library on page 106).
To add a library, the administrator (a person with write permissions to the TCAD distribution
directory $STROOT) copies the library to the directory $STROOT_LIB/inspectlib and
enters text into the index that describes the new library. The following fields must be provided:
<library_name> <library_prefix> <library_filename>
where:
<library_filename> is the name of the file where all functions are implemented.
Extraction Library
The commands provided by this library are used to extract various parameters from I–V curves.
The library is loaded with the command:
load_library EXTRACT
where Curve refers to the name of the Inspect curve. The x- and y-values of the curve are
replaced by the transformed values given by: X' = X* Xm + Xb and Y' = Y* Ym + Yb .
Axis can be set to y or y2, and it determines on which y-axis the transformed curve is
displayed.
where Curve refers to the name of the Inspect curve. The x- and y-values of the curve are
multiplied by XFactor and YFactor, respectively. Axis can be set to y or y2, and it
determines on which y-axis the scaled curve is displayed.
where Name defines the name of the extracted parameter, Curve is the name of the Inspect
curve, and Ilevel refers to the mentioned current level.
where Name defines the name of the extracted parameter, and Curve is the name of the Inspect
curve. The parameter Sign can take the values +1 (n-p-n) or –1 (p-n-p), and is used to
distinguish between the different types of bipolar transistor. (In general, set Sign to –1 if the
breakdown occurs at a negative bias.)
where Name defines the name of the extracted parameter, Curve is the name of the Inspect
curve, and Vtarget refers to the bias point at which the slope of the Ic–Vce curve is determined
for the computation of the Early voltage.
ExtractGm: Transconductance
This routine extracts the maximum transconductance from an Id–Vgs curve. The routine is
called with:
ExtractGm <Name> <Curve> [<Type>]
where Name defines the name of the extracted parameter, and Curve refers to the name of the
Inspect Id–Vgs curve.
See ExtractVtgm: Threshold Voltage on page 80 for details about the optional parameter Type.
ExtractGmb: Transconductance
This is the same as ExtractGm except that ExtractGmb uses parabolic interpolation to find
the gate bias at which the maximum transconductance occurs. See ExtractGm:
Transconductance.
For Id–Vgs curves with a limited number of gate–bias sample points, better accuracy is achieved
with ExtractGmb.
where Name defines the name of the extracted parameter, Curve refers to the name of the
Inspect Id–Vgs curve (computed for a high drain bias), and Voff defines the gate voltage at
which the drain leakage current is extracted, typically, at a small nonzero value to avoid noise.
ExtractMax: Maximum
This routine extracts the maximum of a curve. The routine is called using:
ExtractMax <Name> <Curve>
where Name defines the name of the extracted parameter, and Curve refers to the name of the
Inspect curve.
where Name defines the name of the extracted parameter, Curve refers to the name of the
Inspect Id–Vds curve (computed for a high gate bias), and Von defines the drain voltage at which
the on-state resistance is extracted, typically, well beyond saturation.
where Name defines the name of the extracted parameter, Curve refers to the name of the
Inspect Id–Vgs curve, and Vgo defines the gate voltage at which the slope is extracted. It should
be a value well below the threshold voltage.
NOTE The slope may be noisy at the beginning of the curve or at very low
current levels, so better results are often obtained when setting
Vgo > 0 V.
ExtractValue: Y-Value
This routine extracts the y-value at a given x-point. The routine is called using:
ExtractValue <Name> <Curve> <Xo>
where Name defines the name of the extracted parameter, Curve refers to the name of the
Inspect curve, and Xo defines the x-point at which the value is extracted.
Here, Cgg is the name of the Inspect total gate–capacitance versus the gate–voltage curve.
where Name defines the name of the extracted parameter as it appears in the Variable Values
column of Sentaurus Workbench, and Curve refers to the name of the Inspect Id–Vgs curve.
The MOSFET threshold and transconductance extraction routines require prior knowledge of
the type of transistor and the sign convention for the drain current. The transistor type is
declared with the optional parameter Type, which can take the values:
■ nMOS or nMOSneg (for NMOSFET transistors with a positive or negative drain current
convention).
■ pMOS or pMOSneg (for PMOSFET transistors with a positive or negative drain current
convention).
If the Type parameter is omitted, the type is determined internally by analyzing the first and
last points of the given curve.
The routine ExtractVtgm passes the extracted value to Sentaurus Workbench and prints it to
the log file. It also returns the value to Inspect.
For Id–Vgs curves with a limited number of gate–bias sample points, better accuracy is achieved
with ExtractVtgmb.
where Name defines the name of the extracted parameter, Curve refers to the name of the
Inspect Id–Vgs curve, and Ilevel defines the drain current level at which to extract the gate
voltage.
To better understand this utility, it is helpful to first consider the kind of data on which it is
designed to operate.
In an Inspect script, you can use the dynamic preprocessing feature of Sentaurus Workbench
@<parameter_name>:all@ to access a list of input parameters and extracted values for all
Sentaurus Workbench experiments. For example:
set Types [list @Type:all@]
set Lgs [list @lgate:all@]
set Vts [list @Vt:all@]
set Ids [list @Id:all@]
...
Here, the Tcl list Types contains for all experiments the values of the Sentaurus Workbench
input parameter Type, which for example may take on the values nMOS or pMOS, depending on
whether in this experiment an NMOS or a PMOS structure is created.
Similarly, the Tcl list Lgs contains for all experiments a ‘parallel’ list of values of another
Sentaurus Workbench input parameter, which for example contains the value of the gate length
of the given MOSFETs. The corresponding extracted parameter can be accessed in the same
way. For example, the Tcl lists Vts and Ids may contain the extracted values for the threshold
voltage and the drain current for each respective experiment.
NOTE The values in the various lists may or may not be numeric, and they may
not be ordered.
The FilterTable utility takes as arguments the lists of Sentaurus Workbench parameters as
explained. The first two lists identify the x- and y-values, which are to be processed for creating
a graph. The subsequent arguments control the conditions an experiment must fulfill to be
included in the graph. These conditions are defined using optional pairs of a target value and a
Sentaurus Workbench list.
The command returns two lists of values; the first list contains a subset of the XList. The
subset is restricted to the selected experiments. In addition, the values are given in ascending
order. The second list contains the corresponding values of the YList.
As an additional feature, the FilterTable utility ignores all entries of the YList that contain
a nonnumeric value. Use this feature to skip failed extractions. In the tool input file that
performs the extraction, for example a previous Inspect instance, use the #set directive to
preset the extracted variable to the value x:
#set Vt x
...
set Vt [ExtractVtgmb Vt IdVg]
The actual extraction process, here using the ExtractVtgmb utility, then overwrites the preset
value x with the actual value. However, if the extraction process fails, the preset value persists.
This script creates two separate Vt roll-off curves. One for all nMOS experiments and one for
all pMOS experiments. The values are shown in order and the data point for Type=pMOS and
Lg=0.130, for which the extraction failed (Vt=x), is omitted.
If it is necessary to customize the library, you can create a local copy of the library and edit the
scripts. In this case, the local version is loaded by sourcing the script:
source extend.tcl
The library functions are described in the following sections. The usage descriptions include
short examples. If a function is applied to a curve, the creation of the curve is not mentioned
explicitly in the example for brevity. For test purposes, curves can be created easily with the
following line:
cv_createFromScript c1 {0 1} {1 2}
cv_addCurve
cv_addCurve cname cname2
Action: Adds the y-values of the curve cname2 to the y-values of the curve cname.
Input: cname, cname2, name of curves
Returns: None
Example:
cv_createFromScript c1 {0 1} {1 2}
cv_createFromScript c2 {0 1} {3 4}
cv_addCurve c1 c2
puts "y: [cv_getValsY c1]"
> y: 4 6
cv_addDataset
cv_addDataset cname xdset ydset
cv_autoIncrStyle
cv_autoIncrStyle {stylelist {symbol color fillColor line}}
Action: Sets the curve attributes to be incremented by one whenever a curve is displayed
with cv_disp. The attributes are incremented in the order given by stylelist.
Input: stylelist, list of options; default is {symbol color fillColor line}
off, switches off the auto-increment feature
Returns: None
Example:
# first increment color, if all colors are used, increment symbol and start
# with first color again
cv_autoIncrStyle {color symbol}
cv_disp c1
cv_disp c2
cv_disp
cv_disp cname {label ""} {axis "y"}
Action: Displays a curve using the specified label and axis. The curve attributes are
incremented by default, such that each displayed curve can be easily
distinguished.
Additional control of the curve attributes is given by the following functions:
cv_autoIncrStyle, cv_nextColor, cv_nextLine, cv_nextSymbol,
cv_resetColor, cv_resetFillColor, cv_resetLine, cv_resetStyle,
cv_resetSymbol.
Input: cname, name of curve
label, optional parameter that specifies the curve label to be displayed in the
legend; default is the curve name
axis, optional parameter that specifies the axis to use (y or y2); default is y
cv_exists
cv_exists cname
cv_getGlobalExtrema
cv_getGlobalExtrema cname {type max}
Action: Returns the global maximum (or minimum) of a curve as a list {xmax ymax}.
Input: cname, name of curve
type, max returns the global maximum and min returns the global minimum;
default is max
Returns: If type equals max: {xmax ymax}
If type equals min: {xmin ymin}
Example:
cv_getLocalExtrema
cv_getLocalExtrema cname {type max}
Action: Returns all local maxima (or minima) of a curve as a list {xmax ymax}.
Input: cname, name of curve
type, max returns the local maxima and min returns the local minima; default is
max
Returns: If type equals max: {{xmax1 ymax1} {xmax2 ymax2} ...}
If type equals min: {{xmin1 ymin1} {xmin2 ymin2} ...}
Example:
cv_getNames
cv_getNames
cv_getRange
cv_getRange cname
cv_getXmax
cv_getXmax cname
cv_getXmin
cv_getXmin cname
cv_getYmax
cv_getYmax cname
cv_getYmin
cv_getYmin cname
cv_integrate
cv_integrate formula {xstart {}} {xend {}} {mode {}}
Note that when the formula contains more than one curve and these curves have
different sets of x-values, summation is performed over all the x-values.
Returns: The integration value
Example:
cv_linFit
cv_linFit formula {xstart {}} {xend {}}
cv_linTrans
cv_linTrans cname xm {xb 0} {ym 1} {yb 0}
cv_monotonicX
cv_monotonicX cname
Action: Cuts out the part of a curve where the x-values increase monotonically to the
maximal x-value.
Input: cname, name of curve
Returns: None
Example:
cv_createFromScript iv {0 1 2 0 2 4} {1 2 3 4 5 6}
cv_monotonicX iv
puts "values: [cv_getVals iv]"
-->values: {0 2 4} {4 5 6}
cv_nextColor
cv_nextColor {cindex ""}
Action: Sets the next color of the curve from the extend::COLORPALETTE list.
Input: cindex, if cindex is specified, the specified entry from the
extend::COLORPALETTE list is taken; otherwise, the next entry is chosen.
cv_autoIncrStyle off
cv_disp iv1
cv_nextColor
cv_disp iv2
cv_nextLine
cv_nextLine {cindex ""}
Action: Sets the next line style of the curve from the extend::LINEPALETTE list.
Input: cindex, if cindex is specified, the specified entry from the
extend::LINEPALETTE list is taken; otherwise, the next entry is chosen. If the
last line style is reached, the first line style is returned again.
cv_autoIncrStyle off
cv_disp iv1
cv_nextLine
cv_disp iv2
cv_nextSymbol
cv_nextSymbol {cindex ""}
Action: Sets the next symbol type of the curve from the extend::SYMBOLPALETTE list.
Input: cindex, if cindex is specified, the specified entry from the
extend::SYMBOLPALETTE list is taken; otherwise, the next entry is chosen. If
the last symbol is reached, the first symbol is returned again.
cv_autoIncrStyle off
cv_disp iv1
cv_nextSymbol
cv_disp iv2
cv_resetColor
cv_resetColor
Action: Resets the color to the default entry that equals the first entry from the
extend::COLORPALETTE list.
Input: None
Returns: None
Example:
cv_autoIncrStyle off
cv_disp iv1
cv_nextColor
cv_disp iv2
cv_resetColor
cv_nextSymbol
cv_disp iv3
cv_resetFillColor
cv_resetFillColor
cv_autoIncrStyle off
cv_disp iv1
cv_nextColor
cv_disp iv2
cv_resetColor
cv_nextSymbol
cv_disp iv3
cv_resetLine
cv_resetLine
Action: Resets the line style to the default entry that equals the first entry from the
extend::LINEPALETTE list.
Input: None
Returns: None
Example:
cv_autoIncrStyle off
cv_disp iv1
cv_nextLine
cv_disp iv2
cv_resetLine
cv_nextSymbol
cv_disp iv3
cv_resetStyle
cv_resetStyle
Action: Resets all curve style attributes such as color, fill color, symbol, and line style to
their default values.
Input: None
Returns: None
Example:
cv_autoIncrStyle off
cv_disp iv1
cv_nextSymbol
cv_nextColor
cv_disp iv2
cv_resetStyle
cv_disp iv3
cv_resetSymbol
cv_resetSymbol
Action: Resets the symbol to the default entry that equals the first entry from the
extend::SYMBOLPALETTE list.
Input: None
Returns: None
Example:
cv_autoIncrStyle off
cv_disp iv1
cv_nextSymbol
cv_disp iv2
cv_resetSymbol
cv_nextColor
cv_disp iv3
cv_scale
cv_scale cname xm ym
cv_setFillColor
cv_setFillColor {mode 1}
cv_autoIncrStyle off
cv_setSymbol 1
cv_disp iv1
cv_nextColor
cv_setFillColor 1
cv_disp iv2
cv_setSymbol
cv_setSymbol {mode 1}
cv_autoIncrStyle off
cv_disp iv1
cv_nextColor
cv_setSymbol 1
cv_disp iv2
cv_sort
cv_sort cname
Action: Sorts data points of a curve according to x-values, and removes duplicates.
Input: cname, name of curve
Returns: None
Example:
cv_createFromScript c {1 2 0 3 0} {2 3 -1 4 1}
cv_sort c
puts "[cv_getVals c]"
==> {0 1 2 3} {1 2 3 4}
dbputs
dbputs str {dbglevel 1}
Action: Used to debug output, where str is displayed in the log if the debug variable
::DEBUG is greater than or equal to the debug level.
Input: str, string to be printed to standard output
dbglevel, sets the debug level
Returns: None
Example:
dbputs "test1"
set ::DEBUG 2
dbputs "test2"
dbputs "test3" 2
dbputs "test4" 3
set ::DEBUG 0
dbputs "test5"
==> test2, test3
ds_getValue
ds_getValue proj datasetName {index end}
proj_load n5_des.plt
puts "first value [ds_getValue n5_des "anode OuterVoltage" 0]"
puts "last value [ds_getValue n5_des "anode OuterVoltage"]"
fi_readTxtFile
fi_readTxtFile fname cname {columnIdx 1}
Action: Reads in data from an ASCII file, where columns are separated by white space.
The x-values are taken from the first column; the column to be used for the y-
values can be specified. The file can contain comment lines starting with a hash
(#).
Input: fname, name of ASCII file
cname, curve name to be created
columnIdx, the column index to be used for y-values; column-counting starts
with 0; default is the second column (columnIdx = 1)
Returns: None
Example:
fi_readTxtFileHeader
fi_readTxtFileHeader fname
Action: Reads and returns the header line – a single line that is neither data nor comment.
Input: fname, name of ASCII file
Returns: List of strings
Example:
gr_axis
gr_axis axis title {xmin ""} {xmax ""} {scale lin}
gr_resetAxis
gr_resetAxis
Action: Resets all the axis attributes, in particular, switches off the y2-axis.
Input: None
Returns: None
Example:
gr_setStyle
gr_setStyle mode
gr_setStyle "presentation"
ldiff
ldiff list1 list2 {symmetric ""}
Action: Returns all items of list1 that are not in list2. If symmetric is specified, the
returned list also contains all items of list2 that are not in list1.
Input: list1, list2, lists to be compared
symmetric, specifies that the returned list will contain all items of list2 that
are not in list1
Returns: List
Example:
set l1 {1 2 3 4}
set l2 {1 2 5}
puts "[ldiff $l1 $l2]"
==> {3 4}
puts "[ldiff $l1 $l2 1]"
==> {3 4 5}
lintersect
lintersect list1 list2
Action: Returns all items that are members of both list1 and list2.
Input: list1, list2, lists to be compared
Returns: List
Example:
set l1 {1 2 3 4}
set l2 {1 2}
puts "[lintersect $l1 $l2]"
==> {1 2}
ltranspose
ltranspose list
lunion
lunion list1 list2
Action: Returns a list of unique items that are members of list1 or list2.
Input: list1, list2, lists to be compared
Returns: List
Example:
set l1 {1 2 3 4}
set l2 {1 2 5}
puts "[lunion $l1 $l2]"
==> {1 2 3 4 5}
proj_check
proj_check proj
Action: Inspects all datasets in a project, and checks whether all entries are valid.
Input: proj, project name of the loaded .plt file
Returns: List of dataset names containing invalid data (nonnumeric values)
Example:
proj_load n5_des.plt
proj_check n5_des
proj_datasetExists
proj_datasetExists proj datasetName {groupName ""}
Action: Checks whether a project contains data with the specified dataset and group
name.
Input: proj, project name of the loaded .plt file
datasetName, name of the dataset
groupName, group name of the dataset; if no group name is given and the dataset
name contains a space, the first word of datasetName is taken as the group
name
Returns: 1 (dataset exists) or 0 (dataset does not exist)
Example:
proj_load n5_des.plt
if {[proj_datasetExists n5_des "anode OuterVoltage"]} {puts "anode OuterVoltage exists"}
if {[proj_datasetExists n5_des "OuterVoltage" "anode"]} {puts "anode OuterVoltage
exists"}
if {[proj_datasetExists n5_des "NO_NODE time"]} {puts "time exists"}
proj_getGroups
proj_getGroups proj
proj_load n5_des.plt
puts "all group names: [proj_getGroups n5_des]"
proj_groupExists
proj_groupExists proj groupName
proj_load n5_des.plt
if {[proj_groupExists n5_des "anode"]} {puts "group anode exists"}
AtomicMassConstant 1.660540210e-27 kg
–1
AvogadroConstant 6.022136736e23 mol
ElectronMass 9.109389754e-31 kg
ElectronVolt 1.6021773349e-19 J
ElementaryCharge 1.6021773349e-19 C
FineStructureConstant 7.2973530833e-3 1
FreeSpaceImpedance 376.730313462 Ω
3 2
GravitationConstant 6.6725985e-11 m /kg/s
MagneticFluxQuantum 2.0678346161e-15 Wb
3
MolarVolume 22.4141019e-3 m /mol
Pi 3.141592653589793 1
PlanckConstant 6.626075540e-34 Js
ProtonMass 1.672623110e-27 kg
–1
RydbergConstant 1.097373153413e7 m
All variables are defined in the namespace ::const::. Therefore, to access a variable, use
$::const::<varName> or $const::<varName>, where <varName> must be replaced by
a particular variable name, for example:
load_library PhysicalConstants
puts "c=$const::SpeedOfLight"
The function getVarNames provides a list of all variable names, for example:
set varlist [const::getVarNames]
puts "all variables: $varlist"
==> all variables: AtomicMassConstant AvogadroConstant BohrMagneton ...
To quickly see a list of all variables, the function printVarNames prints directly the names
of all available variables:
const::printVarNames
==>
AtomicMassConstant
AvogadroConstant
BohrMagneton
...
Exporting Data
iccap_Write fileName headerInfo DATA
Action: Exports data to a file using the IC-CAP data management file data format [2].
Input: fileName, file name
headerInfo, header information
DATA, array of curve data
Returns: None
Header Information
The header information headerInfo is a list formed by three sublists:
A detailed description of the header section is presented in the literature [2]. You can use the
following examples as guides:
■ userInput: {}
In this case, there are three IC-CAP input variables. The first element is the name of the
input variable, the second element is the mode, the third and fourth elements are the names
of the positive and negative nodes for the corresponding input variable, and the fifth
element is a list that describes the sweep. The first element of the sweep information is the
type. There are five sweep types: LIN, LIST, CON, LOG, and SYNC.
The sweep information for the first input variable (vg) is a list where:
• LIST indicates that all sweep values are explicitly defined.
• 0.0...2.5 indicate all values that the particular variable can take.
The sweep information for the second input variable (vb) is a list where:
• LIN indicates that the sweep values are a set of values defined in a linear scale.
The sweep information for the third input variable (vd) is a list where:
• CON indicates that there is only one value for this variable.
In this case, there is only one output variable, which is the drain current. The first element
is the name of the output variable, the second element is the mode, and the third and fourth
elements are the names of the positive and negative nodes for the corresponding output
variable.
Array Data
The array data must contain, at least, the following information:
data(<input tuples>,<output>)
There is one array cell for each pair formed by a tuple of input variable values and an output
variable. The <input tuples> order is the inverse of the sweep order.
For example, using the example in Header Information on page 106, the array data contains the
following information:
data(<vb>,<vg>,id)
In this case, each cell stores the drain current (id) for a particular combination of substrate
voltage value (<vb>) and gate voltage value (<vg>).
For example, the tuple data(-0.1,1.0,id) stores the drain current for vb = –0.1 V and
vg = 1.0 V.
cvcmp_CompareTwoCurves
cvcmp_CompareTwoCurves curve1 curve2 windowX use_log n
Action: Computes the square difference between two curves within a given domain
(window). This difference can be computed using either a linear or logarithmic
scale.
Input: curve1, curve2, curves to be compared
windowX, window in the x-axis
use_log, true if a logarithmic scale is used
n, base name for the internal curves
Returns: The square difference between two curves
cvcmp_DeltaTwoCurves
cvcmp_DeltaTwoCurves exp_file sim_file minX maxX use_log name
Action: Writes the square difference between two curves within a given domain (window)
to the standard output. This difference can be computed using either a linear or
logarithmic scale. Both curves are read from files. This function uses the command
ft_scalar to export the computed difference to the Family Tree of Sentaurus
Workbench.
Input: exp_file, sim_file, files where the two curves are stored
minX, maxX, window in the x-axis
use_log, true if a logarithmic scale is used
name, name of the column of the Family Tree of Sentaurus Workbench where the
computed difference is stored
Returns: None
References
[1] G. Woan, The Cambridge Handbook of Physics Formulas, Cambridge: Cambridge
University Press, 2000.
[2] IC-CAP Data Management File Format Specification: Final IC-CAP 5.0 file
specification, E. Arnold and M. Peroolmal (eds.), HP-EESOP document archive,
March, 1997.
The RF Parameter Extraction dialog box is displayed (see Figure 15 on page 112).
Changes are applied only after clicking either the OK or Apply button.
General Tab
This is the first step of every plot or RF extraction. You must enter the name of the plot file to
be processed. The system automatically sets the port and bias names from the input file, but
they can be edited.
You can select to plot admittances and conductances. The system can plot using frequency or
bias as the x-axis. You can select to plot either a single frequency point (or bias point) or a
frequency range (or bias range). If you select to use a single point, only one curve is displayed
on each plot. If you select a range, a family of curves is displayed on each plot.
Figure 15 General tab of RF Parameter Extraction dialog box after selecting a plot file
Preferences Tab
On the Preferences tab, general options can be set:
■ Device Width Scaling Factor (default value is 1).
■ Characteristic Impedance (default value is 50 Ω ).
After the conversion, plotting of the real part, imaginary part, magnitude, or phase of the small-
signal parameters can be selected.
For each element, you can select to display it on either the left y-axis or right y-axis.
For the magnitude, you can select one of the following scales of the plot:
■ Linear
■ 10-based dB scale (10 log 10)
■ 20-based dB scale (20 log 20)
To export data to an IC-CAP file format, select the Export in IC-CAP Format option and
specify a file name.
Plotting RF Curves
In the lower part of the Convert Data tab, three options are available:
New When the OK or Apply button is clicked, the RF curves are created and
displayed according to the specified settings. If the plot area already contains
curves with the same names as those being created, these old curves are
deleted.
Add When the OK or Apply button is clicked, all RF curves are created and
displayed according to the specified settings. If the plot area already contains
curves with the same names as those being created, these old curves remain.
None No action is performed.
Figure 17 shows the Convert Data tab, requesting a conversion to Sentaurus Device small-
signal data to Y-parameters and a plot of the real and imaginary parts after deleting all real and
imaginary curves from the plot area.
RF Extraction Tab
On the RF Extraction tab (see Figure 18), different extractions of RF parameters can be
performed.
Figure 18 shows the RF Extraction tab requesting a plot of fmax using the unit gain method and
extrapolation method after deleting old fmax curves from the plot area.
Extracting fmax
■ Fast Method: If you know that the 20 dB/decade slope is established at a certain frequency
f20dB for all values of the control bias, a much faster extraction method can be used. For this
method, the small-signal simulation in Sentaurus Device is performed at the frequency f20dB
only. The extraction is performed by extrapolating the gain at f20dB to the unit gain point
assuming a 20 dB/decade slope.
Extracting ft
The maximum stable gain (MSG), maximum available gain (MAG), and Rollett stability factor
(K) are plotted.
In the lower part of the tab, three options are available as noted in Plotting RF Curves on
page 114.
Plot Tab
A polar plot or Smith chart of the parameter data can be generated. If a Smith chart is selected,
a new parameter conversion should be performed. A polar plot uses the conversion performed
on the Convert Data tab. On a polar plot or Smith chart, the frequency and bias values of each
point can be obtained by clicking them in the plot area.
Smith Chart
Polar Plot
Figure 19 shows the Plot tab requesting a conversion to S-parameters and a plot of a Smith
chart after deleting all old Smith charts in the plot area.
Utilities Tab
On the Utilities tab, the available option is:
■ Print Current Bias Point: If this option is selected, a list of the bias points used is written
to standard output.
The argument <ACDataFileRootName> takes the name of the small-signal output file, for
example, n3_ac_des.plt.
The argument <ACDataFileRootName> takes the root name of the small-signal output file,
for example, n3_ac_des.
The argument <DisplayOpt> can take the value nodisplay or any other string. For
nodisplay, plotting the family of conductance and capacitance curves is suppressed. If any
other string is specified, the conductances are plotted (with all backtraces) to the y-axis and the
capacitances to the y2-axis. The script assumes a two-port network–like configuration such as
in Figure 20.
Port1 Port2
Two-Port
Network
The arguments <Port1> and <Port2> take the names of the corresponding port names in the
circuit, for example, 1 and 2, or b and c. Furthermore, the script assumes that the small-signal
output data contains one or more frequency sweeps with a voltage bias as the control variable.
The frequency and bias swept can consist of only a single point.
The argument <BiasPort> takes the name of the port in the circuit to which the control bias
sweep is applied, for example, 1 or b. For example:
tpnx_load n3_ac_des nodisplay v(1) frequency 1 2
NOTE The device width must be set before any call to tpnx_ac2y,
tpnx_ac2z, tpnx_ac2h, and tpnx_ac2s.
where the argument <DisplayOpt> takes the values nodisplay, y, or y2. For nodisplay,
plotting the family of curves is suppressed. This allows you to selectively plot curves of interest
(see Global Variables to Control Plotting of Curves on page 122). For y and y2, the family of
curves in plotted (with all backtraces) to the respective axis.
The arguments <Port1> and <Port2> take the names of the corresponding ports in the circuit.
If the optional argument <ICCAPFile> is present, the Y-parameters are exported. The value
of the optional argument is taken as the file name.
First, the 2 × 2 conductance [A] and capacitance [C] matrices are converted into the Y-matrix
according to:
Y = A + jωC (3)
with D y = y 11 y 22 – y 12 y 21 .
( 1 – y 11 ) ( 1 + y 22 ) + y 12 y 21
s 11 = -----------------------------------------------------------------
Ny
– 2 y 12
s 12 = --------------
Ny
(6)
– 2 y 21
s 21 = --------------
Ny
( 1 – y 22 ) ( 1 + y 11 ) + y 12 y 21
s 22 = -----------------------------------------------------------------
Ny
If you select plotting using frequency as the x-axis, a family of curves as a function of
frequency for a range of biases is selected by setting the global variables tpnx_bias_low and
tpnx_bias_high. If these variables are set, only the curves for which the control bias is
between tpnx_bias_low and tpnx_bias_high are displayed, for example:
tpnx_bias_low 0.78
tpnx_bias_high 0.92
The default value of tpnx_bias_low is -1e99, and the default value of tpnx_bias_high
is 1e99.
A specific bias point is selected by setting the global variable tpnx_biasPointNo. If it is set
to a value N other than –1, only the frequency sweep corresponding to the N-th control bias
point is displayed, for example:
tpnx_biasPointNo 9
The actual value of the control bias can be selected by using tpnx_GetBias, for example:
set Vb [tpnx_GetBias]
puts 'Control bias = $Vb'
If you select plotting using bias as the x-axis, the functions tpnx_frequency_low,
tpnx_frequency_high, and tpnx_frequencyPointNo must be used. These functions
perform the same actions and have the same default values as those used to plot frequency.
The type of the small-signal parameter is declared with the argument <ParName>, and it takes
the value y, z, h, or s. The <Xaxis> argument take the value frequency or bias.
The arguments <Port1> and <Port2> are used to identify the small-signal parameter matrix
element of interest.
The optional argument <PostFix> is used to append a unique identifier to the names of the
created curves. The default value is 0.
Example
The type of the small-signal parameter is declared with the argument <ParName>, and it takes
the value y, z, h, or s.
The arguments <Port1> and <Port2> are used to identify the small-signal parameter matrix
element of interest. The argument <dBSelect> takes the values 0, 10, or 20. For 0, magnitude
is plotted linearly, while for 10, a 10-based dB scale (10 log10), and for 20 (default), a 20-based
dB scale (20 log10) is used.
The optional argument <PostFix> is used to append a unique identifier to the names of the
created curves. The default value is 0.
Example
The plotting of the phase can be suppressed by setting the global variable:
tpnx_plotPhase false
The curve displays the imaginary part as a function of the real part for all frequencies in the
sweep. The type of the small-signal parameter is declared with the argument <ParName>, and
it takes the value y, z, h, or s.
The arguments <Port1> and <Port2> are used to identify the small-signal parameter matrix
element of interest. The optional argument <Name> is used to name the curves. The default
value is S.
Example
tpnx_polarplot frequency s 1 1 myS
This command creates curve names such as myS(1,1)(0.925), where myS is the selected
curve name, (1,1) denotes the selected matrix element, and (0.925) gives the control bias
for this curve.
Smith Charts
A polar plot of a given parameter can be converted into a simple Smith chart by creating the
typical Smith chart background with:
tpnx_createSmithBack
This command can only be used if the data files smithchart1.plt and smithchart2.plt
are located in the working directory.
The argument <DisplayOpt> takes the value nodisplay, y, or y2. For nodisplay, the
plotting of curves is suppressed. Otherwise, MUG is plotted to the selected axis.
The arguments <Port1> and <Port2> take the names of the corresponding port names in the
circuit. The optional argument <PostFix> is used to append a unique identifier to the names
of the created curves. The default value is 0.
Example
This command creates curve names such as MUGmy(0.82), where my is the selected post-fix
and (0.82) gives the control bias for this curve.
The argument <DisplayOpt> takes the value nodisplay or any other string. For
nodisplay, the plotting of curves is suppressed. Otherwise, the MSG and MAG curves are
plotted to the y-axis, and K is plotted to the y2-axis.
The arguments <Port1> and <Port2> take the names of the corresponding port names in the
circuit. The optional argument <PostFix> is used to append a unique identifier to the names
of the created curves. The default value is 0.
Internally, MSG, MAG, and the Rollett stability factor are computed from the S-parameters
using:
1 – s 11 2 – s 22 2 + Δs 2
K = ---------------------------------------------------------- (8)
2 s 12 ⋅ s 21
Δs = s 11 ⋅ s 22 – s 12 ⋅ s 21 (9)
s 21
MSG = ------
- (10)
s 12
s 21 2
- ⋅ (K – K – 1)
MAG = ------ (11)
s 12
Example
tpnx_y2MAG y frequency 1 2 my
This command creates curve names such as MSGmy(0.82), MAGmy(0.82), and Kmy(0.82),
where my is the selected post-fix and (0.82) gives the control bias for this curve.
Related Variables
Extracting fmax
fmax is extracted and plotted as a function of the control biases with:
tpnx_y2MUG <DisplayOpt> <Xaxis> <Port1> <Port2> <PostFix> fextract
The extraction is performed by the same routine used for plotting MUG (see Mason’s
Unilateral Gain on page 126). The only difference is the additional argument fextract. fmax
is defined at the unit gain point of MUG (MUG = 1 = 0 dB).
The unit gain point is extracted using two different methods: (a) a direct search for MUG =
1 point and (b) ideally, MUG as a function of frequency is flat at low frequencies and falls off
at a 20 dB/decade slope above a certain threshold frequency. The second extraction method
relies on this.
The script first looks for the point where the gain has dropped by a certain amount (the default
is 10 dB) below the first value of the curve. Then, the script computes, from this point, the
position of the unit gain point by assuming that the 20 dB/decade slope is fully established.
The results from both extraction methods are displayed. (See Discussion of Different Cut-off
Frequency Extraction Methods on page 132 for information about the advantages and
disadvantages of the two methods.)
Example
This command creates curve names such as fmax_MUGONEmy for method (a) and
fmax_MUGXdBmy for method (b).
Related Variables
The plotting of results from method (a) is suppressed by setting:
tpnx_plotONE false
As previously mentioned, method (b) looks for the point where MUG dropped by a certain
amount. This amount is set by:
tpnx_setdBPoint <amount>
NOTE The mentioned extraction methods assume that, for each value of the
control bias, a full frequency sweep is performed. Ideally, this sweep
should start at a frequency where the gain is flat (low frequency regime)
and end beyond the unit gain point. If the frequency sweep does not go
beyond the unit gain point, method (a) returns a zero for fmax. If the
frequency sweep does not start in the flat region, method (b) still returns
a (nonzero) value. However, you must ensure that, at the selected dB
point, the 20 dB/decade slope is established.
If you know that the 20 dB/decade slope is established at a certain frequency f20db for all values
of the control bias, a much faster extraction method (method (c)) can be used. For this method,
the small-signal simulation in Sentaurus Device is performed at the frequency f20dB only.
The extraction is performed by extrapolating the gain at f20dB to the unit gain point assuming a
20 dB/decade slope. This is accomplished by setting:
tpnx_setdBPoint 0
tpnx_plotONE false
Extracting ft
ft is extracted and plotted as a function of the control biases with:
tpnx_plot_dB <DisplayOpt> h <Xaxis> <Port1> <Port2> <dBSelect> <PostFix> \
fextract <FextractDisplayOpt>
The extraction is performed by the same routine used for plotting the magnitude and phase of
a parameter (see Plotting Magnitude and Phase of Small-Signal Parameters on page 124). The
only difference is the additional argument fextract. ft is defined as the unit gain point of h21
(|h21| = 1 = 0 dB). The unit gain point is extracted using two different methods: (a) a direct
search for the |h21| = 1 point and (b) ideally, the |h21| as a function of frequency is flat at low
frequencies and falls off at a 20 dB/decade slope above a certain threshold frequency. The
second extraction method relies on this.
The script first looks for the point where the gain has dropped by a certain amount (the default
is 10 dB) below the first value of the curve. Then, the script computes the position of the unit
gain point by assuming that the 20 dB/decade slope is fully established. The results from both
extraction methods are displayed. (See Discussion of Different Cut-off Frequency Extraction
Methods on page 132 for information about the advantages and disadvantages of the two
methods.)
Example
This command creates curve names such as f_hONEmy for method (a) and f_hXdBmy for
method (b).
Related Variables
As previously mentioned, method (b) looks for the point where |h21| dropped by a certain
amount. This amount is set by:
tpnx_setdBPoint <amount>
NOTE The mentioned extraction methods assume that for each value of the
control bias, a full frequency sweep is performed. Ideally, this sweep
should start at a frequency where the gain is flat (low frequency regime)
and end beyond the unit gain point. If the frequency sweep does not go
beyond the unit gain point, method (a) returns a zero for ft. If the
frequency sweep does not start in the flat region, method (b) still returns
a (nonzero) value. However, you must ensure that, at the selected dB
point, the 20 dB/decade slope is established.
The transition between the flat low-frequency region of the gain curves to the 20 dB/decade
slope at higher frequencies can be wide. Sometimes, a clear 20 dB/decade slope is never
reached. In this case, method (b) may give wrong results. (Often, the results can be improved
by adjusting tpnx_setdBPoint.)
As a general rule, the extracted cut-off frequencies are most likely reliable if both methods (a)
and (b) give the same or similar results. If the results are very different, most likely, the form
of the gain curve prevents a meaningful automatic extraction of the cut-off frequency. In this
case, it is suggested to look at the gain curves themselves (see Plotting Magnitude and Phase
of Small-Signal Parameters on page 124 and Mason’s Unilateral Gain on page 126) and decide
what is the appropriate definition of the cut-off frequencies.
The simulation of a full frequency sweep in Sentaurus Device can be time consuming,
especially for large structures and if many equations are solved. If it is known beforehand that
at a given frequency the gain curves fall off at a 20 dB/decade slope, it is sufficient to simulate
the small-signal response at this single frequency only and to apply extraction method (c).
NOTE This method does not permit a check as to whether the assumption of a
20 dB/decade slope is justified. Further, the optimal frequency for
method (c) may depend of the control bias and may be different for
MUG and h21. Use this method with caution.
1 GHz
Not Simulated
10 dB
20
db
/de
Simulated Point
20
cad
Gain (dB)
Gain (dB)
db
e
/de
Method (a)
cad
e
0 dB Line 0 dB Line
Method (b) Method (c)
Frequency Frequency
Figure 21 Different extraction methods and circumstances under which they may return
inappropriate results
Figure 21 shows how the different methods work and under which circumstances they may
give inappropriate results:
■ Method (a) searches directly for the unit gain point and may give inappropriate results if
the gain curves deviate from the 20 dB/decade slope near the unit gain point.
■ Method (b) looks for the point where the gain dropped by 10 dB and extrapolates it to the
unit gain point assuming a 20 dB/decade slope. It may give inappropriate results if the
20 dB/decade slope is not fully established at this point. (Readjust tpnx_setdBPoint.)
■ Method (c) extrapolates a single frequency point (for example, 1 GHz) to the unit gain
point assuming a 20 dB/decade slope and may give inappropriate results if the assumption
of a 20 dB/decade slope is unjustified.
Extracting fK=1
At the frequency where the Rollett stability parameter K is 1 (the border between the stable and
potentially unstable region), fK=1 is extracted and plotted as a function of the control biases
with:
tpnx_y2MSG <DisplayOpt> <Xaxis> <Port1> <Port2> <PostFix> fextract
The extraction is performed by the same routine used for plotting maximum stable gain (MSG)
(see Maximum Stable Gain, Maximum Available Gain, and Rollett Stability Factor on
page 127). The only difference is the additional argument fextract. fK=1 is defined as first
point where K = 1. The search starts at the lowest frequency of the sweep.
Example
Various Utilities
The available utilities are:
■ List of control biases
Print a list of control biases to the shell using:
tpnx_list_Bias
■ List of frequencies
Print a list of frequencies to the shell using:
tpnx_list_fq
■ Accessing a small-signal parameter at a given control bias and frequency
The 2 × 2 matrix of any small-signal parameter at a given frequency is accessed with:
tpnx_GetParsAtPoint <ParName> <Port1> <Port2> <frequency>
The type of the small-signal parameter is declared with the argument <ParName>, and it
takes the value y, z, h, or s. The arguments <Port1> and <Port2> take the names of the
corresponding port names in the circuit. An example is:
set ZList [tpnx_GetParsAtPoint z 1 2 1e9]
set z11 [lindex $ZList 0]
set z12 [lindex $ZList 1]
set z21 [lindex $ZList 2]
set z22 [lindex $ZList 3]
set index 0
foreach curve $CURVES {
set color [lindex $COLORS $index]
incr index
cv_setCurveAttr $curve "$curve"
$color solid 1 circle 3 defcolor 1 defcolor
if { $index == $NCOLORS } {set index 0}
}
RF Extraction Library
The commands in this library are used to extract RF parameters from small-signal data. To load
the library, use the command:
load_library RFX
rfx_Export2csv
Examples
rfx_Export2csv "FileName=S_f.csv Parameter=S XAxis=bias"
rfx_Export2csv "Help=1"
rfx_GetFK1
Action: Computes the bias or frequency point at which the Rollett stability
factor (K) is one.
Input:
XScale Select "lin" or "log" to specify whether the values on the x-axis
are linearly or logarithmically distributed. Default: "log".
Scale Returned results are divided by this scaling factor. Use to convert, for
example, the frequency to GHz. Default: 1.
Occurrence "1", "2", "3", …
Selects whether the first, second, or third K=1 point is returned.
Default: "1".
Help Prints use if set to 1. Default: 0.
Returns: A list of fmax values. Plot them against rfx_BiasPoints.
Examples
set fK1 [rfx_GetFK1 "XScale=log Scale=1 Occurrence=1"]
rfx_GetFK1 "Help=1"
rfx_GetFmax
Default: "a".
Parameter The dB point for method "b" or frequency point for method "c".
Mandatory argument if method "a" or "b" is used.
XScale Select "lin" or "log" to specify whether the values on the x-axis
are linearly or logarithmically distributed. Default: "log".
Scale Returned results are divided by this scaling factor. Use to convert, for
example, the cut-off frequency to GHz. Default: 1.
Help Prints use if set to 1. Default: 0.
Returns: A list of fmax values. Plot them against rfx_BiasPoints.
Examples
set fmax0dB [rfx_GetFmax "Method=a"]
set fmax10dB [rfx_GetFmax "Method=extract-at-dBPoint Parameter=10 Scale=1e9"]
set fmaxFq [rfx_GetFmax "Method=extract-at-frequency Parameter=1e10 \
Scale=1e9"]
rfx_GetFmax "Help=1"
rfx_GetFt
Default: "a".
Parameter The dB point for method "b" or frequency point for method "c".
Mandatory argument if method "a" or "b" is used.
XScale Select "lin" or "log" to specify whether the values on the x-axis
are linearly or logarithmically distributed. Default: "log".
Scale Returned results are divided by this scaling factor. Use to convert, for
example, the cut-off frequency to GHz. Default: 1.
Help Prints use if set to 1. Default: 0.
Returns: A list of ft values. Plot them against rfx_BiasPoints.
Examples
set ft0dB [rfx_GetFt "Method=a"]
set ft10dB [rfx_GetFt "Method=extract-at-dBPoint Parameter=10 Scale=1e9"]
set ftFq [rfx_GetFt "Method=extract-at-frequency Parameter=1e10 Scale=1e9"]
rfx_GetFt "Help=1"
rfx_GetK_MSG_MAG
Action: Accesses Rollett stability factor (K), the maximum stable gain
(MSG), and the maximum available gain (MAG) as a function of
frequency or bias.
Input:
Examples
set K_MSG_MAG [rfx_GetK_MSG_MAG BiasOrFqIndex=7]
set K_MSG_MAG [rfx_GetK_MSG_MAG "XAxis=bias BiasOrFqIndex=6"]
set KList [lindex $K_MSG_MAG 0]
set MSGList [lindex $K_MSG_MAG 1]
set MAGList [lindex $K_MSG_MAG 2]
rfx_GetK_MSG_MAG "Help=1"
rfx_GetMUG
Examples
set MUG [rfx_GetMUG BiasOrFqIndex=9]
set MUG [rfx_GetMUG "XAxis=bias BiasOrFqIndex=13"]
rfx_GetMUG "Help=1"
rfx_GetNearestIndex
Examples
set BiasPointIndex [rfx_GetNearestIndex Target=-0.5 $rfx_BiasPoints]
set FrequencyIndex [rfx_GetNearestIndex Target=1e10 $rfx_Frequencies]
rfx_GetNearestIndex Help=1 {0}
rfx_load
Action: Loads the Sentaurus Device AC data file and creates the Y-matrix for
later use.
Input:
Examples
rfx_load "ACFileName=n38_ac_des.plt"
rfx_load "Help=1"
rfx_RFCList
Action: Accesses a slice of the Y-, H-, Z-, or S-matrices, typically to generate
a curve. A slice is a row or column of the respective matrix.
Input:
ParP1P2 Parameter identifier. Use, for example, the notation h21 for the
H-matrix component 2, 1. Mandatory argument.
XAxis Select "frequency" or "bias" and x-axis. Default: "frequency".
BiasOrFqIndex Selects the index of the slice. Mandatory argument.
Help Prints use if set to 1. Default: 0.
Returns: The complex RF parameter as a function of the selected x-axis. The
returned data is in the form of two lists. The first element of the list
contains the list of the real parts of the RF parameter. The second
element contains the list of the imaginary parts of the RF parameter.
Examples
set ReIm [rfx_GetRFCList "ParP1P2=h21 BiasOrFqIndex=10"]
set ReIm [rfx_GetRFCList "ParP1P2=s11 XAxis=bias BiasOrFqIndex=8"]
set RealPart [lindex $ReIm 0]
set ImagPart [lindex $ReIm 1]
rfx_GetRFCList "Help=1"
rfx_S2K
The input must be given in the form of four lists, each containing the
real and imaginary parts of a component of the S-matrix.
Returns: K, MSG, and MAG at this frequency and bias point in the form of a
list containing three values for K, MSG, and MAG.
rfx_Y2H
Action: Converts Y-parameters to H-parameters.
Input: The complex Y-matrix for a fixed frequency and bias point.
The input must be given in the form of four lists, each containing the
real and imaginary parts of a component of the Y-matrix.
Returns: The complex H-matrix in the form of four lists. Each list contains the
real and imaginary parts of a component of the H-matrix.
rfx_Y2K
The input must be given in the form of four lists, each containing the
real and imaginary parts of a component of the Y-matrix.
rfx_Y2S
The input must be given in the form of four lists, each containing the
real and imaginary parts of a component of the Y-matrix.
Uses the rfx_CharacteristicImpedance global variable, which
is set to 50 Ω by default. To alter this variable, for example, set:
rfx_CharacteristicImpedance 100
rfx_Y2U
The input must be given in the form of four lists, each containing the
real and imaginary parts of a component of the Y-matrix.
rfx_Y2Z
The input must be given in the form of four lists, each containing the
real and imaginary parts of a component of the Y-matrix.
Returns: The complex Z-matrix in the form of four lists. Each list contains the
real and imaginary parts of a component of the Z-matrix.
rfx_Z2U
The input must be given in the form of four lists, each containing the
real and imaginary parts of a component of the Z-matrix.
Returns: MUG at this frequency and bias point.
rfx_abs_c
set c1 [list 0 2]
puts [rfx_abs_c $c1]
-> 2.0
rfx_abs2_c
set c1 [list 0 2]
puts [rfx_abs2_c $c1]
-> 4.0
rfx_add_c
set c1 [list 1 0]
set c2 [list 0 1]
puts [rfx_add_c $c1 $c2]
-> 1 1
rfx_con_c
set c1 [list 1 1]
puts [rfx_con_c $c1]
-> 1 -1
rfx_div_c
set c1 [list 4 0]
set c2 [list 0 2]
puts [rfx_div_c $c1 $c2]
-> 0 -2.0
rfx_im_c
set c1 [list 1 2]
puts [rfx_im_c $c1]
-> 2
rfx_mag_phase
set c1 [list 1 1]
puts [rfx_mag_phase $c1]
-> 1.414213562373095 45.0
rfx_mul_c
set c1 [list 1 0]
set c2 [list 0 1]
puts [rfx_mul_c $c1 $c2]
-> 0 1
rfx_re_c
set c1 [list 1 2]
puts [rfx_re_c $c1]
-> 1
rfx_sign
rfx_sub_c
set c1 [list 1 0]
set c2 [list 0 1]
puts [rfx_sub_c $c1 $c2]
-> 1 -1
rfx_ExtractVal
Action: Returns x-values of the n -th point at which the given y-value crosses
the target value.
Input:
NOTE The data lists XList and YList must be the last arguments in
the routine.
Returns: The requested x-values or 0 if no target crossing is found.
Examples:
set XList [list 1e2 1e3 1e4 1e5 1e6 1e7 1e8 1e9 1e10 1e11 1e12]
set YList [list -100 -25 25 50 100 100 75 50 25 -25 -100]
set Flog [rfx_ExtractVal "Target=0 XScale=log" $XList $YList]
puts "Flog=[format %.2e $Flog]"
-> Flog=3.16e+03
set Flin [rfx_ExtractVal "Target=0 XScale=lin" $XList $YList]
puts "Flin=[format %.2e $Flin]"
-> Flin=5.50e+03
set F2nd [rfx_ExtractVal "Target=0 Occurrence=2" $XList $YList]
puts "F2nd=[format %.2e $F2nd]"
-> F2nd=3.16e+10
rfx_ExtractVal "Help=1" {0} {0}
rfx_ReIm2Abs
Action: Creates a list of absolute values for a ‘complex’ list. If the optional
last argument is set to 10 or 20, the values are set to decibel, using
10*log10(abs) or 20*log10(abs), respectively.
Input: Two lists. The first contains the real values, and the second contains
the imaginary values.
Returns: A list of corresponding phases.
Examples:
rfx_ReIm2Phase
rfx_PolarBackdrop
rfx_SmithBackdrop
Y-Matrix
The Sentaurus Device small-signal output file contains the admittance (A) and capacitance (C)
matrices. The rows and columns of the matrices are given by the nodes included in the small-
signal analysis.
The A- and C-matrices are converted to the Y-matrix using the formula:
Y = A + jωC (12)
Z-Matrix
with D y = y 11 y 22 – y 12 y 21 .
H-Matrix
with D y = y 11 y 22 – y 12 y 21 .
S-Matrix
( 1 – y 11 ) ( 1 + y 22 ) + y 12 y 21
s 11 = -----------------------------------------------------------------
Ny
– 2 y 12
s 12 = --------------
Ny
(15)
– 2 y 21
s 21 = --------------
Ny
( 1 – y 22 ) ( 1 + y 11 ) + y 12 y 21
s 22 = -----------------------------------------------------------------
Ny
Mason’s unilateral gain (MUG) is computed from the Z-parameters using the formula [2]:
2
z 21 – z 12
MUG = --------------------------------------------------------------------------------------- (16)
4 [ ℜ(z 11) ⋅ ℜ(z 22) – ℜ(z 12) ⋅ ℜ(z 21) ]
The Rollett stability factor (K) is computed from the S-parameters using the formula [2][3]:
1 – s 11 2 – s 22 2 + Δs 2
K = ---------------------------------------------------------- (17)
2 s 12 ⋅ s 21
where Δs = s 11 ⋅ s 22 – s 12 ⋅ s 21 .
The maximum stable gain (MSG) is computed from the S-parameters using the formula [3]:
s 21
MSG = ------
- (18)
s 12
The maximum available gain (MAG) is computed using the formula [3]:
2
MAG = MSG ⋅ ( K – K – 1 ) (19)
References
[1] R. S. Carson, High-Frequency Amplifiers, New York: John Wiley & Sons, 2nd ed.,
1982.
[2] W. Liu, Handbook of III-V Heterojunction Bipolar Transistors, New York: John Wiley
& Sons, 1998.
[3] S. M. Sze, Physics of Semiconductor Devices, New York: John Wiley & Sons, 2nd ed.,
1981.
This appendix lists the toolbar buttons and menus available from the
graphical user interface of Inspect as well as the commands related
to each menu.
Toolbar Buttons
The toolbar offers quick access to commonly used options that are also available from the
different menus. Table 6 lists the toolbar buttons.
Prints current plot Moves selected curve to the front of all curves
Applies recent plotting actions made on the Moves selected curve forward
previous dataset to the current dataset
Removes all curves, and cleans up plot area Moves selected curve backward
Displays the complete plot area Enables or disables logarithmic scale on x-axis
Centers the current zoom region Enables or disables logarithmic scale on left
y-axis
File Menu
Table 7 lists the commands of the File menu.
Update Datasets Ctrl+U Reloads datasets from opened files and updates related
curves.
Delete Datasets Deletes selected projects and the curves that use data
from them.
Write Bitmap Ctrl+W Creates a bitmap file of plot area image in PNG format.
Edit Menu
Table 8 lists the commands of the Edit menu.
Redo Last Plot Ctrl+E Applies the last plotting actions to selected datasets.
Plot Area Ctrl+G Opens the Plot Area dialog box to change attributes of plot area.
Axes Ctrl+A Opens the Axes dialog box to change attributes of axes.
Labels Displays a submenu of options to add, edit, and remove labels from
the plot area.
XGRAPH Mode When this option is selected, Inspect runs in XGRAPH mode. To
switch between XGRAPH mode and plot mode, select this
command again.
Curve Menu
Table 9 lists the commands of the Curve menu.
Curve Data Ctrl+D Opens a dialog box that shows the points of the dataset
corresponding to the selected curve.
DeltaX (X) Creates a deltaX curve for each selected curve. The deltaX curve is
obtained by taking the x-dataset of the original curve as the x-dataset
of the new curve and computing the y-dataset at every point by
subtracting the x-value at the current point from the x-value at the
next point.
Intersect X ? Opens a dialog box displaying the x-coordinate at which the selected
curve crosses the x-axis. If more than one curve is selected, no action
is taken.
Script Menu
Table 10 lists the commands of the Script menu.
Run Script Ctrl+R Opens a dialog box to select the script file to be run. The default
filter for the script file is *.cmd.
Continue Script Ctrl+C When a break command is encountered in a script, the execution is
suspended and user input is possible. This option reactivates the
execution of the script.
Abort Script Ctrl+N When script execution is suspended by a break command, this
command skips the remaining part of the script.
Extensions Menu
Table 11 lists the command of the Extensions menu.
Help Menu
Table 12 lists the command of the Help menu.
This appendix lists the restrictions that affect working with Inspect.
and the curve defined by diff(<c1>) has an exponential behavior. In this case, to obtain more
precise results, create a curve <c2>, which will be equal to log(diff(<c1>)), and then
compute the desired value:
vecvalx(<c2>, log(1e-7))