Inspect Ug

Download as pdf or txt
Download as pdf or txt
You are on page 1of 180

Inspect User Guide

Version H-2013.03, March 2013


Copyright and Proprietary Information Notice
Copyright © 2013 Synopsys, Inc. All rights reserved. This software and documentation contain confidential and proprietary
information that is the property of Synopsys, Inc. The software and documentation are furnished under a license agreement and
may be used or copied only in accordance with the terms of the license agreement. No part of the software and documentation may
be reproduced, transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without
prior written permission of Synopsys, Inc., or as expressly provided by the license agreement.
Destination Control Statement
All technical data contained in this publication is subject to the export control laws of the United States of America.
Disclosure to nationals of other countries contrary to United States law is prohibited. It is the reader’s responsibility to
determine the applicable regulations and to comply with them.
Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Trademarks
Synopsys and certain Synopsys product names are trademarks of Synopsys, as set forth at
http://www.synopsys.com/Company/Pages/Trademarks.aspx.
All other product or company names may be trademarks of their respective owners.

Synopsys, Inc.
700 E. Middlefield Road
Mountain View, CA 94043
www.synopsys.com

ii Inspect User Guide


H-2013.03
Contents
About This Guide xiii
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Accessing SolvNet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Contacting Synopsys Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Contacting Your Local TCAD Support Team Directly. . . . . . . . . . . . . . . . . . . . . . . . xv

Chapter 1 Introducing Inspect 1


Functionality of Inspect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Graphical User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Datasets Group Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Curves Group Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Plot Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Data Files and Supported Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Parameter Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Save Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Chapter 2 Starting Inspect 7


From the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Command-Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Chapter 3 Basic Operations Using Graphical User Interface 9


Loading Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Reloading Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Automatically Updating Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Repeating Plotting Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Zoom Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Working with Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Inspect User Guide iii


H-2013.03
Contents

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

Chapter 4 Working with Curves 17


Selecting Multiple Projects and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Creating Curves. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Automatically Generated Curve Names and Legend Text . . . . . . . . . . . . . . . . . . . . . . . . 18
Selecting and Unselecting Curves. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Curve Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Changing Curve Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Moving the Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Changing Order of Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Creating Curves in Plot Mode and XGRAPH Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Creating Curves Using Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Creating Curves Using Macros and Library Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Deleting Curves. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Chapter 5 Configuring the View 25


Scaling an Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Logarithmic Axis Scale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Axis Limits in Logarithmic Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Changing Attributes of Plot Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Changing Attributes of Axes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Adding Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Displaying Curve Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Cleaning Plot Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Sampling Points in Plot Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Chapter 6 Curve Interpolation and Operations 31


Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Limitation of x-Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
More Than One Curve in a Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Handling Datasets in Formula Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Dataset Created for Result Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

iv Inspect User Guide


H-2013.03
Contents

Curve Handling on Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34


Determining Scale (Linear or Logarithmic) of Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Chapter 7 Formulas and Macros 37


Formula Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Formula Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Chapter 8 Using Script Language 43


Script Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
General-purpose Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
ft_scalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Reading and Writing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
cv_write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
fi_writeBitmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
fi_writeEps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
fi_writePs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
graph_load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
graph_write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
param_load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
param_write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
proj_getDataSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
proj_getList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
proj_getNodeList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
proj_load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
proj_unload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
proj_write. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Creating, Displaying, and Deleting Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
cv_create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
cv_createDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
cv_createFromScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
cv_createWithFormula. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
cv_delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
cv_display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
cv_logScale, cv_log10Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
cv_split. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
cv_split_disc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Changing Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Inspect User Guide v


H-2013.03
Contents

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

vi Inspect User Guide


H-2013.03
Contents

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

Chapter 9 Working with Script Libraries 73


Loading Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
load_library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Adding a Site Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Extraction Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
cv_linTransCurve: Linear Transformations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
cv_scaleCurve: Curve Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
ExtractBVi: Breakdown Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
ExtractBVv: Breakdown Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
ExtractEarlyV: Early Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
ExtractGm: Transconductance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
ExtractGmb: Transconductance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
ExtractIoff: Drain Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
ExtractMax: Maximum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
ExtractRon: On-State Resistance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
ExtractSS: Subthreshold Swing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
ExtractValue: Y-Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
ExtractVtgm: Threshold Voltage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
ExtractVtgmb: Threshold Voltage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
ExtractVti: Threshold Voltage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
FilterTable: Filtering the Sentaurus Workbench Family Table . . . . . . . . . . . . . . . . . . 81
The extend Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
cv_addCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
cv_addDataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
cv_autoIncrStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
cv_disp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Inspect User Guide vii


H-2013.03
Contents

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

viii Inspect User Guide


H-2013.03
Contents

IC-CAP Model Parameter Extraction Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106


Exporting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Header Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Array Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Curve Comparison Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
cvcmp_CompareTwoCurves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
cvcmp_DeltaTwoCurves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Chapter 10 Two-Port Network RF Extraction 111


RF Parameter Extraction and Starting the Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
RF Parameter Extraction Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
General Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Preferences Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Convert Data Tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Plotting RF Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
RF Extraction Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Extracting fmax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Extracting ft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Plotting Mason’s Unilateral Gain (MUG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Plotting Maximum Stable Gain, Maximum Available Gain, and Rollett Stability
Factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Plot Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Smith Chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Polar Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Utilities Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Using Scripts for RF Parameter Extraction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Loading Small-Signal Output File of Sentaurus Device . . . . . . . . . . . . . . . . . . . . . . 119
Making Small-Signal Output Data Accessible to Extraction Script . . . . . . . . . . . . . 119
Global Scaling of Small-Signal Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Global Setting of Characteristic Impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Converting Sentaurus Device Small-Signal Data to Y-, Z-, H-, and S-Parameters . 120
Global Variables to Control Plotting of Curves. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Plotting Real and Imaginary Parts of Small-Signal Parameters . . . . . . . . . . . . . . . . 123
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Plotting Magnitude and Phase of Small-Signal Parameters . . . . . . . . . . . . . . . . . . . 124
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Polar Plots of Small-Signal Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Smith Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Mason’s Unilateral Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

Inspect User Guide ix


H-2013.03
Contents

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

x Inspect User Guide


H-2013.03
Contents

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

Appendix A Graphical User Interface 157


Toolbar Buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Curve Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Script Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Extensions Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Help Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Appendix B Restrictions in Inspect 163


The diff(…formula…) and integr(…formula…) Operators . . . . . . . . . . . . . . . . . . . . . . 163
The vecvalx(…formula…) and vecvaly(…formula…) Operators . . . . . . . . . . . . . . . . . 163
No Support for Right Y-Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

Inspect User Guide xi


H-2013.03
Contents

xii Inspect User Guide


H-2013.03
About This Guide
Inspect is a curve display and analysis program. It works with curves specified at discrete
points. Inspect enables users to work interactively with data using both a graphical user
interface and a script language.

The main chapters are:


■ Chapter 1 introduces the tool Inspect and its graphical user interface.
■ Chapter 2 describes how to start Inspect.
■ Chapter 3 provides information about basic operations using the graphical user interface.
■ Chapter 4 describes how to work with curves.
■ Chapter 5 provides information about configuring the view.
■ Chapter 6 discusses curve interpolation and operations.
■ Chapter 7 provides information about using formulas and macros in Inspect.
■ Chapter 8 discusses the script language used in Inspect.
■ Chapter 9 presents the libraries that can be used with Inspect.
■ Chapter 10 describes how to use the two-port network RF extraction functionality.

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.

Inspect User Guide xiii


H-2013.03
About This Guide
Typographic Conventions

Typographic Conventions
Convention Explanation

<> Angle brackets

{} Braces

Blue text Identifies a cross-reference (only on the screen).

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).

NOTE Identifies important information.

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.

xiv Inspect User Guide


H-2013.03
About This Guide
Customer Support

Contacting Synopsys Support


If you have problems, questions, or suggestions, you can contact Synopsys support in the
following ways:
■ Go to the Synopsys Global Support Centers site on www.synopsys.com. There you can find
e-mail addresses and telephone numbers for Synopsys support centers throughout the
world.
■ Go to either the Synopsys SolvNet site or the Synopsys Global Support Centers site and
open a case online (Synopsys user name and password required).

Contacting Your Local TCAD Support Team Directly


Send an e-mail message to:
■ support-tcad-us@synopsys.com from within North America and South America.
■ support-tcad-eu@synopsys.com from within Europe.
■ support-tcad-ap@synopsys.com from within Asia Pacific (China, Taiwan, Singapore,
Malaysia, India, Australia).
■ support-tcad-kr@synopsys.com from Korea.
■ support-tcad-jp@synopsys.com from Japan.

Inspect User Guide xv


H-2013.03
About This Guide
Customer Support

xvi Inspect User Guide


H-2013.03
CHAPTER 1 Introducing Inspect

This chapter introduces Inspect and its graphical user interface.

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.

An Inspect curve is a sequence of points defined by an array of x-coordinates and y-


coordinates. An array of coordinates that can be mapped to one of the axes is referred to as a
dataset. With Inspect, datasets can be combined and mapped to the x-axis and y-axis to create
and display a curve.

Inspect works on data consisting of clusters of named one-dimensional arrays of floating-point


data, which are called datasets. Each cluster consists of two or more datasets of equal length,
where elements with an identical index represent related values. Datasets inside a cluster can
be divided into named groups. By pairing related values of two datasets from the same cluster,
points (or nodes) of a discrete curve are obtained.

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.

Inspect User Guide 1


H-2013.03
1: Introducing Inspect
Graphical User Interface

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.

Graphical User Interface


The graphical user interface (GUI) of Inspect has three main work areas (see Figure 1):
■ Datasets group box
■ Curves group box
■ Plot area

Menu Bar
Toolbar

Datasets
Group Box

Curves
Group Box

Plot Area

Status
Line

Figure 1 Main window of Inspect showing work areas

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.

2 Inspect User Guide


H-2013.03
1: Introducing Inspect
Graphical User Interface

Datasets Group Box


The Datasets group box has three panes for selecting and combining datasets for creating
curves. Three buttons (To X-Axis, To Left Y-Axis, and To Right Y-Axis) are used to map
datasets to a particular axis.

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.

Curves Group Box


The Curves group box has a pane that displays the names of existing curves. It has the
following buttons:
■ Click New to create a curve using the formula library (see Creating Curves Using Formulas
on page 22).
■ Click Edit to change the graphical attributes of a curve (see Changing Curve Attributes on
page 20).
■ Click Delete to remove curves that are selected in the pane.
■ Click Delete All to remove all curves in the 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.

Inspect User Guide 3


H-2013.03
1: Introducing Inspect
File Types

File Types

Data Files and Supported Data Formats


Inspect works with different file formats, which contain a series of points, described by
x-coordinates and y-coordinates, which represent datasets. Inspect handles and displays these
datasets as curves. Table 1 lists the input data formats that are supported in Inspect.

Table 1 Supported data formats


Data format Description

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

4 Inspect User Guide


H-2013.03
1: Introducing Inspect
File Types

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.

Inspect User Guide 5


H-2013.03
1: Introducing Inspect
File Types

6 Inspect User Guide


H-2013.03
CHAPTER 2 Starting Inspect

This chapter provides information about starting Inspect.

From the Command Line


Inspect can be started from Sentaurus Workbench or from the command line by typing:
inspect

Optionally, inspect can be followed by command-line options and curve files.

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

Inspect User Guide 7


H-2013.03
2: Starting Inspect
From the Command Line

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.

8 Inspect User Guide


H-2013.03
CHAPTER 3 Basic Operations Using Graphical
User Interface

This chapter describes basic operations in Inspect using its


graphical user interface.

Loading Data Files


To open a dataset, it is necessary to load a data file:
1. File > Load Dataset or Ctrl+L.
The Load Dataset dialog box is displayed.
2. Select the data file required by changing the Files of type filter if needed.
3. Double-click a file to open it.

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.

Automatically Updating Datasets


If the dataset displayed in the plot area is updated frequently by others tools, such as Optimizer,
it may be useful to reload the dataset frequently so that refreshed data is shown in the plot area.

To update datasets automatically:


1. File > Automatically Update Datasets.
The Automatic Update dialog box (see Figure 2 on page 10) is displayed.
2. Select the Enable option.

Inspect User Guide 9


H-2013.03
3: Basic Operations Using Graphical User Interface
Repeating Plotting Actions

3. Set the time (in seconds) between reloads.


4. Click OK.

Figure 2 Automatic Update dialog box

Repeating Plotting Actions


When working with multiple datasets of a similar structure, it is useful to apply several plotting
actions made on one dataset to other datasets. These plotting actions include creating curves
(explicitly and by formula), as well as changing curve attributes. Inspect stores the set of
actions made on the current dataset.

To repeat plotting actions for another dataset:


1. Select the dataset or multiple datasets.
2. Edit > Redo Last Plot or Ctrl+E.

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).

10 Inspect User Guide


H-2013.03
3: Basic Operations Using Graphical User Interface
Working with Scripts

Working with Scripts


In Inspect, any sequence of operations can be stored and reproduced using scripts. The
recorded actions are repeated when the file is executed. The operations that can be recorded in
a script are:
■ Loading and unloading projects
■ Loading and saving the current project
■ Changing axis attributes
■ Exporting curves, and creating and deleting curves
■ Changing curve attributes
■ Transforming actions on curves
■ Any use of the formula library to create other curves

For more information about scripts, see Chapter 8 on page 43.

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.

Inspect User Guide 11


H-2013.03
3: Basic Operations Using Graphical User Interface
Preferences

Preferences
In Inspect, preferences relate to the precision of values handled for curve coordinates and the
interpolation method used to operate and display curves.

To open the Preferences dialog box (see Figure 3):


■ File > Preferences.

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.

Figure 3 Preferences dialog box

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.

Exporting Curve Data


Curve data can be written to data files in different formats (see Data Files and Supported Data
Formats on page 4).

To export a curve in the TDR format:


■ File > Export > TDR.

12 Inspect User Guide


H-2013.03
3: Basic Operations Using Graphical User Interface
Printing Curves in Plot Area

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.

Printing Curves in Plot Area


Curves displayed in the plot area can be printed as a single image.

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.

Figure 4 Printer Setup dialog box

Inspect User Guide 13


H-2013.03
3: Basic Operations Using Graphical User Interface
Exporting Curves to Bitmap File

Exporting Curves to Bitmap File


Curves displayed in the plot area can be saved as a bitmap file in the PNG format. This bitmap
image can be imported easily into office applications for documentation and reporting
purposes.

To save the plot area as a bitmap file:


1. File > Write Bitmap or Ctrl+W.
A dialog box is displayed where the name of the target .png file can be defined.
2. Select the file name.
3. Click OK.

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

# Select a display. Should check for an unused display.


# If the display is already used, Xvfb will create an error.
DISPLAY=:5
export DISPLAY

# Create virtual screen. This is platform dependent part.


# Linux
if [ $arch/$os = "ia32/linux_gnu" -o $arch/$os = "amd64/linux" ]
then
Xvfb -screen 0 1600x1200x24 $DISPLAY &
pid1=$!
fi

14 Inspect User Guide


H-2013.03
3: Basic Operations Using Graphical User Interface
Exporting Curves to Bitmap File

# 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

# Call Inspect in GUI mode with the script file.


# The inspect.cmd should contain the call to fi_writeBitmap command
# to save the plot area into PNG bitmap
inspect -f inspect.cmd

# kill virtual screen


kill $pid1

NOTE There is no guarantee that this script will work on any platform. For
some architectures, necessary modifications must be performed.

Inspect User Guide 15


H-2013.03
3: Basic Operations Using Graphical User Interface
Exporting Curves to Bitmap File

16 Inspect User Guide


H-2013.03
CHAPTER 4 Working with Curves

This chapter describes how to create and work with curves using the
graphical user interface of Inspect.

Selecting Multiple Projects and Groups


Inspect displays curves that are formed by datasets from different data files.

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.

NOTE The names of datasets must be identical. Datasets, themselves, can be


different.

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.

Inspect User Guide 17


H-2013.03
4: Working with Curves
Automatically Generated Curve Names and Legend Text

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.

Automatically Generated Curve Names and Legend Text


When a curve is created, a default name for it is generated. With plot files (TDR or TIF files),
the name is a combination of the physical quantity name and the group name of the y-dataset
if the dataset belongs to a group.

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.

Selecting and Unselecting Curves


To select a curve:
■ Click the curve name in the Curves group box.

Alternatively, click the curve legend in the legend text.

18 Inspect User Guide


H-2013.03
4: Working with Curves
Curve Attributes

After selection, the curve is highlighted in the Curves group box, plot area, and legend text.

To unselect curves, right-click in the plot area.

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).

Figure 5 Curve Attributes dialog box displaying all tabs

Inspect User Guide 19


H-2013.03
4: Working with Curves
Changing Curve Attributes

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:

Shape No node markers by default.


Size Size in pixels, 5 by default.
Outline Color It is equal to the line color by default.
Outline Width Width in pixels, 1 by default.
Fill Color It is equal to the line color by default.

Changing Curve Attributes


To change the attributes of a curve:
■ Double-click a curve either in the plot area or Curves group box.

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.

20 Inspect User Guide


H-2013.03
4: Working with Curves
Moving the Legend

Moving the Legend


To move the legend in the plot area:
■ Use the middle mouse button and drag the legend to its new location.

Changing Order of Curves


You may need to rearrange the order in which curves are displayed in the plot area to
distinguish one curve from another, for example, if some have a significant intersection.

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

Creating Curves in Plot Mode and XGRAPH Mode


By default, Inspect runs in plot mode. When a TDR or TIF file is loaded, curves are not created
immediately because a curve may be formed from any pair of datasets belonging to different
groups and only a few of these are likely to interest the user. Curves must be created explicitly
when required by mapping pairs of datasets to x-axes and y-axes.

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.

Inspect User Guide 21


H-2013.03
4: Working with Curves
Creating Curves Using Formulas

Creating Curves Using Formulas


New curves can be created by applying mathematical formulas to existing curves. The Create
Curve dialog box (see Figure 6) is used for this purpose.

To open the Create Curve dialog box:


■ Click the New button in the Curves group box.

Figure 6 Create Curve dialog box

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.

To create a curve that is the difference between two other curves:


1. Click the New button in the Curves group box.
The Create Curve dialog box is displayed.
2. Click a curve in the Curves pane.
The curve name appears in the Formula field enclosed by angle brackets.
3. Type a hyphen after the closing angle bracket in the Formula field.

22 Inspect User Guide


H-2013.03
4: Working with Curves
Creating Curves Using Macros and Library Formulas

4. Double-click a different curve in the Curves pane.


The name of the second curve appears in the Formula field.
5. Select the axis to which the new curve is mapped.
6. Click Apply.
7. Click OK.

The new curve is displayed in the plot area.

For more information about using formulas, see Chapter 7 on page 37.

Creating Curves Using Macros and Library Formulas


To create and handle new curves, various macros and library formulas are included in Inspect.
Macros can be created using the Macro Editor, which allows you to select existing macro
functions, different operations, and formulas from the libraries (see Figure 7).

Figure 7 Macro Editor

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.

To open the Macro Editor:


■ Edit > Define Macros.

For more information about using macros, see Chapter 7 on page 37.

Inspect User Guide 23


H-2013.03
4: Working with Curves
Deleting Curves

Deleting Curves
You can delete either selected curves or all curves shown in the Curves group area.

To delete selected curves:


1. Select the curves in the Curves group box.
2. Click Delete.
3. Confirm deletion of selected curves.

To delete all curves:


1. Click Delete All.
2. Confirm deletion of all curves.

24 Inspect User Guide


H-2013.03
CHAPTER 5 Configuring the View

This chapter describes how to modify the way in which Inspect


displays loaded datasets by changing the scale in which curves are
plotted, or by zooming in on a specific part of a curve, or by
changing the plot area or attributes of the axes.

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.

Logarithmic Axis Scale


If the axis scale is set to logarithmic, Inspect handles data in the following way:
■ Negative values are set to positive.
■ Zero values are set to 1e-20.

When the axis scale is switched to linear, data is restored to its original values.

Axis Limits in Logarithmic Scale


In linear scale, you can set the minimum and maximum values of each axis. In logarithmic
mode, Inspect may be unable to set the axis to the given values. In this case, Inspect sets the
minimum and maximum values of the axis to the nearest power of 10 values.

Inspect User Guide 25


H-2013.03
5: Configuring the View
Changing Attributes of Plot Area

Changing Attributes of Plot Area


The appearance of the plot area can be modified using the Plot Area dialog box (see Figure 8).
This allows you to change such attributes as the name of the plot area, the legend text that
references the displayed curves, the plotting frame, and the grid.

To open the Plot Area dialog box:


■ Edit > Plot Area or Ctrl+G.

Figure 8 Plot Area dialog box displaying all tabs

26 Inspect User Guide


H-2013.03
5: Configuring the View
Changing Attributes of Axes

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.

Changing Attributes of Axes


The appearance of the axes can be modified using the Axes dialog box (see Figure 9).

Figure 9 Axes dialog box

Inspect User Guide 27


H-2013.03
5: Configuring the View
Adding Labels

To open the Axes dialog box:


■ Edit > Axes, or Ctrl+A, or double-click any axis in the plot area.

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.

Figure 10 Labels dialog box

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.

28 Inspect User Guide


H-2013.03
5: Configuring the View
Displaying Curve Data

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.

Displaying Curve Data


Every curve displayed in the plot area has an associated dataset. To view the points included in
the dataset of a specific curve:
1. Select a curve from the Curves group box.
2. Curve > Curve Data or Ctrl+D.

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).

Figure 11 Curve Data dialog box

Cleaning Plot Area


The plot area can be cleaned and reinitialized. All existing curves are deleted, the legend is
removed, and the plot area is reinitialized.

To clean the plot area:


■ Edit > Clean Plot Area or click the corresponding button on the toolbar.

Inspect User Guide 29


H-2013.03
5: Configuring the View
Sampling Points in Plot Area

Sampling Points in Plot Area


The Inspector dialog box allows you to sample points in the plot area:
1. Curve > Inspector.
The Inspector dialog box is displayed.
2. In the plot area, select the first point by clicking a specific location (usually on a curve).
3. Drag the pointer to a second location (usually on another curve) to mark the second point.

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

30 Inspect User Guide


H-2013.03
CHAPTER 6 Curve Interpolation and Operations

This chapter discusses curve interpolation and operations.

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.

Figure 13 Different curves, shown as lines, displayed in plot area

Inspect User Guide 31


H-2013.03
6: Curve Interpolation and Operations
Limitation of x-Dataset

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.

More Than One Curve in a Formula


If a formula includes more than one curve, Inspect interpolates all curves to a common x-data
axis. This is demonstrated in the following example.

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.

32 Inspect User Guide


H-2013.03
6: Curve Interpolation and Operations
Handling Datasets in Formula Processing

Handling Datasets in Formula Processing


The following examples illustrate the dataset handling method that Inspect uses to work with
more than one curve in a formula (see Figure 14).

Resulting
Curve
y = 2x2

Curve 2
y = x2
(log)

Curve 1
y = x2
(lin)

Figure 14 Resulting plot showing curves


2
Curve 1: y = x , linear scale on x

X 1 10 20 30 40 50 60 70

Y 1 100 400 900 1600 2500 3600 4900

2
Curve 2: y = x , logarithmic scale on x

X 1 2 4 8 16 32 64

Y 2 4 16 64 256 1024 4096

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

Inspect User Guide 33


H-2013.03
6: Curve Interpolation and Operations
Dataset Created for Result Curves

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

Dataset Created for Result Curves


For each curve created by a formula that involves more than one curve, Inspect generates a new
dataset. This dataset is stored during the Inspect session in a special project called
AuxProject. When the current project is saved in a file, the AuxProject is also saved;
otherwise, this project with all its datasets is lost when Inspect is exited.

The datasets in AuxProject are handled in the same way as datasets from loaded data files.

Curve Handling on Interpolation


Inspect handles linear-scaled and logarithmic-scaled curves. Each curve is treated
independently. Therefore, when working with two curves, one having a linear scale and the
other having a logarithmic scale, Inspect:
■ Creates new points for the first curve for all x-values of the second curve using a linear
interpolation method.
■ Creates new points for the second curve for all x-values of the first curve using a
logarithmic interpolation method.
■ Operates with the common set of points.

Determining Scale (Linear or Logarithmic) of Curves


Deciding how to handle a curve involves analyzing its slope, which is defined as:

dy y i1 – y i
= ----------------- (1)
dx x i1 – x i

34 Inspect User Guide


H-2013.03
6: Curve Interpolation and Operations
Determining Scale (Linear or Logarithmic) of Curves

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

The same calculation is performed by treating:


■ Τhe x-axis as logarithmically scaled.
■ Τhe y-axis as logarithmically scaled.
■ Both axes as logarithmically scaled.

Of these four values, the one closest to 1.0 indicates the best way of handling the curve.

Inspect User Guide 35


H-2013.03
6: Curve Interpolation and Operations
Determining Scale (Linear or Logarithmic) of Curves

36 Inspect User Guide


H-2013.03
CHAPTER 7 Formulas and Macros

This chapter describes how to use formulas and macros in Inspect.

Formula Syntax
Inspect recognizes two types of variable: curve and scalar.

Mixed curve–curve and curve–scalar operations are evaluated as follows:


1. The range of the result of a curve–curve operation is the intersection of the x-range of the
operands.
2. When one operand is a curve and the other a scalar, the respective operation is performed
as a scalar operation on each element of the curve operand.

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.

Inspect User Guide 37


H-2013.03
7: Formulas and Macros
Formula Library

Table 2 Standard mathematical functions


Function Input type Output type Comment

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 .

asinh curve curve Returns the inverse hyperbolic sine.

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).

cbrt curve curve Returns the cube root.

ceil curve curve Rounds up each element to the smallest integer not less than
itself.

cos curve curve Returns the cosine.

cosh curve curve Returns the hyperbolic cosine.

diff curve only curve Returns the first derivative of the curve.

erf curve curve Returns an error function of the curve values.

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.

fabs curve curve Returns the absolute value.

floor curve curve Rounds down each element to the largest integer not greater
than itself.

gamma curve curve Returns the Gamma function.

integr curve only curve Returns the integral of the curve.

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.

38 Inspect User Guide


H-2013.03
7: Formulas and Macros
Formula Library

Table 2 Standard mathematical functions


Function Input type Output type Comment

sin curve curve Returns the sine.

sinh curve curve Returns the hyperbolic sine.

sqrt curve curve Returns the square root.

tan curve curve Returns the tangent.

tanh curve curve Returns the hyperbolic tangent.

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.

Table 3 Special functions


Function Input type Output type Comment

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.

vecmax curve scalar Maximum y-value.

vecmin curve scalar Minimum y-value.

vecvalx curve, scalar scalar x-value at a given y.

vecvaly curve, scalar scalar y-value at a given x.

veczero curve scalar x-value at y = 0.

Table 4 Fast Fourier transformation (FFT) and related functions


Function Input type Output type Comment

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.

Inspect User Guide 39


H-2013.03
7: Formulas and Macros
Macros

Table 4 Fast Fourier transformation (FFT) and related functions


Function Input type Output type Comment

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>)

A formal argument <CURVE> must be replaced by an actual curve name.

40 Inspect User Guide


H-2013.03
7: Formulas and Macros
Macros

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.

Inspect User Guide 41


H-2013.03
7: Formulas and Macros
Macros

42 Inspect User Guide


H-2013.03
CHAPTER 8 Using Script Language

This chapter describes how to automate the display and analysis of


curves in Inspect using a script language.

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.

NOTE Arguments in braces are optional arguments, which do not have to be


provided. The first term in the braces is the name of the argument, and
the second term is the default value of the argument. For example, a
command that has been defined as command {arg def_value} can
be called as command (which is equivalent to command def_value)
and also as command other_value.

The use of scripts is described in Working with Scripts on page 11.

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.

Inspect User Guide 43


H-2013.03
8: Using Script Language
General-purpose Commands

General-purpose Commands

ft_scalar
ft_scalar variableName variableValue

Action: Produces the following output line:


DOE: 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

Reading and Writing Files

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

44 Inspect User Guide


H-2013.03
8: Using Script Language
Reading and Writing Files

fi_writeBitmap
fi_writeBitmap fileName

Action: Writes the plot area to a bitmap PNG file.


Input: fileName, file to write
Returns: The status of the write operation

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

Input: fileName, file to write


orientation, image orientation: portrait (default) or landscape
height, height of the saved image in pixels
width, width of the saved image in pixels
Returns: The status of the write operation

Inspect User Guide 45


H-2013.03
8: Using Script Language
Reading and Writing Files

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

Input: fileName, file to write


orientation, image orientation: portrait (default) or landscape
printSize, page size: US_LETTER (default), DIN_A3, or DIN_A4
height, height of the saved image in size units (sizeUnit)
width, width of the saved image in size units (sizeUnit)
offsetHeight, vertical page offset in size units (sizeUnit)
offsetWidth, horizontal page offset in size units (sizeUnit)
sizeUnit, unit for height, width, offsetHeight, and offsetWidth:
i: inch (default)
m: millimeter
c: centimeter
Returns: The status of the write operation

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

46 Inspect User Guide


H-2013.03
8: Using Script Language
Reading and Writing Files

graph_write
graph_write fileName

Action: Saves the current state to a file.


Input: fileName, file to write to
Returns: The status of the write operation

param_load
param_load fileName

Action: Loads a parameter file.


Input: fileName, file to load
Returns: The status of the load operation

param_write
param_write fileName

Action: Saves a parameter file.


Input: fileName, file to write to
Returns: The status of the write operation

Inspect User Guide 47


H-2013.03
8: Using Script Language
Reading and Writing Files

proj_getDataSet
proj_getDataSet projectName dataSetId

Action: If no dataset is found, the return value is an empty list. For example, the
commands:

set x_data [proj_getDataSet "tutorial_ins" "time"]


set y_data [proj_getDataSet "tutorial_ins" "node_A data_1"]

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

48 Inspect User Guide


H-2013.03
8: Using Script Language
Reading and Writing Files

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

Action: Writes the given project to the given file.


Input: projectName, name of the project
fileName, file name to use
Returns: The status of the write operation

Inspect User Guide 49


H-2013.03
8: Using Script Language
Creating, Displaying, and Deleting Curves

Creating, Displaying, and Deleting Curves


A dataset used for curve creation is identified by its data path, which consists of the project
name, the group name when the dataset belongs to a group, and the dataset name.

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:

cv_create mycurve "nmos_n7_des time" "nmos_n7_des Gate OuterVoltage"

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}

Same as cv_create except that the curve is displayed. See cv_create.

50 Inspect User Guide


H-2013.03
8: Using Script Language
Creating, Displaying, and Deleting Curves

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:

cv_createFromScript mycurve "0 1 2 3 4 5 6 7 8 9" "1 2 1 2 1 2 1 2 1 2"

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

Inspect User Guide 51


H-2013.03
8: Using Script Language
Creating, Displaying, and Deleting Curves

cv_delete
cv_delete curveName

Action: This command deletes the given curve.


Input: curveName, curve to be deleted
Returns: The status of the delete operation

cv_display
cv_display curveName {axis y}

Action: Displays a curve using the specified y-axis.


Input: curveName, curve to be displayed
axis, optional parameter specifying the axis to use; the default is y
Returns: None

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

52 Inspect User Guide


H-2013.03
8: Using Script Language
Creating, Displaying, and Deleting Curves

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

Inspect User Guide 53


H-2013.03
8: Using Script Language
Changing Attributes

Changing Attributes
This section describes the functions that change the attributes of the title, axes, curves, and
legend.

cv_lineColor
cv_lineColor curveName color

Action: Sets the color of the curve line.


Input: curveName, name of curve
color, color of the curve line
Returns: None

cv_lineStyle
cv_lineStyle curveName style

Action: Sets the drawing style of the curve line.


Input: curveName, name of curve
style, drawing style of the curve line (solid, dashed, dotted, "long
dashed", or "long dotted")
Returns: None

cv_renameCurve
cv_renameCurve curveName newName

Action: Renames a curve.


Input: curveName, name of curve
newName, new name of curve
Returns: None

54 Inspect User Guide


H-2013.03
8: Using Script Language
Changing Attributes

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

Action: Sets curve-drawing attributes.


Input: curveName, curve name
legend, curve legend
color, color of the curve line
style, drawing style of the curve line (solid, dashed, dotted, "long
dashed", or "long dotted")
width, width of the curve line
shape, keyword for the marker shape (none, square, circle, diamond, plus,
cross, splus, scross, or triangle)
size, marker size
outColor, color of the marker outline
outWidth, width of the marker outline
fillColor, fill color of the marker
Returns: None

Inspect User Guide 55


H-2013.03
8: Using Script Language
Changing Attributes

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

Action: Creates a label in the plot area.


Input: label, label text
coordX, x-coordinate
coordY, y-coordinate
fontStr, label font
color, label color
Returns: Label ID

gr_deleteLabel
gr_deleteLabel labelId

Action: Deletes a label from the plot area.


Input: labelId, label ID
Returns: None

56 Inspect User Guide


H-2013.03
8: Using Script Language
Changing Attributes

gr_mappedAxis
gr_mappedAxis axis yesno

Action: Changes the visibility of an axis.


Input: axis, keyword (y or y2) specifying a y-axis
yesno, Boolean value (True or False) specifying the axis visibility
Returns: None

gr_setAxisAttr
gr_setAxisAttr axis title tfont min max color width font angle div scale {tcolor}

Action: Sets the axis attributes.


Input: axis, keyword (X, Y, or Y2) specifying an axis
title, axis title
tfont, font size of the axis title
min, max, minimal and maximal values of the axis
color, color of the axis
width, width of the axis line
font, font size of the tick label
angle, angle at which the tick labels are drawn
div, number of secondary ticks between the main ticks
scale, specifies linear (lin) or logarithmic (log) display of the axis
tcolor, optional parameter specifying color of the axis title
Returns: None

gr_setGeneralAttr
gr_setGeneralAttr {showFrame true} {axesTight true} {backColor white} {selectColor cyan}

Action: Sets the general attributes of the plot.


Input: showFrame, Boolean indicator of plot frame appearance; the default is true
axesTight, Boolean indicator of the tightness of axes; the default is true
backColor, plot background color; the default is white
selectColor, color of the selected curve; the default is cyan
Returns: None

Inspect User Guide 57


H-2013.03
8: Using Script Language
Changing Attributes

gr_setGridAttr
gr_setGridAttr {showGrid false} {gridAlign left} {minorTicks false}
{gridStyle "short dashed"} {gridColor black} {gridWidth 1}

Action: Sets the grid attributes of the plot.


Input: showGrid, Boolean indicator of grid appearance; the default is false
gridAlign, grid alignment; the available attributes are left and right; the
default is left
minorTicks, Boolean indicator of the appearance of minor ticks; the default is
false
gridStyle, attribute of the grid style; the available attributes are solid,
dashed, dotted, "short dashed", "long dashed", "long dotted", and
"dot-dashed"; the default is "short dashed"
gridColor, color of the grid lines; the default is black
gridWidth, thickness of the grid lines; the default is 1
Returns: None

gr_setLegendAttr
gr_setLegendAttr {showFlag true} {fontName helvetica} {fontSize 10} {fontStyle {}}
{backColor white} {foreColor black} {frameColor black} {frameWidth 1} {framePos right}
{frameAnchor n}

Action: Sets the attributes of the legend.


Input: showFlag, Boolean indicator of legend appearance
fontName, legend font name; the default is helvetica
fontSize, legend font size; the default is 10
fontStyle, legend font style; the available attributes are bold, italic,
underline, and overstrike; the default is an empty list {}
backColor, legend background color; the default is white
foreColor, legend foreground color; the default is black
frameColor, legend frame color; the default is black
frameWidth, legend frame width; the default is 1
framePos, legend frame position; the possible values are left, right, top,
bottom, plot, and free; the default is right
frameAnchor, legend frame anchor; the possible values are n, e, s, w, ne, se, sw,
and nw; the default is n
Returns: None

58 Inspect User Guide


H-2013.03
8: Using Script Language
Accessing Curve Data

gr_setTitleAttr
gr_setTitleAttr title {fontSize 14} {just center}

Action: Sets the title attributes.


Input: title, title text
fontSize, optional parameter specifying size of title font; the default is 14
just, optional parameter specifying title justification (center, left, or right);
the default is center
Returns: None

Accessing Curve Data

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:

set xy [cv_getVals "f1"]


set x [lindex $xy 0]
set y [lindex $xy 1]

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

Action: This command returns a list that holds the x-dataset.


Input: curveName, name of curve
Returns: A list of the x-data

Inspect User Guide 59


H-2013.03
8: Using Script Language
Accessing Curve Data

cv_getValsY
cv_getValsY curveName

Action: This command returns a list that holds the y-dataset.


Input: curveName, name of curve
Returns: A list of the y-data

cv_getXaxis
cv_getXaxis curveName

Action: The project name and the dataset ID can be extracted using:

set answer [cv_getXaxis "myCurve"]


set projectName [lindex $answer 0]
set dataSetId [lindex $answer 1]

Input: curveName, name of curve


Returns: A list with the project name and the dataset ID of the x-dataset

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

60 Inspect User Guide


H-2013.03
8: Using Script Language
Transforming Curve Data

cv_printVals
cv_printVals curveName

Action: Writes the x- and y-data of a curve to standard output.


Input: curveName, name of curve
Returns: A list of the printed values

Transforming Curve Data


These functions change the way in which curve data is displayed without changing the curve
datasets.

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

Inspect User Guide 61


H-2013.03
8: Using Script Language
Transforming Curve Data

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

62 Inspect User Guide


H-2013.03
8: Using Script Language
Extracting Parameters

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

Action: Computes the body-effect parameter at two different source–substrate voltages.


The formula used to compute the body-effect parameter is:
Gamma = (VT2 – VT1)/( (const + VB2)1/2 – (const + VB1)1/2 )

Input: VT1, VT2, two threshold voltages


VB1, VB2, two different source–substrate voltages
const, 2ϕ F where ϕ F is the Fermi level potential; the default value is 0.8 V
Returns: Gamma [V1/2] as a scalar or f_error in the case of an error

f_gm
f_gm curveName xmin xmax ymin ymax

Action: Computes the maximum of transconductance for a given Id–Vg curve.


Input: curveName, curve used to calculate gm
xmin, xmax, ymin, ymax, range for computing the result; the default values
correspond to the full curve range
Returns: The value of gm [A/V] of the curve or f_error in the case of an error

Inspect User Guide 63


H-2013.03
8: Using Script Language
Extracting Parameters

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

Action: Computes the saturation current.


Input: curveName, Id–Vd curve at the fixed gate–source voltage
xmin, xmax, ymin, ymax, range for computing the result; the default values
correspond to the full curve range
Returns: The saturation current value or f_error in the case of an error

f_KP
f_KP gm VDS

Action: Computes the transconductance parameter.


Input: gm, transconductance value
VDS, drain source voltage; the default value is 0.1
Returns: KP [A/V2] value or f_error in the case of an error

64 Inspect User Guide


H-2013.03
8: Using Script Language
Extracting Parameters

f_Ron
f_Ron curveName xmin xmax ymin ymax

Action: Computes the on-state resistance in the linear region.


Input: curveName, Id–Vd curve at the fixed gate–source voltage
xmin, xmax, ymin, ymax, range for computing the result; the default values
correspond to the full curve range
Returns: The value of Ron [ kΩ ] or f_error in the case of an error

f_Rout
f_Rout curveName xmin xmax ymin ymax

Action: Computes the output resistance in the saturation region.


Input: curveName, Id–Vd curve at the fixed gate–source voltage
xmin, xmax, ymin, ymax, range for computing the result; the default values
correspond to the full curve range
Returns: The value of Rout [ kΩ ] or f_error in the case of an error

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

Inspect User Guide 65


H-2013.03
8: Using Script Language
Extracting Parameters

f_TetaG
f_TetaG VT gm idvgs vgsvgs xmin xmax ymin ymax

Action: Computes the mobility modulation TetaG using the formula:

TetaG = gm(VGSlow)/ID(VGShigh) - 1/(VGShigh - VT)

Input: VT, threshold voltage value


gm, transconductance value
idvgs, Id–Vg curve
vgsvgs, Vg–Vg curve
xmin, xmax, ymin, ymax, range for computing the result; the default values
correspond to the full curve range
Returns: The value of TetaG [V–1] or f_error in the case of an error

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]

Input: curveName, name of curve


xmin, xmax, ymin, ymax, range for computing the result; the default values
correspond to the full curve range
Returns: The threshold voltage value or f_error in the case of an error

66 Inspect User Guide


H-2013.03
8: Using Script Language
Computing

f_VT1
f_VT1 curveName xmin xmax ymin ymax

Action: Computes the threshold voltage [V] of the given curve.


Vth is typically extracted at Id = 0.1 μA/μm .
Input: curveName, name of curve
xmin, xmax, ymin, ymax, range for computing the result; the default values
correspond to the full curve range
Returns: The threshold voltage value or f_error in the case of an error

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

Action: Computes a scalar using the formula.


Input: formula, string with the formula to evaluate
xmin, xmax, ymin, ymax, range for which the formula is applied
Returns: A scalar computation result

Inspect User Guide 67


H-2013.03
8: Using Script Language
Controlling Scripts

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

Action: A macro is defined, which can be used later for computations.


Input: macroName, name of the macro
macroDef, macro definition
Returns: The status of the operation

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

68 Inspect User Guide


H-2013.03
8: Using Script Language
Support for Manual Examples Library

script_exit
script_exit

Action: Stops the execution of a script and exits Inspect.


Input: None
Returns: None

script_sleep
script_sleep sec

Action: Stops the execution of a script for a given number of seconds.


Input: sec, time in seconds
Returns: None

Support for Manual Examples Library

gr_formatAxis
gr_formatAxis axis format

Action: Changes the format of the displayed axis.


Input: axis, axis to be formatted
format, the options are default, fixed, scientific, engineering
Returns: None

Inspect User Guide 69


H-2013.03
8: Using Script Language
Support for Manual Examples Library

gr_precision
gr_precision axis prec

Action: Changes the precision of a given axis.


Input: axis, axis to be formatted
prec, numeric precision to be set for the axis
Returns: None

gr_setLegend
gr_setLegend status

Action: Activates or deactivates the legend in the plot area.


Input: status, 1 if the legend is to be activated; otherwise, 0
Returns: None

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

70 Inspect User Guide


H-2013.03
8: Using Script Language
Examples of Using Script Language

Examples of Using Script Language

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

set Dose_As [cv_compute "vecmax(integr(<n30_sd_Arsenic_Implant>))" A A 1e14 A]


#---------------------------------------------------------------

#---------------------------------------------------------------
# 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]

Inspect User Guide 71


H-2013.03
8: Using Script Language
Examples of Using Script Language

72 Inspect User Guide


H-2013.03
CHAPTER 9 Working with Script Libraries

This chapter describes how to work with script libraries in Inspect.

Loading Libraries
The script language of Inspect is complemented by libraries that provide additional
functionality for specific topics, such as curve comparison.

Libraries can be loaded as required using the command load_library.

load_library
load_library libraryName

Input: libraryName, library identifier


Return: None
Action: Makes available all functions provided by the library.

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).

Adding a Site Library


All libraries are stored in the directory ${STROOT_LIB}/inspectlib. In this directory, the
file lib_index stores an index of all available libraries.

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>

Inspect User Guide 73


H-2013.03
9: Working with Script Libraries
Extraction Library

where:

<library_name> is the name that is used by users to call this library.

<library_prefix> is the prefix used for all functions.

<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

The library is located at ${STROOT}/${STRELEASE}/lib/inspectlib/EXTRACT.tcl. 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 EXTRACT.tcl

The library functions are described in the following sections.

cv_linTransCurve: Linear Transformations


This routine applies a linear transformation to the x- and y-values of an Inspect curve. The
routine is called using:
cv_linTransCurve <Curve> <Xm> <Xb> <Ym> <Yb> <Axis>

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.

For example, use:


cv_linTransCurve IdVgs 1 0.55 1.0 0.0 y

to shift an Id–Vgs curve by 0.55 V.

74 Inspect User Guide


H-2013.03
9: Working with Script Libraries
Extraction Library

cv_scaleCurve: Curve Scaling


This routine scales the x- and y-values of an Inspect curve. The routine is called using:
cv_scaleCurve <Curve> <XFactor> <YFactor> <Axis>

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.

For example, use:


cv_scaleCurve IdVgs 1 1e6 y

to scale an Id–Vgs curve from A/μm to mA/mm.

ExtractBVi: Breakdown Voltage


The breakdown curves sometimes exhibit a pronounced snapback. In this case, another relevant
definition is the bias voltage at which the current reaches a certain level. This type of extraction
is performed with the routine ExtractBVi, which is called using:
ExtractBVi <Name> <Curve> <Ilevel>

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.

For example, the call:


ExtractBVi BVcboi VcIc 1e-12

results in output such as:


DOE: BVcboi 9.09e+00
BVi: 9.09e+00

Inspect User Guide 75


H-2013.03
9: Working with Script Libraries
Extraction Library

ExtractBVv: Breakdown Voltage


The breakdown voltage can be defined as the maximum voltage that can be applied to a contact.
The routine ExtractBVv extracts this value and is called using:
ExtractBVv <Name> <Curve> <Sign>

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.)

For example, the call:


ExtractBVv BVcbov VcIc 1.0

results in output such as:


DOE: BVcbov 9.09e+00
BVv: 9.09e+00 V

ExtractEarlyV: Early Voltage


This routine extracts the Early voltage from an Ic–Vce curve. The routine is called using:
ExtractEarlyV <Name> <Curve> <Vtarget>

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.

For example, the call:


ExtractEarlyV Va IcVc 1.25

results in output such as:


DOE: Ro 3.283e+04
DOE: Va -1.836e+01

where Ro is the output resistance and Va is the Early voltage.

76 Inspect User Guide


H-2013.03
9: Working with Script Libraries
Extraction Library

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.

For example, the call:


set gm [ExtractGm gmLin IdVg]

results in output such as:


DOE: gmLin 1.123e-04 gm: 1.123e-04
S/um Max gm is at Vg= 0.540 V

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.

ExtractIoff: Drain Leakage


This routine extracts the drain leakage current from an Id–Vgs curve. The routine is called using:
ExtractIoff <Name> <Curve> <Voff>

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.

Inspect User Guide 77


H-2013.03
9: Working with Script Libraries
Extraction Library

For example, the call:


if { $Type == "nMOS" } { set SIGN 1.0 } \
else { set SIGN -1.0 }
set Ioff [ExtractIoff Ioff [expr $SIGN*1e-4]]

results in output such as:


DOE: Ioff 5.167e-11
Ioff: 5.167e-11 A/um

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.

For example, the call:


set IdSat [ExtractMax IdSat IdVg]

results in output such as:


DOE: IdSat 4.028e-04
Max: 4.028e-04

ExtractRon: On-State Resistance


This routine extracts the on-state resistance from an Id–Vds curve. The routine is called using:
ExtractRon <Name> <Curve> <Von>

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.

78 Inspect User Guide


H-2013.03
9: Working with Script Libraries
Extraction Library

For example, the call:


set Ron [ExtractRon Ron IdVd 1.1]

results in output such as:


DOE: Ron 14909.555
Ron: 14909.555 Ohm um

ExtractSS: Subthreshold Swing


This routine extracts the subthreshold voltage swing from an Id–Vgs curve. The routine is called
using:
ExtractSS <Name> <Curve> <Vgo>

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.

For example, the call:


set SS [ExtractSS SSlin IdVg($N) 0.01]

results in output such as:


DOE: SSlin 79.758
SS (subthreshold voltage swing): 79.758 mV/dec

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.

Inspect User Guide 79


H-2013.03
9: Working with Script Libraries
Extraction Library

For example, the call:


set CggP [ExtractValue CgP Cgg 1.2]

results in output such as:


DOE: CgP 1.426e-15
CgP: 1.426e-15

Here, Cgg is the name of the Inspect total gate–capacitance versus the gate–voltage curve.

ExtractVtgm: Threshold Voltage


This routine extracts the threshold voltage from an Id–Vgs curve using the maximum
transconductance method. The routine is called with:
ExtractVtgm <Name> <Curve> [<Type>]

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 example, the call:


set Vt [ExtractVtgm Vtgm IdVg]

results in output such as:


DOE: Vtgm 0.392
Vt (Max gm method): 0.392 V

80 Inspect User Guide


H-2013.03
9: Working with Script Libraries
Extraction Library

ExtractVtgmb: Threshold Voltage


This is the same as ExtractVtgm except that ExtractVtgmb uses parabolic interpolation to
find the gate bias at which the maximum transconductance occurs. See ExtractVtgm:
Threshold Voltage on page 80.

For Id–Vgs curves with a limited number of gate–bias sample points, better accuracy is achieved
with ExtractVtgmb.

ExtractVti: Threshold Voltage


This routine extracts the gate voltage from an Id–Vgs curve at which the drain current exceeds
a given current level. The routine is called with:
ExtractVti <Name> <Curve> <Ilevel>

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.

For example, the call:


set Vti [ExtractVti Vti IdVg 1e-7]

results in output such as:


DOE: Vti 1.476
Vti (Vg at Io=1.000e-06): 1.476 V

FilterTable: Filtering the Sentaurus Workbench Family


Table
The FilterTable utility processes the data from the Sentaurus Workbench Family Table to
create a plot of one Sentaurus Workbench parameter as a function of another Sentaurus
Workbench parameter for a certain subset of experiments. Threshold voltage roll-off plots are
a typical application of this utility.

To better understand this utility, it is helpful to first consider the kind of data on which it is
designed to operate.

Inspect User Guide 81


H-2013.03
9: Working with Script Libraries
Extraction Library

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 syntax of the command FilterTable is:


FilterTable XList YList [ConditionTarget1 ConditionList1] \
[ConditionTarget2 ConditionList2] [ConditionTarget3 ConditionList3] [...]

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]

82 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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.

Here is a usage example. After preprocessing, Sentaurus Workbench preprocessor references


such as @Type:all@ are expanded and the resulting preprocessed file may look like:
set Types [list nMOS nMOS nMOS nMOS pMOS pMOS pMOS pMOS]
set Lgs [list 0.090 0.045 0.130 0.065 0.065 0.045 0.130 0.090]
set Vts [list 0.424 0.313 0.414 0.408 -0.344 -0.232 x -0.374]

set XYLists [FilterTable $Lgs $Vts "nMOS" $Types]


cv_createFromScript Vt_vs_Lg_nMOS [lindex $XYLists 0] [lindex $XYLists 1] y
cv_display Vt_vs_Lg_nMOS y

set XYLists [FilterTable $Lgs $Vts "pMOS" $Types]


cv_createFromScript Vt_vs_Lg_pMOS [lindex $XYLists 0] [lindex $XYLists 1] y
cv_display Vt_vs_Lg_pMOS y

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.

The extend Library


The extend library implements high-level commands to provide:
■ Better control of curve attributes (cv_disp, cv_nextColor, cv_nextSymbol,
cv_setFillColor, cv_autoIncrStyle)
■ Comfortablecurve manipulation (cv_scale, cv_linTrans, cv_addCurve,
cv_addDataset, cv_sort, cv_monotonicX)
■ Additionalcurve information (cv_integrate, cv_getNames, cv_getRange,
cv_getXmax, cv_getLocalExtrema, cv_getGlobalExtrema, cv_linFit)
■ Convenient functions to extract dataset information (ds_getValue,
proj_datasetExists)
■ A simple debug print function (dbputs)
■ Functions to work with lists (ldiff, lintersect, ltranspose, lunion)
■ An ASCII file import filter (fi_readTxtFileHeader)

The library is loaded with the command:


load_library extend

The library is located at ${STROOT}/${STRELEASE}/lib/inspectlib/extend.tcl.

Inspect User Guide 83


H-2013.03
9: Working with Script Libraries
The extend Library

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

Action: Adds the y-values of a dataset to an existing curve.


Input: cname, name of curve to which datasets will be added
xdset, dataset name of the x-values
ydset, dataset name of the y-values to be added
Returns: None
Example:

# sum the total currents of nContact and nContact2


cv_addDataset iv "n4_des pContact OuterVoltage" "n4_des nContact TotalCurrent"
cv_addDataset iv "n4_des pContact OuterVoltage" "n4_des nContact2 TotalCurrent"

84 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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

Note that controlling attributes manually makes most sense when


cv_autoIncrStyle is switched off.
Returns: None
Example:

cv_disp iv "simulated IV" y

Inspect User Guide 85


H-2013.03
9: Working with Script Libraries
The extend Library

cv_exists
cv_exists cname

Action: Checks whether a curve exists.


Input: cname, name of curve
Returns: 1 (the curve cname exists) or 0 (the curve cname does not exist)
Example:

if {[cv_exists iv]} {puts "curve iv exists"}

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:

set cmin [cv_getGlobalExtrema iv min]


puts "The minimum of the iv-curve is [lindex $cmin 1] and occurred at [lindex $cmin 0]"

86 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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:

set cmax [cv_getLocalExtrema iv "max"]


puts "All maxima of the iv-curve: $cmax"

cv_getNames
cv_getNames

Action: Returns all existing curve names.


Input: None
Returns: List of curve names
Example:

puts "the following curves exist currently: [cv_getNames]"

cv_getRange
cv_getRange cname

Action: Returns the x- and y-range of a curve as {xmin,xmax,ymin,ymax}.


Input: cname, name of curve
Returns: {xmin,xmax,ymin,ymax}
Example:

puts "{xmin,xmax,ymin,ymax}: [cv_getRange iv]"

Inspect User Guide 87


H-2013.03
9: Working with Script Libraries
The extend Library

cv_getXmax
cv_getXmax cname

Action: Returns the upper boundary of the x-values of a curve.


Input: cname, name of curve
Returns: xmax
Example:

puts "upper boundary of the x values of iv: [cv_getXmax iv]"

cv_getXmin
cv_getXmin cname

Action: Returns the lower boundary of the x-values of a curve.


Input: cname, name of curve
Returns: xmin
Example:

puts "lower boundary of the x values of iv: [cv_getXmin iv]"

cv_getYmax
cv_getYmax cname

Action: Returns the upper boundary of the y-values of a curve.


Input: cname, name of curve
Returns: ymax
Example:

puts "upper boundary of the y values of iv: [cv_getYmax iv]"

88 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

cv_getYmin
cv_getYmin cname

Action: Returns the lower boundary of the y-values of a curve.


Input: cname, name of curve
Returns: ymin
Example:

puts "lower boundary of the y values of iv: [cv_getYmin iv]"

cv_integrate
cv_integrate formula {xstart {}} {xend {}} {mode {}}

Action: Performs integration of a formula, and returns the integration value.


Input: formula, contains the formula to be integrated, as it is specified for
cv_createWithFormula
xstart, beginning of the integration interval; if not specified, the beginning of
the curve is used
xend, end of the integration interval; if not specified, the end of the curve is used
mode, defines the integration mode:
– If not specified, it is set to {}, which performs the Inspect internal integration
using integr()
– trapez performs the integration using the trapezoidal rule
– sumup sums all the y-values

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:

# P_t is the time-dependent power


puts "energy in the first second is: [cv_integrate P_t 0 1 trapez]"

Inspect User Guide 89


H-2013.03
9: Working with Script Libraries
The extend Library

cv_linFit
cv_linFit formula {xstart {}} {xend {}}

Action: Performs a linear fit y = A + B ⋅ x to a curve formula.


Input: formula, contains the formula to be fitted, as it is specified for
cv_createWithFormula
xstart, beginning of the fit interval
xend, end of the fit interval
Returns: The fit results as a list:
– (Estimate of) Intercept A
– (Estimate of) Slope B
2
– Standard deviation of y relative to the fit correlation coefficient R
– Number of degrees of freedom df
– Standard error of intercept A
– Significance level of A
– Standard error of slope B
– Significance level of B
Example:

set res [cv_linFit "log(<cname>)"]

cv_linTrans
cv_linTrans cname xm {xb 0} {ym 1} {yb 0}

Action: Scales a curve linearly, replacing x with xm ⋅ x + xb and replacing y with


ym ⋅ y + yb .
Input: cname, name of curve
xm, slope of the x-values
xb, offset of the x-values
ym, slope of the y-values
yb, offset of the y-values
Returns: None
Example:

# scaling an IV curve given in A over V, to mA over mV.


# In addition, the curve had a current offset of 2A, which we want to remove

cv_linTrans iv 1e3 0 1e3 -2000

90 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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.

Note that controlling attributes manually makes most sense when


cv_autoIncrStyle is switched off.
Returns: None
Example:

cv_autoIncrStyle off
cv_disp iv1
cv_nextColor
cv_disp iv2

Inspect User Guide 91


H-2013.03
9: Working with Script Libraries
The extend Library

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.

Note that controlling attributes manually makes most sense when


cv_autoIncrStyle is switched off.
Returns: None
Example:

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.

Note that controlling attributes manually makes most sense when


cv_autoIncrStyle is switched off.
Returns: None
Example:

cv_autoIncrStyle off
cv_disp iv1
cv_nextSymbol
cv_disp iv2

92 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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

Action: Resets the fill color to white.


Input: None
Returns: None
Example:

cv_autoIncrStyle off
cv_disp iv1
cv_nextColor
cv_disp iv2
cv_resetColor
cv_nextSymbol
cv_disp iv3

Inspect User Guide 93


H-2013.03
9: Working with Script Libraries
The extend Library

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

94 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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

Action: Scales a curve linearly, replacing x with xm ⋅ x and replacing y with ym ⋅ y .


Input: cname, name of curve
xm, scale applied to x-values
ym, scale applied to y-values
Returns: None
Example:

# scales a current over time given in A over s to mA over us.


cv_scale i_t 1e6 1e3

Inspect User Guide 95


H-2013.03
9: Working with Script Libraries
The extend Library

cv_setFillColor
cv_setFillColor {mode 1}

Action: Switches the fill color on and off.


Input: mode, sets the fill color:
– 1 fills the symbol with the curve color
– 0 specifies the fill color is white; default is 0
Returns: None
Example:

cv_autoIncrStyle off
cv_setSymbol 1
cv_disp iv1
cv_nextColor
cv_setFillColor 1
cv_disp iv2

cv_setSymbol
cv_setSymbol {mode 1}

Action: Switches symbols on and off.


Input: mode, sets the symbol:
– 1 specifies that the symbols are shown
– 0 specifies that the symbols are not shown; default is 1
Returns: None
Example:

cv_autoIncrStyle off
cv_disp iv1
cv_nextColor
cv_setSymbol 1
cv_disp iv2

96 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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

Inspect User Guide 97


H-2013.03
9: Working with Script Libraries
The extend Library

ds_getValue
ds_getValue proj datasetName {index end}

Action: Returns the index-th value of a dataset.


Input: proj, project name of the loaded .plt file
datasetName, name of the dataset
index, the index of the dataset item to return; counting starts with 0 and finishes
with end; default is end
Returns: Real number
Example:

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_readTxtFile "am15g.txt" spec

98 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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:

puts "[fi_readTxtFileHeader "am15g.txt"]"


==> Wavelength [um] Intensity [W*cm^-2]

gr_axis
gr_axis axis title {xmin ""} {xmax ""} {scale lin}

Action: Sets the attributes of the x-axis and y-axis.


Input: axis, specifies axis to be modified, which can be x, y, or y2
title, axis label
xmin, xmax, sets the range of the axis, where {} specifies automatic scaling
scale, specifies the scaling to apply (lin or log); default is lin
Returns: None
Example:

gr_axis x {voltage [V]}


gr_axis y {current [A]} {} {} log

Inspect User Guide 99


H-2013.03
9: Working with Script Libraries
The extend Library

gr_resetAxis
gr_resetAxis

Action: Resets all the axis attributes, in particular, switches off the y2-axis.
Input: None
Returns: None
Example:

gr_axis x {voltage [V]}


gr_axis y {current [A]} {} {} log
gr_resetAxis

gr_setStyle
gr_setStyle mode

Action: Sets the style of the plot area.


Input: mode, specifies the mode:
– "screen" is used for interactive work; default is "screen"
– "presentation" has larger fonts suitable for pasting graphs into
presentations
Returns: None
Example:

gr_setStyle "presentation"

100 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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}

Inspect User Guide 101


H-2013.03
9: Working with Script Libraries
The extend Library

ltranspose
ltranspose list

Action: Transposes a list.


Input: list, the list to transpose
Returns: List
Example:

set l {{1 2} {3 4} {5 6}}


puts "[ltranspose $l]"
==> {{1 3 5} {2 4 6}}

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

102 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The extend Library

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

Action: Returns a list containing all group names of the project.


Input: proj, project name of the loaded .plt file
Returns: List of strings
Example:

proj_load n5_des.plt
puts "all group names: [proj_getGroups n5_des]"

Inspect User Guide 103


H-2013.03
9: Working with Script Libraries
The PhysicalConstants Library

proj_groupExists
proj_groupExists proj groupName

Action: Checks whether a project contains a particular group.


Input: proj, project name of the loaded .plt file
groupName, name of the group
Returns: 1 (group exists) or 0 (group does not exist)
Example:

proj_load n5_des.plt
if {[proj_groupExists n5_des "anode"]} {puts "group anode exists"}

The PhysicalConstants Library


This library defines a set of variables of major physical constants [1] (see Table 5).

Table 5 Variables defined in PhysicalConstants library


Name of variable Value Unit

AtomicMassConstant 1.660540210e-27 kg
–1
AvogadroConstant 6.022136736e23 mol

BohrMagneton 9.274015431e-24 J/T

BoltzmannConstant 1.38065812e-23 J/K

ElectronMass 9.109389754e-31 kg

ElectronVolt 1.6021773349e-19 J

ElementaryCharge 1.6021773349e-19 C

FaradayConstant 9.648530929e4 C/mol

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

Permeability 12.566370614e-7 H/m

104 Inspect User Guide


H-2013.03
9: Working with Script Libraries
The PhysicalConstants Library

Table 5 Variables defined in PhysicalConstants library


Name of variable Value Unit

Permittivity 8.854187817e-12 H/m

Pi 3.141592653589793 1

PlanckConstant 6.626075540e-34 Js

ProtonMass 1.672623110e-27 kg
–1
RydbergConstant 1.097373153413e7 m

SpeedOfLight 299792458 m/s


2 4
StefanBoltzmannConstant 5.6705119e-8 W/m /K

To load the library, use the command:


load_library PhysicalConstants

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
...

Inspect User Guide 105


H-2013.03
9: Working with Script Libraries
IC-CAP Model Parameter Extraction Library

IC-CAP Model Parameter Extraction Library


The commands provided by this library are used to export device simulation results to the
Integrated Circuit Characterization and Analysis Program (IC-CAP) model extraction tool.
These commands allow for the creation of files that can be later imported by IC-CAP.

To load the library, use the command:


load_library ise2iccap

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:

userInput Contains information on variables that cannot be swept in a traditional


IC-CAP setup.
iccapInput Contains information on variables that can be swept in an IC-CAP setup.
output Contains information on output variables that can be recognized in an
IC-CAP setup.

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, no user sweeps are considered.


■ iccapInput: {{vg V G GROUND {LIST 1 26 0.0...2.5}}
{vb V D GROUND {LIN 2 -0.1 -0.5 3}}
{vd V S GROUND {CON 0.0}}}

106 Inspect User Guide


H-2013.03
9: Working with Script Libraries
IC-CAP Model Parameter Extraction Library

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.

• 1 is the sweep order (1 is the innermost or fastest varying sweep).

• 26 is the number of values.

• 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.

• 2 is the sweep order.

• -0.1 is the start value.

• -0.5 is the end value.

• 3 is the number of values.

The sweep information for the third input variable (vd) is a list where:
• CON indicates that there is only one value for this variable.

• 0.0 is a constant value.


■ output is {{id I D GROUND}}

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.

Inspect User Guide 107


H-2013.03
9: Working with Script Libraries
Curve Comparison Library

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.

Curve Comparison Library


The commands provided by this library are used to compare two curves by computing the
square difference between the two curves within a given domain.

To load the library, use the command:


load_library curvecomp

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

108 Inspect User Guide


H-2013.03
9: Working with Script Libraries
References

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.

Inspect User Guide 109


H-2013.03
9: Working with Script Libraries
References

110 Inspect User Guide


H-2013.03
CHAPTER 10 Two-Port Network RF Extraction

This chapter describes how to use the two-port network RF


extraction tool available in Inspect.

RF Parameter Extraction and Starting the Tool


This tool is a graphical extension that allows you to extract RF parameters from a two-port
network. Functionality includes:
■ Plotting conductances and inductances.
■ Converting and extracting RF parameters.
■ Plotting using frequency or bias as the x-axis.

To launch this tool:


■ Extensions > Two-Port Networks or Ctrl+T.

The RF Parameter Extraction dialog box is displayed (see Figure 15 on page 112).

RF Parameter Extraction Dialog Box


Using the RF Parameter Extraction dialog box, you can perform several operations using
options provided on the different tabs.

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.

Inspect User Guide 111


H-2013.03
10: Two-Port Network RF Extraction
RF Parameter Extraction Dialog Box

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 Ω ).

112 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Parameter Extraction Dialog Box

Figure 16 Preferences tab showing default value of each option

Convert Data Tab


On the Convert Data tab, Sentaurus Device data can be converted to either Y-, H-, Z-, or S-
parameters.

NOTE Only one parameter conversion is possible at one time.

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.

Inspect User Guide 113


H-2013.03
10: Two-Port Network RF Extraction
RF Parameter Extraction Dialog Box

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.

Figure 17 Convert Data tab

114 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Parameter Extraction Dialog Box

RF Extraction Tab
On the RF Extraction tab (see Figure 18), different extractions of RF parameters can be
performed.

Figure 18 RF Extraction tab

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

fmax is extracted and can be plotted using different methods.

NOTE A previous conversion to Y-parameters is required, or select the


Y Parameters option on the Convert Data tab.

The available extraction methods are:


■ Unit Gain Method: A direct search for the MUG = 1 point.
■ Extrapolation Method: Ideally, the MUG as a function of frequency is flat at low
frequencies and falls off at a 20 dB/decade slope. 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.

Inspect User Guide 115


H-2013.03
10: Two-Port Network RF Extraction
RF Parameter Extraction Dialog Box

■ 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

ft is extracted and plotted using different methods.

NOTE A previous conversion to H-parameters is required, or select the


H Parameters option on the Convert Data tab.

The available extraction methods are:


■ Unit Gain Method: A direct search for |h21| = 1 point is performed.
■ Extrapolation Method: Ideally, |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. This 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.
■ 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.

Plotting Mason’s Unilateral Gain (MUG)


Mason’s unilateral gain is plotted.

NOTE A previous conversion to Z-parameters is required, or select the


Z Parameters option on the Convert Data tab.

116 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Parameter Extraction Dialog Box

Plotting Maximum Stable Gain, Maximum Available Gain, and Rollett


Stability Factor

The maximum stable gain (MSG), maximum available gain (MAG), and Rollett stability factor
(K) are plotted.

NOTE A previous conversion to Y-parameters is required, or select the


Y Parameters option on the Convert Data tab.

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

A simple Smith chart of a given parameter is plotted:


■ List of R: List of radii used in the background.
■ List of X: List of straight lines plotted in the background.

Polar Plot

A polar plot of a small-signal parameter is created:


■ List of R: List of radii used in the background.
■ List of Phi: List of polar straight lines in the background.

Inspect User Guide 117


H-2013.03
10: Two-Port Network RF Extraction
RF Parameter Extraction Dialog Box

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.

Figure 19 Plot tab

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.

118 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

Using Scripts for RF Parameter Extraction


All actions that can be performed using the RF Parameter Extraction dialog box can be
performed using scripts.

Loading Small-Signal Output File of Sentaurus Device


A small-signal output file of Sentaurus Device is loaded using the command:
proj_load <ACDataFileRootName>

The argument <ACDataFileRootName> takes the name of the small-signal output file, for
example, n3_ac_des.plt.

Making Small-Signal Output Data Accessible to Extraction


Script
After loading the small-signal output file of Sentaurus Device into Inspect, the data is made
accessible to the plug-in scripts with:
tpnx_load <ACDataFileRootName> <DisplayOpt> v(<BiasPort>) frequency \
<Port1> <Port2>

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

Figure 20 Two-port network schematic

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

Inspect User Guide 119


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

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

Global Scaling of Small-Signal Parameters


Some small-signal parameters and quantities derived from them scale with the width of the
device (or the number of parallel operating devices). The effective device width can be set in
Sentaurus Device with the keyword AreaFactor in the Physics section. Alternatively, the
scaling is performed by using the scripts of the plug-in:
tpnx_DevWidth <ScalingFactor>

The default value of <ScalingFactor> is 1.

NOTE The device width must be set before any call to tpnx_ac2y,
tpnx_ac2z, tpnx_ac2h, and tpnx_ac2s.

Global Setting of Characteristic Impedance


The S-parameters depend on the characteristic impedance used as a reference. It is customary
to use 50 Ω . However, this default setting can be changed with:
tpnx_characteristic_impedance <CharacteristicImpedance>

The default value of <CharacteristicImpedance> is 50.

Converting Sentaurus Device Small-Signal Data to Y-, Z-,


H-, and S-Parameters
After the small-signal data of Sentaurus Device is accessible to the script (see Making Small-
Signal Output Data Accessible to Extraction Script on page 119), the small-signal data can be
converted to Y-parameters using:
tpnx_ac2y <DisplayOpt> frequency <Port1> <Port2> <ICCAPFile>

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

120 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

(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.

The conversion into other parameters is accomplished by the routines tpnx_ac2z,


tpnx_ac2h, and tpnx_ac2s. These routines take the same arguments as tpnx_ac2y and
operate in a similar fashion, for example:
tpnx_ac2y nodisplay frequency 1 2 n9Y-ICCAP

The conversions are performed as follows:

First, the 2 × 2 conductance [A] and capacitance [C] matrices are converted into the Y-matrix
according to:
Y = A + jωC (3)

where j is the imaginary unit, and ω is 2π multiplied by the frequency.

The formulas to convert the Y-matrix to the Z-matrix are:


y 22
z 11 = -------
Dy
– y 12
z 12 = ----------
Dy
(4)
– y 21
z 21 = ----------
Dy
y 11
z 22 = -------
Dy

Inspect User Guide 121


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

The formulas to convert the Y-matrix to the H-matrix are:


1
h 11 = -------
y 11
– y 12
h 12 = ----------
y 11
(5)
y 21
h 21 = -------
y 11
Dy
h 22 = -------
y 11

with D y = y 11 y 22 – y 12 y 21 .

The formulas to convert the Y-matrix to the S-matrix are:

( 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

with y ij = Z o y ij , where Z o is the characteristic impedance (see Global Setting of


Characteristic Impedance on page 120) and N y = ( 1 + y 11 ) ( 1 + y 22 ) – y 12 y 21 .

Global Variables to Control Plotting of Curves


The plotting of curves can be made using frequency or bias as the x-axis; this decision is made
at the time of calling the plot routines.

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.

122 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

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 default value of tpnx_biasPointNo is –1.

NOTE A value other than –1 overwrites the range selection with


tpnx_bias_low and tpnx_bias_high.

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.

Plotting Real and Imaginary Parts of Small-Signal


Parameters
The real and imaginary parts of any small-signal parameter are plotted as a function of
frequency or bias for a single point or a range (see Global Variables to Control Plotting of
Curves on page 122) with:
tpnx_plot_par <RealDisplayOpt> <ImaginaryDisplayOpt> <ParName> <Xaxis> \
<Port1> <Port2> <PostFix>

where the arguments <RealDisplayOpt> and <ImaginaryDisplayOpt> take the value


nodisplay, y, or y2. For nodisplay, the plotting of curves is suppressed. For y and y2, the
curves are plotted to the selected axis.

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.

Inspect User Guide 123


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

Example

The command for plotting h21 to the y-axis is:


tpnx_plot_par y y h frequency 2 1 my
jl;j

This command creates curve names such as h_r(2,1)my(0.82) and h_i(2,1)my(0.82),


where the first character denotes the small-signal parameter type, r and i are the real and
imaginary parts, (2,1) denotes the selected matrix element, my is the selected post-fix, and
(0.82) gives the control bias for this curve.

NOTE Running the appropriate conversion routine (that is, tpnx_ac2y,


tpnx_ac2z, tpnx_ac2h, or tpnx_ac2s) is a prerequisite.

Plotting Magnitude and Phase of Small-Signal Parameters


The magnitude or phase part of any small-signal parameter is plotted as a function of frequency
or bias for a single point or a range (see Global Variables to Control Plotting of Curves on
page 122) with:
tpnx_plot_dB <MagDisplayOpt> <PhaseDisplayOpt> <ParName> <Xaxis> \
<Port1> <Port2> <dBSelect> <PostFix>

where the arguments <MagDisplayOpt> and <PhaseDisplayOpt> take the value


nodisplay, y, or y2. For nodisplay, the plotting of curves is suppressed. For y or y2, the
magnitude curve is plotted to the y-axis and the phase curve is plotted to the y2-axis.

The <Xaxis> argument takes the value frequency or bias.

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.

124 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

Example

The command for plotting h21 to the y-axis is:


tpnx_plot_dB y y h frequency 2 1 20 my

This command creates curve names such as h_dB(2,1)my(0.82) and


h_phase(2,1)my(0.82) where the first character denotes the small-signal parameter type,
dB denotes the magnitude curve, phase denotes the phase curve, (2,1) denotes the selected
matrix element, my is the selected post-fix, and (0.82) gives the control bias for this curve.

The plotting of the phase can be suppressed by setting the global variable:
tpnx_plotPhase false

By default, it is set to true.

NOTE Running the appropriate conversion routine (that is, tpnx_ac2y,


tpnx_ac2z, tpnx_ac2h, or tpnx_ac2s) is a prerequisite.

Polar Plots of Small-Signal Parameters


A polar plot of any small-signal parameter is created for a single point or a range of bias or
frequency (see Global Variables to Control Plotting of Curves on page 122) with:
tpnx_polarplot <Xaxis> <ParName> <Port1> <Port2> <Name>

The <Xaxis> argument takes the value frequency or bias.

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.

Inspect User Guide 125


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

NOTE Running the appropriate conversion routine (that is, tpnx_ac2y,


tpnx_ac2z, tpnx_ac2h, or tpnx_ac2s) is a prerequisite.

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.

Mason’s Unilateral Gain


Mason’s unilateral gain (MUG) is plotted as a function of frequency or bias (see Global
Variables to Control Plotting of Curves on page 122) with:
tpnx_y2MUG <DisplayOpt> <Xaxis> <Port1> <Port2> <PostFix>

where the argument <Xaxis> takes the value frequency or bias.

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.

Internally, MUG is computed from the Z-parameters by using:


2
z 21 – z 12
MUG = --------------------------------------------------------------------------------------- (7)
4 [ ℜ(z 11) ⋅ ℜ(z 22) – ℜ(z 12) ⋅ ℜ(z 21) ]

Example

The command for plotting MUG to the y-axis is:


tpnx_y2MUG y frequency 1 2 my

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.

126 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

NOTE Running the conversion routine tpnx_ac2y is a prerequisite.

Maximum Stable Gain, Maximum Available Gain, and


Rollett Stability Factor
The maximum stable gain and maximum available gain (MSG/MAG) and the Rollett stability
factor (K) are plotted as a function of frequency or bias for a single point or a range (see Global
Variables to Control Plotting of Curves on page 122) with:
tpnx_y2MSG <DisplayOpt> <Xaxis> <Port1> <Port2> <PostFix>

where the <Xaxis> argument takes the value frequency or bias.

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

For K < 1 , MAG is set to MSG.

Inspect User Guide 127


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

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

The plotting of K is suppressed by setting:


tpnx_plotK false

The default is true.

The plotting of MSG and MAG is suppressed by setting:


tpnx_plotMSG false

The default is true.

NOTE Running the conversion routine tpnx_ac2y is a prerequisite.

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.

128 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

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

The command for plotting fmax to the y-axis is:


tpnx_y2MUG y frequency 1 2 my fextract

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

The default is true.

The plotting of results from method (b) is suppressed by setting:


tpnx_plotXdB false

The default is true.

As previously mentioned, method (b) looks for the point where MUG dropped by a certain
amount. This amount is set by:
tpnx_setdBPoint <amount>

where <amount> is given in dB. The default is 10.

NOTE Running the conversion routine tpnx_ac2y is a prerequisite.

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.

Inspect User Guide 129


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

Fast Alternative Extraction 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 (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

Otherwise, the extraction is performed as previously discussed.

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

The command for plotting ft to the y-axis is:


tpnx_plot_dB y h frequency 2 1 20 my fextract y

This command creates curve names such as f_hONEmy for method (a) and f_hXdBmy for
method (b).

130 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

Related Variables

The plotting of results from method (a) is suppressed by setting:


tpnx_plotONE false

The default is true.

The plotting of results from method (b) is suppressed by setting:


tpnx_plotXdB false

The default is true.

As previously mentioned, method (b) looks for the point where |h21| dropped by a certain
amount. This amount is set by:
tpnx_setdBPoint <amount>

where <amount> is given in dB. The default is 10.

NOTE Running the conversion routine tpnx_ac2h is a prerequisite. This


routine can be used to extract the unit point of any small-signal
parameter.

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.

Fast Alternative Extraction Method

See Fast Alternative Extraction Method on page 130.

Inspect User Guide 131


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

Discussion of Different Cut-off Frequency Extraction


Methods
Unfortunately, there is no single definition of ft and fmax that is appropriate under all
circumstances. Technically, method (a), the direct search for the unit gain point, should be the
most appropriate definition. However, at high frequencies, additional parasitic elements may
become dominant and alter the 20 dB/decade slope near the unit gain point. Further, in
experiments, it is sometimes difficult to trace the gain curve to high-enough frequencies to see
the unit gain point directly. Therefore, extrapolation of experimental data to the unit gain point
is common. In this case, the experiment may not ‘see’ the altered slope due to the parasitics
(also some parasitics may not be included in the simulation). For a comparison with
experimental results, therefore, method (b) may be better.

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.

132 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

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.

Inspect User Guide 133


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

Example

The command for plotting fK=1 to the y-axis is:


tpnx_y2MSG y frequency 1 2 my fextract

This command creates curve names such as fKONEmy.

NOTE Sometimes, there is more than one point where K = 1. To extract a


second, high-frequency solution, set the starting point of the search
appropriately with: tpnx_startfq <StartFrequency>
The default is 0.

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]

NOTE Use tpnx_biasPointNo (see Global Variables to Control Plotting of


Curves on page 122) to select the control bias of interest or ensure that
the small-signal output of Sentaurus Device contains only a single
control bias.

134 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
Using Scripts for RF Parameter Extraction

■ List of last created curves


Some commands of the script create more than one curve. To customize the color and line
style of these curves, it is useful to have access to a list of all curves created by the last
command. This is accomplished by the command tpnx_CurveDisplayList.
This example illustrates how to customize the display of a set of curves using
tpnx_CurveDisplayList:
set CURVES [tpnx_CurveDisplayList]
set COLORS [list red blue green orange magenta purple black \
maroon brown tomato violet turquoise pink yellow khaki azure]
set NCOLORS [llength $COLORS]

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}
}

Inspect User Guide 135


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

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

The RF extraction library assumes a two-port network–like configuration such as shown in


Figure 20 on page 119.

RF Data Loading and Exporting

rfx_Export2csv

Action: Exports the Y-, H-, Z-, or S-matrix to a comma-separated values


(CSV) file.
Input:

FileName Name to be used for the output file. Default: export.csv.


Parameter "Y", "H", "Z", or "S". Mandatory argument.
XAxis "frequency" or "bias". Selects the sorting order. For example, for
XAxis=frequency, the data is printed using a loop with the
frequency as the ‘inner variable’ and the bias as the outer variable.
Default: "frequency".
Help Prints use if set to 1. Default: 0.
Returns: None

Uses the global variables:


■ rfx_NumberOfFrequencies: Number of frequencies.
■ rfx_Frequencies: List of frequencies.
■ rfx_NumberOfBiasPoints: Number of bias points.
■ rfx_BiasPoints: List of bias points.
■ rfx_Y: The Y-matrix.

136 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

Creates a CSV file containing columns. For Parameter=Z XAxis=frequency:


bias, freq, R: Z.11, I: Z.11, R: Z.12, I: Z.12,
R: Z.21, I: Z.21, R: Z.22, I: Z.22

For XAxis=bias, the first two columns are reversed.

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.

Uses the global variables:


■ rfx_NumberOfFrequencies: Number of frequencies.
■ rfx_Frequencies: List of frequencies.
■ rfx_NumberOfBiasPoints: Number of bias points.
■ rfx_BiasPoints: List of bias points used.
■ rfx_Y: The Y-matrix.

Examples
set fK1 [rfx_GetFK1 "XScale=log Scale=1 Occurrence=1"]
rfx_GetFK1 "Help=1"

Inspect User Guide 137


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_GetFmax

Action: Computes the cut-off frequency fmax.


Input:

Method "a" or "unit-gain-point" extracts fmax as the frequency at which


MUG = 0 dB.

"b" or "extract-at-dBPoint" extracts fmax by extrapolating


MUG from the point at which MUG has dropped by a certain number
of decibels from its initial value. The extrapolation assumes that
MUG drops by 20 dB/decade. This dB point is set with the
Parameter argument. (The recommended values are between 7 and
15.)

"c" or "extract-at-frequency" is the same as "b", but MUG is


extrapolated from a certain frequency point. This frequency point is
set with the Parameter argument (in units of Hz).

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.

Uses the global variables:


■ rfx_NumberOfFrequencies: Number of frequencies.
■ rfx_Frequencies: List of frequencies.
■ rfx_NumberOfBiasPoints: Number of bias points.
■ rfx_BiasPoints: List of bias points.
■ rfx_Y: The Y-matrix.

138 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

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

Action: Computes the cut-off frequency ft.


Input:

Method "a" or "unit-gain-point" extracts ft as the frequency at which


h21 = 0 dB.

"b" or "extract-at-dBPoint" extracts ft by extrapolating h21


from the point at which h21 has dropped by a certain number of
decibels from its initial value. The extrapolation assumes that h21
drops by 20 dB/decade. This dB point is set with the Parameter
argument. (The recommended values are between 7 and 15.)

"c" or "extract-at-frequency" is the same as "b", but h21 is


extrapolated from a certain frequency point. This frequency point is
set with the Parameter argument (in units of Hz).

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.

Uses the global variables:


■ rfx_NumberOfFrequencies: Number of frequencies.
■ rfx_Frequencies: List of frequencies.
■ rfx_NumberOfBiasPoints: Number of bias points.

Inspect User Guide 139


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

■ rfx_BiasPoints: List of bias points.


■ rfx_Y: The Y-matrix.

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:

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 Rollett stability factor (K), MSG, and MAG as a function of the
selected x-axis. The returned data is in the form of three lists. The
first list contains the K values, the second one, the MSG values, and
the last one, the MAG values.

Uses the global variables:


■ rfx_NumberOfFrequencies: Number of frequencies.
■ rfx_Frequencies: List of frequencies.
■ rfx_NumberOfBiasPoints: Number of bias points.
■ rfx_BiasPoints: List of bias points.
■ rfx_Y: The Y-matrix.

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"

140 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_GetMUG

Action: Accesses Mason’s unilateral gain (MUG) as a function of frequency


or bias.
Input:

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: MUG as a function of the selected x-axis. The returned data is in the
form of a list.

Uses the global variables:


■ rfx_NumberOfFrequencies: Number of frequencies.
■ rfx_Frequencies: List of frequencies.
■ rfx_NumberOfBiasPoints: Number of bias points.
■ rfx_BiasPoints: List of bias points.
■ rfx_Y: The Y-matrix.

Examples
set MUG [rfx_GetMUG BiasOrFqIndex=9]
set MUG [rfx_GetMUG "XAxis=bias BiasOrFqIndex=13"]
rfx_GetMUG "Help=1"

Inspect User Guide 141


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_GetNearestIndex

Action: Finds the index of a frequency or bias point closest to a frequency or


bias of interest.
Input:

Target Frequency or bias point of interest. Mandatory argument.


Help Prints use if set to 1. Default: 0.
DataList An ordered numeric list. The list can be ascending or descending. Use
with rfx_Frequencies or rfx_BiasPoints.

NOTE DataList must be the last argument for this routine.


Returns: The index of the entry in an ordered numeric list that is closest to the
given target.

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:

ACFileName Name of Sentaurus Device AC data file. Mandatory argument.


Port1Name Name of input port of the two-port network. Default: 1.
Port2Name Name of output port of the two-port network. Default: 2.
BiasPortName Name of bias port. For example, v(1) for voltage on port or node 1,
or i(vc,2) for current flowing out of the voltage source vc at port or
node 2. Default: v(1).
DeviceWidth Device width multiplier. Unit is micrometer. Default: 1.
Help Prints use if set to 1. Default: 0.
Returns: None

142 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

Creates the global variables:


■ rfx_NumberOfFrequencies: Number of frequencies.
■ rfx_Frequencies: List of frequencies.
■ rfx_NumberOfBiasPoints: Number of bias points.
■ rfx_BiasPoints: List of bias points.
■ rfx_Y: The Y-matrix. The array has the form:
rfx_Y($ReIm,$P1,$P2,$if,$iv)
where:
ReIm: 0 (real part) or 1 (imaginary part)
P1,P2: 1 or 2 (port)
if: 0-(rfx_Frequencies-1) frequency index
iv: 0-(rfx_BiasPoints-1) bias point index

Examples
rfx_load "ACFileName=n38_ac_des.plt"

rfx_load "ACFileName=n38_ac_des.plt Port1Name=1 Port2Name=2 \


BiasPortName=i(vc,2) DeviceWidth=30"

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.

Inspect User Guide 143


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

Uses the global variables:


■ rfx_NumberOfFrequencies: Number of all frequencies.
■ rfx_Frequencies: List of frequencies used.
■ rfx_NumberOfBiasPoints: Number of all bias points.
■ rfx_BiasPoints: List of bias points used.
■ rfx_Y: The Y-matrix.

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"

Utility Section A: Parameter Converters

rfx_S2K

Action: Converts S-parameters to Rollett stability factor (K), maximum stable


gain (MSG), and maximum available gain (MAG).
Input: The complex S-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 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.

144 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_Y2K

Action: Converts Y-parameters to K, MSG, and MAG.


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.

Uses the conversion function rfx_S2K.


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_Y2S

Action: Converts Y-parameters to S-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.
Uses the rfx_CharacteristicImpedance global variable, which
is set to 50 Ω by default. To alter this variable, for example, set:

rfx_CharacteristicImpedance 100

before calling rfx_Y2S.


Returns: The complex S-matrix in the form of four lists. Each list contains the
real and imaginary parts of a component of the S-matrix.

rfx_Y2U

Action: Converts Y-parameters to Mason’s unilateral gain (MUG).


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.

Uses the conversion function rfx_Z2U.


Returns: MUG at this frequency and bias point.

Inspect User Guide 145


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_Y2Z

Action: Converts Y-parameters to Z-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 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

Action: Converts Z-parameters to MUG.


Input: The complex Z-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 Z-matrix.
Returns: MUG at this frequency and bias point.

Utility Section B: Complex Arithmetic Support

rfx_abs_c

Action: Returns absolute value of a complex number.


Input: A list containing the real and imaginary parts of a complex number.
Returns: A single value.
Examples:

set c1 [list 0 2]
puts [rfx_abs_c $c1]
-> 2.0

146 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_abs2_c

Action: Computes absolute square of a complex number.


Input: A list containing the real and imaginary parts of a complex number.
Returns: A single value.
Examples:

set c1 [list 0 2]
puts [rfx_abs2_c $c1]
-> 4.0

rfx_add_c

Action: Adds two complex numbers.


Input: Two lists, each containing the real and imaginary parts of a complex
number.
Returns: A list containing the real and imaginary parts of a complex number.
Examples:

set c1 [list 1 0]
set c2 [list 0 1]
puts [rfx_add_c $c1 $c2]
-> 1 1

rfx_con_c

Action: Conjugates a complex number.


Input: A list containing the real and imaginary parts of a complex number.
Returns: A list containing the real and imaginary parts of a complex number.
Examples:

set c1 [list 1 1]
puts [rfx_con_c $c1]
-> 1 -1

Inspect User Guide 147


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_div_c

Action: Divides two complex numbers.


Input: Two lists, each containing the real and imaginary parts of a complex
number.
Returns: A list containing the real and imaginary parts of a complex number.
Examples:

set c1 [list 4 0]
set c2 [list 0 2]
puts [rfx_div_c $c1 $c2]
-> 0 -2.0

rfx_im_c

Action: Returns imaginary part of a complex number.


Input: A list containing the real and imaginary parts of a complex number.
Returns: A single value.
Examples:

set c1 [list 1 2]
puts [rfx_im_c $c1]
-> 2

rfx_mag_phase

Action: Computes absolute value and the phase of a complex number.


Input: A list containing the real and imaginary parts of a complex number.
Returns: A list containing the absolute value and the phase.
Examples:

set c1 [list 1 1]
puts [rfx_mag_phase $c1]
-> 1.414213562373095 45.0

148 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_mul_c

Action: Multiplies two complex numbers.


Input: Two lists, each containing the real and imaginary parts of a complex
number.
Returns: A list containing the real and imaginary parts of a complex number.
Examples:

set c1 [list 1 0]
set c2 [list 0 1]
puts [rfx_mul_c $c1 $c2]
-> 0 1

rfx_re_c

Action: Returns real part of a complex number.


Input: A list containing the real and imaginary parts of a complex number.
Returns: A single value.
Examples:

set c1 [list 1 2]
puts [rfx_re_c $c1]
-> 1

rfx_sign

Action: Returns the sign of a real value.


Input: Real value.
Returns: 1.0 or –1.0
Examples:

puts [rfx_sign -2]


-> -1.0

Inspect User Guide 149


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_sub_c

Action: Subtracts two complex numbers.


Input: Two lists, each containing the real and imaginary parts of a complex
number.
Returns: A list containing the real and imaginary parts of a complex number.
Examples:

set c1 [list 1 0]
set c2 [list 0 1]
puts [rfx_sub_c $c1 $c2]
-> 1 -1

Utility Section C: Modifying Curves

rfx_ExtractVal

Action: Returns x-values of the n -th point at which the given y-value crosses
the target value.
Input:

Target y-value to be searched for. Default: 0.


XScale Select "lin" or "log" to specify whether the values on the x-axis
are linearly or logarithmically distributed. Default: "log".
Occurrence "1", "2", "3", …
Selects whether the first, second, or third crossing point is returned.
Default: 1.
Help Prints use if set to 1. Default: 0.
XList A list of x-values.
YList A list of y-values.

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.

150 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

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:

set RealParts [list 1 1 0 -1 -1 -1 0 1]


set ImagParts [list 0 1 1 1 0 -1 -1 -1]
set CList [list $RealParts $ImagParts]
set Abs [rfx_ReIm2Abs $CList]
puts $Abs

set RealParts [list 0 0 0 0 0]


set ImagParts [list 1e0 1e1 1e2 1e3 1e4]
set CList [list $RealParts $ImagParts]
set dB [rfx_ReIm2Abs $CList 10]
puts $dB
-> 0.0 10.0 20.0 30.0 40.0

Inspect User Guide 151


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_ReIm2Phase

Action: Creates a list of phases for a ‘complex’ list.


Input: Two lists. The first list contains the real values, and the second list
contains the imaginary values.
Returns: A list of corresponding phases.
Examples:

set RealParts [list 1 1 0 -1 -1 -1 0 1]


set ImagParts [list 0 1 1 1 0 -1 -1 -1]
set CList [list $RealParts $ImagParts]
set Phases [rfx_ReIm2Phase $CList]
puts $Phases
-> 0.0 45.0 90.0 135.0 180.0 -135.0 -90.0 -45.0

Utility Section D: Backgrounds

rfx_PolarBackdrop

Action: Creates a ruled background on which RF parameters in polar


coordinates are plotted.
Input:

RList A list of radial values.


PhiList A list of angular values.
Returns: None

Creates two families of curves: a set of concentric circles and a set of


angular lines.
Examples:

set RList [list 0.25 0.5 0.75 1.0]


set PhiList [list 0 30 60 90 120 150]
rfx_PolarBackdrop $RList $PhiList

152 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

rfx_SmithBackdrop

Action: Creates a Smith chart–ruled background on which RF parameters are


plotted.
Input:

RList A list of R-values (constant resistive or conductive component).


xList A list of x-values (constant capacitive or inductive component).
Returns: None

Creates two families of curves: the resistive or conductive circles and


the capacitive or inductive circles.
Examples:

set RCList [list 0 0.3333 1.0 3.0]


set CIList [list 0.268 0.575 1 1.73 3.75]
rfx_SmithBackdrop $RCList $CIList

Formulas Used in RF Extraction Library

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 RF extraction library reads only a 2 × 2 matrix, corresponding to a two-port network


setup. If other ports are present, they are ignored.

The A- and C-matrices are converted to the Y-matrix using the formula:
Y = A + jωC (12)

where j is the imaginary unit, and ω is 2π multiplied by the frequency.

Inspect User Guide 153


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

Z-Matrix

The Y-matrix is converted to the Z-matrix using the formulas [1]:


y 22
z 11 = -------
Dy
– y 12
z 12 = ----------
Dy
(13)
– y 21
z 21 = ----------
Dy
y 11
z 22 = -------
Dy

with D y = y 11 y 22 – y 12 y 21 .

H-Matrix

The Y-matrix is converted to the H-matrix using the formulas [1]:


1
h 11 = -------
y 11
– y 12
h 12 = ----------
y 11
(14)
y 21
h 21 = -------
y 11
Dy
h 22 = -------
y 11

with D y = y 11 y 22 – y 12 y 21 .

154 Inspect User Guide


H-2013.03
10: Two-Port Network RF Extraction
RF Extraction Library

S-Matrix

The Y-matrix is converted to the S-matrix using the formulas [1]:

( 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

with y ij = Z o y ij , where Z o is the characteristic impedance (see Global Setting of


Characteristic Impedance on page 120) and N y = ( 1 + y 11 ) ( 1 + y 22 ) – y 12 y 21 .

The characteristic impedance defaults to 50 Ω .

To change the characteristic impedance to, for example, 100 Ω , use:


set rfx_CharacteristicImpedance 100.0

after loading the RF extraction library.

Mason’s Unilateral Gain

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) ]

where ℜ ( z ) denotes the real part of the complex number z .

Rollett Stability Factor

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 .

Inspect User Guide 155


H-2013.03
10: Two-Port Network RF Extraction
References

Maximum Stable Gain

The maximum stable gain (MSG) is computed from the S-parameters using the formula [3]:
s 21
MSG = ------
- (18)
s 12

Maximum Available Gain

The maximum available gain (MAG) is computed using the formula [3]:
2
MAG = MSG ⋅ ( K – K – 1 ) (19)

For K < 1, MAG is set to 0.

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.

156 Inspect User Guide


H-2013.03
APPENDIX A Graphical User Interface

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.

Table 6 Inspect toolbar buttons


Button Description Button Description

Opens dataset file Displays or removes grid

Prints current plot Moves selected curve to the front of all curves

Reloads dataset Moves selected curve to the back 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

Zooms in, showing a selected area Runs or continues executing script

Zooms out, showing a larger area Stops executing script

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

Zooms in to a selected curve Enables or disables logarithmic scale on right


y-axis

Displays or removes legend text

Inspect User Guide 157


H-2013.03
A: Graphical User Interface
File Menu

File Menu
Table 7 lists the commands of the File menu.

Table 7 File menu commands


Command Button Shortcut keys Description

Load Dataset Ctrl+L Opens dataset file.

Update Datasets Ctrl+U Reloads datasets from opened files and updates related
curves.

Automatically Update Datasets Automatically reloads datasets from opened files.

Delete Datasets Deletes selected projects and the curves that use data
from them.

Load Setup Loads preferences stored in setup file.

Save Setup Saves preferences to setup file.

Restore All Loads a previously saved project from a .sav file.

Save All Saves current state of Inspect to a .sav file.

Export Saves current curves to different file formats.

Write Bitmap Ctrl+W Creates a bitmap file of plot area image in PNG format.

Write EPS Creates an EPS file of plot area image.

Write PS Creates a PostScript file of plot area image.

Print Ctrl+P Opens the Printer Setup dialog box.

Preferences Opens the Preferences dialog box.

Exit Ctrl+Q Exits Inspect.

158 Inspect User Guide


H-2013.03
A: Graphical User Interface
Edit Menu

Edit Menu
Table 8 lists the commands of the Edit menu.

Table 8 Edit menu commands


Command Button Shortcut keys Description

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.

Clean Plot Area Cleans the 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.

Define Macros Opens the Macro Editor.

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.

Table 9 Curve menu commands


Command Button Shortcut keys Description

Transform Displays a submenu with these options:


Abs X: Maps x-value of all data points of selected curves to its
absolute value and redisplays the curve.
Abs Y: Maps y-value of all data points of selected curves to its
absolute value and redisplays the curve.
Reflect X: Reflects curve about x-axis.
Reflect Y: Reflects curve about y-axis.
Suppress Backtrace: Data points of a selected curve where the x
values are not monotonically increasing (where the current x-value
is less than the previous one) indicate the start of a new line. In this
case, no line connects the previous point to the current point.

Curve Data Ctrl+D Opens a dialog box that shows the points of the dataset
corresponding to the selected curve.

Restore Data Undoes all changes to selected curves.

Inspect User Guide 159


H-2013.03
A: Graphical User Interface
Script Menu

Table 9 Curve menu commands


Command Button Shortcut keys Description

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.

Inspector Opens the Inspector dialog box.

Drawing Order Opens a submenu to rearrange order of curves. Options are:


Move to Front: Moves the selected curve to the front of all curves.
Move to Back: Moves the selected curve to the back of all curves.
Move Forward: Moves the selected curve one step closer to the
front.
Move Backward: Moves the selected curve one step closer to the
back.

Script Menu
Table 10 lists the commands of the Script menu.

Table 10 Script menu commands


Command Button Shortcut keys Description

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.

Record Creates a script file. Options are:


Start: Opens the Record Script File dialog box for selecting the
output file and starts to record a sequence of operations.
Add Pause: Adds a sleep command to the script. The length of the
pause is selected from the submenu.
Add Break: Adds a break command to the script.
Stop: Stops the recording.

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.

160 Inspect User Guide


H-2013.03
A: Graphical User Interface
Extensions Menu

Extensions Menu
Table 11 lists the command of the Extensions menu.

Table 11 Extensions menu command


Command Button Shortcut keys Description

Two-Port Networks Ctrl+T Opens the RF Parameter Extraction dialog box.

Help Menu
Table 12 lists the command of the Help menu.

Table 12 Help menu command


Command Button Shortcut keys Description

About Ctrl+B Provides version information.

Inspect User Guide 161


H-2013.03
A: Graphical User Interface
Help Menu

162 Inspect User Guide


H-2013.03
APPENDIX B Restrictions in Inspect

This appendix lists the restrictions that affect working with Inspect.

The diff(…formula…) and integr(…formula…) Operators


The diff() and integr() operators require a curve only argument, which can be defined as
a curve that contains more than one point, since a curve that contains only one point is treated
as a scalar. When a formula is used as an argument for these operators, the parser cannot always
decide if the argument curve for the diff() or integr() operators will have more than one
point; therefore, an error message is generated.

For example, to obtain proper results, diff(log10(...formula...)) must be performed


in two steps. First, create the curve log10(...formula...), and then apply the diff()
operator to the resulting curve.

The vecvalx(…formula…) and vecvaly(…formula…)


Operators
It is advisable to compute the curve defined by ...formula... before applying the
vecvalx() or vecvaly() operators. Additionally, if the curve has an exponential behavior,
better results are obtained if the curve is transformed to a logarithmic scale before applying
these operators.

For example, suppose you want to compute the value:


vecvalx(diff(<c1>), 1e-7)

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))

Inspect User Guide 163


H-2013.03
B: Restrictions in Inspect
No Support for Right Y-Axes

No Support for Right Y-Axes


The Inspector dialog box works only for the x-axis and left y-axis.

164 Inspect User Guide


H-2013.03

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy