Orcad Pspice A/D: How To Use This Online Manual
Orcad Pspice A/D: How To Use This Online Manual
Orcad Pspice A/D: How To Use This Online Manual
Welcome to OrCAD
Overview
Commands
Analog devices
Digital devices
Glossary
Index
Version 9.0, October, 1998.
Copyright 1998, OrCAD, Inc. All rights reserved.
Printed in the United States of America.
OrCAD trademarks
OrCAD, OrCAD Layout, and OrCAD Simulate are registered trademarks, and EDA for the Windows NT Enterprise,
Enterprise CIS, Enterprise Component Information System, OrCAD Capture CIS, OrCAD Express, OrCAD Express CIS,
OrCAD Layout Engineer's Edition, OrCAD Optimizer, SmartRoute, OrCAD Capture, OrCAD Design Desktop, OrCAD
Express, SmartDrag, SmartPlace, SmartRoute, and SmartWire are trademarks of OrCAD, Inc.
Referenced herein are the trademarks used by OrCAD, Inc., to identify its products. OrCAD is the exclusive owners of
“MicroSim,” “PSpice,” “PLogic,” “PLSyn.”
Additional marks of OrCAD include: “StmEd,” “Stimulus Editor,” “Probe,” “Parts,” “Monte Carlo,” “Analog Behavioral
Modeling,” “Device Equations,” “Digital Simulation,” “Digital Files,” “Filter Designer,” “Schematics,”
“PLogic,” ”PCBoards,” “PSpice Optimizer,” and “PLSyn” and variations theron (collectively the “Trademarks”) are used
in connection with computer programs. OrCAD owns various trademark registrations for these marks in the United States
and other countries.
SPECCTRA is a registered trademark of Cooper & Chyan Technology, Inc.
Copyright notice
Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or
distributed in any form or by any means, or stored in a data base or retrieval system, without the prior written permission of
OrCAD, Inc.
As described in the license agreement, you are permitted to run one copy of the OrCAD software on one computer at a time.
Unauthorized duplication of the software or documentation is prohibited by law. Corporate Program Licensing and multiple
copy discounts are available.
Contact information
Technical support (503) 671-9400 Technical support e-mail techsupport@orcad.com
Corporate offices (503) 671-9500 General e-mail info@orcad.com
Fax (503) 671-9501 World Wide Web http://www.orcad.com
Contents
How to Use This
Online Manual
How to print this online manual . . . . . . . . . . . . . . . . . . . . . xiv
Welcome to OrCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Typographical conventions . . . . . . . . . . . . . . . . . . . . . . xvi
Command syntax formats . . . . . . . . . . . . . . . . . . . . . . xvii
Numeric value conventions . . . . . . . . . . . . . . . . . . . . . xviii
Numeric expression conventions . . . . . . . . . . . . . . . . . . . xix
Command line options
for OrCAD applications . . . . . . . . . . . . . . . . . . . . . xxii
Command files . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Creating and editing command files . . . . . . . . . . . . . . . xxii
Log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Editing log files . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Simulation command line specification format . . . . . . . . . . . xxv
Simulation command line options . . . . . . . . . . . . . . . . xxvi
Specifying simulation command line options. . . . . . . . . . xxvii
Commands
Command reference
for PSpice and PSpice A/D . . . . . . . . . . . . . . . . . . . . . 30
.AC (AC analysis) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
.ALIASES, .ENDALIASES
(aliases and endaliases) . . . . . . . . . . . . . . . . . . . . . . . 33
.DC (DC analysis) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Linear sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Logarithmic sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Nested sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
.DISTRIBUTION (user-defined distribution) . . . . . . . . . . . . . . . 37
Deriving updated parameter values . . . . . . . . . . . . . . . . . . 37
Usage example . . . . . . . . . . . . . . . . . . . . . . . . . . 38
.END (end of circuit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
.EXTERNAL (external port) . . . . . . . . . . . . . . . . . . . . . . . . 40
.FOUR (Fourier analysis) . . . . . . . . . . . . . . . . . . . . . . . . . 41
.FUNC (function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
.IC (initial bias point condition) . . . . . . . . . . . . . . . . . . . . . . 43
.INC (include file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
.LIB (library file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
.LOADBIAS (load bias point file) . . . . . . . . . . . . . . . . . . . . . 46
.MC (Monte Carlo analysis) . . . . . . . . . . . . . . . . . . . . . . . . 47
.MODEL (model definition) . . . . . . . . . . . . . . . . . . . . . . . . 50
Parameters for setting temperature . . . . . . . . . . . . . . . . . . . 53
Model parameters for device temperature . . . . . . . . . . . . 53
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Contents
Special considerations. . . . . . . . . . . . . . . . . . . . . . . 54
.NODESET (set approximate node voltage for bias point) . . . . . . . . 55
.NOISE (noise analysis) . . . . . . . . . . . . . . . . . . . . . . . . . . 56
.OP (bias point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
.OPTIONS (analysis options) . . . . . . . . . . . . . . . . . . . . . . . 59
Flag options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Option with a name as its value . . . . . . . . . . . . . . . . . . 60
Numerical options with their default values . . . . . . . . . . . 61
PSpice A/D digital simulation condition messages . . . . . . . . . . 63
.PARAM (parameter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
.PLOT (plot) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
.PRINT (print) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
.PROBE (Probe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
DC Sweep and transient analysis output variables . . . . . . . . . . . 70
Multiple-terminal devices . . . . . . . . . . . . . . . . . . . . . . 71
AC analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Noise analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
.SAVEBIAS (save bias point to file) . . . . . . . . . . . . . . . . . . . . 75
Usage examples . . . . . . . . . . . . . . . . . . . . . . . . . . 76
.SENS (sensitivity analysis) . . . . . . . . . . . . . . . . . . . . . . . . 78
.STEP (parametric analysis) . . . . . . . . . . . . . . . . . . . . . . . . 79
Usage examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
.STIMLIB (stimulus library file) . . . . . . . . . . . . . . . . . . . . . . 82
.STIMULUS (stimulus) . . . . . . . . . . . . . . . . . . . . . . . . . . 83
.SUBCKT (subcircuit) . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
.ENDS (end subcircuit) . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Usage examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
.TEMP (temperature) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
.TEXT (text parameter) . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
.TF (transfer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
.TRAN (transient analysis) . . . . . . . . . . . . . . . . . . . . . . . . . 90
.VECTOR (digital output) . . . . . . . . . . . . . . . . . . . . . . . . . 92
.WATCH (watch analysis results) . . . . . . . . . . . . . . . . . . . . . 94
.WCASE (sensitivity/worst-case analysis) . . . . . . . . . . . . . . . . . 95
* (comment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
; (in-line comment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
+ (line continuation) . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Differences between PSpice and Berkeley SPICE2 . . . . . . . . . . . 102
Analog devices
Analog devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Device types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Analog device summary . . . . . . . . . . . . . . . . . . . . . . . 107
GaAsFET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Capture parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Setting operating temperature . . . . . . . . . . . . . . . . . . . 111
Model parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 112
GaAsFET model parameters for all levels . . . . . . . . . . . . 112
GaAsFET model parameters specific to model levels . . . . . . 113
4
Contents
5
Contents
6
Contents
7
Contents
Digital devices
Digital device summary . . . . . . . . . . . . . . . . . . . . . . . . . 246
Digital primitive summary . . . . . . . . . . . . . . . . . . . . . . . . 247
General digital primitive format . . . . . . . . . . . . . . . . . . . 250
Timing models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Treatment of unspecified propagation delays. . . . . . . . . . . 252
Treatment of unspecified timing constraints . . . . . . . . . . . 253
Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Standard gates . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Standard gate timing model parameters. . . . . . . . . . . . . . 257
Tristate gates . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Tristate gate types . . . . . . . . . . . . . . . . . . . . . . . . . 259
Tristate gate timing model parameters . . . . . . . . . . . . . . 260
Bidirectional transfer gates . . . . . . . . . . . . . . . . . . . . 261
Flip-flops and latches . . . . . . . . . . . . . . . . . . . . . . . . . 264
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Timing violations . . . . . . . . . . . . . . . . . . . . . . . . . 264
Edge-triggered flip-flops . . . . . . . . . . . . . . . . . . . . . 265
Edge-triggered flip-flop timing model parameters . . . . . . . . 267
Edge-triggered flip-flop truth tables DFF and JKFF . . . . 268
Edge-triggered flip-flop truth tables DFFDE and JKFFDE. . . . 269
Gated latch . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Gated latch truth tables . . . . . . . . . . . . . . . . . . . . . . 272
Pullup and pulldown . . . . . . . . . . . . . . . . . . . . . . . . . 273
Delay line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Programmable logic array . . . . . . . . . . . . . . . . . . . . . . 275
Read only memory . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Random access read-write memory . . . . . . . . . . . . . . . . . 283
Multi-bit A/D and D/A converter . . . . . . . . . . . . . . . . . . 286
Multi-bit analog-to-digital converter . . . . . . . . . . . . . . . 287
Multi-bit digital-to-analog converter . . . . . . . . . . . . . . . 289
Behavioral primitives . . . . . . . . . . . . . . . . . . . . . . . . . 291
Logic expression . . . . . . . . . . . . . . . . . . . . . . . . . 292
Pin-to-pin delay . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Constraint checker . . . . . . . . . . . . . . . . . . . . . . . . 304
Stimulus devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Stimulus generator . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Time units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Stimulus generator examples . . . . . . . . . . . . . . . . . . . 313
File stimulus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Stimulus file format . . . . . . . . . . . . . . . . . . . . . . . . 317
Transition format . . . . . . . . . . . . . . . . . . . . . . . . . 318
File stimulus device . . . . . . . . . . . . . . . . . . . . . . . . 319
Input/output model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Input/output model parameters . . . . . . . . . . . . . . . . . . . 322
Digital/analog interface devices . . . . . . . . . . . . . . . . . . . . . 324
8
Contents
Glossary
Index
9
Contents
10
Contents
11
Contents
12
How to Use This
Online Manual
Click this toolbar
To do this...
button or book icon...
Go to the Index.
Go to the Glossary.
Go to the Contents.
How to Use This Online Manual How to print this online manual
xiv
How to Use This Online Manual Welcome to OrCAD
Welcome to OrCAD
OrCAD offers a total solution for your core design tasks: schematic- and VHDL-based
design entry; FPGA and CPLD design synthesis; digital, analog, and mixed-signal simulation;
and printed circuit board layout. What's more, OrCAD's products are a suite of applications
built around an engineer's design flow—not just a collection of independently developed
point tools. PSpice and PSpice A/D are just one element in OrCAD's total solution design
flow.
Welcome to OrCAD. With OrCAD's products, you'll spend less time dealing with the details
of tool integration, devising workarounds, and manually entering data to keep files in sync.
Our products will help you build better products, faster, and at lower cost.
xv
How to Use This Online Manual Overview
Overview
This manual contains the reference material needed when working with special circuit
analyses in PSpice A/D.
Included in this manual are detailed command descriptions, start-up option definitions, and a
list of supported devices in the digital and analog device libraries.
This manual has comprehensive reference material for all of the PSpice circuit analysis
applications, which include:
• PSpice A/D
• PSpice A/D Basics
• PSpice
This manual assumes that you are familiar with Microsoft Windows (NT or 95), including
how to use icons, menus and dialog boxes. It also assumes you have a basic understanding
about how Windows manages applications and files to perform routine tasks, such as starting
applications and opening and saving your work. If you are new to Windows, please review
your Microsoft Windows User’s Guide.
Typographical conventions
This manual generally follows the conventions used in the Microsoft Windows User’s Guide.
Procedures for performing an operation are generally numbered with the following
typographical conventions.
Notation Examples Description
monospace font mydiodes.slb Library files and file names.
key cap or letter Press J ... A specific key or key stroke on the
keyboard.
monospace font Type VAC... Output produced by a printer and
commands/text entered from the
keyboard.
xvi
How to Use This Online Manual Overview
xvii
How to Use This Online Manual Overview
xviii
How to Use This Online Manual Overview
xix
How to Use This Online Manual Overview
xx
How to Use This Online Manual Overview
Expressions can contain the standard operators as shown in the following table.
Operators Meaning
arithmetic
+ addition (or string concatenation)
- subtraction
* multiplication
/ division
** exponentiation
logical
~ unary NOT
| boolean OR
^ boolean XOR
& boolean AND
relational (within IF( ) functions)
== equality test
!= non-equality test
> greater than test
>= greater than or equal to test
< less than test
<= less than or equal to test
xxi
How to Use This Online Manual Command line options for OrCAD applications
Command files
A command file is an ASCII text file which contains a list of commands to be executed. A
command file can be specified in multiple ways:
• at the command line when starting PSpice, Stimulus Editor, or the Model Editor,
• by choosing Run Commands from the File menu and entering a command file name (for
PSpice and Stimulus Editor only), or
• at the PROBECMD or STMEDCMD command line, found in the configuration file
pspice.ini.
The command file is read by the program and all of the commands contained within the file
are performed. When the end of the command file is reached, commands are taken from the
keyboard and the mouse. If no command file is specified, all of the commands are received
from the keyboard and mouse.
The ability to record a set of commands can be useful when using PSpice, the Model Editor,
and Stimulus Editor. This is especially useful in PSpice, if you are repeatedly doing the same
simulation and looking at the same waveform with only slight changes to the circuit before
each run. It can also be used to automatically create hardcopy output at the end of very long
(such as overnight) simulation runs.
After you activate cursors (from the Tools menu, choose Cursor), any mouse or
keyboard movements that you make for moving the cursor will not be recorded in the
command file.
If you choose to create a command file using a text editor, note that the commands in the
command file are the same as those available from the keyboard with these differences:
• The name of the command or its first capitalized letter can be used.
• Any line that begins with an * is a comment.
• Blank lines are ignored, therefore, they can be added to improve the readability of the
command file.
• The commands @CR, @UP, @DWN, @LEFT, @RIGHT, and @ESC are used to
represent the <Enter>, <↑>, <↓>, <←>, <→>, and <Esc> keys, respectively.
xxii
How to Use This Online Manual Command line options for OrCAD applications
• The command PAUSE causes PSpice, the Model Editor, or Stimulus Editor to wait until
any key on the keyboard is pressed. In the case of PSpice, this can be useful to examine a
waveform before the command file draws the next one.
The commands are one to a line in the file, but comment and blank lines can be used to make
the file easier to read.
Assuming that a waveform data file has been created by simulating the circuit example.dsn,
you can manually create a command file (using a text editor) called example.cmd which
contains the commands listed below. This set of commands draws a waveform, allows you to
look at it, and then exits PSpice.
* Display trace v(out2) and wait
Trace Add
v(out2)
Pause
* Exit Probe environment
File Exit
See Simulation command line specification format and Specifying simulation command
line options for specifying command files on the simulation command line. See Simulation
command line specification format and Specifying simulation command line options for
details on specifying the /C or -c option for PSpice.
The Search Commands feature is a Cursor option for positioning the cursor at a
particular point. You can learn more about Search Commands by consulting PSpice
Help.
Log files
Instead of creating command files by hand, using a text editor, you can generate them
automatically by creating a log file while running PSpice, the Model Editor, or Stimulus
Editor. While executing the particular package, all of the commands given are saved in the
log file. The format of the log file is correct for use as a command file.
To create a .log file in PSpice or Stimulus Editor, from the File menu, choose Log
Commands and enter a log file name. This turns logging on. Any action taken after starting
Log Commands is logged in the named file and can be run in another session by choosing Run
Commands.
You can also create a log file for PSpice, Stimulus Editor, or the Model Editor by using the /l
or -l option at the command line. For example:
PROBE /L EXAMPLE.LOG
Of course, you can use a name for the log file that is more recognizable, such as acplots.cmd
(to PSpice, the Model Editor, and Stimulus Editor, the file name is any valid file name for your
computer).
You can use either (/) or (-) as separators, and file names can be in upper or lower
case.
xxiii
How to Use This Online Manual Command line options for OrCAD applications
The file in.cmd gives the command to PSpice, and PSpice saves the (same) commands into
the out.log file. When in.cmd runs out of commands, and PSpice is taking commands from
the keyboard, these commands also go into the out.log file.
xxiv
How to Use This Online Manual Command line options for OrCAD applications
input file
Specifies the name of a circuit file for PSpice or PSpice A/D to simulate after it starts. The
input file can be a simulation file (.sim, .cir, .net), data files (.dat), output files (.out),
or any files (*.*). PSpice opens any files whose extension PSpice does not recognize as
a text file.
You can specify multiple input files, but if the output file or data file options are specified,
they apply only to the first specified input file.
The input file name can include wildcard characters (* and ?), in which case all file names
matching the specification are simulated.
options
One or more of the options listed in Simulation command line options.
xxv
How to Use This Online Manual Command line options for OrCAD applications
-l <file name> Creates a log file, which saves the commands from this
session. This log file can later be used as an input command
file for PSpice.
-o <output file> Specifies the output file to which PSpice saves the simulation
output. By default, the name of the output file name defaults
to the name of the input file with an .out extension.
xxvi
How to Use This Online Manual Command line options for OrCAD applications
Option Description
-p <file name> Specifies a file that contains goal functions for Performance
Analysis, macro definitions, and display configurations. This
file is loaded after the global .prb file (specified in the .ini
file by the line PRBFILE=pspice.prb), and the local .prb file
(<file name>.prb), have been loaded. Definitions in this
file will replace definitions from the global or local .prb files
that have already been loaded.
-r Runs simulation files. If this option is not specified, the
specified files are opened but not simulated.
-t <temp directory name> Specifies a directory where PSpice can write temporary files.
This option replaces the -wTEMP option.
-wOUT=<suffix> Specifies the file suffix for the simulation output file. If
<suffix> is not specified, the default .out file is used.
-wDAT=<suffix> Specifies the file suffix for the waveform data file. If
<suffix> is not specified, the default .dat file is used.
-wTXT=<suffix> Specifies the file suffix for the CSDF file. If <suffix> is not
specified, the default .txt file is used.
-wNO_NOTIFY Indicates that the simulator should not display the status
message dialog after completion of each circuit file.
-wPAUSE=<seconds> Specifies the maximum time that the status dialog box should
be displayed. If <seconds> elapses before you click one of
the buttons, the dialog will close.
are equivalent. However, PSpice searches first for the exact <file name> specified for these
command line options, and if that <file name> exists, PSpice uses it. If the exact <file name>
xxvii
How to Use This Online Manual Command line options for OrCAD applications
does not exist, PSpice adds default extensions to <file name> and searches for those. The
following default extensions are used:
<file name[.dat]> waveform data file
-c<file name[.cmd]> command file
-l<file name[.log]> log file
-p<file name[.prb]> displays, goal functions, and macros file
You can learn more about PSpice macros by consulting PSpice Help.
xxviii
Commands
standard analyses
.AC (AC analysis) .OP (bias point)
.DC (DC analysis) .SENS (sensitivity analysis)
.FOUR (Fourier analysis) .TF (transfer)
.NOISE (noise analysis) .TRAN (transient analysis)
output control
.PLOT (plot)
.VECTOR (digital output)
.PRINT (print)
.WATCH (watch analysis results)
.PROBE (Probe)
simple multi-run analyses
.STEP (parametric analysis) .TEMP (temperature)
circuit file processing
.END (end of circuit)
.LIB (library file)
.FUNC (function)
.PARAM (parameter)
.INC (include file)
statistical analyses
.MC (Monte Carlo analysis) .WCASE (sensitivity/ worst-case analysis)
device modeling
.ENDS (end subcircuit)
.MODEL (model definition)
.DISTRIBUTION
.SUBCKT (subcircuit)
(user-defined distribution)
initial conditions
.NODESET
.IC (initial bias point condition)
(set approximate node voltage for bias point)
.LOADBIAS (load bias point file)
.SAVEBIAS (save bias point to file)
miscellaneous
.ALIASES, .ENDALIASES .STIMULUS (stimulus)
(aliases and endaliases) .TEXT (text parameter)
.EXTERNAL (external port) * (comment)
.OPTIONS (analysis options) ; (in-line comment)
.STIMLIB (stimulus library file) + (line continuation)
Command reference
for PSpice and PSpice A/D
Schematics users enter analysis specifications through the Analysis Setup dialog box (from
the Analysis menu, select Setup).
30
Commands Command reference for PSpice and PSpice A/D
31
Commands .AC (AC analysis)
<points value>
Specifies the number of points in the sweep, using an integer.
32
Commands .ALIASES, .ENDALIASES (aliases and endaliases)
.ALIASES, .ENDALIASES
(aliases and endaliases)
Purpose The Alias commands set up equivalences between node names and pin names, so that traces
in the Probe display can be identified by naming a device and pin instead of a node. They are
also used to associate a net name with a node name.
General form .ALIASES
<device name> <device alias> (<<pin>=<node>>)
_ _ (<<net>=<node>>)
.ENDALIASES
Examples .ALIASES
R_RBIAS RBIAS (1=$N_0001 2=VDD)
Q_Q3 Q3 (c=$N_0001 b=$N_0001 e=VEE)
_ _ (OUT=$N_0007)
.ENDALIASES
The first alias definition shown in the example allows the name RBIAS to be used as an alias
for R_RBIAS, and it relates pin 1 of device R_RBIAS to node $N_0001 and pin 2 to VDD.
The last alias definition equates net name OUT to node name $N_0007.
33
Commands .DC (DC analysis)
34
Commands .DC (DC analysis)
Linear sweep
General form .DC [LIN] <sweep variable name>
+ <start value> <end value> <increment value>
+ [nested sweep specification]
<increment value>
The step size. This value must be greater than zero.
Comments The sweep variable is swept linearly from the starting to the ending value.
The keyword LIN is optional.
Logarithmic sweep
General form .DC <logarithmic sweep type> <sweep variable name>
+ <start value> <end value> <points value>
+ [nested sweep specification]
<start value>
Must be positive and less than <end value>.
<points value>
The number of steps per octave or per decade in the sweep. This value must be an integer.
Comments Either OCT or DEC must be specified for the <logarithmic sweep type>.
35
Commands .DC (DC analysis)
Nested sweep
General form .DC <sweep variable name> LIST <value>*
+[nested sweep specification]
Comments For a nested sweep, a second sweep variable, sweep type, start, end, and increment values can
be placed after the first sweep. In the nested sweep example, the first sweep is the inner loop:
the entire first sweep is performed for each value of the second sweep.
When using a list of values, there are no start and end values. Instead, the numbers that follow
the keyword LIST are the values that the sweep variable is set to.
The rules for the values in the second sweep are the same as for the first. The second sweep
generates an entire .PRINT (print) table or .PLOT (plot) plot for each value of the sweep.
Probe displays nested sweeps as a family of curves.
36
Commands .DISTRIBUTION (user-defined distribution)
<deviation>
Must be in the range (-1,+1), which matches the range of the random number generator.
No <deviation> can be less than the previous <deviation> in the list, although it can repeat
the previous value.
<probability>
Represents a relative probability, and must be positive or zero.
Comments When using Schematics, several distributions can be defined by configuring an include file
containing the .DISTRIBUTION command. For details on how to do this, refer to your PSpice
user’s guide.
If you are not using Schematics, a user-defined distribution can be specified as the default by
setting the DISTRIBUTION parameter in the .OPTIONS (analysis options) command.
37
Commands .DISTRIBUTION (user-defined distribution)
Usage example
To illustrate, assume there is a 1.0 µfd capacitor that has a variation of -50% to +25%, and
another that has tolerances of -10% to +5%. Note that both capacitors’ tolerances are in the
same general shape, i.e., both have negative excursions twice as large as their positive
excursions.
.distribution cdistrib (-1,1) (.5, 1) (.5, 0) (1, 0)
c1 1 0 cmod 11u
c2 1 0 cmod2 1u
.model cmod1 cap (c=1 dev/cdistrib 50%)
.model cmod2 cap (c=1 dev/cdistrib 10%)
Separate random numbers are generated for each parameter that has a tolerance
unless a tracking number is specified.
38
Commands .END (end of circuit)
Comments There can be more than one circuit in an input file. Each circuit is marked by an .END
command. PSpice processes all the analyses for each circuit before going on to the next one.
Everything is reset at the beginning of each circuit. Having several circuits in one file gives
the same results as having them in separate files and running each one separately. However,
all the simulation results go into one .OUT file and one .DAT file. This is a convenient way to
arrange a set of runs for overnight operation.
39
Commands .EXTERNAL (external port)
<node_name>
One or more valid PSpice A/D node names.
Comments When a node is included in a .EXTERNAL statement it is identified as a primary
observation point. For example, if you are modeling and simulating a PCB-level
description, you could place an .EXTERNAL (or its Capture symbol counterparts) on the
edge pin nets to describe the pin as the external interface point of the network.
PSpice recognizes the nets marked as .EXTERNAL when reporting any sort of timing
violation. When a timing violation occurs, PSpice analyzes the conditions that would permit
the effects of such a condition to propagate through the circuit. If, during this analysis, a net
marked external is encountered, PSpice reports the condition as a Persistent Hazard,
signifying that it has a potential effect on the externally visible behavior of the circuit. For
more information on Persistent Hazards, refer to your PSpice user’s guide.
Port specifications are inserted in the netlist by Capture whenever an external port symbol,
EXTERNAL_IN, EXTERNAL_OUT, or EXTERNAL_BI is used. Refer to your PSpice
user’s guide for more information.
40
Commands .FOUR (Fourier analysis)
<frequency value>
The fundamental frequency. Not all of the transient results are used, only the interval from
the end, back to 1/<frequency value> before the end is used. This means that the transient
analysis must be at least 1/<frequency value> seconds long.
Comments The analysis results are obtained by performing a Fourier integral on the results from a
transient analysis. The analysis must be supplied with specified output variables using evenly
spaced time points. The time interval used is <print step value> in the .TRAN (transient
analysis) command, or 1% of the <final time value> (TSTOP) if smaller, and a 2nd-order
polynomial interpolation is used to calculate the output value used in the integration. The DC
component, the fundamental, and the 2nd through 9th harmonics of the selected voltages and
currents are calculated by default, although more harmonics can be specified.
A .FOUR command requires a .TRAN command, but Fourier analysis does not require
.PRINT, .PLOT, or .PROBE (Probe) commands. The tabulated results are written to the
output file (.out) as the transient analysis is completed.
The results of the .FOUR command are only available in the output file. They
cannot be viewed in Probe.
41
Commands .FUNC (function)
.FUNC (function)
Purpose The .FUNC command defines functions used in expressions. Besides their obvious flexibility,
they are useful for where there are several similar subexpressions in a circuit file.
General form .FUNC <name> ([arg]*) {<body>}
<body>
Refers to other (previously defined) functions; the second example, DECAY, uses the first
example, E.
[arg]
Specifies up to 10 arguments in a definition. The number of arguments in the use of a
function must agree with the number in the definition. Functions can be defined as having
no arguments, but the parentheses are still required. Parameters, TIME, other functions,
and the Laplace variable s are allowed in the body of function definitions.
Comments The <body> of a defined function is handled in the same way as any math expression; it is
enclosed in curly braces {}. Previous versions of PSpice did not require this, so for
compatibility the <body> can be read without braces, but a warning is generated.
Creating a file of frequently used .FUNC definitions and accessing them using
an .INC command near the beginning of the circuit file can be helpful. .FUNC
commands can also be defined in subcircuits. In those cases they only have
local scope.
42
Commands .IC (initial bias point condition)
43
Commands .INC (include file)
Every model and subcircuit definition, even if not needed, takes up memory.
44
Commands .LIB (library file)
Examples .LIB
.LIB linear.lib
.LIB "C:\lib\bipolar.lib"
The index files have to be regenerated each time the library is changed.
Because of this, it is advantageous to configure separately any frequently
changed libraries.
Nom.lib normally contains references to all parts in the MicroSim Standard Model Library.
You can edit nom.lib to include your custom model references.
45
Commands .LOADBIAS (load bias point file)
Any nodes mentioned in the loaded file that are not present in the circuit are
ignored, and a warning message will be generated.
To echo the .LOADBIAS file contents to the output file, use the EXPAND option on the
.OPTIONS (analysis options) command.
46
Commands .MC (Monte Carlo analysis)
<analysis>
Specifies at least one analysis type: .DC (DC analysis), .AC (AC analysis), or
.TRAN (transient analysis). This analysis is repeated in subsequent passes. All analyses
that the circuit contains are performed during the nominal pass. Only the selected analysis
is performed during subsequent passes.
<output variable>
Identical in format to that of a .PRINT (print) output variable.
<function>
Specifies the operation to be performed on the values of <output variable> to reduce these
to a single value. This value is the basis for the comparisons between the nominal and
subsequent runs.The <function> can be any one of the following:
Function Definition
YMAX Find the absolute value of the greatest difference in each
waveform from the nominal run.
MAX Find the maximum value of each waveform.
MIN Find the minimum value of each waveform.
RISE_EDGE(<value>) Find the first occurrence of the waveform crossing above the
threshold <value>. The waveform must have one or more points
at or below <value> followed by one above; the output value
listed is the first point that the waveform increases above <value>.
FALL_EDGE(<value>) Find the first occurrence of the waveform crossing below the
threshold <value>. The waveform must have one or more points
at or above <value> followed by one below; the output value
listed is where the waveform decreases below <value>.
47
Commands .MC (Monte Carlo analysis)
<function> and all [option]s (except for <output type>) have no effect on the
Probe data that is saved from the simulation. They are only applicable to the
output file.
[option]*
Can include zero or more of the following options:
[SEED=value]
Defines the seed for the random number generator within the Monte Carlo analysis (The
Art of Computer Programming, Donald Knuth, vol. 2, pg. 171, “subtractive method”).
<value>
Must be an odd integer ranging from 1 to 32,767. If the seed value is not set, its default
value is 17,533.
For almost all analyses, the default seed value is adequate to achieve a
constant set of results. The seed value can be modified within the integer value
as required.
48
Commands .MC (Monte Carlo analysis)
Comments The first run uses nominal values of all components. Subsequent runs use variations on model
parameters as specified by the DEV and LOT tolerances on each .MODEL (model
definition) parameter.
The other specifications on the .MC command control the output generated by the Monte
Carlo analysis.
For more information on Monte Carlo analysis, refer to your PSpice user’s guide.
49
Commands .MODEL (model definition)
<model type>
Must be one of the types outlined in the table that follows.
• A JFET can reference a model of types NJF or PJF, but not of type NPN.
• There can be more than one model of the same type in a circuit, although they must
have different names.
Following the <model type> is a list of parameter values enclosed by parentheses. None,
any, or all of the parameters can be assigned values. Default values are used for all
unassigned parameters. The lists of parameter names, meanings, and default values are
found in the individual device descriptions.
50
Commands .MODEL (model definition)
51
Commands .MODEL (model definition)
[tolerance specification]
Appended to each parameter, using the format:
[DEV [track&dist] <value>[%]] [LOT [track&dist] <value>[%]]
to specify an individual device (DEV) and the device lot (LOT) parameter value
deviations. The tolerance specification is used by the .MC (Monte Carlo analysis)
analysis only.
The LOT tolerance requires that all devices that refer to the same model use the same
adjustments to the model parameter. DEV tolerances are independent, that is each device
varies independently. The % shows a relative (percentage) tolerance. If it is omitted,
<value> is in the same units as the parameter itself.
[track & dist]
Specifies the tracking and non-default distribution, using the format:
[/<lot #>][/<distribution name>].
These specifications must immediately follow the keywords DEV and LOT (without
spaces) and are separated by /.
<lot #>
Specifies which of ten random number generators, numbered 0 through 9, are used to
calculate parameter value deviations. This allows deviations to be correlated between
parameters in the same model, as well as between models. The generators for DEV and
LOT tolerances are distinct: there are ten generators for DEV tracking and ten generators
for LOT tracking. Tolerances without <lot #> are assigned individually generated random
numbers.
<distribution name>
The distribution name is one of the following. The default distribution can be set by using
the DISTRIBUTION parameter of the .OPTIONS (analysis options) command.
Distribution
Function
name
UNIFORM Generates uniformly distributed deviations over the range
±<value>.
GAUSS Generates deviations using a Gaussian distribution over the range
±3σ and <value> specifies the ±1σ deviation (i.e., this generates
deviations greater than ±<value>).
<user name> Generates deviations using a user-defined distribution and
<value> specifies the ±1 deviation in the user definition; see the
.DISTRIBUTION (user-defined distribution).
Comments The examples are for the .MODEL parameter. The last example uses the AKO syntax to
reference the parameters of the model QDRIV in the third example.
For more information, refer to your PSpice user’s guide.
52
Commands .MODEL (model definition)
This overrides the nominal TNOM value which is set in the .OPTIONS (analysis options)
command line (default = 27°C). All other parameters listed in the .MODEL command are
assumed to have been measured at T_MEASURED.
In addition to the measured model parameter temperature, current device temperatures can be
customized to override the circuit’s global temperature specification defined by the
.TEMP (temperature) command line (or equivalent .STEP TEMP or .DC TEMP). There are
three forms, as described below.
For all formats, <value> can be a literal value or a parameter of the form
{<parameter name>}. A maximum of one device temperature customization can coexist
using the T_MEASURED customization. For example,
.MODEL PNP_NEW PNP( T_ABS=35 T_MEASURED=0 BF=90 )
defines a new model PNP_NEW, where BF was measured at 0°C. Any bipolar transistor
referencing this model has an absolute device temperature of 35°C.
Examples
One This example demonstrates device temperatures set relative to the global
temperature of the circuit:
.TEMP 10 30 40
.MODEL PNP_NEW PNP( T_REL_GLOBAL=-5 BF=90 )
This produces three PSpice runs where global temperature changes from 10° to 30° to 40°C,
respectively, and any bipolar transistor that references the PNP_NEW model has a device
temperature of 5°, 25°, or 35°C, respectively.
53
Commands .MODEL (model definition)
Two This example sets the device temperature relative to a referenced AKO model:
.MODEL PNP_NEW PNP( AKO:PNP_OLD T_REL_LOCAL=10)
.MODEL PNP_OLD PNP( T_ABS=20)
Any bipolar transistor referencing the PNP_NEW model has a device temperature of 30°C.
Special considerations
There are a few special considerations when using these temperature parameters:
• If the technique for current device temperature is using the value relative to an AKO
model’s absolute temperature (T_ABS), and the AKO referenced model does not specify
T_ABS, then the T_REL_LOCAL specification is ignored and the standard global
temperature specification is used.
• These temperature parameters cannot be used with the DEV and LOT model parameter
tolerance feature.
• A DC sweep analysis can be performed on these parameters so long as the temperature
parameter assignment is to a variable parameter. For example:
.PARAM PTEMP 27
.MODEL PNP_NEW PNP ( T_ABS={PTEMP} )
.DC PARAM PTEMP 27 35 1
This method produces a single DC sweep in PSpice where any bipolar transistor referencing
the PNP_NEW model has a device temperature which is swept from 27°C to 35°C in 1°C
increments.
A similar effect can be obtained by performing a parametric analysis. For instance:
.PARAM PTEMP 27
.MODEL PNP_NEW PNP( T_ABS={PTEMP} )
.STEP PARAM PTEMP 27 35 1
This method produces nine PSpice runs where the PNP_NEW model temperature steps from
27°C to 35°C in increments of 1°C, one step per run.
• The effect of a temperature parameter is evaluated once prior to the bias point calculation,
unless parameters are swept by means of a .DC PARAM or .STEP PARAM analysis
described above. In these cases, the temperature parameter’s effect is reevaluated once for
each value of the swept variable.
54
Commands .NODESET (set approximate node voltage for bias point)
Comments This command is effective for the bias point (both small-signal and transient bias points) and
for the first step of the DC sweep. It has no effect during the rest of the DC sweep, nor during
a transient analysis.
Unlike the .IC (initial bias point condition) command, .NODESET provides only an initial
guess for some initial values. It does not clamp those nodes to the specified voltages. However,
by providing an initial guess, .NODESET can be used to break the tie in, for instance, a
flip-flop, and make it come up in a required state.
If both the .IC command and .NODESET command are present, the .NODESET command is
ignored for the bias point calculations (.IC overrides .NODESET).
For Capture-based designs, refer to your PSpice user’s guide for more
information on setting initial conditions.
55
Commands .NOISE (noise analysis)
<name>
The name of an independent voltage or current source where the equivalent input noise is
calculated. The <name> is not itself a noise generator, but only a place where the
equivalent input noise is calculated.
[interval value]
Integer that specifies how often the detailed noise analysis data is written to the output file.
Comments A noise analysis is performed in conjunction with an AC sweep analysis and requires an
.AC (AC analysis) command. When .NOISE is used, noise data is recorded in the Probe .DAT
file for each frequency in the AC sweep.
The simulator computes:
• Device noise for every resistor and semiconductor in the circuit (propagated to a specified
output node)
• Total input and output noise
At each frequency, each noise generator’s contribution is calculated and propagated to the
output node. At that point, all the propagated noise values are RMS-summed to calculate the
total output noise. The gain from the input source to the output voltage, the total output noise,
and the equivalent input noise are all calculated.
For more information, refer to the AC Analyses chapter of your PSpice user’s guide.
If:
<name> is a voltage source
then:
1/2
the input noise units are volt/hertz
If:
<name> is a current source
then:
1/2
the input noise units are amp/hertz
1/2
The output noise units are always volt/hertz .
56
Commands .NOISE (noise analysis)
Every nth frequency, where n is the print interval, a detailed table is printed showing the
individual contributions of all the circuit’s noise generators to the total noise. These values are
the noise amounts propagated to the output node, not the noise amounts at each generator. If
[interval value] is not present, then no detailed table is printed.
The detailed table is printed while the analysis is being performed and does not need a
.PRINT (print) command or a .PLOT (plot) command. The output noise and equivalent
input noise can be printed in the output by using a .PRINT command or a .PLOT command.
57
Commands .OP (bias point)
Examples .OP
Comments This command does not write output to the Probe data file. The bias point is calculated
regardless of whether there is a .OP command. Without the .OP command, the only
information about the bias point in the output is a list of the node voltages, voltage source
currents, and total power dissipation.
Using a .OP command can cause the small-signal (linearized) parameters of all the nonlinear
controlled sources and all the semiconductor devices to be printed in the output file.
The .OP command controls the output for the regular bias point only. The .TRAN (transient
analysis) command controls the output for the transient analysis bias point.
58
Commands .OPTIONS (analysis options)
Comments The options can be listed in any order. There are two kinds of options: those with values, and
those without values. Options without values are flags that are activated by simply listing the
option name.
The .OPTIONS command is cumulative. That is, if there are two (or more) of the .OPTIONS
command, the effect is the same as if all the options were listed together in one .OPTIONS
command. If the same option is listed more than once, only its last value is used.
For SPICE options not available in PSpice, see Differences between PSpice and Berkeley
SPICE2.
Flag options
The default for any flag option is off or no (i.e., the opposite of specifying the option). Flag
options affect the output file unless otherwise specified.
59
Commands .OPTIONS (analysis options)
60
Commands .OPTIONS (analysis options)
.OPTIONS DISTRIBUTION=USERDEF1
61
Commands .OPTIONS (analysis options)
62
Commands .OPTIONS (analysis options)
63
Commands .OPTIONS (analysis options)
SUPPRESSED GLITCH A pulse applied to the input of a primitive that is shorter than the active
propagation delay is ignored by PSpice. This can or cannot be significant,
depending upon the nature of the circuit. The reporting of the suppressed glitch
hazard shows that there might be a problem with either the stimulus, or the path
delay configuration of the circuit.
PERSISTENT HAZARD If the effects of any of the other logic hazard messages mentioned in the output
file are able to propagate to either an EXTERNAL port, or to any storage device
in the circuit, they are flagged as PERSISTENT HAZARDs. (Refer to your
PSpice user’s guide for more details on PERSISTENT HAZARDs.)
ZERO-DELAY- If the output of a primitive changes more than 50 times within a single digital
OSCILLATION time step, the node is considered to be oscillating. PSpice reports this and cancels
the run.
64
Commands .PARAM (parameter)
.PARAM (parameter)
Purpose The .PARAM statement defines the value of a parameter. A parameter name can be used in
place of most numeric values in the circuit description. Parameters can be constants, or
expressions involving constants, or a combination of these, and they can include other
parameters.
General form .PARAM < <name> = <value> >*
.PARAM < <name> = { <expression> } >*
There are several predefined parameters. The parameter values must be either constants
or expressions:
<value>
Constants (<value>) do not need braces { }.
<expression>
Can contain constants or parameters.
Comments The .PARAM statements are order independent. They can be used inside a subcircuit definition
to create local subcircuit parameters. Once defined, a parameter can be used in place of almost
all numeric values in the circuit description with the following exceptions:
• Not in the in-line temperature coefficients for resistors (parameters can be used for the TC1
and TC2 resistor model parameters).
• Not in the PWL values for independent voltage and current source (V and I device)
parameters.
• Not the E, F, G, and H device SPICE2G6 syntax for polynomial coefficient values and gain.
A .PARAM command can be in a library. The simulator can search libraries for parameters not
defined in the circuit file, in the same way it searches for undefined models and subcircuits.
Parameters cannot be used in place of node numbers, nor can the values on an
analysis command (e.g., TRAN and AC) be parameterized.
65
Commands .PLOT (plot)
.PLOT (plot)
Purpose The .PLOT command causes results from DC, AC, noise, and transient analyses to be line
printer plots in the output file.
<output variable>
Following the analysis type is a list of the output variables and (possibly) Y axis scales. A
maximum of 8 output variables are allowed on one .PLOT command. However, an
analysis can have any number of a .PLOT command. See .PROBE (Probe) for the syntax
of the output variables.
(<lower limit value>, <upper limit value>)
Sets the range of the y-axis. This forces all output variables on the same y-axis to use the
specified range.
The same form, (<lower limit value>, <upper limit value>), can also be inserted one or
more times in the middle of a set of output variables. Each occurrence defines one Y axis
that has the specified range. All the output variables that come between it and the next
range to the left in the .PLOT command are put on its corresponding Y axis.
Comments Plots are made by using text characters to draw the plot, which print on any kind of printer.
However, plots printed from within Probe look much better.
The range and increment of the x-axis is fixed by the analysis being plotted. The y-axis default
range is determined by the ranges of the output variables. In the fourth example, the two
voltage outputs go on the y-axis using the range (0,5V) and the two current outputs go on the
y-axis using the range (-5mMA, 50mA).
66
Commands .PLOT (plot)
If the different output variables differ considerably in their output ranges, then the plot is given
more than one y-axis using ranges corresponding to the different output variables.
67
Commands .PRINT (print)
.PRINT (print)
Purpose The .PRINT command allows results from DC, AC, noise, and transient analyses to be an
output in the form of tables, referred to as print tables in the output file.
General form .PRINT[/DGTLCHG] <analysis type> [output variable]*
The last example illustrates how to print a node that has a name, rather than a number. The first
item to print is a node voltage, the second item is the voltage across a resistor, and the third
item to print is another node voltage, even though the second and third items both begin with
the letter R. The square brackets force the names to be interpreted as node names.
Arguments and options
[/DGTLCHG]
For digital output variables only. Values are printed for each output variable whenever one
of the variables changes.
<analysis type>
Only one analysis type— DC, AC, NOISE, or TRAN—can be specified for each .PRINT
command.
<output variable>
Following the analysis type is a list of the output variables. There is no limit to the number
of output variables: the printout is split up depending on the width of the data columns (set
using NUMDGT option) and the output width (set using WIDTH option). See
.PROBE (Probe) for the syntax of output variables.
Comments The values of the output variables are printed as a table where each column corresponds to one
output variable. You can change the number of digits printed for analog values by using the
NUMDGT option of the .OPTIONS (analysis options) command.
An analysis can have multiple .PRINT commands.
68
Commands .PROBE (Probe)
.PROBE (Probe)
Purpose The .PROBE command writes the results from DC, AC, and transient analyses to a data file
used by Probe.
General form .PROBE[/CSDF][output variable]*
Examples .PROBE
.PROBE V(3) V(2,3) V(R1) I(VIN) I(R2) IB(Q13) VBE(Q13)
.PROBE/CSDF
.PROBE V(3) V(R1) V([RESET])
.PROBE D(QBAR)
The first example (with no output variables) writes all the node voltages and all the device
currents to the data file. The list of device currents written is the same as the device currents
allowed as output variables.
The second example writes only those output variables specified to the data file, to restrict the
size of the data file.
The third example creates a data file in a text format using the Common Simulation Data File
(CSDF) format, not a binary format. This format is used for transfers between different
computer families. CSDF files are larger than regular text files.
The fourth example illustrates how to specify a node that has a name rather than a number. The
first item to output is a node voltage, the second item is the voltage across a resistor, and the
third item to output is another node voltage, even though the second and third items both begin
with the letter R. The square brackets force the interpretation of names to mean node names.
The last example writes only the output at digital node QBAR to the data file, to restrict the
size of the data file.
Arguments and options
[output variable]
This section describes the types of output variables allowed in a .PRINT (print),
.PLOT (plot), and .PROBE command. Each .PRINT or .PLOT can have up to 8 output
variables. This format is similar to that used when calling up waveforms while running
Probe.
See the tables below for descriptions of the possible output variables. If .PROBE is used
without specifying a list of output variables, all of the circuit voltages and currents are
stored for post-processing. When an output variable list is included, the data stored is
limited to the listed items. This form is intended for users who want to limit the size of the
Probe data file.
Comments Refer to your PSpice user’s guide for a description of Probe, for information about using the
Probe data file, and for more information on the use of text files in Probe. You can also consult
Probe Help.
Unlike the .PRINT and .PLOT commands, there are no analysis names before
the output variables. Also, the number of output variables is unlimited.
69
Commands .PROBE (Probe)
Example Meaning
D(QA) the value of digital node QA
I(D5) current through diode D5
IG(J10) current into gate of J10
V(3) voltage between node three and ground
V(3,2) voltage between nodes three and two
V(R1) voltage across resistor R1
VA(T2) voltage at port A of T2
VB(Q3) voltage between base of transistor Q3 and ground
VGS(M13) gate-source voltage of M13
70
Commands .PROBE (Probe)
Multiple-terminal devices
For the V(<name>) and I(<name>) forms, where <name> must be the name of a two-terminal
device, the devices are:
For the Vx(<name>), Vxy(<name>), and Ix(<name>) forms, where <name> must be the
name of a three or four-terminal device and x and y must each be a terminal abbreviation, the
devices and the terminals areas follows. For the Vz(<name>) and Iz(<name>) forms, <name>
must be the name of a transmission line (T device) and z must be A or B.
71
Commands .PROBE (Probe)
72
Commands .PROBE (Probe)
AC analysis
For AC analysis, the output variables listed in the preceding section are augmented by adding
a suffix.
For AC analysis, the suffixes are ignored for a .PROBE command, but can be used
in a .PRINT (print) command and a .PLOT (plot) command, and when adding a
trace in Probe. For example, in a .PROBE command, VDB(R1) is translated to V(R1),
which is the raw data.
For these devices, you need to put a zero-valued voltage source in series with the device (or
terminal) of interest before you can print or plot the current through this voltage source.
Current outputs for the F and G devices are not available for DC and transient
analyses.
73
Commands .PROBE (Probe)
Noise analysis
For noise analysis, the output variables are predefined as follows:
Output variable Meaning of output variables for noise analysis
INOISE Total RMS summed noise at input node
ONOISE INOISE equivalent at output node
DB(INOISE) INOISE in decibels
DB(ONOISE) ONOISE in decibels
.PRINT (print) and .PLOT (plot) cannot be used for the noise from any one device.
However, the print interval on the .NOISE (noise analysis) command can be used
to output this information.
74
Commands .SAVEBIAS (save bias point to file)
For the first example, the small-signal operating point (.AC or .OP) bias point is saved.
.SAVEBIAS "TRANDATA.BSP" TRAN NOSUBCKT TIME=10u
In the second example, the transient bias point is written out at the time closest to, but not less
than 10.0 u/sec. No bias point information for subcircuits is saved.
.SAVEBIAS "SAVETRAN.BSP" TRAN TIME=5n REPEAT TEMP=50.0
Use of the [REPEAT] keyword in the third example causes the bias point to be written out
every 5.0 ns when the temperature of the run is 50.0 degrees.
.SAVEBIAS "DCBIAS.SAV" DC
In the fourth example, because there are no parameters supplied, only the very first DC bias
point is written to the file.
.SAVEBIAS "SAVEDC.BSP" DC MCRUN=3 DC1=3.5 DC2=100
The fifth example saves the DC bias point when the following three conditions are all met: the
first DC sweep value is 3.5, the second DC sweep value is 100, and the simulation is on the
third Monte Carlo run. If only one DC sweep is being performed, then the keyword DC can be
substituted for DC1.
Arguments and options
<“file name”>
Any valid file name for the computer system, which must be enclosed in quotation marks.
[NOSUBCKT]
When used, the node voltages and inductor currents for subcircuits are not saved.
[TIME=<value> [REPEAT]]
Used to define the transient analysis time at which the bias point is to be saved.
[TEMP=<value>]
Defines the temperature at which the bias point is to be saved. [STEP=<value>]
The step value at which the bias point is to be saved.
75
Commands .SAVEBIAS (save bias point to file)
[MCRUN=<value>]
The number of the Monte Carlo or worst-case analysis run for which the bias point is to
be saved.
Usage examples
A .SAVEBIAS command and a .LOADBIAS (load bias point file) command can be used to
shorten the simulation time of large circuits, and also to aid in convergence.
A typical application for a .SAVEBIAS and a .LOADBIAS command is for a simulation that
takes a considerable amount of time to converge to a bias point. The bias point is saved using
a .SAVEBIAS command so that when the simulation is run again, the previous bias point
calculated is used as a starting point for the bias solution, to save processing time.
The following example illustrates this procedure for a transient simulation.
.SAVEBIAS "SAVEFILE.TRN" TRAN
When the simulation is run, the transient analysis bias point information is saved to the file
savefile.trn in the form of a .NODESET command. This .NODESET command provides
the simulator with a starting solution for determining the bias point calculation for future
simulations. To use this file, replace the .SAVEBIAS command in the circuit file using the
following .LOADBIAS (Load Bias Point File) command.
.LOADBIAS "SAVEFmILE.TRN"
A .SAVEBIAS and .LOADBIAS command should not refer to the same file during the
same simulation run. Use the .SAVEBIAS during the first simulation and the
.LOADBIAS for subsequent ones.
The simulator algorithms have been changed to provide an automatic saving and loading of
bias point information under certain conditions. This automatic feature is used in the
76
Commands .SAVEBIAS (save bias point to file)
Another application for the .LOADBIAS and .SAVEBIAS command is the handling of
convergence problems. Consider a circuit which has difficulty in starting a DC sweep. The
designer has added a .NODESET command as shown below to help the simulator determine
the bias point solution.
.NODESET V(3)=5.0V V(4)=2.75V
Even though this helps the simulator determine the bias point, the simulator still has to
compute the starting values for each of the other nodes. These values can be saved using the
following statement:
.SAVEBIAS "DCOP.NOD" DC
The next time the simulation is run, the .NODESET and .SAVEBIAS command should be
removed and replaced using the following:
.LOADBIAS "DCOP.NOD"
This provides the starting values for all of the nodes in the circuit, and can assist the simulator
in converging to the correct bias point for the start of the sweep. If convergence problems are
caused by a change in the circuit topology, the designer can edit the bias point save file to
change the values for specific nodes or to add new nodes.
77
Commands .SENS (sensitivity analysis)
The results of the .SENS command are only available in the output file. They
cannot be viewed in Probe.
78
Commands .STEP (parametric analysis)
The first general form is for doing a linear sweep. The second form is for doing a logarithmic
sweep. The third form is for using a list of values for the sweep variable.
Examples .STEP VCE 0V 10V .5V
.STEP LIN I2 5mA -2mA 0.1mA
.STEP RES RMOD(R) 0.9 1.1 .001
.STEP DEC NPN QFAST(IS) 1E-18 1E-14 5
.STEP TEMP LIST 0 20 27 50 80 100
.STEP PARAM CenterFreq 9.5kHz 10.5kHz 50Hz
The first three examples are for doing a linear sweep. The fourth example is for doing a
logarithmic sweep. The fifth example is for using a list of values for the sweep variable.
Arguments and options
Sweep type
The sweep can be linear, logarithmic, or a list of values. For [linear sweep type], the
keyword LIN is optional, but either OCT or DEC must be specified for the
<logarithmic sweep type>. The sweep types are described below.
79
Commands .STEP (parametric analysis)
Sweep Variable
Meaning
Name
source A name of an independent voltage or current source. During
the sweep, the source’s voltage or current is set to the sweep
value.
model parameter A model type and model name followed by a model parameter
name in parenthesis. The parameter in the model is set to the
sweep value.
temperature Use the keyword TEMP for <sweep variable name>. The
temperature is set to the sweep value. For each value in the
sweep, all the circuit components have their model parameters
updated to that temperature.
global parameter Use the keyword PARAM, followed by the parameter name,
for <sweep variable name>). During the sweep, the global
parameter’s value is set to the sweep value and all expressions
are reevaluated.
<start value>
Can be greater or less than <end value>: that is, the sweep can go in either direction.
80
Commands .STEP (parametric analysis)
Usage examples
One The .STEP command only steps the DC component of an AC source. In order to step
the AC component of an AC source, a variable parameter has to be created. For example,
Vac 1 0 AC {variable}
.param variable=0
.step param variable 0 5 1
.ac dec 100 1000 1e6
Two This is one way of stepping a resistor from 30 to 50 ohms in steps of 5 ohms, using
a global parameter:
.PARAM RVAL = 1
R1 1 2 {RVAL}
.STEP PARAM RVAL 30,50,5
The parameter RVAL is global and PARAM is the keyword used by the .STEP command
when using a global parameter.
Three The following example steps the resistor model parameter R. This is another way
of stepping a resistor from 30 to 50 ohms in steps of 5 ohms.
R1 1 2 RMOD 1
.MODEL RMOD RES(R=30)
.STEP RES RMOD(R) 30,50,5
Therefore, if the line value of the resistor is set to one ohm, the final resistor value is 1 · R or
R. Stepping R from 30 to 50 ohms then steps the resistor value from 1 · 30 ohms to 1 · 50 ohms.
In examples 2 and 3 , all of the ordinary analyses (e.g., .DC, .AC, and .TRAN) are run for each
step.
81
Commands .STIMLIB (stimulus library file)
82
Commands .STIMULUS (stimulus)
.STIMULUS (stimulus)
Purpose The .STIMULUS command encompasses only the Transient specification portion of what is
allowed in the V or I device syntax.
General form .STIMULUS <stimulus name> <type> <type-specific parameters>*
Examples .STIMULUS InputPulse PULSE (-1mv 1mv 2ns 2ns 50ns 100ns)
.STIMULUS DigitalPulse STIM (1,1)
+ 0S 1
+ 10NS 0
+ 20NS 1
.STIMULUS 50KHZSIN SIN (0 5 50KHZ 0 0 0)
83
Commands .SUBCKT (subcircuit)
.SUBCKT (subcircuit)
.ENDS (end subcircuit)
Purpose The .SUBCKT command/statement starts the subcircuit definition by specifying its name, the
number and order of its terminals, and the names and default parameters that control its
behavior. Subcircuits are instantiated using X (Subcircuit instantiation) devices. The .ENDS
command marks the end of a subcircuit definition.
General form .SUBCKT <name> [node]*
+ [OPTIONAL: < <interface node> = <default value> >*]
+ [PARAMS: < <name> = <value> >* ]
+ [TEXT: < <name> = <text value> >* ]
...
.ENDS
.SUBCKT 74LS00 A B Y
+ OPTIONAL: DPWR=$G_DPWR DGND=$G_DGND
+ PARAMS: MNTYMXDLY=0 IO_LEVEL=0
...
.ENDS
[node]*
An optional list of nodes (pins). This is optional because it is possible to specify a
subcircuit that has no interface nodes.
OPTIONAL:
Allows specification of one or more optional nodes (pins) in the subcircuit definition.
84
Commands .ENDS (end subcircuit)
Comments The subcircuit definition ends with a .ENDS command. All of the netlist between .SUBCKT
and .ENDS is included in the definition. Whenever the subcircuit is used by an X (Subcircuit
Instantiation) device, all of the netlist in the definition replaces the X device.
There must be the same number of nodes in the subcircuit calling statements as in its
definition. When the subcircuit is called, the actual nodes (the ones in the calling statement)
replace the argument nodes (the ones in the defining statement).
Do not use 0 (zero) in this node list. Zero is reserved for the global ground
node.
The optional nodes are stated as pairs consisting of an interface node and its default value. If
an optional node is not specified in an X device, its default value is used inside the subcircuit;
otherwise, the value specified in the definition is used.
This feature is particularly useful when specifying power supply nodes, because the same
nodes are normally used in every device. This makes the subcircuits easier to use because the
same two nodes do not have to be specified in each subcircuit statement. This method is used
in the libraries provided with the Digital Simulation feature.
Subcircuits can be nested. That is, an X device can appear between .SUBCKT and .ENDS
commands. However, subcircuit definitions cannot be nested. That is, a .SUBCKT statement
cannot appear in the statements between a .SUBCKT and a .ENDS.
Subcircuit definitions should contain only device instantiations (statements without a leading
period) and possibly these statements:
• .IC (initial bias point condition)
• .NODESET (set approximate node voltage for bias point)
• .MODEL (model definition)
• .PARAM (parameter)
• .FUNC (function)
Models, parameters, and functions defined within a subcircuit definition are available only
within the subcircuit definition in which they appear. Also, if a .MODEL, .PARAM, or a
.FUNC statement appears in the main circuit, it is available in the main circuit and all
subcircuits.
Node, device, and model names are local to the subcircuit in which they are defined. It is
acceptable to use a name in a subcircuit which has already been used in the main circuit. When
the subcircuit is expanded, all its names are prefixed using the subcircuit instance name: for
example, Q13 becomes X3.Q13 and node 5 becomes X3.5 after expansion. After expansion
all names are unique. The only exception is the use of global node names (refer to your PSpice
user’s guide) that are not expanded.
85
Commands .ENDS (end subcircuit)
The keyword PARAMS: passes values into subcircuits as arguments and uses them in
expressions inside the subcircuit. The keyword TEXT: passes text values into subcircuits as
arguments and uses them as expressions inside the subcircuit. Once defined, a text parameter
can be used in the following places:
• To specify a JEDEC file name on a PLD device.
• To specify an Intel Hex file name to program a ROM device or initialize a RAM device.
• To specify a stimulus file name or signal name on a FSTIM device.
• To specify a text parameter to a (lower level) subcircuit.
• As part of a text expression used in one of the above.
The text parameters and expressions are currently only used in Digital
Simulation.
Usage examples
One In the example of the 74LS00 subcircuit, the following subcircuit reference uses the
default power supply nodes $G_DPWR and $G_DGND:
X1 IN1 IN2 OUT 74LS00
Two To specify your own power supply nodes MYPOWER and MYGROUND, use the
following subcircuit instantiation:
X2 IN1 IN2 OUT MYPOWER MYGROUND 74LS00
Three If wanted, one optional node in the subcircuit instantiation can be provided. In the
following subcircuit instantiation, the default $G_DGND would be used:
X3 IN1 IN2 OUT MYPOWER 74LS00
Four However, to specify values beyond the first optional node, all nodes previous to that
node must be specified. For example, to specify your own ground node, the default power
node before it must be explicitly stated:
X4 IN1 IN2 OUT $G_DPWR MYGROUND 74LS00
86
Commands .TEMP (temperature)
.TEMP (temperature)
Purpose The .TEMP command sets the temperature at which all analyses are done.
General form .TEMP <temperature value>*
The temperatures are in degrees Centigrade. If more than one temperature is given, then all
Comments
87
Commands .TEXT (text parameter)
<text expression>
Text expressions can contain the following:
The values can be text constants (enclosed in quotation marks “ “) or text expressions
Comments
(enclosed in |). Text expressions can contain only text constants or previously defined
parameters. Once defined, a text parameter has the following uses:
• To specify a JEDEC file name on a PLD device.
• To specify an Intel Hex file name to program a ROM device or initialize a RAM device.
• To specify a stimulus file name or signal name on an FSTIM device.
• To specify a text parameter to a subcircuit.
• As part of a text expression used in one of the above.
88
Commands .TF (transfer)
.TF (transfer)
Purpose The .TF command/statement causes the small-signal DC gain to be calculated by linearizing
the circuit around the bias point.
General form .TF <output variable> <input source name>
are evaluated and written to the output file. This output does not require a .PRINT (Print),
.PLOT (plot), or .PROBE (Probe) statement.When <output variable> is a current, it is
restricted to be the current through a voltage source.
The results of the .TF command are only available in the output file. They
cannot be viewed in Probe.
89
Commands .TRAN (transient analysis)
Since the results are computed at different times than they are printed, a 2nd-order
polynomial interpolation is used to obtain the printed values. This applies only to
.PRINT (print), .PLOT (plot), and .FOUR (Fourier analysis) outputs and does not
affect Probe.
<final time value>
Sets the end time for the analysis.
[no-print value]
Sets the time interval (from TIME=0) that is not printed, plotted, or given to Probe.
[SKIPBP]
Skips calculation of the bias point.
When this option is used, the bias conditions are fully determined by the
IC= specifications for capacitors and inductors.
90
Commands .TRAN (transient analysis)
Comments The transient analysis calculates the circuit’s behavior over time, always starting at TIME=0
and finishing at <final time value>, but you can suppress the output of a portion of the
analysis. Use a .PRINT (print), .PLOT (plot), .FOUR (Fourier analysis), or
.PROBE (Probe) to get the results of the transient analysis.
Prior to performing the transient analysis, PSpice computes a bias point for the circuit separate
from the regular bias point. This is necessary because at the start of a transient analysis, the
independent sources can have different values than their DC values.
The internal time step of the transient analysis adjusts as the analysis proceeds: over intervals
when there is little activity, the time step is increased, and during busy intervals it is decreased.
The default ceiling on the internal time step is <final time value>/50, but when there are no
charge storage elements, inductances, or capacitances in the circuit, the ceiling is
<print step value>.
The .TRAN command also sets the variables TSTEP and TSTOP, which are used in defaulting
some waveform parameters. TSTEP is equal to <print step value> and TSTOP is equal to
<final time value>.
Refer to your PSpice user’s guide for more information on setting initial conditions.
91
Commands .VECTOR (digital output)
<number of nodes>
This means the number of nodes in the list.
<node>
This defines the nodes whose states are to be stored.
<column position>
Specifies the column position in the file. By default, the column position is determined
through the order in which the .VECTOR command appears in the circuit file, and by the
order of the signals within a .VECTOR command. Valid values for <column position> are
1-255.
RADIX
The radix of the values for the specified nodes is defined if <number of nodes> is greater
than one. Valid values are BINARY, OCTAL, or HEX (you can abbreviate to the first
letter). If <number of nodes> is one, and a radix of OCTAL or HEX is specified, a bit
position within the octal or hex digit via the BIT parameter can also be specified. A
separate .VECTOR command can be used to construct multi-bit values out of single
signals, provided the same POS value is specified. The default radix is BINARY if
<number of nodes> is one. Otherwise, the default radix is HEX. If a radix of OCTAL or
HEX is specified, the simulator creates dummy entries in the vector file header to fill out
the value if <number of nodes> is not an even power of two.
<bit index>
Defines the bit position within a single hex or octal digit when the VECTOR symbol is
attached to a wire. Valid values are one through four if RADIX=HEX, and one through
three if RADIX=OCTAL.
92
Commands .VECTOR (digital output)
<signal names>
Defines the names of the signals which appear in the header of the vector file. If
SIGNAMES is not specified, the <node> names are used in the vector file header. If
<number of nodes> is greater than one, names are defined positionally, msb to lsb. If
fewer signal names than <number of nodes> are specified, the <node> names are used for
the remaining unspecified names.
Comments The resulting file contains time and state values for the circuit nodes specified in the statement.
The file format is identical to that used by the digital file stimulus device (FSTIM). Thus, the
results of one simulation can be used to drive inputs of a subsequent simulation. See File
stimulus for more information on the file stimulus file format.
The optional parameters on the .VECTOR command can be used to control the file name,
column order, radix of the state values, and signal names which appear in the file header. Each
parameter is described in detail in the following table.
A different file name can be specified by using the FILE parameter. You can use multiple
.VECTOR commands to specify nodes for the same file.
93
Commands .WATCH (watch analysis results)
<output variable>
A maximum of eight output variables are allowed on a single .WATCH statement.
operating range set from minus one volt to four volts. If during the simulation the voltage at
node three exceeds four volts, the simulation will pause. If the simulation is allowed to
proceed, and node three continues to rise in value, the simulation is then not interrupted.
However, if the simulation is allowed to continue and V(3) falls below -1.0 volt, the simulation
would again pause because a new boundary condition was exceeded.
Up to three output variables can be seen on the display at one time. More than three variables
can be specified, but they are not all displayed.
The possible output variables are given in .PROBE (Probe), with the exception that digital
nodes cannot be used and group delay is not available.
94
Commands .WCASE (sensitivity/worst-case analysis)
<output variable>
Identical in format to that of a .PRINT (print) output variable.
<function>
Specifies the operation to be performed on the values of the <output variable> to reduce
these to a single value. This value is the basis for the comparisons between the nominal
and subsequent runs. The <function> must be one of the following:
Function Meaning
YMAX Find the absolute value of the greatest difference in each
waveform from the nominal run.
MAX Find the maximum value of each waveform.
MIN Find the minimum value of each waveform.
RISE_EDGE(<value>) Find the first occurrence of the waveform crossing above the
threshold <value>. The waveform must have one or more
points at or below <value> followed by one above; the
output value listed is where the waveform increases above
<value>.
FALL_EDGE(<value>) Find the first occurrence of the waveform crossing below the
threshold <value>. The waveform must have one or more
points at or above <value> followed by one below; the
output value listed is where the waveform decreases below
<value>.
95
Commands .WCASE (sensitivity/worst-case analysis)
[option]*
Could have any number of the following.
[option] Meaning
LIST Prints the updated model parameters for the sensitivity analysis.
This does not affect the Probe data generated by the simulation.
OUTPUT ALL Prints output from the sensitivity runs, after the nominal (first) run.
The output from any run is governed by the .PRINT, .PLOT, and
.PROBE command in the file. If OUTPUT ALL is omitted, then only
the nominal and worst-case runs produce output. OUTPUT ALL
ensures that all sensitivity information is saved for Probe.
RANGE* Restricts the range over which <function> can be evaluated. An
(<low value>, asterisk * can be used in place of a <value> to show for all values.
<high value>) For example see the next two rows.
YMAX YMAX is evaluated for values of the sweep variable (e.g., time, and
RANGE(*,.5) frequency) of .5 or less.
MAX RANGE(-1,*) The maximum of the output variable is found for values of the
sweep variable of -1 or more.
HI or LOW Specify the direction which <function> should move for the
worst-case run is to go (relative to the nominal). If <function> is
YMAX or MAX, the default is HI, otherwise the default is LOW.
VARY DEV| By default, any device which has a model parameter specifying
VARY LOT| either a DEV tolerance or a LOT tolerance is included in the
VARY BOTH
analysis. The analysis can be limited to only those devices which
have DEV or LOT tolerances by specifying the appropriate option.
The default is VARY BOTH. When VARY BOTH is used, sensitivity to
parameters using both DEV and LOT specifications is checked only
with respect to LOT variations. The parameter is then maximized or
minimized using both DEV and LOT tolerances for the worst-case.
All devices referencing the model have the same parameter values
for the worst-case simulation.
DEVICES By default, all devices are included in the sensitivity and worst-case
(list of device types) analyses. The devices considered can be limited by listing the device
types after the keyword DEVICES. Do not use any spaces or tabs in
the devices list. For example, to only perform the analysis on
resistors and MOSFETs, enter:
DEVICES RM
* If RANGE is omitted, then <function> is evaluated over the whole sweep range. This is equivalent to
RANGE(*,*).
96
Commands .WCASE (sensitivity/worst-case analysis)
97
Commands .WCASE (sensitivity/worst-case analysis)
Comments Multiple runs of the selected analysis (DC, AC, or transient) are performed while parameters are
varied. Unlike .MC (Monte Carlo analysis), .WCASE varies only one parameter per run. This
allows PSpice to calculate the sensitivity of the output waveform to each parameter. Once all
the sensitivities are known, one final run is performed using all parameters varied so as to
produce the worst-case waveform. The sensitivity and worst-case runs are performed using
variations on model parameters as specified by the DEV and LOT tolerances on each
.MODEL (model definition) parameter (see page 1-52 for details on the DEV and LOT
tolerances). Other specifications on the .WCASE command control the output generated by the
analysis.
You can run either .MC or .WCASE for a circuit, but not both in the same circuit.
98
Commands * (comment)
* (comment)
Purpose A statement beginning with an asterisk * is a comment line, which PSpice ignores.
General form * [any text]
Use an asterisk at the beginning of each line you want to be a comment. A single asterisk does
Comments
produces an error message, because the second line is not covered by the first asterisk.
The use of comment statements throughout the input is recommended. It is good practice to
insert a comment line just before a subcircuit definition to identify the nodes, for example:
* +IN -IN V+ V- +OUT -OUT
.SUBCKT OPAMP 100 101 1 2 200 201
99
Commands ; (in-line comment)
; (in-line comment)
Purpose A semicolon ; is treated as the end of a line.
General form circuit file text ;[any text]
The simulator moves on to the next line in the circuit file. The text on the line after the
Comments
semicolon ; is a comment and has no effect. The use of comments throughout the input is
recommended. This type of comment can also replace comment lines, which must start with *
in the first column.
Trailing in-line comments that extend to more that one line can use a semicolon to mark the
beginning of the subsequent comment lines, as shown in the example.
100
Commands + (line continuation)
+ (line continuation)
Purpose A plus sign + is treated as the continuation of the previous line.
General form circuit file text
+ more text
Because the simulator reads the line preceded by a plus sign as a continuation of the previous
Comments
line, you can use the plus sign to break up long lines of command text.
101
Commands Differences between PSpice and Berkeley SPICE2
102
Commands Differences between PSpice and Berkeley SPICE2
103
Commands Differences between PSpice and Berkeley SPICE2
104
Analog devices
Letter Device type Letter Device type
B GaAsFET N Digital input (N device)
C Capacitor O Digital output (O device)
D Diode Q Bipolar transistor
Voltage-controlled
E R Resistor
voltage source
Current-controlled
F S Voltage-controlled switch
current source
Voltage-controlled
G T Transmission line
current source
Current-controlled
H U Digital primitive summary
voltage source
Independent current
I U STIM Stimulus devices
source & stimulus
Independent voltage
J Junction FET V
source & stimulus
Inductor coupling
K W Current-controlled switch
(and magnetic core)
Transmission line
K X Subcircuit instantiation
coupling
L Inductor Z IGBT
M MOSFET
2
Analog devices
This chapter describes the different types of analog devices supported by PSpice and
PSpice A/D. These device types include analog primitives, independent and controlled
sources, and subcircuit calls. Each device type is described separately, and each description
includes the following information as applicable:
• A description and an example of the proper netlist syntax.
• The corresponding model types and their description.
• The corresponding list of model parameters and their descriptions.
• The equivalent circuit diagram and characteristic equations for the model (as required).
• References to publications that the model is based on.
These analog devices include all of the standard circuit components that normally are not
considered part of the two-state (binary) devices that are found in the digital devices.
The model library consists of analog models of off-the-shelf parts that you can use directly in
your circuit designs. Refer to the online Library List for available device models and the
libraries they are located in. You can also implement models using the .MODEL (model
definition) statement and implement macromodels as subcircuits using the .SUBCKT
(subcircuit) statement.
The Device types summary table lists all of the analog device primitives supported by
PSpice A/D. Each primitive is described in detail in the sections following the table.
106
Analog devices
Device types
PSpice supports many types of analog devices, including sources and general subcircuits.
PSpice A/D also supports digital devices. The supported devices are categorized into device
types. each of which can have one or more model types. For example, the BJT device type has
three model types: NPN, PNP, and LPNP (Lateral PNP). The description of each devices type
includes a description of any of the model types it supports.
The device declarations in the netlist always begin with the name of the individual device
(instance). The first letter of the name determines the device type. What follows the name
depends on the device type and its requested characteristics. Below is a summary of the device
types and the general form of their declaration formats.
The table below includes the designator (letter) used in device modeling for each
device type.
107
Analog devices
108
Analog devices
109
Analog devices B
GaAsFET B
General form B<name> <drain node> <gate node> <source node> <model name> [area value]
Examples BIN 100 10 0 GFAST
B13 22 14 23 GNOM 2.0
Description The GaAsFET is modeled as an intrinsic FET using an ohmic resistance (RD/area) in series
with the drain, another ohmic resistance (RS/area) in series with the source, and another
ohmic resistance (RG) in series with the gate.
Drain
RD
Cgd
Gate RG
CDS
Cgs
RS
Source
Arguments and options
[area value]
The relative device area. Its default value is 1.0.
Comments The LEVEL model parameter selects among different models for the intrinsic GaAsFET as
follows:
LEVEL=1 “Curtice” model (see reference [1])
LEVEL=2 “Raytheon” or “Statz” model (see reference [3]), equivalent to
the GaAsFET model in SPICE3
LEVEL=3 “TOM” model by TriQuint (see reference [4])
LEVEL=4 “Parker-Skellern” model (see reference [5] and [6])
LEVEL=5 “TOM-2” model by TriQuint (see reference [7])
For more information, see References.
110
Analog devices B
The TOM-2 model is based on the original TriQuint TOM model, retaining the
desirable features of the TOM model, while improving accuracy in the subthreshold
near cutoff and knee regions (Vds of 1 volt or less). This model includes additional
temperature coefficients related to the drain current and corrects the major
deficiencies in the behavior of the capacitance as a function of temperature.
Capture parts
The following table lists the set of GaAsFET breakout parts designed for customizing model
parameters for simulation. These are useful for setting up Monte Carlo and worst-case
analyses with device and/or lot tolerances specified for individual model parameters.
111
Analog devices B
Model parameters
GaAsFET model parameters for all levels
Model parameter* Description Units Default
AF flicker noise exponent 1
BETA transconductance coefficient amp/volt2 0.1
BETATCE BETA exponential temperature coefficient %/°C 0
CDS drain-source capacitance farad 0
CGD zero-bias gate-drain p-n capacitance farad 0
CGS zero-bias gate-source p-n capacitance farad 0
EG band gap voltage (barrier height) eV 1.11
FC forward-bias depletion capacitance 0.5
coefficient
IS gate p-n saturation current amp 1E-14
KF flicker noise coefficient 0
LEVEL model index (1, 2, 3, 4, or 5) 1
N gate p-n emission coefficient 1
RD drain ohmic resistance ohm 0
RG gate ohmic resistance ohm 0
RS source ohmic resistance ohm 0
TRD1 RD temperature coefficient (linear) °C-1 0
TRG1 RG temperature coefficient (linear) °C-1 0
TRS1 RS temperature coefficient (linear) °C-1 0
T_ABS absolute temperature °C
T_MEASURED measured temperature °C
T_REL_GLOBAL relative to current temperature °C
T_REL_LOCAL relative to AKO model temperature °C
VBI gate p-n potential volt 1.0
VTO pinchoff voltage volt -2.5
VTOTC VTO temperature coefficient volt/°C 0
XTI IS temperature exponent 0
* For information on T_ABS, T_MEASURED, T_REL_GLOBAL, and T_REL_LOCAL, see the .MODEL (model defini-
tion) statement.
112
Analog devices B
113
Analog devices B
114
Analog devices B
115
Analog devices B
116
Analog devices B
GaAsFET equations
The equations in this section describe an N-channel GaAsFET. The following variables are
used:
Vgs = intrinsic gate-intrinsic source voltage
Vgd = intrinsic gate-intrinsic drain voltage
Vds = intrinsic drain-intrinsic source voltage
Cds = drain-source capacitance
Cgs = gate-source capacitance
Cgd = gate-drain capacitance
Vt = k·T/q (thermal voltage)
k = Boltzmann constant
q = electron charge
T = analysis temperature (°K)
Tnom = nominal temperature (set by using .OPTIONS (analysis options) TNOM=)
Positive current is current flowing into a terminal (for example, positive drain current
flows from the drain through the channel to the source).
117
Analog devices B
and Vgs -
– --------------
VBD
Igsr = IBD · 1 – e
and Vgd-
– --------------
VBD
Igdr = IBD · 1 – e
level 1: Idrain
Normal mode: Vds > 0
Case 1
for cutoff region: Vgs - VTO < 0
then: Idrain = 0
Case 2
for linear & saturation region: Vgs - VTO > 0
then: Idrain = BETA·(1+LAMBDA·Vds)·(Vgs-VTO)2·tanh(ALPHA·Vds)
Inverted mode: Vds < 0
Switch the source and drain in the Normal mode equations.
118
Analog devices B
119
Analog devices B
Vgst = Vgs - VTO - γlf · Vgdavg - γhf · (Vgd – Vgdavg) - ηhf · (Vgs – Vgsavg)
Vdst = Vds
120
Analog devices B
– Ids
Idrain = 1-------------------------------------------
+ DELTA ⋅ p
-
avg
Vgst = Vgd - VTO - γlf · Vgdavg - γhf · (Vgs - Vgdavg) - ηhf · (Vgd -Vgsavg)
Vdst = -Vds
where
Ids = BETA · (1 + LAMBDA · Vdst)·(VgtQ - (Vgt -Vdt)Q)
Pavg = Vds · Ids - TAUD · d/dt Pavg
γlf = LFGAM - LFG1 · Vgsavg - LFG2 · Vgdavg
Vgdavg = Vgd -TAUG · d/dt Vgdavg if: Vgd < Vgs
= Vgs - TAUG · d/dt Vgdavg if: Vgs < Vgd
γhf = HFGAM - HFG1 · Vgsavg - HFG2 · Vgdavg
ηhf = HFETA + HFE1 · Vgdavg + HFE2 · Vgsavg
Vgsavg = Vgs -TAUG · d/dt Vgsavg if: Vgd < Vgs
= Vgd - TAUG · d/dt Vgsavg if: Vgs < Vgd
1 1 2 2 2 2
Vdt = --- ⋅ ( Vdp ⋅ 1 + Z + Vsat ) + Z ⋅ Vsat – --- ⋅ ( Vdp ⋅ 1 + Z – Vsat ) + Z ⋅ Vsat
2 2
P–Q
- ⋅ ---------------------------
P Vgt
Vdp = Vdst ⋅ ---
Q VBI – VTO
121
Analog devices B
Vst = ( NG + ND ⋅ Vds ) ⋅ kT
-------
q
122
Analog devices B
all levels
For all conditions: Cds = area·CDS
level 1
For: Vgs < FC·VBI Cgs = area·CGS·(1-Vgs/VBI)-M
For: Vgs > FC·VBI Cgs = area·CGS·(1-FC)-(1+M)·(1-FC·(1+M)+M·Vgs/VBI)
For: Vgd < FC·VBI Cgd = area·CGD·(1-Vgd/VBI)-M
For: Vgd > FC·VBI Cgd = area·CGD·(1-FC)-(1+M)·(1-FC·(1+M)+M·Vgd/VBI)
levels 2, 3, and 5
1/2
Cgs = area·(CGS·K2·K1/(1-Vn/VBI) + CGD·K3)
1/2
Cgd = area·(CGS·K3·K1/(1-Vn/VBI) + CGD·K2)
where:
1/2
K1 = (1 + (Ve-VTO)/((Ve-VTO)2+VDELTA2) )/2
1/2
K2 = (1 + (Vgs-Vgd)/((Vgs-Vgd)2+(1/ALPHA)2) )/2
1/2
K3 = (1 - (Vgs-Vgd)/((Vgs-Vgd)2+(1/ALPHA)2) )/2
1/2
Ve = (Vgs + Vgd + ((Vgs-Vgd)2+(1/ALPHA)2) )/2
1/2
if: (Ve + VTO + ((Ve-VTO)2+VDELTA2) )/2 < VMAX
1/2
then: Vn = (Ve + VTO + ((Ve-VTO)2+VDELTA2) )/2
else: Vn = VMAX
123
Analog devices B
level 4
where:
V gn
K1 = 1--- -----------------------------------
CGS
- 1 + XC + ( 1 – XC ) -----------------------------
-
2 1 – V ⁄ VBI 2 2
ge V gn + 0.2
3
4 ( 1 – FC )
if: Vx > FC · VBI then: Vge = VBI 1 – --------------------------------------------
Vx 2
2 – 3 FC + --------
-
VBI
If the source and drain potentials swap, the model reverses over a range set by α.The
model maintains a straight line relation between gate-source capacitance and gate
bias in the region Vgs > FC · VBI.
124
Analog devices B
125
Analog devices B
126
Analog devices B
References
For more information on this GaAsFET model, refer to:
[1] W. R. Curtice, “A MESFET model for use in the design of GaAs integrated circuits,” IEEE
Transactions on Microwave Theory and Techniques, MTT-28, 448-456 (1980).
[2] S. E. Sussman-Fort, S. Narasimhan, and K. Mayaram, “A complete GaAs MESFET
computer model for SPICE,” IEEE Transactions on Microwave Theory and Techniques,
MTT-32, 471-473 (1984).
[3] H. Statz, P. Newman, I. W. Smith, R. A. Pucel, and H. A. Haus, “GaAs FET Device and
Circuit Simulation in SPICE,” IEEE Transactions on Electron Devices, ED-34, 160-169
(1987).
[4] A. J. McCamant, G. D. McCormack, and D. H. Smith, “An Improved GaAs MESFET
Model for SPICE,” IEEE Transactions on Microwave Theory and Techniques, vol. 38, no. 6,
822-824 (June 1990).
[5] A. E. Parker and D. J. Skellern “Improved MESFET Characterization for Analog Circuit
Design and Analysis,” 1992 IEEE GaAs IC Symposium Technical Digest, pp. 225-228,
Miami Beach, October 4-7, 1992.
[6] A. E. Parker, “Device Characterization and Circuit Design for High Performance
Microwave Applications,” IEE EEDMO’93, London, October 18, 1993.
[7] D. H. Smith, “An Improved Model for GaAs MESFETs,” Publication forthcoming.
(Copies available from TriQuint Semiconductors Corporation or MicroSim.)
127
Analog devices C
Capacitor C
General form C<name> <(+) node> <(-) node> [model name] <value> [IC=<initial value>]
15v 0v
CLoad
[model name]
If [model name] is left out, then <value> is the capacitance in farads. If [model name] is
specified, then the value is given by the model parameters; see Capacitor value formula.
<initial value>
The initial voltage across the capacitor during the bias point calculation. It can also be
specified in a circuit file using a .IC command as follows:
.IC V(+node, -node) <initial value>
Comments Positive current flows from the (+) node through the capacitor to the (-) node. Current flow
from the first node through the component to the second node is considered positive.
For details on using the .IC command in a circuit file, see .IC (initial bias point condition)
and refer to your PSpice user’s guide for more information.
The initial voltage across the capacitor can also be set in Capture by using the IC1 part if the
capacitor is connected to ground or by using the IC2 part for setting the initial conditions
between two nodes. These parts can be found in SPECIAL.OLB.
For more information about setting initial conditions, refer to the Capture User’s Guide if you
are using Capture, or refer to your PSpice user’s guide if you are using PSpice.
128
Analog devices C
Capture parts
For standard C parts, the effective value of the part is set directly by the VALUE property.
For the variable capacitor, C_VAR, the effective value is the product of the base value
(VALUE) and multiplier (SET).
In general, capacitors should have positive component values (VALUE property). In all cases,
components must not be given a value of zero.
However, there are cases when negative component values are desired. This occurs most often
in filter designs that analyze an RLC circuit equivalent to a real circuit. When transforming
from the real to the RLC equivalent, it is possible to end up with negative component values.
PSpice A/D allows negative component values for bias point, DC sweep, AC, and noise
analyses. A transient analysis may fail for a circuit with negative components. Negative
capacitors may create instabilities in time that the analysis cannot handle.
Model
Part name Property Property description
type
C capacitor VALUE capacitance
IC initial voltage across the capacitor during bias
point calculation
C_VAR VALUE base capacitance
SET multiplier
Breakout parts
For non-stock passive and semiconductor devices, Capture provides a set of breakout parts
designed for customizing model parameters for simulation. These are useful for setting up
Monte Carlo and worst-case analyses with device and/or lot tolerances specified for
individual model parameters. Another approach is to use the model editor to derive an
instance model and customize this. For example, you could add device and/or lot tolerances
to model parameters.
Basic breakout part names consist of the intrinsic PSpice A/D device letter plus the suffix
BREAK. By default, the model name is the same as the part name and references the
appropriate device model with all parameters set at their default. For instance, the DBREAK
part references the DBREAK model which is derived from the intrinsic PSpice A/D D model
(.MODEL DBREAK D).
For breakout part CBREAK, the effective value is computed from a formula that is a function
of the specified VALUE property.
Device Part
Part library Property Property description
type name
capacitor CBREAK BREAKOUT.OLB VALUE capacitance
IC initial voltage across the
capacitor during bias point
calculation
MODEL CAP model name
129
Analog devices C
Capacitor equations
where <value> is normally positive (though it can be negative, but not zero). Tnom is the
nominal temperature (set using TNOM option).
130
Analog devices D
D Diode
General form D<name> <(+) node> <(-) node> <model name> [area value]
Description The diode is modeled as an ohmic resistance (RS/area) in series with an intrinsic diode.
Positive current is current flowing from the anode through the diode to the cathode.
RS
C
I
<(-) node>
The cathode.
[area value]
Scales IS, ISR, IKF,RS, CJO, and IBV, and has a default value of 1.
IBV and BV are both specified as positive values.
131
Analog devices D
Capture parts
The following table lists the set of diode breakout parts designed for customizing model
parameters for simulation. These are useful for setting up Monte Carlo and worst-case
analyses with device and/or lot tolerances specified for individual model parameters.
132
Analog devices D
133
Analog devices D
Diode equations
The equations in this section use the following variables:
Vd = voltage across the intrinsic diode only
Vt = k·T/q (thermal voltage)
k = Boltzmann’s constant
q = electron charge
T = analysis temperature (°K)
Tnom = nominal temperature (set using TNOM option)
Other variables are listed in Diode model parameters.
.
134
Analog devices D
References
For a detailed description of p-n junction physics, refer to:
[1] A. S. Grove, Physics and Technology of Semiconductor Devices, John Wiley and Sons,
Inc., 1967.
Also, for a generally detailed discussion of the U.C. Berkeley SPICE models, including the
diode device, refer to:
[2] P. Antognetti and G. Massobrio, Semiconductor Device Modeling with SPICE,
McGraw-Hill, 1988.
135
Analog devices E/G
Description The voltage-controlled voltage source (E) and the voltage-controlled current source (G)
devices have the same syntax. For a voltage-controlled current source just substitute G for E.
G generates a current, whereas E generates a voltage.
1v 10v 1v 10v
2v 11v 2v 11v
EBuff GBuff
136
Analog devices E/G
FREQ
If a DELAY value is specified, the simulator modifies the phases in the FREQ table to
incorporate the specified delay value. This is useful for cases of tables which the simulator
identifies as being non-causal. When this occurs, the simulator provides a delay value
necessary to make the table causal. The new syntax allows this value to be specified in
subsequent simulation runs, without requiring the user to modify the table.
If a KEYWORD is specified for FREQ tables, it alters the values in the table. The
KEYWORD can be one of the following:
• MAG causes magnitude of frequency response to be interpreted as a raw value instead
of dB.
• DB causes magnitude to be interpreted as dB (the default).
• RAD causes phase to be interpreted in radians.
• DEG causes phase to be interpreted in degrees (the default).
• R_I causes magnitude and phase values to be interpreted
as real and imaginary magnitudes.
Comments The first form and the first two examples apply to the linear case; the second form and the third
example are for the nonlinear case. The last five forms and examples are analog behavioral
modeling (ABM) that have expression, look up table, Laplace transform, frequency response,
and filtering. Refer to your PSpice user’s guide for more information on analog behavioral
modeling.
Chebyshev filters have two attenuation values, given in dB, which specify the pass band ripple
and the stop band attenuation. They can be given in either order, but must appear after all of
the cutoff frequencies have been given. Low pass (LP) and high pass (HP) have two cutoff
frequencies, specifying the pass band and stop band edges, while band pass (BP) and band
reject (BR) filters have four. Again, these can be given in any order.
You can get a list of the filter Laplace coefficients for each stage by enabling
the LIST option in the Simulation Settings dialog box. (Click the Options tab,
then select the Output file Category and select Device Summary.) The output
is written to the .out file after the simulation is complete.
For the linear case, there are two controlling nodes and these are followed by the gain. For all
cases, including the nonlinear case (POLY), refer to your PSpice user’s guide.
Expressions cannot be used for linear and polynomial coefficient values in a
voltage-controlled voltage source device statement.
137
Analog devices E/G
where
If the source is one-dimensional (there is only one controlling source), POLY(1) is required
unless the linear form is used. If the source is multidimensional (there is more than one
controlling source), the dimension needs to be included in the keyword, for instance
POLY(2).
Caution must be exercised with the POLY form. For instance,
EWRONG 1 0 POLY(1) (1,0) .5 1.0
tries to set node 1 to .5 volts greater than node 1. In this case, any analyses which you specify
will fail to calculate a result. In particular, PSpice A/D cannot calculate the bias point for a
circuit containing EWRONG. This also applies to the VALUE form of EWRONG:
(EWRONG 1 0 VALUE = {0.5 * V(1)}).
PSpice A/D has a built-in capability allowing controlled sources to be defined with a
polynomial transfer function of any degree and any dimension. Polynomials have associated
138
Analog devices E/G
coefficients for each term. Consider a voltage-controlled source with voltages V1, V2, ... Vn.
The coefficients are associated with the polynomial according to this convention:
Vout = P0 +
P1·V1 + P2·V2 + ··· Pn·Vn +
Pn+1·V1·V1 + Pn+2·V1·V2 + ··· Pn+n·V1·Vn +
P2n+1·V2·V2 + P2n+2·V2·V3 + ··· P2n+n-1·V2·Vn +
.
.
.
Pn!/(2(n-2)!)+2n·Vn·Vn +
Pn!/(2(n-2)!)+2n+1·V12·V1 + Pn!/(2(n-2)!)+2n+2·V12·V2 + ···
.
.
.
The above is written for a voltage-controlled voltage source, but the form is similar for the
other sources.
The POLY device types shown in Basic controlled source properties are defined with a
dimension of one, meaning there is only one controlling source. However, similar devices can
be defined of any degree and dimension by creating parts with appropriate coefficient and
TEMPLATE properties and the appropriate number of input pins.
The current-controlled device models (F, FPOLY, H, and HPOLY) contain a current-sensing
voltage source. When netlisted, they generate two device declarations to the circuit file set:
one for the controlled source and one for the independent current-sensing voltage source.
When defining a current-controlled source part of higher dimension, the TEMPLATE
property must account for the same number of current-sensing voltage sources (equal to the
dimension value). For example, a two dimensional current-controlled voltage source is
described by the following polynomial equation:
Vout = C0 + C1I1 + C2I2 + C11I12 + C12I1I2 + C22I22
To create the two dimensional HPOLY2 part, these properties must be defined:
COEFF0 = 1
COEFF1 = 1
COEFF2 = 1
COEFF11 = 1
COEFF12 = 1
COEFF22 = 1
COEFFS = @COEFF0 @COEFF1 @COEFF2 @COEFF11 @COEFF12 @COEFF22
TEMPLATE = H^@REFDES %5 %6 POLY(2) VH1^@REFDES VH2^@REFDES
\n+ @COEFFS \nVH1^@REFDES %1 %2 0V \nVH2^@REFDES %3 %4 0V
The TEMPLATE definition is actually contained on a single line. The VH1 and VH2
fragments after the \n characters represent the device declarations for the two current-sensing
voltage sources required by this part. Also, the part graphics must have the appropriate
number of pins. When placing an instance of HPOLY2 in your schematic, the COEFFn
properties must be appropriately set.
Implementation examples
Following are some examples of traditional SPICE POLY constructs and equivalent ABM
parts which could be used instead.
139
Analog devices E/G
This could be represented with a single ABM expression device configured with the following
expression properties:
EXP1 = V(1,0) +
EXP2 = V(2,0) +
EXP3 = V(3,0) +
EXP4 = V(4,0)
Following template substitution for the ABM device, the output becomes:
V(OUT) = { V(1,0) + V(2,0) + V(3,0) + V(4,0) }
This could be represented with a single MULT device. For additional examples of a voltage
multiplier device, refer to the Analog Behavioral Modeling chapter of your PSpice user’s
guide.
This could be represented by a single instance of the MULT part, with both inputs from the
same net. This results in the following:
Vout = (Vin)2
140
Analog devices F/H
Description The Current-Controlled Current Source (F) and the Current-Controlled Voltage Source (H)
devices have the same syntax. For a Current-Controlled Voltage Source just substitute an H
for the F. The H device generates a voltage, whereas the F device generates a current.
Arguments and options
(+) and (-)
Output nodes. A positive current flows from the (+) node through the source to the (-)
node. The current through the controlling voltage source determines the output current.
The controlling source must be an independent voltage source (V device), although it
need not have a zero DC value.
POLY(<value>)
Specifies the number of dimensions of the polynomial. The number of controlling voltage
sources must be equal to the number of dimensions.
Comments The first General Form and the first two examples apply to the linear case. The second form
and the last example are for the nonlinear case.
For the linear case, there must be one controlling voltage source and its name is followed by
the gain. For all cases, including the nonlinear case (POLY), refer to your PSpice user’s guide.
141
Analog devices I/V
Description This element is a current source. Positive current flows from the (+) node through the source
to the (-) node: in the first example, IBIAS drives node 13 to have a negative voltage. The
default value is zero for the DC, AC, and transient values. None, any, or all of the DC, AC,
and transient values can be specified. The AC phase value is in degrees. The pulse and
exponential examples are explained later in this section.
13v 13v
0v 0v
IBias VBias
The independent current source & stimulus (I) and the independent voltage
source & stimulus (V) devices have the same syntax. For an independent
voltage source & stimulus just substitute a V for the I. The V device functions
identically and has the same syntax as the I device, except that it generates
voltage instead of current.
The variables TSTEP and TSTOP, which are used in defaulting some waveform parameters,
are set by the .TRAN (transient analysis) command. TSTEP is <print step value> and
TSTOP is <final time value>. The .TRAN command can be anywhere in the circuit file; it
need not come after the voltage source.
142
Analog devices I/V
143
Analog devices I/V
Waveform parameters
Description The EXP form causes the current to be <i1> for the first <td1> seconds. Then, the current
decays exponentially from <i1> to <i2> using a time constant of <tc1>. The decay lasts
td2-td1 seconds. Then, the current decays from <i2> back to <i1> using a time constant of
<tc2>. Independent current source and stimulus exponential waveform formulas
describe the EXP waveform.
144
Analog devices I/V
Waveform parameters
Description The PULSE form causes the current to start at <i1>, and stay there for <td> seconds. Then, the
current goes linearly from <i1> to <i2> during the next <tr> seconds, and then the current
stays at <i2> for <pw> seconds. Then, it goes linearly from <i2> back to <i1> during the next
<tf> seconds. It stays at <i1> for per-(tr+pw+tf) seconds, and then the cycle is repeated except
for the initial delay of <td> seconds. Independent current source and stimulus pulse
waveform formulas describe the PULSE waveform.
145
Analog devices I/V
146
Analog devices I/V
n volt square wave (where n is 1, 2, 3, 4, then 5); 75% duty cycle; 10 cycles; 1 microseconds
per cycle:
.PARAM N=1
.STEP PARAM N 1,5,1
V1 1 0 PWL
+ TIME_SCALE_FACTOR=1e-6 ;all time units are scaled to
+ microseconds
+ REPEAT FOR 10
+ (.25, 0)(.26, {N})(.99, {N})(1, 0)
+ ENDREPEAT
5 volt square wave; 75% duty cycle; 10 cycles; 10 microseconds per cycle; followed by 50%
duty cycle n volt square wave (where n is 1, 2, 3, 4, then 5) lasting until the end of simulation:
.PARAM N=.2
.STEP PARAM N .2, 1.0, .2
V1 1 0 PWL
+ TIME_SCALE_FACTOR=1e-5 ; all time units are
+ scaled to 10 us
+ VALUE_SCALE_FACTOR=5
+ REPEAT FOR 10
+ (.25, 0)(.26, 1)(.99, 1)(1, 0)
+ ENDREPEAT
+ REPEAT FOREVER
+ (+.50, 0)
+ (+.01, {N}) ; iteration time .51
+ (+.48, {N}) ; iteration time .99
+ (1, 0)
+ ENDREPEAT
147
Analog devices I/V
Assuming that a PWL specification has been given for a device to generate two triangular
waveforms:
V3 1 0 PWL (1ms, 1)(2ms, 0)(3ms, 1)(4ms, 0)
Waveform parameters
Description The PWL form describes a piecewise linear waveform. Each pair of time-current values
specifies a corner of the waveform. The current at times between corners is the linear
interpolation of the currents at the corners.
148
Analog devices I/V
<file name>
The text file that supplies the time-current (<tn> <in>) pairs. The contents of this file are
read by the same parser that reads the circuit file, so that engineering units (e.g., 10us) are
correctly interpreted. Note that the continuation + signs in the first column are unnecessary
and therefore discouraged.
A typical file can be created by editing an existing PWL specification, replacing all + signs
with blanks (to avoid unintentional +time). Only numbers (with units attached) can appear
in the file; expressions for <tn> and <n> values are invalid. All absolute time points in
<file name> are with respect to the last (<tn> <in>) entered. All relative time points are
with respect to the last time point.
REPEAT ... ENDREPEAT
These loops permit repetitions.
They can appear anywhere a (<tn> <in>) pair can appear. Absolute times within REPEAT
loops are with respect to the start of the current iteration. The REPEAT ... ENDREPEAT
specifications can be nested to any depth. Make sure that the current value associated with
the beginning and ending time points (within the same REPEAT loop or between adjacent
REPEAT loops), are the same when 0 is specified as the first point in a REPEAT loop.
<n>
A REPEAT FOR -1 ... ENDREPEAT is treated as if it had been REPEAT FOREVER ...
ENDREPEAT. A REPEAT FOR 0 ... ENDREPEAT is ignored (other than syntax checking of
the enclosed corner points).
149
Analog devices I/V
Waveform parameters
Description The SFFM (Single-Frequency FM) form causes the current, as illustrated below, to follow the
formula:
ioff + iampl·sin(2p·fc·TIME + mod·sin(2p·fm·TIME) )
150
Analog devices I/V
Waveform parameters
Description The sinusoidal (SIN) waveform causes the current to start at <ioff> and stay there for <td>
seconds.
Then, the current becomes an exponentially damped sine wave. Independent current
source and stimulus sinusoidal waveform formulas describe the SIN waveform.
The SIN waveform is for transient analysis only. It does not have any effect on AC analysis.
To give a value to a current during AC analysis, use an AC specification, such as:
IAC 3 0 AC 1mA
where IAC has an amplitude of one milliampere during AC analysis, and can be zero during
transient analysis. For transient analysis use, for example:
ITRAN 3 0 SIN(0 1mA 1kHz)
where ITRAN has an amplitude of one milliampere during transient analysis and is zero
during AC analysis. Refer to your PSpice user’s guide.
151
Analog devices I/V
152
Analog devices J
J Junction FET
General form J<name> <drain node> <gate node> <source node> <model name> +[area value]
Description The JFET is modeled as an intrinsic FET using an ohmic resistance (RD/area) in series with
the drain, and using another ohmic resistance (RS/area) in series with the source. Positive
current is current flowing into a terminal.
Drain
RD
Cgd
Gate Id
Cgs
RS
Source
153
Analog devices J
Capture parts
The following table lists the set of JFET breakout parts designed for customizing model
parameters for simulation. These are useful for setting up Monte Carlo and worst-case
analyses with device and/or lot tolerances specified for individual model parameters.
154
Analog devices J
Model parameters
Model
Description Units Default
parameters*
AF flicker noise exponent 1
ALPHA ionization coefficient volt-1 0
BETA transconductance coefficient amp/volt2 1E-4
BETATCE BETA exponential temperature coefficient %/°C 0
CGD zero-bias gate-drain p-n capacitance farad 0
CGS zero-bias gate-source p-n capacitance farad 0
FC forward-bias depletion capacitance coefficient 0.5
IS gate p-n saturation current amp 1E-14
ISR gate p-n recombination current parameter amp 0
KF flicker noise coefficient 0
LAMBDA channel-length modulation volt-1 0
M gate p-n grading coefficient 0.5
N gate p-n emission coefficient 1
NR emission coefficient for isr 2
PB gate p-n potential volt 1.0
RD drain ohmic resistance ohm 0
RS source ohmic resistance ohm 0
T_ABS absolute temperature °C
T_MEASURED measured temperature °C
T_REL_GLOBAL relative to current temperature °C
T_REL_LOCAL relative to AKO model temperature °C
VK ionization knee voltage volt 0
VTO threshold voltage volt -2.0
VTOTC VTO temperature coefficient volt/°C 0
XTI IS temperature coefficient 3
* For information on T_MEASURED, T_ABS, T_REL_GLOBAL, and T_REL_LOCAL, see .MODEL (model definition).
VTO < 0 means the device is a depletion-mode JFET (for both N-channel and
P-channel) and VTO > 0 means the device is an enhancement-mode JFET. This
conforms to U.C. Berkeley SPICE.
155
Analog devices J
JFET equations
The equations in this section describe an N-channel JFET. For P-channel devices, reverse the
sign of all voltages and currents.
The following variables are used:
Vgs = intrinsic gate-intrinsic source voltage
Vgd = intrinsic gate-intrinsic drain voltage
Vds = intrinsic drain-intrinsic source voltage
Cgs = gate-source capacitance
Cgd = gate-drain capacitance
Vt = k·T/q (thermal voltage)
k = Boltzmann’s constant
q = electron charge
T = analysis temperature (°K)
Tnom = nominal temperature (set using TNOM option)
Other variables are listed in Model parameters.
Positive current is current flowing into a terminal (for example, positive drain current
flows from the drain through the channel to the source).
156
Analog devices J
157
Analog devices J
158
Analog devices J
VTO(T) = VTO+VTOTC·(T-Tnom)
BETA(T) = BETA·1.01BETATCE·(T-Tnom)
IS(T) = IS·e(T/Tnom-1)·EG/(N·Vt)·(T/Tnom)XTI/N
where EG = 1.11
ISR(T) = ISR·e(T/Tnom-1)·EG/(NR·Vt)·(T/Tnom)XTI/NR
where EG = 1.11
PB(T) = PB·T/Tnom - 3·Vt·ln(T/Tnom) - Eg(Tnom)·T/Tnom + Eg(T)
where Eg(T) = silicon bandgap energy = 1.16- .000702·T2/(T+1108)
CGS(T) = CGS·(1+M·(.0004·(T-Tnom)+(1-PB(T)/PB)))
CGD(T) = CGD·(1+M·(.0004·(T-Tnom)+(1-PB(T)/PB)))
Reference
For more information about the U.C. Berkeley SPICE models, including the JFET device,
refer to:
[1] P. Antognetti and G. Massobrio, Semiconductor Device Modeling with SPICE,
McGraw-Hill,
1988.
159
Analog devices K
Description
L3out L4in
KTuned
This device can be used to define coupling between inductors (transformers) or between
transmission lines. This device also refers to a nonlinear magnetic core (CORE) model to
include magnetic hysteresis effects in the behavior of a single inductor (winding), or in
multiple coupled windings.
160
Analog devices K
Inductor coupling
Arguments and options
K<name> L<inductor name>
Couples two or more inductors.
The current through L2 is in the opposite direction as the current through L1. The polarity
is determined by the order of the nodes in the L devices and not by the order of inductors
in the K statement.
<coupling value>
This is the coefficient of mutual coupling, which must be between -1.0 and 1.0.
where
Li,Lj = a coupled-pair of inductors
Mij = the mutual inductance between Li and Lj
For transformers of normal geometry, use 1.0 as the value. Values less than 1.0 occur in
air core transformers when the coils do not completely overlap.
<model name>
If <model name> is present, four things change:
• The mutual coupling inductor becomes a nonlinear, magnetic core device. The
magnetic core’s B-H characteristics are analyzed using the Jiles-Atherton model (see
Inductor coupling: Jiles-Atherton model).
• The inductors become windings, so the number specifying inductance now specifies the
number of turns.
• The list of coupled inductors could be just one inductor.
• A model statement is required to specify the model parameters.
[size value]
Has a default value of 1.0 and scales the magnetic cross-section. It is intended to represent
the number of lamination layers, so only one model statement is needed for each
lamination type. For example:
L1 5 9 20 ; inductor having 20 turns
K1 L1 1 K528T500_3C8; Ferroxcube toroid core
L2 3 8 15 ; primary winding having
; 15 turns
L3 4 6 45 ; secondary winding having
; 45 turns
K2 L2 L3 1 K528T500_3C8; another core (not the same as K1)
161
Analog devices K
162
Analog devices K
The simulator uses the Jiles-Atherton model (see Inductor coupling: Jiles-Atherton model)
to analyze the B-H curve of the magnetic core and calculate values for inductance and flux
for each of the windings.
The state of the nonlinear core can be viewed in Probe by specifying B(Kxxx) for the
magnetization or H(Kxxx) for the magnetizing influence. These values are not available for
.PRINT (print) or .PLOT (plot) output.
Capture parts
See your PSpice user’s guide for information about using nonlinear magnetic cores with
transformers.
Model
Part name Property Property description
type
XFRM_LINEAR transformer L1_VALUE winding inductances in Henries
L2_VALUE
COUPLING coefficient of mutual coupling
(must lie between 0 and 1)
K_LINEAR transformer Ln inductor reference designator
XFRM_NONLINEAR transformer L1_TURNS number of turns on each winding
L2_TURNS
COUPLING coefficient of mutual coupling
(must lie between 0 and 1)
MODEL nonlinear CORE model name
Breakout parts
For non-stock passive and semiconductor devices, Capture provides a set of breakout parts
designed for customizing model parameters for simulation. These are useful for setting up
Monte Carlo and worst-case analyses with device and/or lot tolerances specified for
individual model parameters. Another approach is to use the model editor to derive an
instance model and customize this. For example, you could add device and/or lot tolerances
to model parameters.
Basic breakout part names consist of the intrinsic PSpice A/D device letter plus the suffix
BREAK. By default, the model name is the same as the part name and references the
appropriate device model with all parameters set at their default. For instance, the DBREAK
part references the DBREAK model which is derived from the intrinsic PSpice A/D D model
(.MODEL DBREAK D)
163
Analog devices K
Part
Device type Part library Property Description
name
inductor coupling KBREAK BREAKOUT.OLB COUPLING coupling factor
Li inductor reference
designator
For nonlinear coupling L1 must have a value; the rest may be left blank. The
model must reference a CORE model such as those contained in MAGNETIC.LIB or other
user-defined models. VALUE is set to the number of windings.
For linear coupling L1 and at least one other Li must have values; the rest may be
left blank. The model reference must be blank. VALUE must be in Henries.
164
Analog devices K
where
Man= the anhysteric magnetization
MS = the saturation magnetization
H = the magnetizing influence (after GAP correction)
A = a thermal energy parameter
For a given magnetizing influence (H), the anhysteric magnetization is the global flux level
the material would attain if the domain walls could move freely. The walls, however, are
stopped or pinned on dislocations in the material. The wall remains pinned until enough
magnetic potential is available to break free, and travel to the next pinning site. The theory
165
Analog devices K
supposes a mean energy required, per volume, to move domain walls. This is analogous to
mechanical drag. A simplified equation of this is
change-in-magnetization = potential/drag
where n·I is the sum of the amp-turns of the windings on the core. Also, the magnetization in
the air-gap is negligible, so that Bgap = Hgap and Bgap = Bcore. These combine in the
previous equation to yield:
Hcore·Lcore + Bcore·Lgap = n·I
This is a difficult equation to solve, especially for the Jiles-Atherton model, which is a state
equation model rather than an explicit function (which one would expect, because the B-H
curve depends on the history of the material). However, there is a graphical technique that
solves for Bcore and Hcore, given n·I, which is to:
1 Take the non-gapped B-H curve.
2 Extend a line from the current value of n·I having a slope of -Lcore/Lgap (this would
be vertical if Lgap = 0).
3 Find the intersection of the line using the B-H curve.
The intersection is the value for Bcore and Hcore for the n·I of the gapped core. The n·I
value is the apparent or external value of Hcore, but the real value of Hcore is less. The result
is a smaller value for Bcore and for the sheared-over B-H curves of a gapped core. The
simulator implements the numerical equivalent of this graphical technique.
The resulting B-H values are recorded in the Probe data file as Bcore and Happarent.
166
Analog devices K
For more information on the Jiles-Atherton model, see Reference [1] of References.
These parameters can be thought of as the off-diagonal terms of a capacitive coupling matrix,
[C], and an inductive coupling matrix, [L], respectively. [C] and [L] are both symmetric
matrices, and for two coupled lines, the following relationships hold:
C 11 C 12 L 11 L 12
C = L =
C 21 C 22 L 21 L 22
167
Analog devices K
Example
The following circuit fragment shows an example using two coupled lines:
T1 1 0 2 0 R=.31 L=.38u G=6.3u C=70p LEN=1
T2 3 0 4 0 R=.29 L=.33u G=6.0u C=65p LEN=1
K12 T1 T2 Lm=.04u Cm=6p
Lossy lines
For the lossy line case, the matrix product to be decoupled is actually:
[R+sL][G+sC]
where:
s = the Laplace variable
R = the resistance per unit length matrix
G = the conductance per unit length matrix.
The modes obtained from [L][C] represent a high frequency asymptote for this system.
Simulation results should be good approximations for low-loss lines. However, as shown in
reference [2], the approximation becomes exact for homogeneous, equally-spaced lossy lines,
provided that coupling beyond immediately adjacent lines is negligible (i.e., the coupling
matrices are tridiagonal and Toeplitz).
Coupled ideal lines can be modeled by setting R and G to zero. The Z0/TD parameter
set is not supported for coupled lines.
168
Analog devices K
References
For a further description of the Jiles-Atherton model, refer to:
[1] D.C. Jiles, and D.L. Atherton, “Theory of ferromagnetic hysteresis,” Journal of
Magnetism and Magnetic Materials, 61, 48 (1986).
For more information on transmission line coupling, refer to:
[1] Tripathi and Rettig, “A SPICE Model for Multiple Coupled Microstrips and Other
Transmission Lines,” IEEE MTT-S Internal Microwave Symposium Digest, 1985.
[2] Roychowdhury and Pederson, “Efficient Transient Simulation of Lossy Interconnect,”
Design Automation Conference,
1991.
169
Analog devices L
Inductor L
General form L<name> <(+) node> <(-) node> [model name] <value>
+ [IC=<initial value>]
15v 0v
LLoad
The first node listed (or pin one in Capture), is defined as positive. The voltage across the
component is therefore defined as the first node voltage less the second node voltage.
Positive current flows from the (+) node through the inductor to the (-) node. Current flow
from the first node through the component to the second node is considered positive.
[model name]
If [model name] is left out, then the effective value is <value>.
If [model name] is specified, then the effective value is given by the model parameters;
see Inductance value formula.
If the inductor is associated with a Core model, then the effective value is the number of
turns on the core. Otherwise, the effective value is the inductance. See the Model Form
statement for the K device in Inductor coupling (and magnetic core) for more
information on the Core model.
<initial value>
Is the initial current through the inductor during the bias point calculation.
170
Analog devices L
Capture parts
For standard L parts, the effective value of the part is set directly by the VALUE property.
In general, inductors should have positive component values (VALUE property). In all cases,
components must not be given a value of zero.
However, there are cases when negative component values are desired. This occurs most often
in filter designs that analyze an RLC circuit equivalent to a real circuit. When transforming
from the real to the RLC equivalent, it is possible to end up with negative component values.
PSpice A/D allows negative component values for bias point, DC sweep, AC, and noise
analyses. A transient analysis may fail for a circuit with negative components. Negative
inductors may create instabilities in time that the analysis cannot handle.
Model
Part name Property Property description
type
L inductor VALUE inductance
IC initial current through the inductor during
bias point calculation
XFRM_LINEAR transformer L1_VALUE winding inductances in Henries
L2_VALUE
COUPLING coefficient of mutual coupling (must be
between 0 and 1)
K_LINEAR transformer Ln inductor reference designator
171
Analog devices L
Breakout parts
For non-stock passive and semiconductor devices, Capture provides a set of breakout parts
designed for customizing model parameters for simulation. These are useful for setting up
Monte Carlo and worst-case analyses with device and/or lot tolerances specified for
individual model parameters. Another approach is to use the model editor to derive an
instance model and customize this. For example, you could add device and/or lot tolerances
to model parameters.
Basic breakout part names consist of the intrinsic PSpice A/D device letter plus the suffix
BREAK. By default, the model name is the same as the part name and references the
appropriate device model with all parameters set at their default. For instance, the DBREAK
part references the DBREAK model, which is derived from the intrinsic PSpice A/D D model
(.MODEL DBREAK D).
For breakout part LBREAK, the effective value is computed from a formula that is a function
of the specified VALUE property.
Device Part
Part library file Property Description
type name
inductor LBREAK BREAKOUT.OLB VALUE inductance
IC initial current through the
inductor during bias point
calculation
MODEL IND model name
172
Analog devices L
Inductor equations
where <value> is normally positive (though it can be negative, but not zero). Tnom is the
nominal temperature (set using TNOM option).
173
Analog devices M
MOSFET M
Description The MOSFET is modeled as an intrinsic MOSFET using ohmic resistances in series with the
drain, source, gate, and bulk (substrate). There is also a shunt resistance (RDS) in parallel
with the drain-source channel.
Drain
RD
Cgb
Cgd Cbd
RG RB
Gate Idrain
Bulk
Cgs Cbs
RS
Source
174
Analog devices M
AD and AS
The drain and source diffusion areas. Defaults for AD and AS can be set in the .OPTIONS
statement. If AD or AS defaults are not set, their default value is 0.
PD and PS
The drain and source diffusion perimeters. Their default value is 0.
JS
Can specify the drain-bulk and source-bulk saturation currents. JS is multiplied by AD
and AS.
IS
Can also specify the drain-bulk and source-bulk saturation currents. IS is an absolute
value.
CJ
Can specify the zero-bias depletion capacitances. CJ is multiplied by AD and AS.
CJSW
Can also specify the zero-bias depletion capacitances. CJSW is multiplied by PD and PS.
CBD and CBS
Can also specify the zero-bias depletion capacitances. CBD and CBS are absolute values.
NRD, NRS, NRG, and NRB
Multipliers (in units of squares) that can be multiplied by RSH to yield the parasitic
(ohmic) resistances of the drain (RD), source (RS), gate (RG), and substrate (RB),
respectively. NRD, NRS, NRG, and NRB default to 0.
Consider a square sheet of resistive material. Analysis shows that the resistance between
two parallel edges of such a sheet depends upon its composition and thickness, but is
independent of its size as long as it is square. In other words, the resistance will be the
same whether the square’s edge is 2 mm, 2 cm, or 2 m. For this reason, the sheet resistance
of such a layer, abbreviated RSH, has units of ohms per square.
M (NP)
A parallel device multiplier (default = 1), which simulates the effect of multiple devices
in parallel. (NP is an alias for M.)
The effective width, overlap and junction capacitances, and junction currents of the
MOSFET are multiplied by M. The parasitic resistance values (e.g., RD and RS) are
divided by M. Note the third example: it shows a device twice the size of the second
example.
175
Analog devices M
N (NS)
A series device multiplier (default value= 1.0) for the Level 5 model only, which
simulates an approximation of the effect of multiple devices in series. NS is an aliased
name for N.
There are some things to keep in mind while using this parameter. The parameter N is used
to derive the effective length, Leff = N · (L+DL), of a transistor drawn as N elements of
width W and length L in series (in other words, the drain of element [K] is the source of
element [K+1], and the gates are tied together). The short-channel effects included in the
pinch-off voltage calculation, however, are evaluated using the effective length L+DL of
each element. Except for this, everything is calculated as if the transistor were laid out as
a single element of length L=Leff-DL=N · (L+DL)-DL.
In this compact formulation, the intermediate drain/source diffusions appearing along the
channel are ignored (that is, junction capacitance and diffusion resistances are assumed to
be zero). As a consequence, DC, AC and transient analyses can yield different results
compared with the standard device declaration, particularly at higher frequencies. A
closer match is obtained for long devices, or devices with low RS and RD and high
UCRIT. Be sure to evaluate the accuracy of this compact formulation and to check the
validity of the underlying approximations.
Comments The simulator provides six MOSFET device models, which differ in the formulation of the
I-V characteristic. The LEVEL parameter selects among different models as shown below. For
more information, see References.
LEVEL=1 Shichman-Hodges model (see reference [1])
LEVEL=2 geometry-based, analytic model (see reference [2])
LEVEL=3 semi-empirical, short-channel model (see reference [2])
LEVEL=4 BSIM model (see reference [3])
LEVEL=5 EKV model version 2.6 (see reference [10])
LEVEL=6 BSIM3 model version 2.0 (see reference [7])
LEVEL=7 BSIM3 model version 3.1 (see reference [8])
176
Analog devices M
Capture parts
The following table lists the set of MOSFET breakout parts designed for customizing model
parameters for simulation. These are useful for setting up Monte Carlo and worst-case
analyses with device and/or lot tolerances specified for individual model parameters.
Model
Part name Property Property description
type
MBREAKN NMOS L channel length
MBREAKN3 W channel width
MBREAKN4 AD drain diffusion area
MBREAKP PMOS AS source diffusion area
MBREAKP3 PD drain diffusion perimeter
MBREAKP4 PS source diffusion perimeter
NRD relative drain resistivity (in squares)
NRS relative source resistivity (in squares)
NRG relative gate resistivity (in squares)
NRB relative substrate resistivity (in squares)
M device multiplier
(simulating parallel devices)
MODEL NMOS or PMOS model name
177
Analog devices M
The default value for TOX is 0.1 µ for Levels 2 and 3, but is unspecified for Level 1,
which discontinues the use of process parameters.
For MOSFETs the capacitance model has been changed to conserve charge, affecting only the
Level 1, 2, and 3 models.
Effective length and width for device parameters are calculated with the formula:
Pi = P0 + PL/Le + PW/We
where:
Le = effective length = L - (LD · 2)
We = effective width = W - (WD · 2)
See .MODEL (model definition) for more information.
Model level 4
Unlike the other models in PSpice, the BSIM model is designed for use with a process
characterization system that provides all parameters. Therefore, there are no
defaults specified for the parameters, and leaving one out can cause problems.
The LEVEL=4 (BSIM1) model parameters are all values obtained from process
characterization, and can be generated automatically. Reference [4] of References describes
a means of generating a process file, which must then be converted into .MODEL (model
definition) statements for inclusion in the Model Library or circuit file. (The simulator does
not read process files.)
The level 4 (BSIM) and level 6 (BSIM3 version 2) models have their own capacitance model,
which conserves charge and remains unchanged. References [6] and [7] describe the
equations for the capacitance due to channel charge.
In the following MOSFET model parameters list, parameters marked with a ζ in the Default
column also have corresponding parameters with a length and width dependency. For
178
Analog devices M
example, VFB is a basic parameter using units of volts, and LVFB and WVFB also exist and
have units of volt·µ. The formula
Pi = P0 + PL/Le + PW/We
is used to evaluate the parameter for the actual device, where:
Le = effective length = L - DL
We = effective width = W - DW
Additional notes
Note 2 0 (zero) and O (the letter O) are not interchangeable. For example, use VTO, not
VT0 (VTO is referenced to the bulk); use E0, not EO; use Q0, not QO.
Note 3 Use the AVTO, AKP, and AGAMMA model parameters with a DEV tolerance to
perform Monte Carlo and Sensitivity/Worst-Case analyses. Their default values cannot be
changed.
The device-to-device matching of MOSFETs depends on the gate area, W · L. Using AVTO,
AKP, and AGAMMA with a DEV tolerance applies the matching scaling law for the model
equations and derives the device matching statistics (DEV tolerance) from a single
normalized parameter. (Without these parameters, you would need to use a dedicated
.MODEL card with a DEV tolerance for VTO, KP and GAMMA for each value of the gate area
used in your design.)
179
Analog devices M
Do not apply the LOT specification, which is a measure of the ability of the process to control
the absolute value of a model parameter, to AVTO, AKP, and AGAMMA, because this would be
redundant with the LOT specification for VTO, KP, and GAMMA.
Note 4 Use the model parameter HDIF with the device parallel multiplier, M, to set
default values for AD, AS, PD, and PS. Use HDIF only for the MOSEKV (Level 5) model.
When HDIF is specified, the following equations are used.
NRD = HDIF ⁄ W
NRS = HDIF ⁄ W
AD = ( 2 ⋅ HDIF ) ⋅ W
AS = ( 2 ⋅ HDIF ) ⋅ W
PD = 2 ⋅ ( ( 2 ⋅ HDIF ) + W )
PS = 2 ⋅ ( 2 ⋅ HDIF ) + W
AD = HDIF ⋅ W
AS = ( HDIF + ( 2 ⋅ HDIF ) ⁄ M ) ⋅ W
PD = ( 2 ⋅ HDIF ) + W
PS = ( 2 ⋅ HDIF ) + W + 2 ⋅ ( ( 2 ⋅ HDIF ) + W ) ⁄ M
AD = ( HDIF + ( HDIF ⁄ M ) ) ⋅ W
AS = ( HDIF + ( HDIF ⁄ M ) ) ⋅ W
PD = ( 2 ⋅ HDIF ) + W + ( ( 2 ⋅ HDIF ) + W ) ⁄ M
PS = ( 2 ⋅ HDIF ) + W + ( ( 2 ⋅ HDIF ) + W ) ⁄ M
Note 5 If RGSH is specified, the default value for NRG is set to 0.5 · W/L.
Note 6 The model parameters TOX, NSUB, VFB, UO, and VMAX accomodate scaling
behavior of the process and basic intrinsic model parameters, as well as statistical circuit
simulation. These parameters are only used if COX, GAMMA, and/or PHI, VTO, KP, and UCRIT
are not specified, respectively. Furthermore, a simpler mobility reduction model due to
vertical field is accessible through the mobility reduction coefficient, THETA. THETA is only
used if E0 is not specified.
180
Analog devices M
The Level 6 Advanced parameters should not be changed unless the detail structure
of the device is known and has specific, meaningful values.
The BSIM3 model is a physical model using extensive built-in dependencies of important
dimensional and processing parameters. It includes the major effects that are important to
modeling deep-submicrometer MOSFETs, such as threshold voltage reduction, nonuniform
doping, mobility reduction due to the vertical field, bulk charge effect, carrier velocity
saturation, drain-induced barrier lowering (DIBL), channel length modulation (CLM),
hot-carrier-induced output resistance reduction, subthreshold conduction, source/drain
parasitic resistance, substrate current induced body effect (SCBE), and drain voltage
reduction in LDD structure. For additional, detailed model information, see References.
Additional notes
Note 1 If any of the following BSIM3 version 2.0 model parameters are not explicitly
specified, they are calculated using the following equations.
K2 = (-------------------------------------------------------------------------------------------------------------------------------
GAMMA1 – GAMMA2 ) ( PHI – VBX – PHI )
2 PHI ( PHI – VBX – PHI ) + VBM
VBF = VTH0 – PHI – K1 PHI
PHI = 2V tm ln --------------------
NPEAK
n
i
2qε si NPEAK
GAMMA1 = -------------------------------------
-
COX
2qε si NSUB
GAMMA2 = ---------------------------------
-
COX
2
VBX = PHI – q ⋅ NPEAK ⋅ XT ⁄ ( 2ε si )
ε si TOX X j
LITL = ------------------------
ε ox
Note 2 Default values listed for the BSIM3 version 2.0 parameters UA, UB, UC, UA1,
AB1, and UC1 are used for simplified mobility modeling.
181
Analog devices M
new relaxation time model to improve transient modeling, and improved model fitting of
various W/L ratios using one parameter set. BSIM3 version 3.1 retains the extensive built-in
dependencies of dimensional and processing parameters of BSIM3 version 2. For additional,
detailed model information, see Reference [8] of References.
Additional notes
Note 1 If any of the following BSIM3 version 3.1 model parameters are not explicitly
specified, they are calculated using the following equations:
q ⋅ NCH ⋅ XT 2
VBX = φ s – -----------------------------------
2⋅ε si
2ε ox
CF = ----------
× 10 – 7-
- ln 1 + 4-------------------
π TOX
where ( 7.02 ⋅ 10 – 4 ⋅ T 2 -)
Eg(T)=the energy bandgap at temperature T= 1.16 – -----------------------------------------
( T + 1108 )
Note 2 If K1 AND K2 are not specified, they are calculated using the following
equations:
K1 = GAMMA2 – 2 K2 φ s – VBM
φ s = 2Vt ⋅ ln ------------
NCH
n
i
⋅ T-
Vt = k----------
q
1.5 E g ( T )
n i = 1.45 ⋅ 10 10 ---------------- exp 21.5565981 – --------------
T
-
300.15 2Vt
182
Analog devices M
Else:
CGSO=0.6 · XJ · Cox
Else:
CGDO=0.6 · XJ · Cox
183
Analog devices M
184
Analog devices M
levels 1, 2, and 3
DELTA width effect on threshold 0
ETA static feedback (Level 3) 0
1/2
GAMMA bulk threshold parameter volt see page 178
KP transconductance coefficient amp/volt2 2.0E-5
KAPPA saturation field factor (Level 3) 0.2
LAMBDA channel-length modulation (Levels 1 and 2) volt-1 0.0
LD lateral diffusion (length) meter 0.0
NEFF channel charge coefficient (Level 2) 1.0
NFS fast surface state density 1/cm2 0.0
NSS surface state density 1/cm2 none
NSUB substrate doping density 1/cm3 none
PHI surface potential volt 0.6
THETA mobility modulation (Level 3) volt-1 0.0
TOX oxide thickness meter see page 178
TPG Gate material type: +1
+1 = opposite of substrate
-1 = same as substrate
0 = aluminum
UCRIT mobility degradation critical field (Level 2) volt/cm 1.0E4
UEXP mobility degradation exponent (Level 2) 0.0
UTRA (not used) 0.0
mobility degradation transverse field coefficient
UO surface mobility cm2/volt·sec 600
(The second character is the letter O, not the
numeral zero.)
VMAX maximum drift velocity meter/sec 0
185
Analog devices M
186
Analog devices M
187
Analog devices M
188
Analog devices M
189
Analog devices M
190
Analog devices M
191
Analog devices M
192
Analog devices M
193
Analog devices M
194
Analog devices M
195
Analog devices M
196
Analog devices M
197
Analog devices M
MOSFET Equations
These equations describe an N-channel MOSFET. For P-channel devices, reverse the signs of
all voltages and currents.
In the following equations:
Vbs = intrinsic substrate-intrinsic source voltage
Vbd = intrinsic substrate-intrinsic drain voltage
Vds = intrinsic drain-intrinsic source voltage
Vdsat = saturation voltage
Vgs = intrinsic gate-intrinsic source voltage
Vgd = intrinsic gate-intrinsic drain voltage
Vt = k·T/q (thermal voltage)
Vth = threshold voltage
Cox = the gate oxide capacitance per unit area.
f = noise frequency
k = Boltzmann’s constant
q = electron charge
Leff = effective channel length
Weff = effective channel width
T = analysis temperature (°K)
Tnom = nominal temperature (set using TNOM option)
Other variables are from MOSFET model parameters.
Positive current is current flowing into a terminal (for example, positive drain current
flows from the drain through the channel to the source).
198
Analog devices M
199
Analog devices M
All capacitances are between terminals of the intrinsic MOSFET, in other words, to
the inside of the ohmic drain and source resistances. For levels 1, 2, and 3, the
capacitance model has been changed to conserve charge.
levels 1, 2, and 3
Cbs = bulk-source capacitance = area cap. + sidewall cap. + transit time cap.
Cbd = bulk-drain capacitance = area cap. + sidewall cap. + transit time cap.
where
if
CBS = 0 AND CBD = 0
then
Cbs = AS·CJ·Cbsj + PS·CJSW·Cbss + TT·Gbs
Cbd = AD·CJ·Cbdj + PD·CJSW·Cbds + TT·Gds
else
Cbs = CBS·Cbsj + PS·CJSW·Cbss + TT·Gbs
Cbd = CBD·Cbdj + PD·CJSW·Cbds + TT·Gds
where
Gbs = DC bulk-source conductance = dIbs/dVbs
Gbd = DC bulk-drain conductance = dIbd/dVbd
if
Vbs < FC·PB
then
Cbsj = (1-Vbs/PB)-MJ
Cbss = (1-Vbs/PBSW)-MJSW
if
Vbs > FC·PB
then
Cbsj = (1-FC)-(1+MJ)·(1-FC·(1+MJ)+MJ·Vbs/PB)
Cbss = (1-FC)-(1+MJSW)·(1-FC·(1+MJSW)+MJSW·Vbs/PBSW)
if
Vbd < FC·PB
then
Cbdj = (1-Vbd/PB)-MJ
Cbds = (1-Vbd/PBSW)-MJSW
if
Vbd > FC·PB
then
Cbdj = (1-FC)-(1+MJ)·(1-FC·(1+MJ)+MJ·Vbd/PB)
Cbds = (1-FC)-(1+MJSW)·(1-FC·(1+MJSW))
200
Analog devices M
all levels
IS(T) = IS·e(Eg(Tnom)·T/Tnom - Eg(T))/Vt
JS(T) = JS·e(Eg(Tnom)·T/Tnom - Eg(T))/Vt
JSSW(T) = JSSW·e(Eg(Tnom)·T/Tnom - Eg(T))/Vt
PB(T) = PB·T/Tnom - 3·Vt·ln(T/Tnom) - Eg(Tnom)·T/Tnom + Eg(T)
PBSW(T) = PBSW·T/Tnom - 3·Vt·ln(T/Tnom) - Eg(Tnom)·T/Tnom + Eg(T)
PHI(T) = PHI·T/Tnom - 3·Vt·ln(T/Tnom) - Eg(Tnom)·T/Tnom + Eg(T)
where
Eg(T) = silicon bandgap energy = 1.16 - .000702·T2/(T+1108)
CBD(T) = CBD·(1+MJ·(.0004·(T-Tnom)+(1-PB(T)/PB)))
CBS(T) = CBS·(1+MJ·(.0004·(T-Tnom)+(1-PB(T)/PB)))
CJ(T) = CJ·(1+MJ·(.0004·(T-Tnom)+(1-PB(T)/PB)))
CJSW(T) = CJSW·(1+MJSW·(.0004·(T-Tnom)+(1-PB(T)/PB)))
KP(T) = KP·(T/Tnom)-3/2
UO(T) = UO·(T/Tnom)-3/2
MUS(T) = MUS·(T/Tnom)-3/2
MUZ() = MUZ·(T/Tnom)-3/2
X3MS(T) = X3MS·(T/Tnom)-3/2
201
Analog devices M
202
Analog devices M
References
For a more complete description of the MOSFET models, refer to:
[1] H. Shichman and D. A. Hodges, “Modeling and simulation of insulated-gate field-effect
transistor switching circuits,” IEEE Journal of Solid-State Circuits, SC-3, 285, September
1968.
[2] A. Vladimirescu, and S. Lui, “The Simulation of MOS Integrated Circuits Using SPICE2,”
Memorandum No. M80/7, February 1980.
[3] B. J. Sheu, D. L. Scharfetter, P.-K. Ko, and M.-C. Jeng, “BSIM: Berkeley Short-Channel
IGFET Model for MOS Transistors,” IEEE Journal of Solid-State Circuits, SC-22, 558-566,
August 1987.
[4] J. R. Pierret, “A MOS Parameter Extraction Program for the BSIM Model,” Memorandum
No. M84/99 and M84/100, November 1984.]
[5] P. Antognetti and G. Massobrio, Semiconductor Device Modeling with SPICE,
McGraw-Hill, 1993.
[6] Ping Yang, Berton Epler, and Pallab K. Chatterjee, “An Investigation of the Charge
Conservation Problem for MOSFET Circuit Simulation,” IEEE Journal of Solid-State
Circuits, Vol. SC-18, No.1, February 1983.
[7] J.H. Huang, Z.H. Liu, M.C. Jeng, K. Hui, M. Chan, P.K. KO, and C. Hu,
“BSIM3 Manual,” Department of Electrical Engineering and Computer Science, University
of California, Berkeley, CA 94720.
[8] Department of Electrical Engineering and Computer Science, “BSIM3v3.1 Manual,”
University of California, Berkeley, CA 94720.
[9] J. C. Bowers, and H. A. Neinhaus, SPICE2 Computer Models for HEXFETs, Application
Note 954A, reprinted in HEXFET Power MOSFET Databook, International Rectifier
Corporation #HDB-3.
[10]M.Bucher,C.Lallement,C.Enz,F.Theodoloz,F.Krummenacher.TheEPFL–EKVMOSFET
Model Equations for Simulation Technical Report: Model Version 2.6. Electonics
Laboratories, Swiss Federal Institute of Technology (EPFL), Lausanne, Switzerland.
Updated September, 1997.
For more information on References [2] and [4], contact:
Software Distribution Office
EECS/ERL Industrial Liaison Program
205 Cory Hall #1770
University of California
Berkeley, CA 94720-1770
(510) 643-6687
203
Analog devices Q
Bipolar transistor Q
General form Q<name> < collector node> <base node> <emitter node>
+ [substrate node] <model name> [area value]
Examples Q1 14 2 13 PNPNOM
Q13 15 3 0 1 NPNSTRONG 1.5
Q7 VC 5 12 [SUB] LATPNP
Because the simulator allows alphanumeric names for nodes, and because there is no easy
way to distinguish these from the model names, the name (not a number) used for the
substrate node needs to be enclosed with square brackets [ ]. Otherwise, nodes would be
interpreted as model names. See the third example.
[area value]
is the relative device area and has a default value of 1.
Description The bipolar transistor is modeled as an intrinsic transistor using ohmic resistances in series
with the collector (RC/area), with the base (value varies with current, see Bipolar transistor
equations), and with the emitter (RE/area).
Collector
Qw
Ibc2 Substrate
Base
(LPNP only)
Rb Cje Ibe2
(Ibe - Ibc1)/Kqb
Ibe1/BF
RE
Substrate
(LPNP only) Emitter
204
Analog devices Q
For model parameters with alternate names, such as VAF and VA (the alternate name is shown
by using parentheses), either name can be used.
For model types NPN and PNP, the isolation junction capacitance is connected between the
intrinsic-collector and substrate nodes. This is the same as in SPICE2, or SPICE3, and works
well for vertical IC transistor structures. For lateral IC transistor structures there is a third
model, LPNP, where the isolation junction capacitance is connected between the
intrinsic-base and substrate nodes.
Capture parts
The following table lists the set of bipolar transistor breakout parts designed for customizing
model parameters for simulation. These are useful for setting up Monte Carlo and worst-case
analyses with device and/or lot tolerances specified for individual model parameters.
205
Analog devices Q
206
Analog devices Q
207
Analog devices Q
When XCJC2 is specified in the range 0 < XCJC2 < 1.0, XCJC is ignored. Also, the extrinsic
base to extrinsic collector capacitance (Cbx2) and the gain-bandwidth product (Ft2) are
included in the operating point information (in the output listing generated during a Bias Point
Detail analysis, .OP (bias point)). For backward compatibility, the parameter XCJC and the
associated calculation of Cbx and Ft remain unchanged. Cbx and Ft appears in the output
listing only when XCJC is specified.
The use of XCJC2 produces more accurate results because Cbx2 (the fraction of CJC associated
with the intrinsic collector node) now equals the ratio of the device’s emitter area-to-base
area. This results in a better correlation between the measured data and the gain bandwidth
product (Ft2) calculated by PSpice.
XCJS, which is valid in the range 0 ≤ XCJS ≤ 1.0, specifies a portion of the CJS capacitance
to be between the external substrate and external collector nodes instead of between the
external substrate and internal collector nodes. When XJCS is 1, CJS is applied totally between
the external substrate and internal collector nodes. When XCJS is 0, CJS is applied totally
between the external substrate and external collector codes.
208
Analog devices Q
209
Analog devices Q
where:
1 + ( 144 ⁄ π 2 ) ⋅ Ib ⁄ ( area ⋅ IRB ) ) 1 / 2 – 1
x = (--------------------------------------------------------------------------------------------------
( 24 ⁄ π 2 ) ⋅ ( Ib ⁄ ( area ⋅ IRB ) ) 1 / 2
210
Analog devices Q
base-emitter capacitance
Cbe = base-emitter capacitance = Ctbe + area·Cjbe
Ctbe = transit time capacitance = tf·Gbe
tf = effective TF = TF·(1+XTF·(Ibe1/(Ibe1+area·ITF))2·eVbc/(1.44·VTF))
Gbe = DC base-emitter conductance = (dIbe)/(dVb)
Ibe = Ibe1 + Ibe2
Cjbe = CJE·(1-Vbe/VJE)-MJE IF Vbe < FC·VJE
Cjbe = CJE·(1-FC)-(1+MJE)·(1-FC·(1+MJE) +MJE·Vbe/VJE) IF Vbe > FC·VJE
base-collector capacitance
Cbc = base-collector capacitance = Ctbc + area·XCJC·Cjbc
Ctbc = transit time capacitance = TR·Gbc
Gbc = DC base-collector conductance = (dIbc)/(dVbc)
Cjbc = CJC·(1-Vbc/VJC)-MJC IF Vbc < FC·VJC
Cjbc = CJC·(1-FC)-(1+MJC)·(1 FC·(1+MJC)+MJC·Vbc/VJC) IF Vbc > FC·VJC
extrinsic-base to intrinsic-collector capacitance
Cbx = extrinsic-base to intrinsic-collector capacitance = area·(1-XCJC)·Cjbx
Cjbx = CJC·(1-Vbx/VJC)-MJC IF Vbx < FC·VJC
Cjbx = CJC·(1-FC)-(1+MJC)·(1-FC·(1+MJC)+MJC·Vbx/VJC) IF Vbx > FC·VJC
211
Analog devices Q
Iepi = area·(VO·(Vt·(K(Vbc)-K(Vbn)-ln((1+K(Vbc))/(1+K(Vbn))))+Vbc-Vbn))/RCO·(|Vbc-Vbn|+VO)
Qo = area·QCO·( K(Vbc)-1-GAMMA/2 )
Qw = area·QCO·( K(Vbn)-1-GAMMA/2 )
where 1/2
K(v) = (1+GAMMA·e(v/Vt))
212
Analog devices Q
RC(T) = RC·(1+TRC1·(T-Tnom)+TRC2·(T-Tnom)2)
VJE(T) = VJE·T/Tnom - 3·Vt·ln(T/Tnom) - Eg(Tnom)·T/Tnom + Eg(T)
VJC(T) = VJC·T/Tnom - 3·Vt·ln(T/Tnom) - Eg(Tnom)·T/Tnom + Eg(T)
VJS(T) = VJS·T/Tnom - 3·Vt·ln(T/Tnom) - Eg(Tnom)·T/Tnom + Eg(T)
where Eg(T) = silicon bandgap energy = 1.16 - .000702·T 2/(T+1108)
CJE(T) = CJE·(1+MJE·(.0004·(T-Tnom)+(1-VJE(T)/VJE)))
CJC(T) = CJC·(1+MJC·(.0004·(T-Tnom)+(1-VJC(T)/VJC)))
CJS(T) = CJS·(1+MJS·(.0004·(T-Tnom)+(1-VJS(T)/VJS)))
213
Analog devices Q
References
For a more information on bipolar transistor models, refer to:
[1] Ian Getreu, Modeling the Bipolar Transistor, Tektronix, Inc. part# 062-2841-00.
For a generally detailed discussion of the U.C. Berkeley SPICE models, including the bipolar
transistor, refer to:
[2] P. Antognetti and G. Massobrio, Semiconductor Device Modeling with SPICE,
McGraw-Hill, 1988.
For a description of the extension for the quasi-saturation effect, refer to:
[3] G. M. Kull, L. W. Nagel, S. W. Lee, P. Lloyd, E. J. Prendergast, and H. K. Dirks, “A
Unified Circuit Model for Bipolar Transistors Including Quasi-Saturation Effects,” IEEE
Transactions on Electron Devices, ED-32, 1103-1113 (1985).
214
Analog devices R
R Resistor
General form R<name> <(+) node> <(-) node> [model name] <value>
+ [TC = <TC1> [,<TC2>]]
Examples RLOAD 15 0 2K
R2 1 2 2.4E4 TC=.015,-.003
RFDBCK 3 33 RMOD 10K
15v 0v
RLoad
[model name]
Affects the resistance value; see Resistor value formulas.
Comments The first node listed (or pin 1 in Capture) is defined as positive. The voltage across the
component is therefore defined as the first node voltage minus the second node voltage.
Positive current flows from the (+) node through the resistor to the (-) node. Current flow from
the first node through the component to the second node is considered positive.
Temperature coefficients for the resistor can be specified in-line, as in the second example. If
the resistor has a model specified, then the coefficients from the model are used for the
temperature updates; otherwise, the in-line values are used. In both cases the temperature
coefficients have default values of zero. Expressions cannot be used for the in-line
coefficients.
Capture parts
For standard R parts, the effective value of the part is set directly by the VALUE property.
For the variable resistor, R_VAR, the effective value is the product of the base value
(VALUE) and multiplier (SET).
In general, resistors should have positive component values (VALUE property). In all cases,
components must not be given a value of zero.
However, there are cases when negative component values are desired. This occurs most often
in filter designs that analyze an RLC circuit equivalent to a real circuit. When transforming
from the real to the RLC equivalent, it is possible to end up with negative component values.
215
Analog devices R
PSpice A/D allows negative component values for bias point, DC sweep, AC, and noise
analyses. In the case of resistors, the noise contribution from negative component values come
from the absolute value of the component (components are not allowed to generate negative
noise). A transient analysis may fail for a circuit with negative components. Negative
components may create instabilities in time that the analysis cannot handle.
The RBREAK part must be used if you want a LOT tolerance. In that case, use the
Model Editor to edit the RBREAK instance.
Breakout parts
For non-stock passive and semiconductor devices, Capture has a set of breakout parts
designed for customizing model parameters for simulation. These are useful for setting up
Monte Carlo and worst-case analyses with device and/or lot tolerances specified for
individual model parameters.
Basic breakout part names consist of the intrinsic PSpice A/D device letter plus the suffix
BREAK. By default, the model name is the same as the part name and references the
appropriate device model with all parameters set at their default. For instance, the DBREAK
part references the DBREAK model, which is derived from the intrinsic PSpice A/D D model
(.MODEL DBREAK D). Another approach is to use the model editor to derive an instance
model and customize this. For example, you could add device and/or lot tolerances to model
parameters.
For breakout part RBREAK, the effective value is computed from a formula that is a function
of the specified VALUE property.
Device
Part name Part library file Property Description
type
resistor RBREAK BREAKOUT.OLB VALUE resistance
MODEL RES model name
216
Analog devices R
217
Analog devices R
Resistor equations
Two If [model name] is included and TCE is not specified, then the resistance is given by:
<value>·R·(1+TC1·(T-Tnom)+TC2·(T-Tnom)2)
where <value> is usually positive (though it can be negative, but not zero).
218
Analog devices S
S Voltage-controlled switch
General form S<name> <(+) switch node> <(-) switch node>
+ <(+) controlling node> <(-) controlling node>
+ <model name>
Description The voltage-controlled switch is a special kind of voltage-controlled resistor. This switch
model was designed to minimize numerical problems. However, there are a few things to
consider; see Special considerations.
13v 2v
17v 0v
S12
Comments The resistance between the <(+) switch node> and <(-) switch node> depends on the voltage
between the <(+) controlling node> and <(–) controlling node>. The resistance varies
continuously between the RON and ROFF model parameters.
A resistance of 1/GMIN is connected between the controlling nodes to keep them from
floating. See the .OPTIONS (analysis options) statement for setting GMIN.
Although very little computer time is required to evaluate switches, during transient analysis
the simulator must step through the transition region using a fine enough step size to get an
accurate waveform. Applying many transitions can produce long run times when evaluating
the other devices in the circuit at each time step.
219
Analog devices S
Capture parts
Ideal switches
Summarized below is the available voltage-controlled switch part type in the breakout.slb
part library. To create a time-controlled switch, connect the switch control pins to a voltage
source with the appropriate voltage vs. time values (transient specification).
The VSWITCH model defines the on/off resistance and the on/off control voltage or current
thresholds. This switch has a finite on resistance and off resistance, and it changes smoothly
between the two as its control voltage (or current) changes. This behavior is important
because it allows PSpice A/D to find a continuous set of solutions for the simulation. You can
make the on resistance very small in relation to the other circuit impedances, and you can
make the off resistance very large in relation to the other circuit impedances.
Special considerations
• Using double precision numbers, the simulator can only handle a dynamic range of about
12 decades. Making the ratio of ROFF to RON greater than 1E+12 is not recommended.
• Also, it not recommend to make the transition region too narrow. Remember that in the
transition region the switch has gain. The narrower the region, the higher the gain and the
greater the potential for numerical problems. The smallest allowed value for
VON-VOFF is RELTOL·(MAX(VON, VOFF))+ VNTOL.
220
Analog devices S
221
Analog devices S
222
Analog devices T
T Transmission line
Description The transmission line device is a bidirectional delay line with two ports, A and B. The (+) and
(-) nodes define the polarity of a positive voltage at a port.
Comments During transient (.TRAN (transient analysis)) analysis, the internal time step is limited to
be no more than one-half the smallest transmission delay, so short transmission lines cause
long run times.
The simulation status window displays the properties of the three shortest transmission lines
in a circuit if a transient run’s time step ceiling is set more frequently by one of the
transmission lines. This is helpful when you have a large number of transmission lines. The
properties displayed are:
• % loss: percent attenuation at the characteristic
delay (i.e., the degree to which the line is lossy)
• time step ceiling: induced by the line
• % of line delay: time step size at percentage of characteristic delay
These transmission line properties are displayed only if they are slowing down the simulation.
For a line that uses a model, the electrical length is given after the model name. Example T5
of Examples uses TMOD to specify the line parameters and has an electrical length of one
unit.
All of the transmission line parameters from either the ideal or lossy parameter set can be
expressions. In addition, R and G can be general Laplace expressions. This allows the user to
model frequency dependent effects, such as skin effect and dielectric loss. However, this adds
to the computation time for transient analysis, since the impulse responses must be obtained
by an inverse FFT instead of analytically.
223
Analog devices T
Ideal line
General form T<name> <A port (+) node> <A port (-) node>
+ <B port (+) node> <B port (-) node>
+ [model name]
+ Z0=<value> [TD=<value>] [F=<value> [NL=<value>]]
+ IC= <near voltage> <near current> <far voltage> <far current>
Description As shown below, port A’s (+) and (-) nodes are 1 and 2, and port B’s (+) and (-) nodes are 3
and 4, respectively.
I1 -I3
Z0 delayed 13 Z0 delayed I1
2 4
Comments For the ideal line, IC sets the initial guess for the voltage or current across the ports. The
<near voltage> value is the voltage across A(+) and A(-) and the <far voltage> is the voltage
across B(+) and B(-). The <near current> is the current through A(+) and A(-) and the
<far current> is the current through B(+) and B(-).
For the ideal case, Z0 is the characteristic impedance. The transmission line’s length can be
specified either by TD, a delay in seconds, or by F and NL, a frequency and a relative
wavelength at F. NL has a default value of 0.25 (F is the quarter-wave frequency). Although
TD and F are both shown as optional, one of the two must be specified.
224
Analog devices T
Lossy line
General form T<name> <A port (+) node> <A port (-) node>
+ <B port (+) node> <B port (-) node>
+ [ <model name> [electrical length value] ]
+ LEN=<value> R=<value> L=<value>
+ G=<value> C=<value>
Description The simulator uses a distributed model to represent the properties of a lossy transmission line.
That is, the line resistance, inductance, conductance, and capacitance are all continuously
apportioned along the line’s length. A common approach to simulating lossy lines is to model
these characteristics using discrete passive elements to represent small sections of the line.
This is the lumped model approach, and it involves connecting a set of many small subcircuits
in series as shown below:
R L
G C
This method requires that there is enough lumps to adequately represent the distributed
character of the line, and this often results in the need for a large netlist and correspondingly
long simulation times. The method also produces spurious oscillations near the natural
frequencies of the lumped elements.
An additional extension allows systems of coupled transmission lines to be simulated.
Transmission line coupling is specified using the K device. This is done in much the same way
that coupling is specified for inductors. See the description of Transmission line coupling for
further details.
The distributed model allows freedom from having to determine how many lumps are
sufficient, and eliminates the spurious oscillations. It also allows lossy lines to be simulated
in a fraction of the time necessary when using the lumped approach, for the same accuracy.
Comments For a lossy line, LEN is the electrical length. R, L, G, and C are the per unit length values of
resistance, inductance, conductance, and capacitance, respectively.
Example T4 specifies a lossy line one meter long. The lossy line model is similar to that of the
ideal case, except that the delayed voltage and current values include terms which vary with
frequency. These terms are computed in transient analysis using an impulse response
convolution method, and the internal time step is limited by the time resolution required to
accurately model the frequency characteristics of the line. As with ideal lines, short lossy lines
cause long run times.
225
Analog devices T
Capture parts
PSpice A/D uses a distributed model to represent the properties of a lossy transmission line.
That is, the line resistance, inductance, conductance, and capacitance are all continuously
apportioned along the line’s length.
A common approach to simulating lossy lines is to model these characteristics using discreet
passive elements to represent small sections of the line. This is the lumped model approach,
and it involves connecting a set of many small subcircuits in series. This method requires that
enough lumps exist to adequately represent the distributed characteristic of the line. This often
results in the need for a large netlist and correspondingly long simulation time. The method
also produces spurious oscillations near the natural frequencies of the lumped elements.
The distributed model used in PSpice A/D frees you from having to determine how many
lumps are sufficient, and eliminates the spurious oscillations. It also allows lossy lines to be
simulated with the same accuracy in a fraction of the time required by the lumped approach.
In addition, you can make R and G general Laplace expressions. This allows frequency
dependent effects to be modeled, such as skin effect and dielectric loss.
226
Analog devices T
227
Analog devices T
Simulation considerations
When simulating, transmission lines with short delays can create performance bottlenecks by
setting the time step ceiling to a very small value.
If one transmission line sets the time step ceiling frequently, PSpice A/D reports the three
lines with the shortest time step. The status window displays the percentage attenuation, step
ceiling, and step ceiling as percentage of transmission line delay.
If your simulation is running reasonably fast, you can ignore this information and let the
simulation proceed. If the simulation is slowed significantly, you may want to cancel the
simulation and modify your design. If the line is lossy and shows negligible attenuation,
model the line as ideal instead.
228
Analog devices T
* See.MODEL (model definition). The order is from the most commonly used to the least commonly used parameter.
** Any length units can be used, but they must be consistent. For instance, if LEN is in feet, then the units of R must be in ohms/foot.
L
*** A lossy line with R=G=0 and LEN=1 is equivalent to an ideal line with ZO = --- and TD = LEN ⋅ L ⋅ C .
C
229
Analog devices T
References
For more information on how the lossy transmission line is implemented, refer to:
[1] Roychowdhury and Pederson, “Efficient Transient Simulation of Lossy Interconnect,”
Design Automation Conference,
1991.
230
Analog devices V
231
Analog devices W
Current-controlled switch W
13v
17v
W12
This model was chosen for a switch to try to minimize numerical problems. However, there
are a few things to consider; see Special considerations.
Arguments and options
<controlling V device name>
The current that the resistance between the <(+) switch node> and <(-) switch node>
depends on.
232
Analog devices W
Capture parts
Ideal switches
Summarized below is the available current-controlled switch part type in the breakout.slb
part library. To create a time-controlled switch, connect the switch control pins to a voltage
source with the appropriate voltage vs. time values (transient specification).
The ISWITCH model defines the on/off resistance and the on/off control voltage or current
thresholds. This switch has a finite on resistance and off resistance, and it changes smoothly
between the two as its control voltage (or current) changes. This behavior is important
because it allows PSpice A/D to find a continuous set of solutions for the simulation. You can
make the on resistance very small in relation to the other circuit impedances, and you can
make the off resistance very large in relation to the other circuit impedances.
As with current-controlled sources (F, FPOLY, H, and HPOLY), WBREAK contains a
current-sensing voltage source. When netlisted, WBREAK generates two device declarations
to the circuit file set:
• one for the controlled switch
• one for the independent current-sensing voltage source
If you want to create a new part for a current-controlled switch (with, for example, different
on/off resistance and current threshold settings in the ISWITCH model), the TEMPLATE
property must account for the additional current-sensing voltage source.
233
Analog devices W
Special considerations
Using double precision numbers, the simulator can handle only a dynamic range of about 12
decades. Therefore, it is not recommended making the ratio of ROFF to RON greater than
1.0E+12.
Similarly, it is also not recommended making the transition region too narrow. Remembering
that in the transition region the switch has gain. The narrower the region, the higher the gain
and the greater the potential for numerical problems. The smallest allowed value for ION
-IOFF is RELTOL·(MAX(ION, IOFF))+ ABSTOL.
234
Analog devices W
235
Analog devices X
Subcircuit instantiation X
Purpose This statement causes the referenced subcircuit to be inserted into the circuit using the given
nodes to replace the argument nodes in the definition. It allows a block of circuitry to be
defined once and then used in several places.
General form X<name> [node]* <subcircuit name> [PARAMS: <<name> = <value>>*]
+ [TEXT: < <name> = <text value> >* ]
PARAMS:
Passes values into subcircuits as arguments and into expressions inside the subcircuit.
TEXT:
Passes text values into subcircuits and into text expressions inside the subcircuit.
Comments There must be the same number of nodes in the call as in the subcircuit’s definition.
Subcircuit references can be nested; that is, a call can be given to subcircuit A, whose
definition contains a call to subcircuit B. The nesting can be to any level, but must not be
circular: for example, if subcircuit A’s definition contains a call to subcircuit B, then subcircuit
B’s definition must not contain a call to subcircuit A.
236
Analog devices Z
Z IGBT
General form Z<name> <collector> <gate> <emitter> <model name>
+ [AREA=<value>] [WB=<value>] [AGD=<value>]
+ [KP=<value>] [TAU=<value>]
Description The equivalent circuit for the IGBT is shown below. It is modeled as an intrinsic device (not
as a subcircuit) and contains five DC current components and six charge (capacitive)
components. An overview of the model equations is included below. For a more detailed
description of the defining equations see references [1] through [4] of References.
G
E(s)
dQgs/dt dQdg/dt
Imos
dQds/dt
Imult
b(d)
dQmult/dt
IT
237
Analog devices Z
Capture parts
The following table lists the set of IGBT breakout parts designed for customizing model
parameters for simulation. These are useful for setting up Monte Carlo and worst-case
analyses with device and/or lot tolerances specified for individual model parameters.
238
Analog devices Z
Device
Description Units Default
parameters
AGD gate-drain overlap area m2 5.0E-6
AREA area of the device m2 1.0E-5
KP MOS transconductance A/V2 0.38
TAU ambipolar recombination lifetime sec 7.1E-6
WB metallurgical base width m 9.0E-5
239
Analog devices Z
240
Analog devices Z
IGBT equations
In the following equations:
Imos = MOSFET channel current
IT = anode current
Icss = steady-state (bipolar) collector current
Ibss = Steady-state base current
Imult = avalanche multiplication current
Rb = conductivity modulated base resistance
b = ambipolar mobility ratio
Dp = diffusion coefficient for holes
W = quasi-neutral base width
Qeb = instantaneous excess carrier base charge
Qb = background mobile carrier charge
ni = intrinsic carrier concentration
M = avalanche multiplication factor
Igen = (bipolar)collector-base thermally generated current
εsi = dielectric permittivity of silicon
q = electron charge
Wbcj = base (bipolar) to collector depletion width
241
Analog devices Z
242
Analog devices Z
drain source
( AREA – AGD ) ⋅ ε si
C ds = -------------------------------------------------
- Q ds = q ⋅ ( AREA – AGD ) ⋅ NB ⋅ W dsj
W dsj
2 ⋅ ε si ⋅ ( V ds + 0.6 )
where W dsj = ----------------------------------------------
q ⋅ NB
gate drain
For V ds < V gs – VTD
Cdg = COXD Q dg = COXD ⋅ V dg
For V ds ≥ V gs – VTD
C dgj ⋅ COXD
C dg = ---------------------------------
-
C dgj + COXD
2
q ⋅ NB ⋅ ε si ⋅ AGD COXD ⋅ W dgj COXD ⋅ W dgj
- --------------------------------- – log 1 + ---------------------------------
Q dg = --------------------------------------------- – COXD ⋅ VTD
COXD ε ⋅ AGD ε ⋅ AGD
si si
where AGD ⋅ ε si
C dgj = ----------------------
- 2 ⋅ ε si ⋅ ( V dg + VTD )
W dgj W dgj = --------------------------------------------------
q ⋅ NB
Ccer
Q eb ⋅ C bcj ε si ⋅ AREA
C cer = ------------------------ C bcj = --------------------------
-
3 ⋅ QB W bcj
Cmult
C mult = ( M – 1 ) ⋅ C cer Q mult = ( M – 1 ) ⋅ Q cer
emitter base
dQ eb
C eb =
d V eb
243
Analog devices Z
References
For more information on the IGBT model, refer to:
[1] G.T. Oziemkiewicz, “Implementation and Development of the NIST IGBT Model in a
SPICE-based Commercial Circuit Simulator,” Engineer’s Thesis, University of Florida,
December 1995.
[2] A.R.Hefner, Jr., “INSTANT - IGBT Network Simulation and Transient Analysis Tool,”
National Institute of Standards and Technology Special Publication SP 400-88, June 1992.
[3] A.R.Hefner, Jr., “An Investigation of the Drive Circuit Requirements for the Power
Insulated Gate Bipolar Transistor (IGBT),” IEEE Transactions on Power Electronics, Vol. 6,
No. 2, April 1991, pp. 208-219.
[4] A.R.Hefner, Jr., “Modeling Buffer Layer IGBTs for Circuit Simulation,” IEEE
Transactions on Power Electronics, Vol. 10, No. 2, March 1995, pp. 111-123
244
Digital devices
The digital devices are part of the digital simulation feature of PSpice A/D. For more
information on digital simulation and creating models, refer to your PSpice user’s
guide.
246
Digital devices Digital primitive summary
247
Digital devices Digital primitive summary
248
Digital devices Digital primitive summary
When adding digital parts to a part library, you can create corresponding digital device models
by connecting U devices in a subcircuit definition similar to the one shown above. OrCAD
recommends that these be saved in a custom model file. The model files can then be
configured into the model library or specified for use in a given design.
249
Digital devices Digital primitive summary
See Input/output model parameters for a list of the UIO model parameters.
Timing model format
.MODEL <model name> <model type> ( <model parameters>* )
<node>*
One or more input and output nodes. The number of nodes depends on the primitive type
and its parameters. Analog devices, digital devices, or both can be connected to a node. If
a node has both analog and digital connections, then the simulator automatically inserts
an interface subcircuit to translate between logic levels and voltages. Refer to your PSpice
user’s guide for more information.
250
Digital devices Digital primitive summary
<model type>
Is specific to the primitive type. See the specific primitive for the correct <model type>
and associated <model parameters>. General timing model issues are discussed in the next
section.
MNTYMXDLY
An optional device parameter that selects either the minimum, typical, or maximum delay
values from the device’s timing model. A fourth option operates the primitive in Digital
Worst-Case (min/max) mode. If not specified, MNTYMXDLY defaults to 0. Valid values
are:
251
Digital devices Digital primitive summary
Timing models
With the exception of the PULLUP, PULLDN, and PINDLY devices, all digital primitives
have a timing model that provides timing parameters to the simulator. Within a timing model,
there can be one or more types of parameters
• propagation delays (TP)
• setup times (TSU)
• hold times (TH)
• pulse widths (TW)
• switching times (TSW)
Each parameter is further divided into three values: minimum (MN), typical (TY), and
maximum (MX). For example, the typical low-to-high propagation delay on a gate is
specified as TPLHTY. The minimum data-to-clock setup time on a flip-flop is specified as
TSUDCLKMN.
One or more parameters can be missing from the timing model definition. Data books do not
always provide all three (minimum, typical, and maximum) timing specifications. The way
the simulator handles missing parameters depends on the type of parameter.
This discussion applies only to propagation delay parameters (TP). All other timing
parameters, such as setup/hold times and pulse widths, are handled differently and
are described in Treatment of unspecified timing constraints.
Often, only the typical and maximum delays are specified in data books. If, in this case, the
simulator were to assume that the unspecified minimum delay just defaults to zero, the logic
in certain circuits could break down.
For this reason, the simulator provides two configurable options, DIGMNTYSCALE and
DIGTYMXSCALE (set using the .OPTIONS (analysis options) command), which are used to
extrapolate unspecified propagation delays in the timing models.
DIGMNTYSCALE
ThIS option computes the minimum delay when a typical delay is known, using the formula
TPxxMN = DIGMNTYSCALE · TPxxTY
DIGMNTYSCALE has a default value of 0.4, or 40% of the typical delay. Its value must be
between 0.0 and 1.0.
DIGTYMXSCALE
This option computes the maximum delay from a typical delay, using the formula
TPxxMX = DIGTYMXSCALE · TPxxTY
DIGTYMXSCALE has a default value of 1.6. Its value must be greater than 1.0.
252
Digital devices Digital primitive summary
When a typical delay is unspecified, its value is derived from the minimum and/or maximum
delays, in one of the following ways. If both the minimum and maximum delays are known,
the typical delay is the average of these two values. If only the minimum delay is known, the
typical delay is derived using the value of the DIGMNTYSCALE option. Likewise, if only the
maximum delay is specified, the typical delay is derived using DIGTYMXSCALE. Obviously,
if no values are specified, all three delays have a default value of zero.
253
Digital devices Digital primitive summary
Gates
Logic gates come in two types: standard and tristate. Standard gates always have their outputs
enabled, whereas tristate gates have an enable control. When the enable control is 0, the
output’s strength is Z and its level is X.
Logic gates also come in two forms: simple gates and gate arrays. Simple gates have one or
more inputs and only one output. Gate arrays contain one or more simple gates in one
component. Gate arrays allow one to work directly using parts that have several gates in one
package.
The usual Boolean equations apply to these gates having the addition of the X level. The rule
for X is: if an input is X, and if changing that input between one and zero would cause the
output to change, then the output is also X. In other words, X is only propagated to the output
when necessary. For example: 1 AND X = X; 0 AND X = 0; 0 OR X = X; 1 OR X = 1.
254
Digital devices Digital primitive summary
Standard gates
Device format U<name> <gate type> (<parameter value>*)
+ <digital power node> <digital ground node>
+ <input node>* <output node>*
+ <timing model name> <I/O model name>
+ [MNTYMXDLY=<delay select value>]
+ [IO_LEVEL=<interface subckt select value>]
The standard gate types and their parameters are listed in Standard Gate Types.
Timing model format
<timing model name> UGATE [model parameters]
Examples U5 AND(2) $G_DPWR $G_DGND IN0 IN1 OUT ; two-input AND gate
+ T_AND2 IO_STD
U2 INV $G_DPWR $G_DGND 3 5 ; simple INVerter
+ T_INV IO_STD
U13 NANDA(2,4) $G_DPWR $G_DGND ; four two-input NAND gates
+ INA0 INA1 INB0 INB1 INC0 INC1
+ IND0 IND1 OUTA OUTB OUTC OUTD
+ T_NANDA IO_STD
U9 AO(3,3) $G_DPWR $G_DGND ;three-input AND-OR gate
+ INA0 INA1 INA2 INB0 INB1 INB2 INC0 INC1 INC2
+ OUT T_AO IO_STD
+ MNTYMXDLY=1 IO_LEVEL=1
.MODEL T_AND2 UGATE ; AND2 Timing Model
+ TPLHMN=15ns TPLHTY=20ns TPLHMX=25ns
+ TPHLMN=10ns TPHLTY=15ns TPHLMX=20ns
+)
In gate arrays the order of the nodes is: all inputs for the first gate, all inputs for the second
gate, ..., output for the first gate, output for the second gate, ... In other words, all of the
input nodes come first, then all of the output nodes. The total number of input nodes is
<no. of inputs>·<no. of gates>; the number of output nodes is <no. of gates>.
A compound gate is a set of <no. of gates> first-level gates which each have <no. of
inputs> inputs. Their outputs are connected to a single second-level gate. For example, the
AO component has <no. of gates> AND gates whose outputs go into one OR gate. The
OR gate’s output is the AO device’s output. The order of the nodes is: all inputs for the
first, first-level gate; all inputs for the second, first-level gate; ...; the output of the
second-level gate. In other words, all of the input nodes followed by the one output node.
255
Digital devices Digital primitive summary
Standard gates
INA0
OUTA
INA1 INA0
INA1
INB0
OUTB
INB1 INB0
OUT
NAND gate array INB1
INC0
OUTC
INC1 INC0
INC1
IND0
OUTD AND-OR compound gate
IND1
256
Digital devices Digital primitive summary
257
Digital devices Digital primitive summary
Tristate gates
Device format U<name> <tristate gate type> [( <parameter value>* )]
+ <digital power node> <digital ground node>
+ <input node>* <enable node> <output node>*
+ <timing model name> <I/O model name>
+ [MNTYMXDLY=<delay select value>]
+ [IO_LEVEL=<interface subckt select value>]
Examples U5 AND3(2) $G_DPWR $G_DGND IN0 IN1 ENABLE OUT two-input AND
+ T_TRIAND2 IO_STD
U2 INV3 $G_DPWR $G_DGND 3 100 5 ; INVerter
+ T_TRIINV IO_STD
U13 NAND3A(2,4) $G_DPWR $G_DGND ; four two-input NAND
+ INA0 INA1 INB0 INB1 INC0 INC1 IND0 IND1
+ ENABLE OUTA OUTB OUTC OUTD
+ T_TRINAND IO_STD
<no. of gates>
The number of gates in model.
Comments In gate arrays the order of the nodes is: all inputs for the first gate, all inputs for the second
gate, ..., enable, output for the first gate, output for the second gate, ... In other words, all of
the input nodes come first, then the enable, then all of the output nodes. The total number of
input nodes is <no. of inputs>·<no. of gates>+1; the number of output nodes is <no. of gates>.
If a tristate gate is connected to a net that has at least one device input using an INLD I/O model,
or a device output using an OUTLD I/O model where both parameters are greater than zero, then
that net is simulated as a charge storage net.
258
Digital devices Digital primitive summary
259
Digital devices Digital primitive summary
260
Digital devices Digital primitive summary
U<name> PBTG
+ <digital power node> <digital ground node>
+ <gate node> <channel node 1> <channel node 2>
+ <timing model name> <I/O model name>
+ [MNTYMXDLY = <delay select value>]
+ [IO_LEVEL = <interface subckt select value>]
The contents of the subcircuit must model the behavior of the transfer gate in the analog
domain, at least for the channel. If the subcircuit’s gate node is connected to analog devices,
then PSpice will simulate the gate node as an analog net. If this behavior is not desired (e.g.,
the gate will be connected to a clock signal, which will slow simulation if it is an analog
signal), then the subcircuit should not have any analog devices connected to the gate node.
261
Digital devices Digital primitive summary
The gate node has the same behavior if it is connected to an analog net as other
digital device pins: the analog-to-digital subcircuit specified by the I/O model and
IO_LEVEL is connected between the analog net and the gate pin of the device.
Examples
The first example is a subcircuit that models the switch with an analog gate connection. In
some circuit topologies, this may cause large parts of a circuit to convert to analog if a single
net is connected to an analog part. To avoid this, use the _D version of the digital-to-analog
converter by setting IO_LEVEL to 3 or 4.
.model io_nbtg uio (drvh=200 drvl=200 inld=10pf outld=15pf
+ digpower="DIGIFPWR"TstoreMN=10us
+ inR=10MEGdrvZ =5MEG
+AtoD1="AtoD_HC"AtoD2="AtoD_HC"
+AtoD3="AtoD_HC"AtoD4="AtoD_HC"
+DtoA1="DtoA_NBTG"DtoA2="DtoA_NBTG"
+DtoA3="DtoA_NBTG_D"DtoA4="DtoA_NBTG_D"
.model io_pbtg uio (drvh=200 drvl=200 inld=10pf outld=15pf
+ digpower="DIGIFPWR"TstoreMN=10us
+ inR=10MEGdrvZ =5MEG
+AtoD1="AtoD_HC"AtoD2="AtoD_HC"
+AtoD3="AtoD_HC"AtoD4="AtoD_HC"
+DtoA1="DtoA_PBTG"DtoA2="DtoA_PBTG"
+DtoA3="DtoA_PBTG_D"DtoA4="DtoA_PBTG_D"
.model io_nbtgs uio (drvh=200 drvl=200
+ digpower="DIGIFPWR"TstoreMN=10us
+ inR=10MEGdrvZ =5MEG
+AtoD1="AtoD_HC"AtoD2="AtoD_HC"
+AtoD3="AtoD_HC"AtoD4="AtoD_HC"
+DtoA1="DtoA_NBTG"DtoA2="DtoA_NBTG"
+DtoA3="DtoA_NBTG_D"DtoA4="DtoA_NBTG_D"
.model io_pbtgs uio (drvh=200 drvl=200
+ digpower="DIGIFPWR"TstoreMN=10us
+ inR=10MEGdrvZ =5MEG
+AtoD1="AtoD_HC"AtoD2="AtoD_HC"
+AtoD3="AtoD_HC"AtoD4="AtoD_HC"
+DtoA1="DtoA_PBTG"DtoA2="DtoA_PBTG"
+DtoA3="DtoA_PBTG_D"DtoA4="DtoA_PBTG_D"
.model btg1 ubtg
The next two examples are switch models with digital gate inputs. The digital-to-analog
conversion of the gate inputs uses an I/O model (HC in this example) that is defined here, not
the I/O model of the device driving the gate.
Use these examples in cases where an using analog input would create too many analog
switches. Do not use these when the gate is analog, since this would make an
analog-to-digital-to-analog conversion, which may cause invalid simulation results. (This is
because the analog gate is squared up before being converted to analog again and applied to
the “gate” of the switch.)
262
Digital devices Digital primitive summary
263
Digital devices Digital primitive summary
Initialization
By default, at the beginning of each simulation, all flip-flops and latches are initialized to the
unknown state (that is, they output an X). Each device remains in the unknown state until
explicitly set or cleared by an active-low pulse on either the preset or clear pins, or until a
known state is clocked in.
You can override the X start-up state by setting .OPTIONS (analysis options) DIGINITSTATE
to either zero or one. If set to zero, all flip-flops and latches in the circuit are cleared. Likewise,
if set to one, all such devices are preset. Any other values produce the default (X) start-up
state. The DIGINITSTATE option is useful in situations where the initial state of the flip-flop is
unimportant to the function of the circuit, such as a toggle flip-flop in a frequency divider.
It is important to note that if the initial state is set to zero or one, the device still outputs an X
at the beginning of the simulation if the inputs would normally produce an X on the output.
For example, if the initial state is set to one, but the clock is an X at time zero, Q and QBar
both go to X when the simulation begins.
X-level handling
The truth-table for each type of flip-flop and latch is given in the sections that follow.
However, how the flip-flops treat X levels on the inputs is not depicted in the truth tables
because it can depend on the state of the device.
The rule is as follows: if an input is X, and if changing that input between one and zero would
cause the output to change, then the output is set to X. In other words, X is only propagated
to the output when necessary. For example: if Q = 0 and PresetBar = X, then Q → X; but if Q
= 1 and PresetBar = X, then Q → 1.
Timing violations
The flip-flop and latch primitives have model parameters which specify timing constraints
such as setup/hold times and minimum pulse-widths. If these model parameter values are
greater than zero, the simulator compares measured times on the inputs against the specified
value. See Standard gate timing model parameters and Tristate gate timing model
parameters .
The simulator reports flip-flop timing violations as digital simulation warning messages in the
.out file.
These messages can also be viewed using the Windows version of Probe.
264
Digital devices Digital primitive summary
Edge-triggered flip-flops
The simulator supports four types of edge-triggered flip-flops:
• D-type flip-flop (DFF), which is positive-edge triggered
• J-K flip-flop (JKFF), which is negative-edge triggered
• Dual-edge D flip-flop (DFFDE), which is selectively positive and/or negative edge
triggered
• Dual-edge J-K flip-flop (JKFFDE), which is selectively positive and/or negative edge
triggered
265
Digital devices Digital primitive summary
Comments Use <no. of flip-flops> to specify the number of flip-flops in the device. The three nodes,
<presetbar node>, <clearbar node> and <clock(bar) node>, are common to all flip-flops in the
device.
The <positive-edge enable node> and <negative-edge enable node> are common to all
flip-flops in the dual-edge flip-flops.
266
Digital devices Digital primitive summary
267
Digital devices Digital primitive summary
268
Digital devices Digital primitive summary
269
Digital devices Digital primitive summary
Gated latch
The simulator supports two types of gated latches: the S-R flip-flop (SRFF) and the D-type
latch (DLTCH).
Comments Use <no. of flip-flops> to specify the number of flip-flops in the device. The three nodes,
<presetbar node>, <clearbar node>, and <gate node>, are common to all of the flip-flops in
the device.
270
Digital devices Digital primitive summary
Model
Description Units Default
parameters*
TPDQHLMN Delay: s/r/d to q/qb hi to low, min sec 0
TPDQHLTY Delay: s/r/d to q/qb hi to low, typ sec 0
TPDQHLMX Delay: s/r/d to q/qb hi to low, max sec 0
TPGQLHMN Delay: gate to q/qb low to hi, min sec 0
TPGQLHTY Delay: gate to q/qb low to hi, typ sec 0
TPGQLHMX Delay: gate to q/qb low to hi, max sec 0
TPGQHLMN Delay: gate to q/qb hi to low, min sec 0
TPGQHLTY Delay: gate to q/qb hi to low, typ sec 0
TPGQHLMX Delay: gate to q/qb hi to low, max sec 0
TPPCQLHMN Delay: preb/clrb to q/qb low to hi, min sec 0
TPPCQLHTY Delay: preb/clrb to q/qb low to hi, typ sec 0
TPPCQLHMX Delay: preb/clrb to q/qb low to hi, max sec 0
TPPCQHLMN Delay: preb/clrb to q/qb hi to low, min sec 0
TPPCQHLTY Delay: preb/clrb to q/qb hi to low, typ sec 0
TPPCQHLMX Delay: preb/clrb to q/qb hi to low, max sec 0
TSUDGMN Setup: s/r/d to gate edge, min sec 0
TSUDGTY Setup: s/r/d to gate edge, typ sec 0
TSUDGMX Setup: s/r/d to gate edge, max sec 0
TSUPCGHMN Setup: preb/clrb hi to gate edge, min sec 0
TSUPCGHTY Setup: preb/clrb hi to gate edge, typ sec 0
TSUPCGHMX Setup: preb/clrb hi to gate edge, max sec 0
TWPCLMN Min preb/clrb width low, min sec 0
TWPCLTY Min preb/clrb width low, typ sec 0
TWPCLMX Min preb/clrb width low, max sec 0
TWGHMN Min gate width hi, min sec 0
TWGHTY Min gate width hi, typ sec 0
TWGHMX Min gate width hi, max sec 0
* See .MODEL (model definition).
271
Digital devices Digital primitive summary
272
Digital devices Digital primitive summary
<number of resistors>
Specifies the number of resistors in the array.
Comments Notice that PULLUP and PULLDN do not have Timing Models, just I/O
models.
273
Digital devices Digital primitive summary
Delay line
The output of a delay line follows the input after the delay specified in the Timing Model. Any
width pulse can propagate through a delay line. This behavior is different from gates, which
don’t propagate a pulse when its width is less than the propagation delay.
The delay line device has no parameters, and only one input and one output node.
274
Digital devices Digital primitive summary
This example creates a 14H4 PAL which is programmed by the JEDEC file myprog.jed.
275
Digital devices Digital primitive summary
276
Digital devices Digital primitive summary
<radix flag>
One of the following:
The data values must be enclosed in dollar signs ($), but can be separated
by spaces or continuation lines.
Comments The example defines a 3-to-8 line decoder. The inputs are IN1 (MSB), IN2, and
IN3 (LSB). If the inputs are all low, OUT0 is true. If IN1 and IN2 are low and
IN3 is high, then OUT1 is true, and so on. The programming data has been
typed in as an array, so that it is easier to read. The comments above the
columns identify the true and false (complement) inputs, and the comments at
the end of the line identify the output pin which is controlled by that gate. (Note,
the simulator does not process any of these comments—they just help make the
programming data readable.)
277
Digital devices Digital primitive summary
278
Digital devices Digital primitive summary
Device format U<name> ROM( <no. of address pins>, <no. of output pins> )
+ <digital power node> <digital ground node>
+ <enable_node> <address node msb> ... <address node lsb>
+ <output node msb> ... <output node lsb>
+ <timing model name> <I/O model name>
+ [FILE=<file name text value>]
+ [DATA=<radix flag>$<program data>$]
+ [MNTYMXDLY=<delay select value>]
+ [IO_LEVEL=<interface subckt select value>]
279
Digital devices Digital primitive summary
280
Digital devices Digital primitive summary
<radix flag>
One of the following:
The data values must be enclosed in dollar signs ($ $), but can be separated by spaces or
continuation lines.
281
Digital devices Digital primitive summary
282
Digital devices Digital primitive summary
<radix flag>
One of the following:
The data values must be enclosed in dollar signs ($ $), but can be separated by spaces or
continuation lines.
The initialization of a RAM using the DATA=... construct is the same as the programming
of a ROM. See Read only memory on the ROM primitive for an example.
283
Digital devices Digital primitive summary
Comments The RAM has separate read and write sections, using separate data and enable pins, and shared
address pins. To write to the RAM, the address and write data signals must be stable for the
appropriate setup times, then write enable is raised. It must stay high for at least the minimum
time, then fall. Address and data must remain stable while write enable is high, and for the
hold time after it falls. Write enable must remain low for at least the minimum time before
changing.
To read from the RAM, raise read enable, and the outputs change from Z (high impedance) to
the appropriate value after a delay. The address can change while read enable is high, and if
it does, the new data is available at the outputs after the delay.
Nothing prevents both the read and write enable from being true at the same time, although
most real devices would not allow this. The new value from the write is sent to the read data
outputs on the falling edge of write enable.
284
Digital devices Digital primitive summary
Model
Description Units Default
parameters*
TPERDLZMN delay: read enable to read data, low to hi-Z, min sec 0
TPERDLZTY delay: read enable to read data, low to hi-Z, typ sec 0
TPERDLZMX delay: read enable to read data, low to hi-Z, max sec 0
TSUDEWMN min setup time: data to write enable rise, min sec 0
TSUDEWTY min setup time: data to write enable rise, typ sec 0
TSUDEWMX min setup time: data to write enable rise, max sec 0
TSUAEWMN min setup time: address to write enable rise, min sec 0
TSUAEWTY min setup time: address to write enable rise, typ sec 0
TSUAEWMX min setup time: address to write enable rise, max sec 0
TWEWHMN min width: enable write hi, min sec 0
TWEWHTY min width: enable write hi, typ sec 0
TWEWHMX min width: enable write hi, max sec 0
TWEWLMN min width: enable write low, min sec 0
TWEWLTY min width: enable write low, typ sec 0
TWEWLMX min width: enable write low, max sec 0
* See .MODEL (model definition).
285
Digital devices Digital primitive summary
286
Digital devices Digital primitive summary
287
Digital devices Digital primitive summary
Status
DATA refers to both the data and over-range signals. The Convert pulse can be any width,
including zero. If the propagation delay between the rising edge of the Convert signal and the
Status signal (tpsd) is zero, the data and over-range do not go to unknown but directly to the
new value. There is a resistive load from <ref node> to <gnd node>, and from <in node> to
<gnd node>, of 1/GMIN.
The voltage at <in node> and <ref node> with respect to <gnd node> is sampled starting at
the rising edge of the Convert signal, and ending when the Status signal becomes high. This
gives a sample aperture time of tpcs plus any rising time for Convert. If, during the sample
aperture, the output calculated having the minimum <ref node> voltage and maximum <in
node> voltage is different from the output calculated having the maximum <ref node> voltage
and minimum <in node> voltage, the appropriate output bits are set to the unknown state and
a warning message is printed in the output file.
The output is the binary value of the nearest integer to
V ( in, gnd )
- ⋅ 2 nbits
----------------------------
V ( ref, gnd )
If this value is greater than 2nbits-1, then all data bits are 1, and over-range is 1. If this value is
less than zero, then all data bits are zero, and over-range is 1.
288
Digital devices Digital primitive summary
289
Digital devices Digital primitive summary
If any inputs are unknown (X), the output voltage is halfway between the output voltage if all
the X bits were 1 and the output voltage if all the X bits were 0. When an input bit changes,
the output voltage changes linearly to the new value during the switching time.
V(out,gnd)
tsw
290
Digital devices Digital primitive summary
Behavioral primitives
The simulator offers three primitives to aid in the modeling of complex digital devices: the
Logic Expression, Pin-to-Pin Delay, and Constraint Checker primitives. These devices are
distinct from other primitives in that they allow data-sheet descriptions to be specified more
directly, allowing a one-to-one correspondence using the function diagrams and timing
specifications.
The Logic Expression primitive, LOGICEXP, uses free-format logic expressions to describe
the functional behavior device.
The Pin-To-Pin Delay primitive, PINDLY, describes propagation delays using sets of rules
based on the activity on the device inputs.
The Constraint Checker primitive, CONSTRAINT allows a listing of timing rules such as
setup/hold times, and minimum pulse widths. When a violation occurs, the simulator issues a
message indicating the time of the violation and its cause.
291
Digital devices Digital primitive summary
Logic expression
The LOGICEXP primitive allows combinational logic to be expressed in an equation-like
style, using standard logic operators, node names, and temporary variables.
<output node>
One of the output node names as it appears in the interface list. Assignments to an
<output node> causes the result of the <logic expression> to be scheduled on that output
pin. Each <output node> must have exactly one assignment.
<temporary value>
Any target of an assignment which is not specified as one of the nodes attached to the
device defines a temporary variable. Once assigned, <temporary values> can be used
inside subsequent <logic expressions>. They are provided to reduce the complexity and
improve the readability of the model. The rules for node names apply to
<temporary value> names
<logic expression>
A C-like, infix-notation expression that returns one of the five digital logic levels. Like all
other expressions, <logic expressions> must be surrounded by curly braces { }. They can
span one or more lines using the + continuation character in the first column position.
292
Digital devices Digital primitive summary
293
Digital devices Digital primitive summary
Simulation behavior
When a LOGICEXP primitive is evaluated during a transient analysis, the assignment
statements using in it are evaluated in the order they were specified in the netlist. The logic
expressions are evaluated using no delay. When the result is assigned to an output node, it is
scheduled on that output pin using the appropriate delay specified in the timing model.
Internal feedback loops are not allowed in expressions. That is, an expression cannot
reference a value which has yet to be defined. However, external feedback is allowed if the
output node also appears on the list of input nodes.
This example models the functionality of the 74181 Arithmetic/Logic Unit. The logic for the
entire part is contained in just one primitive. Timing would be handled by the PINDLY and
CONSTRAINT primitives. Refer to any major device manufacturer’s data book for a detailed
description of the operation of the 74181.
U74181 LOGICEXP( 14, 8 ) DPWR DGND
+ A0BAR A1BAR A2BAR A3BAR B0BAR B1BAR B2BAR B3BAR S0 S1 S2 S3 M CN
+ LF0BAR LF1BAR LF2BAR LF3BAR LAEQUALB LPBAR LGBAR LCN+4
+ D0_GATE IO_STD
+
+ LOGIC:
*
* Intermediate terms:
*
+ I31 = { ~((B3BAR & S3 & A3BAR) | (A3BAR & S2 & ~B3BAR)) }
+ I32 = { ~((~B3BAR & S1) | (S0 & B3BAR) | A3BAR ) }
+
+ I21 = { ~((B2BAR & S3 & A2BAR) | (A2BAR & S2 & ~B2BAR)) }
+ I22 = { ~((~B2BAR & S1) | (S0 & B2BAR) | A2BAR ) }
+
+ I11 = { ~((B1BAR & S3 & A1BAR) | (A1BAR & S2 & ~B1BAR)) }
+ I12 = { ~((~B1BAR & S1) | (S0 & B1BAR) | A1BAR ) }
+
+ I01 = { ~((B0BAR & S3 & A0BAR) | (A0BAR & S2 & ~B0BAR)) }
+ I02 = { ~((~B0BAR & S1) | (S0 & B0BAR) | A0BAR ) }
+
+ MBAR = { ~M }
+ P = { I31 & I21 & I11 & I01 }
*
* Output Assignments
*
+ LF3BAR = {(I31 & ~I32) ^
+ ~( (I21 & I11 & I01 & Cn & MBAR) | (I21 & I11 & I02 & MBAR ) |
+ (I21 & I12 & MBAR) | (I22 & MBAR) )}
+
+ LF2BAR = {(I21 & ~I22) ^
+ ~( (I11 & I01 & Cn & MBAR) | (I11 & I02 & MBAR) |
+ (I12 & MBAR) ) }
+
+ LF1BAR = {(I11 & ~I12) ^ ~( (Cn & I01 & MBAR) |
+ (I02 & MBAR) ) }
+
+ LF0BAR = { (I01 & ~I02) ^ ~(MBAR & Cn) }
+
+ LGBAR = { ~( I32 | (I31 & I22) | (I31 & I21 & I12) |
+ (I31 & I22 & I11 & I02) ) }
+
+ LCN+4 = { ~LGBAR | (P & Cn) }
+ LPBAR = { ~P }
+ LAEQUALB = { LF3BAR & LF2BAR & LF1BAR & LF0BAR }
294
Digital devices Digital primitive summary
Pin-to-pin delay
The pin-to-pin (PINDLY) primitive is a general mechanism that allows the modeling of
complex device timing. It can be thought of as a set of delay-lines (paths) and rules describing
how to associate specific amounts of delay using each path.
A PINDLY primitive is used in the output path of a device model, typically at the output pins
of a subcircuit definition. A single PINDLY primitive can model the timing and output
characteristics of an entire part, including tristate behavior.
PINDLY primitives are expressed and evaluated in a manner similar to the LOGICEXP
primitive, except in this case a delay expression is assigned to each output. Whenever an
output path undergoes a transition, its delay expression is evaluated to determine the
propagation delay which is to be applied to that change.
A delay expression can contain one or more rules that determine which activity on the part’s
inputs is responsible for the output change, for example, “is the output changing because the
clock changed or the data changed?” This allows device models to be derived directly from
data sheets, which typically specify propagation delays based on which input is changing. The
PINDLY primitive uses its reference inputs to determine the logic state and recent transitions
on nodes which are not in the output path.
Pin-to-pin delay modeling is much simpler compared to earlier methods, in which
input-to-output delays had to be distributed among the low-level primitives used to model the
device. The latter method can require a great deal of trial and error because manufacturer’s
data sheets do not provide a one-to-one association between the logic diagram and the timing
specifications.
PINDLY primitives can also contain constraints such as setup/hold, width, and frequency
specifications, like those supported by the CONSTRAINT primitive. When used in the
PINDLY primitive, these constraints allow the simulator to propagate hazard conditions and
report violations in subsequent logic.
REF1
REF2
REF3
IN2 OUT2
Delay Rules
IN3 OUT3
295
Digital devices Digital primitive summary
<no. of enables>
Specifies the number of tristate enable nodes used by the primitive. Enable
nodes are used in TRISTATE sections. <no. of enables> can be zero.
<no. of refs>
Specifies the number of reference nodes used by the primitive. Reference
nodes are used within delay expressions to get state information about
signals which are not in the input-to-output paths. <no. of refs> can be zero.
Comments The example depicts the relationship and purpose of the different pins on the
PINDLY primitive.
The PINDLY primitive can be viewed as four buffers, IN1 to OUT1 through
IN4 to OUT4, and three reference nodes which are used by the output delay
rules. The figure shows how the reference nodes can be used in one or more
set of delay rules. In this case, REF1 and REF2 are used by the delay rules for
OUT2, and REF3 is used by the delay rules for OUT1 and OUT4. The figure
also shows that OUT2 and OUT3 can share the same delay rules. The
remainder of the format description describes how to create delay rules.
296
Digital devices Digital primitive summary
<boolean variable> can be any name which follows the node name rules.
<boolean expression> is a C-like, infix-notation expression which returns the boolean value
TRUE or FALSE. Like all other expressions, <boolean expressions> must be surrounded by
curly braces {...}. They can span one or more lines by using the + continuation character in
the first column position. The boolean operators are listed below from highest-to-lowest
precedence:
~ unary not
== equality
!= inequality
& and
^ exclusive or
| or
All boolean operators take the following boolean values as operands:
• Previously assigned <boolean variables>
• Reference functions (defined below)
• Transition functions (defined below)
• <boolean constants>: TRUE, FALSE
In addition, the == and != operators take logic values, such as <input nodes> and
<logic constants>. This allows for a check of the values on nodes; for example, CLEAR == 1
returns TRUE if the current level on the node CLEAR is a logic one and FALSE otherwise.
297
Digital devices Digital primitive summary
Reference functions
Reference functions are used to detect changes (transitions) on <reference nodes> or <input
nodes>. All reference functions return boolean values, and therefore can be used within any
<boolean expression>. Following is the list of available reference functions and their
arguments:
CHANGED <node>, <delta time> )
CHANGED_LH <node>, <delta time> )
CHANGED_HL <node>, <delta time> )
The CHANGED function returns TRUE if the specified <node> has undergone any state
transition within the past <delta time>, prior to the current simulation time; otherwise it
returns FALSE.
Similarly, CHANGED_LH returns TRUE if <node> has specifically undergone a low-to-high
transition within the past <delta time>; FALSE otherwise. Note that CHANGED_LH only
looks at the most recent (or current) transition. It cannot, for example, determine if 0 Æ 1
occurred two transitions ago.
Finally, CHANGED_HL is similar to CHANGED_LH, but checks for high-to-low
transitions.
If a <delta time> is specified zero, the reference functions return TRUE if the node has
changed at the current simulation time. This allows all of the functionality of a device to be
modeled in zero delay so that the total delay through the device can be described using the
delay expressions.
298
Digital devices Digital primitive summary
Transition functions
Transition functions are used to determine the state change occurring on the changing output,
that is, the <output node> for which the <delay expression> is being evaluated. Like reference
functions, transition functions return boolean values. However, they differ from reference
functions in that transition functions take no arguments, since they implicitly refer to the
changing output at the current time. The transition functions are of the general form:
TRN_pn
where p is the previous state value and n is the new state value. State values are taken from
the set { L H Z $ }. Where appropriate, the $ can be used to signify don’t care, e.g., a TRN_H$
matches a transition from H to ANY state. Rising states automatically map to High, and
Falling states automatically map to Low.
As a term in any boolean expression, for example, TRN_LH takes on a TRUE value if the
changing output is propagating a change from zero to one.
Following is the complete set of transition functions.
TRN_LH TRN_LZ TRN_L$ TRN_HL TRN_HZ TRN_H$ TRN_ZL TRN_ZH TRN_Z$ TRN_$L TRN
_$H TRN_$Z
The TRN_pZ and TRN_Zn functions return true only if it is used within a TRISTATE
section, described below. Although open-collector outputs also transition to a
high-impedance Z (instead of H), most data books describe propagation times on
open-collector outputs as TPLH or TPHL. Therefore, open-collector output devices
should use TRN_LH and TRN_HL, and tristate output devices should use TRN_LZ,
TRN_HZ, TRN_ZL, and TRN_ZH.
PINDLY: marks the beginning of a section of one or more <delay assignments>, which
are used to associate propagation delays using the PINDLY primitive’s outputs.
<delay assignments> are of the form:
<output node>* = { <delay expression> }
<output node> is one of the output node names as it appears in the interface list. Each <output
node> must have exactly one assignment. Several outputs can share the same delay rules by
listing them (separated by spaces or commas) on the left-hand side of the <delay expression>.
<delay expression> is an expression which, when evaluated, returns a triplet (min, typ, max)
of delay values. Like all other expressions, <delay expressions> must be surrounded by curly
braces {...}. They can span one or more lines by using the +222222222222 continuation
character in the first column position.
The simplest <delay expression> is a single <delay value>, defined as:
DELAY(<min>, <typ>, <max>)
where <min>, <typ>, and <max> are floating point constants or expressions (involving
parameters), expressed in seconds. To specify unknown values, use -1. For example,
DELAY(20ns,-1,35ns) specifies a minimum time of 20ns, a default (program-computed)
value for typical, and a maximum of 35ns. See Treatment of unspecified propagation
delays for more information on default delays.
299
Digital devices Digital primitive summary
The delay assignment below specifies the propagation delays through output Y to be:
min=2ns, typ=5ns, and max=9ns.
...
+ PINDLY:
+ Y = { DELAY(2ns, 5ns, 9ns) }
...
To define more complex, rule-based <delay expressions>, use the CASE function, which has
the form:
CASE(
<boolean expression>, <delay expression>,; Rule 1
<boolean expression>, <delay expression>,; Rule 2
... ; ...
<delay expression> ; Default delay
)
The arguments to the CASE function are pairs of <boolean expressions> and
<delay expressions>, followed by a final default <delay expression>. <boolean expressions>
(described above) can contain <boolean values>, reference functions, and transition
functions.
When the CASE function is evaluated, each <boolean expression> is evaluated in order of
appearance until one produces a TRUE result. When this occurs, the <delay expression> it is
paired with the result of the CASE function, and the evaluation of the CASE is ended. If none
of the <boolean expressions> return a TRUE result, the value of the final <delay expression>
is used. Because it is possible for all <boolean expressions> to evaluate FALSE, the default
delay value must be supplied. Note that each argument to the CASE function must be
separated by commas.
...
+ BOOLEAN:
+ CLOCK = { CHANGED_LH( CLK, 0 ) }
+ PINDLY:
+ QA QB QC QD = {
+ CASE (
+ CLOCK & TRN_LH, DELAY(-1,13ns,24ns),
+ CLOCK & TRN_HL, DELAY(-1,18ns,27ns),
+ CHANGED_HL( CLRBAR,0), DELAY(-1,20ns,28ns),
+ DELAY(-1,20ns,28ns) ; Default
+ )
+ }
This example describes the delays through a four-bit counter. It shows how rules can be
defined to precisely isolate the cause of the output change. In this example, the boolean
variable CLOCK is being defined. It is TRUE whenever the reference input CLK changes
from low-to-high at the current simulation time. This is only true if the device functionality is
modeled in zero delay.
The four outputs QA through QD all share the same delay expression. The CASE is used to
specify different delays when the device is counting or clearing. The first two rules define
delays when the device is counting (CLK changing low-to-high); the first when the output
(QA through QD) is going from low-to-high, the second from high-to-low.
The third rule simply uses the CHANGED_HL function directly to determine whether
CLRBAR is changing, and in this case the specification applies to any change (low-to-high
or high-to-low) on the output. The default delay applies to all other output transitions which
are not covered by the first three rules.
300
Digital devices Digital primitive summary
TRISTATE: marks the beginning of a sequence of one or more <delay assignments>. The
TRISTATE section differs from the PINDLY section in that the outputs are controlled by the
specified enable node.
Immediately following the TRISTATE keyword, an enable node must be specified using its
polarity and the ENABLE keyword:
ENABLE HI <enable node>; Specifies active HI enable
ENABLE LO <enable node>; Specifies active LO enable
The specified <enable node> applies to all <output node> assignments in the current section.
Note that <delay expressions> within a TRISTATE section can contain the transition
functions pertaining to the Z state, for example TRN_ZL and TRN_HZ.
The following example demonstrates how an enable node can be used to control more than
one output. It also shows that some device outputs can use the standard output (PINDLY)
while others use the tristate output. (Delay values have been omitted.)
ENA
REF1
REF2
301
Digital devices Digital primitive summary
302
Digital devices Digital primitive summary
303
Digital devices Digital primitive summary
Constraint checker
The CONSTRAINT primitive provides a general constraint checking mechanism to the
digital device modeler. It performs setup and hold time checks, pulse width checks, frequency
checks, and includes a general mechanism to allow user-defined conditions to be reported.
The CONSTRAINT primitive only reports timing violations. It does not affect propagated or
stored logic state or propagation delays.
Timing specifications are usually given at the device (i.e., package pin) level. Thus, the inputs
to the constraint description typically are those of the subcircuit description of the device,
after any necessary buffering. CONSTRAINT devices can be used in conjunction with any
combination of digital primitives, including gates, logic expressions, and pin-to-pin delay
primitives.
BOOLEAN sections can appear in any order within the CONSTRAINT primitive.
The syntax of the <boolean expression> is the same as that defined in the PINDLY primitive
reference, having the exception that transition functions have no meaning within the
CONSTRAINT primitive.
SETUP_HOLD:
Marks the beginning of a setup/hold constraint specification, which has the following format:
+ SETUP_HOLD:
+ CLOCK <assertion edge> = <input node>
+ DATA ( <no. of data inputs> ) = <input node j> ... <input node k>
+ [ SETUPTIME = <time value> ]
+ [ HOLDTIME = <time value> ]
+ [ RELEASETIME = <time value> ]
+ [ WHEN {<boolean expression>} ]
+ [ MESSAGE = “<additional message text>" ]
+ [ ERRORLIMIT = <value> ]
+ [ AFFECTS_ALL | AFFECTS_NONE |
+ AFFECTS (#OUTPUTS) = <output-node-list> ]
One or more sections can be specified in any order. Note that AFFECTS clauses are
only allowed in PINDLY primitives.
CLOCK defines the node to be used as the reference for setup/hold/release specification.
<assertion edge> is one of LH or HL, and specifies which edge of the CLOCK node the
setup/hold time is measured against. The CLOCK node must be specified.
304
Digital devices Digital primitive summary
DATA defines one or more nodes to be the nodes whose setup/hold time is being measured.
At least one DATA node must be specified.
SETUPTIME defines the minimum time that all DATA nodes must be stable prior to the
<assertion edge> of the clock. The <time value> must be a nonnegative constant or
expression, expressed in seconds. Some devices have different setup time requirements which
depend on whether the data is a low or a high at the time of the clock change. In this case, one
or both of the following can be used:
SETUPTIME_LO = <time value>
SETUPTIME_HI = <time value>
instead of SETUPTIME, which defines both low- and high-level specifications. If one or both
SETUPTIME_xx specifications is zero, the simulator does not perform a setup check for that
data level.
HOLDTIME defines the minimum time that all DATA nodes must be stable after the
<assertion edge> of the clock. The <time value> must be a nonnegative constant or
expression, expressed in seconds. Some devices have different hold time requirements which
depend on whether the data is a low or a high at the time of the clock change. In this case, one
or both of the following can be used:
HOLDTIME_LO = <time value>
HOLDTIME_HI = <time value>
instead of HOLDTIME, which defines both low- and high-level specifications. If one or both
HOLDTIME_xx specifications is zero, the simulator does not perform a hold check for that
data level.
RELEASETIME specifications cause the simulator to perform a special-purpose setup check.
In a data sheet, release time (also called recovery time) specifications refer to the minimum
time a signal (such as CLEAR) can go inactive before the active CLOCK edge. In other
words, release times refer to the position of a specific data edge in relation to the clock edge.
For this reason, one or both of the following can be used:
RELEASETIME_LH = <time value>
RELEASETIME_HL = <time value>
instead of RELEASETIME, which defines both LH- and HL-edge specifications. The
<time value> must be a nonnegative constant or expression, expressed in seconds.
The difference between the release-time checker and the setup-time checker is that
simultaneous CLOCK/DATA changes are never allowed in the release-time check. That is, a
nonzero hold time is assumed, even though the HOLDTIME is not specified. This feature
allows the data sheet values to be specified for release-times directly in a model. For this
reason, release times are usually given alone, and not in conjunction with SETUPTIME or
HOLDTIME specifications.
305
Digital devices Digital primitive summary
One or more sections can be specified in any order. Note that AFFECTS clauses are
only allowed in the PINDLY primitive.
NODE defines the input node whose pulse width is to be checked.
MIN_HI specifies the minimum time that the <input node> can remain at a high (1) logic
level. The <time value> must be a nonnegative constant or expression, expressed in seconds.
If not specified, MIN_HI defaults to 0, meaning that any width HI pulse is allowed.
MIN_LO likewise specifies the minimum time that the <input node> can remain at a low (0)
logic level. The <time value> must be a nonnegative constant or expression, expressed in
seconds. If not specified, MIN_LO defaults to 0, meaning that any width LO pulse is allowed.
306
Digital devices Digital primitive summary
At least one instance of MIN_HI or MIN_LO must appear within a WIDTH specification.
FREQ: marks the beginning of a frequency constraint specification, which has the following
format:
+ FREQ:
+ NODE = <input node>
+ [ MINFREQ = <frequency value> ]
+ [ MAXFREQ = <frequency value>]
+ [ WHEN { <boolean expression> }]
+ [ MESSAGE "<additional message text>" ]
+ [ ERRORLIMIT = <value> ]
+ [ AFFECTS_ALL | AFFECTS_NONE |
+ AFFECTS (#OUTPUTS) = <output-node-list> ]
One or more sections can be specified in any order. Note that AFFECTS clauses are
only allowed in the PINDLY primitive.
NODE defines the input node whose frequency is to be checked.
MINFREQ specifies the minimum frequency allowed on <input node>. The
<frequency value> must be a nonnegative floating point constant or expression, expressed in
hertz.
MAXFREQ specifies the maximum frequency allowed on <input node>. The
<frequency value> must be a nonnegative floating point constant or expression, expressed in
hertz.
At least one of MINFREQ or MAXFREQ must be specified within a FREQ specification.
307
Digital devices Digital primitive summary
One or more sections can be specified in any order. Note that AFFECTS clauses are
only allowed in the PINDLY primitive. The default for the GENERAL constraint is
AFFECTS_NONE.
WHEN is used to define a boolean expression, which can describe arbitrary signal
relationships that represent the error or condition of interest.
MESSAGE defines the message to be reported by the simulation whenever the WHEN
expression evaluates TRUE. The <message text> must be a text constant (enclosed by double
quotes “ ”) or a text expression.
General notes
Any or all of the constraint specifications (SETUP_HOLD, WIDTH, FREQ, GENERAL) can
appear, in any order, within a CONSTRAINT primitive. Further, more than one constraints
of the same type can appear (such as two WIDTH specifications). Each of the constraint
specifications is evaluated whenever any inputs to the CONSTRAINT primitive instance
change.
All constraint specifications can optionally include a WHEN statement, which is interpreted
as “only perform the check when result of <boolean expression> == TRUE.” The WHEN
statement is required in the GENERAL constraint.
Each constraint type (SETUP_HOLD, WIDTH, FREQ, and GENERAL) has an associated
built-in message. In addition, each instance can include a MESSAGE specification, which
takes a text constant (enclosed in double quotes “ ”) or text expression. The
<additional message text> is appended to the end of the internally-generated, type-specific
message which is output whenever a violation occurs. The MESSAGE clause is required for
the GENERAL constraint device.
All of the constraint specifications can accept an optional ERRORLIMIT specification. The
<value> must be a nonnegative constant or expression. The default <value> is obtained from
the value of the DIGERRDEFAULT (set using the .OPTIONS command), which defaults to 20.
A value of zero is interpreted as infinity, i.e., no limit. When more than <value> violations of
the associated constraint have occurred, no further message output is generated for that
constraint checker; other checkers within the CONSTRAINT primitive that have not
exceeded their own ERRORLIMITs continue to operate.
During simulation, if the total number of digital violations reported exceeds the value given
by DIGERRLIMIT (set using the .OPTIONS (analysis options) command), then the simulation
is halted. DIGERRLIMIT defaults to infinity.
308
Digital devices Digital primitive summary
This CONSTRAINT primitive example below was derived from the 74LS160A device in the
model library. It demonstrates how all of the timing checks can be performed by a single
primitive.
ULS160ACON CONSTRAINT(10) DPWR DGND
+ CLK ENP ENT CLRBAR LOADBAR A B C D EN
+ IO_LS
+ FREQ:
+ NODE = CLK
+ MAXFREQ = 25MEG
+ WIDTH:
+ NODE = CLK
+ MIN_LO = 25NS
+ MIN_HI = 25NS
+ WIDTH:
+ NODE = CLRBAR
+ MIN_LO = 20NS
+ SETUP_HOLD:
+ DATA(1) = LOADBAR
+ CLOCK LH = CLK
+ SETUPTIME = 20NS
+ HOLDTIME = 3NS
+ WHEN = { CLRBAR!=’0 }
+ SETUP_HOLD:
+ DATA(2) = ENP ENT
+ CLOCK LH = CLK
+ SETUPTIME = 20NS
+ HOLDTIME = 3NS
+ WHEN = { CLRBAR!=’0 & (LOADBAR!=’0 ^ CHANGED(LOADBAR,0))
+ & CHANGED(EN,20NS) }
+ SETUP_HOLD:
+ DATA(4) = A B C D
+ CLOCK LH = CLK
+ SETUPTIME = 20NS
+ HOLDTIME = 3NS
+ WHEN = { CLRBAR!=’0 & (LOADBAR!=’1 ^ CHANGED(LOADBAR,0)) }
+ SETUP_HOLD:
+ DATA(1) = CLRBAR
+ CLOCK LH = CLK
+ RELEASETIME_LH = 25NS
309
Digital devices Stimulus devices
Stimulus devices
Stimulus devices apply digital waveforms to a node. Their purpose is to provide the input to
a digital circuit or a digital portion of a mixed circuit. They play the same role in the digital
simulator that the independent voltage and current sources (V and I devices) do in the analog
simulator.
There are two types of stimulus devices: the stimulus generator (STIM), which uses a simple
command to generate a wide variety of waveforms; and the file stimulus (FSTIM), which
obtains the waveforms from an external file.
Unlike digital primitives, stimulus devices do not have a Timing Model. This is similar to the
analog V and I devices: the timing characteristics are described by the device itself, not in a
separate model.
310
Digital devices Stimulus devices
Stimulus generator
Device format U<name> STIM(<width>, <format array>)
+ <digital power node> <digital ground node>
+ <node>*
+ <I/O model name>
+ [STIMULUS=<stimulus name>]
+ [IO_LEVEL=<interface subckt select value>]
+ [TIMESTEP=<stepsize>]
+ <command>*
<format array>
Specifies the format of <value>s used in defining the stimulus. <format array> is a
sequence of digits which specifies the number of signals (nodes) that the corresponding
digit in a <value> represents. Each digit of <value> is assumed to be in base 2<m> where
<m> is the corresponding digit in <format array>. Each <value> must have the same
number of digits as <format array>. The sum of the digits in <format array> must be
<width>, and each digit must be either a 1, 3, or 4 (that is, binary, octal, or hexadecimal).
<node>*
One or more node names which are output by the stimulus generator. The number of
nodes specified must be the same as <width>.
STIMULUS
An optional parameter for referencing a stimulus definition.
IO_LEVELAn optional device parameter which selects one of the four DtoA interface
subcircuits from the I/O model. The simulator calls the selected subcircuit automatically
in the event a <node> connects to an analog device. If not specified, IO_LEVEL defaults
to 0. Valid values are:
311
Digital devices Stimulus devices
TIMESTEP
Number of seconds per clock cycle, or step. Transition times that are specified in clock
cycles (using the C suffix) are multiplied by this amount to determine the actual time of
the transition. (See <time> below.) If TIMESTEP is not specified, the default is zero
seconds. TIMESTEP has no effect on <time> values which are specified in seconds (using
the S suffix).
<command>*
A description of the stimuli to be generated, using one or more of the following.
<time> <value>
LABEL=<label name>
<time> GOTO <label name> <n> TIMES
<time> GOTO <label name> UNTIL GT <value>
<time> GOTO <label name> UNTIL GE <value>
<time> GOTO <label name> UNTIL LT <value>
<time> GOTO <label name> UNTIL LE <value>
<time> INCR BY <value>
<time> DECR BY <value>
REPEAT FOREVER
REPEAT <n> TIMES
ENDREPEAT
FILE=<file name>
<time>
Specifies the time for the new <value>, GOTO, or INCR/DECR command to occur.
Time units
Time values can be stated in seconds or in clock cycles (see TIMESTEP above). To specify a
time value in clock cycles, use the C suffix. Otherwise, the units default to seconds.
Absolute/relative times
Times can be absolute, such as 45ns or 10c, or relative to the previous time. To specify a
relative time, prefix the time using a “+” such as +5ns or +2c.
<value> is the value for each node ( 0, 1, R, F, X, or Z ). <value> is interpreted using the
<format array>.
<label name> is the name used in GOTO statements. GOTO <label name> jumps to the next
non-label statement after the <LABEL = <label name>> statement.
<n> is the number of times to repeat a GOTO loop. Use a -1 to specify forever.
Keep the following in mind when using the stimulus command:
Transitions using absolute times within a GOTO loop are converted to relative times based on
the time of the previous command and the current step size.
• GOTO <label name> must specify a label that has been defined in a previous
LABEL=<label name> statement.
• Times must be in strictly ascending order, except that the transition after a GOTO can be
at the same time as the GOTO.
312
Digital devices Stimulus devices
A simpler syntax for constructing counted loops in digital stimulus is to use the
REPEAT/ENDREPEAT construct. Specify the count value, for example:
REPEAT 3 TIMES
+ 5ns 0
+ 5ns 1
ENDREPEAT
For an infinite loop, use REPEAT FOREVER (equivalent to REPEAT -1 TIMES). All times
within REPEAT loops are interpreted as relative to the start of the loop.
Transition (i.e., time-value pairs) information can be placed in a FILE and accessed one or
more times from the STIM device by using the FILE= statement. The syntax for the file
contents is identical to what can appear directly in the body of the STIM device <command>
section.
This is useful when the Reset node is being driven by another device which does not reset the
flip-flop at time zero. By using the library I/O model named IO_STM, the stimulus generator
drives with a high strength, and thus overpowers the other output. By outputting a Z for the
duration of the simulation, the stimulus generator cannot affect the node.
Two The second example is a simple example of a clock stimulus which pulses every 5
nanoseconds. It has one output node, OUT1, and the format is represented in binary notation.
This example specifies the time as relative to the previous step. IO_STM is an I/O model for
stimulus devices and is available in the dig_io.lib library file which comes with the digital
simulation feature.
UEx2 STIM( 1, 1 ) $G_DPWR $G_DGND Out1 IO_STM
+ 0s 0; At time=0 initialize Out1 ; to zero.
+ REPEAT FOREVER;repeats loop indefinitely
+ +5ns 1 ;5ns later Out1 is set to 1
+ +5ns 0 ;5ns later Out1 is set to 0
+ ENDREPEAT
313
Digital devices Stimulus devices
Three The third example illustrates the use of the timestep; a cycle is equal to one
nanosecond:
UEx3 STIM( 2, 11 ) $G_DPWR $G_DGND 1 2
+ IO_STM TIMESTEP=1ns
+ 0c 00 ;At time=0ns, both nodes are set to 0.
+ REPEAT 4 TIMES ;What’s in the loop is repeated
;4 times
+ +1c 01 ;1ns later node 1 is set to 0
;and node 2 is set to 1.
+ +2c 11 ;2ns later both nodes set to 1.
+ ENDREPEAT
Four The fourth example has four output nodes. The values of the nodes at each transition
are in hexadecimal notation. This is because the <format array> is set to 4, meaning <value>
is one digit representing the value of four nodes. Both the absolute and relative timing
methods are used, but, at the start of execution, the simulation converts all absolute values to
relative values based on the time of the command and the current step size. The timestep is
equal to one nanosecond, setting the cycle to one nanosecond:
UEx4 STIM( 4, 4 ) $G_DPWR $G_DGND IN1 IN2 IN3 IN4
+ IO_STM TIMESTEP=1ns
+ 0s 0 ; At time=0 seconds, all nodes are set to 0.
+ LABEL=STARTLOOP
+ 10C 1 ; At time=10NS, IN1, IN2, & IN3 are set to 0 and IN4
;is set to 1.
+ +5NS 0 ; 5NS later, all nodes are set to 0.
+ 20NS A ; At time=20NS, nodes IN1 & IN3 are set to 1 and
;nodes IN2 &
; IN4 are to 0.
+ +5NS 0 ; 5NS later, all nodes are set to 0.
+ 30C GOTO STARTLOOP 1 TIMES ; At time=30NS, execute the
;first statement of the loop without
;a further delay.“1 TIMES” causes the logic to loop
; 1 time, actually executing the loop twice.
+ +10C 1 ; After the logic falls through the loop
;the second
; time and then waiting 10 additional cycles
; (or 10 nanoseconds),
;IN1, IN2, & IN3 are set to 0 and IN4 is set to 1.
314
Digital devices Stimulus devices
Example four produces the following transitions. Note how all of the time values are
calculated relative to the previous step:
TIME VALUE
0.00E+00 = 0000
1.00E-08 = 0001 ; STARTLOOP
1.50E-08 = 0000
2.00E-08 = 1010 ; 1010 in hex=A
2.50E-08 = 0000
3.00E-08 = 0001 ; The GOTO STARTLOOP 1 TIMES causes the
;first statement
; after the STARTLOOP label to be executed
;immediately.
3.50E-08 = 0000
4.00E-08 = 1010
4.50E-08 = 0000 ; At time 5.00E-08 we checked the
;GOTO STARTLOOP
; 1 TIMES statement, but did not execute it
; since it was already completed one time.
6.00E-08 = 0001 ;At 10C=1ns * 10=10ns later we
;execute the
;last statement.
Five The fifth example illustrates the use of the INCR BY command used to increment
the value of the 16 bit bus:
UEx5 STIM ( 16, 4444 ) $G_DPWR $G_DGND
+ 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
+ IO_STM TIMESTEP = 10ns
+ 0s 0000 ; At time=0 seconds, all nodes are set to 0.
+ LABEL=STARTLOOP
+ 10c INCR BY 0001 ; At 100ns, increment bus by 1.
+ 20c GOTO STARTLOOP UNTIL GE 000A ; If the bus value
;is less
; than 10, branch back to STARTLOOP and
; execute the line following the
; label without a further delay.
315
Digital devices Stimulus devices
Six The sixth example has seven output nodes: 1, 2, 3, 4, 5, 6, and 7. The <format array>
specifies the notation (1=binary, 3=octal, or 4=hex) used to define the output of those seven
nodes. The first two output signals are defined in binary, the next four are in hexadecimal, and
the last one is in binary.
In this example, at time equal to one nanosecond, the value of 0070 creates the bit pattern
0001110 on the output nodes. The first two zeros correspond to outputs one and two, the 0111
(7 in hex) corresponds to output signals 3 through 6, and the last zero
is the value of output signal 7.
UEx6 STIM( 7, 1141 ) $G_DPWR $G_DGND 1 2 3 4 5 6 7 IO_STM
+ 0ns 0000 ; At time=0ns, all nodes are set to 0.
+ REPEAT 4 TIMES ; Repeats what’s in loop 4 times.
+ +1ns 0070 ; At time=1ns, nodes 1, 2, & 3 are set to 0,
; nodes 4, 5, & 6 are set to 1,
; and node 7 is set to 0.
+ +2ns 11F1; At time=2ns, all nodes are set to 1.
+ ENDREPEAT
316
Digital devices Stimulus devices
File stimulus
The file stimulus device, FSTIM, allows the digital stimuli to be obtained from a file. This is
often useful if the number of stimuli is very large, or if the inputs to one simulation come from
the output of another simulation (or even from another simulator). To make the discussion of
the FSTIM device more meaningful, the stimulus file format is discussed first.
Header format
[TIMESCALE=<value>]
<signame 1>...<signame n>...
OCT(<signame bit 3> ... <signame lsb>) ...
HEX(<signame bit 4> ... <signame lsb>) ...
The header consists of the list of signal names and an optional TIMESCALE value. The signal
names can be separated by commas, spaces, or tabs. The list can span several lines, but must
not include the + continuation character. The signal names listed correspond to the columns
of values in the order that they are listed. Up to 255 signals can be listed in the header,
however a maximum of 300 characters are allowed per line.
The OCT and HEX radix functions allows three or four signals to be grouped, respectively,
into a single octal or hexadecimal digit in the columns of values. Note that exactly three
signals must be included inside the parentheses in the OCT function, and that exactly four
signals must be included in the HEX function. Signal names listed without the radix functions
default to binary values.
The following example shows the use of the HEX radix function.
Clock Reset In1 In2
HEX(Addr7 Addr6 Addr5 Addr4) HEX(Addr3 Addr2 Addr1 Addr0)
ReadWrite
317
Digital devices Stimulus devices
In this example, there are four binary signals, followed by two occurrences of the HEX radix
function, followed by a single binary signal. In the list of transitions following the header,
there are seven values which correspond, in order, to the list of signals.
The optional TIMESCALE assignment is used to scale the time values in the transitions. The
TIMESCALE assignment must be on a separate line. If unspecified, TIMESCALE defaults
to 1.0. See <time> below for more information on the use of TIMESCALE.
Transition format
<time> <value>* Following the first blank line after the header, the simulator looks
for one or more lines containing transitions. Transitions consist of a time value, followed by
one or more values corresponding to the signal names in the header. The <time> and list of
<values> must be separated by at least one space or tab.
<time> Transition times are always stated in seconds. Times can be absolute, such as
45ns, 1.2e-8, or 10; or relative to the previous time. To specify relative time, prefix the time
using a +, such as +5ns or +1e-9.
Time values are always scaled by the value of TIMESCALE. This is useful if the time values
in the file are expressed as whole numbers, but the actual units are, for example, 10ns. An
example showing the use of TIMESCALE is given below.
<value>* Each value corresponds to a single binary signal (the default) or the entire
group of signals inside the OCT or HEX radix functions. The number of values listed must
equal the total number of binary signals and radix functions which are specified in the header.
Valid <values> are:
318
Digital devices Stimulus devices
When the <value> in a HEX or OCT column is a number, the simulator converts the number
to binary and assigns the appropriate logic value of each bit (either zero or one) to the signals
inside the radix function. The bits are assigned msb to lsb. When the <value> is X, Z, R, or F,
all signals in the radix function take on that value. Note that there can be no falling value in a
HEX column because F is used as a numeric value.
The following example shows the use of TIMESCALE and relative <time> values.
TIMESCALE=10ns ; must appear on separate line
Clock, Reset, In1, In2
HEX(Addr7 Addr6 Addr5 Addr4) HEX(Addr3 Addr2 Addr1 Addr0)
ReadWrite
0 0000 00 0
1 110R 4E 0 ; transition occurs at 10ns
2 0101 4E 1
+ 3 1111 4E 1 ; transition occurs at 50ns
7 011F C3 0 ; transition occurs at 70ns
8 11X0 C3 1
319
Digital devices Stimulus devices
<node>*
One or more node names which are output by the file stimulus. The number of nodes
specified must be the same as <# outputs>.
320
Digital devices Stimulus devices
Comments The first example references a file named dig1.stm. This file must have a signal named IN1.
The second example references dig2.stm. This file would have to have signals named AD3
through AD0. These are mapped, in order, to the nodes ADDR3 through ADDR0, which are
driven by this device.
In the third example, the FSTIM device references the file flipflop.stm.
The contents of flipflop.stm are shown below:
J K PRESET CLEAR CLOCK
0 0 0 010
10ns 0 0 111
.
.
.
In this example, the first two nodes, CLK and PRE, reference the signals named CLOCK and
PRESET in the stimulus file. The last two nodes, J and K, directly reference the signals
named J and K in the file, and therefore do not need to be listed in SIGNAMES. Note that the
order of the SIGNAMES on the FSTIM device does not need to match the order of the names
listed in the header of the stimulus file. It is not required that every signal in the file be
referenced by an FSTIM device. In the example above, the signal named CLEAR is not
referenced. One, several, or all signals in a stimulus file can be referenced by one or more
FSTIM devices.
321
Digital devices Input/output model
Input/output model
Each digital device in the circuit must reference an I/O model. The I/O model describes the
device’s loading and driving characteristics. It also contains the names of up to four AtoD and
DtoA subcircuits that the simulator calls to handle interface nodes.
I/O models are common to device families. For example, of the digital devices in the model
library, there are only four I/O Models for the entire 74LS family: IO_LS, for standard inputs
and outputs; IO_LS_OC, for standard inputs and open-collector outputs; IO_LS_ST, for
schmitt trigger inputs and standard outputs; and IO_LS_OC_ST, for schmitt trigger inputs and
open-collector outputs. This is in contrast to timing models, which are unique to each device
in the library.
322
Digital devices Input/output model
INLD and OUTLD are used in the calculation of loading capacitance, which factors into the
propagation delay. Refer to your PSpice user’s guide for more information.
DRVH and DRVL are used to determine the strength of the output. Refer to your PSpice user’s
guide for more information.
DRVZ, INR, and TSTOREMN are used to determine which nets should be simulated as charge
storage nets.
AtoD1 through AtoD4 and DtoA1 through DtoA4 are used to hold the names of interface
subcircuits. Note that INLD and AtoD1 through AtoD4 do not apply to stimulus generators
because they have no input nodes. Refer to your PSpice user’s guide for more information.
The switching times (TSWLHn and TSWHLn) are subtracted from a device’s propagation delay
on the outputs which connect to interface nodes. This compensates for the time it takes the
DtoA device to change its output voltage from its current level to that of the switching
threshold. By subtracting the switching time from the propagation delay, the analog signal
reaches the switching threshold at the correct time (that is, at the exact time of the digital
transition). The values for these model parameters should be obtained by measuring the time
it takes the analog output of the DtoA (using a nominal analog load attached) to change to the
switching threshold after its digital input changes. If the switching time is larger than the
propagation delay for an output, no warning is issued, and a delay of zero is used. Note that
the switching time parameters are not used when the output drives a digital node.
DIGPOWER specifies the name of the power supply subcircuit the simulator calls for when an
AtoD or DtoA interface is created. The default value is DIGIFPWR, which is the power supply
subcircuit used by the TTL and CMOS device libraries.
For more information on how to change the default power supplies, refer to your PSpice user’s
guide.
323
Digital devices Digital/analog interface devices
324
Digital devices Digital/analog interface devices
For more information on using the digital input device to simulate mixed analog/digital
systems refer to your PSpice user’s guide.
325
Digital devices Digital/analog interface devices
As shown below, the digital input device is modeled as a time varying resistor from
<low level node> to <interface node>, and another time varying resistor from
<high level node> to <interface node>. Each of these resistors has an optional fixed value
capacitor in parallel: CLO and CHI. When the state of the digital signal changes, the values
of the resistors change (exponentially) from their present values to the values specified for the
new state over the switching time specified by the new state. Normally the low and high level
nodes would be attached to voltage sources which would correspond to the highest and lowest
logic levels. (Using two resistors and two voltage levels, any voltage between the two levels
can be created at any impedance.
Digital Input Model
must be specified. Refer to your PSpice user’s guide for more information on digital I/O
models. The digital net must not be connected to any analog devices, otherwise the automatic
analog/digital interface process disconnects the digital input device from the digital net.
Digital simulation can send states named 0, 1, X, R, F, and Z to a digital input device. The
simulation stops if the digital simulation sends a state which is not modeled (does not have
SnNAME, SnTSW, SnRLO, and SnRHI specified) to a digital input device.
The initial state of a digital simulation driven digital input is controlled by the bias point
solution of the analog/digital system. It is sometimes necessary to override this solution (for
example, an oscillator which contains both analog and digital parts). The optional parameter
IS = <initial state name>
can be used to do this. The digital input remains in the initial state until the digital simulation
value changes from its TIME=0 value.
The model parameters FILE, FORMAT, and TIMESTEP are not used by digital simulation
driven digital input devices, and only the FILE parameter is used for VIEWsim A/D driven
digital inputs. For file driven digital inputs the FILE parameter defines the name of the file to
be read, and the FORMAT parameter defines the format of the data in that file. The
TIMESTEP parameter defines the conversion between the digital simulation’s integer timing
tick numbers and the simulation’s floating-point time values:
tick number · TIMESTEP = seconds
326
Digital devices Digital/analog interface devices
For a file driven or VIEWsim A/D driven digital input, the DGTLNET parameter must not be
specified, but the optional parameter
SIGNAME = <digital signal name>
is used to specify the name of the digital signal in the file (or the digital net name in VIEWsim
A/D). If no SIGNAME is given, then the portion of the device name after the leading N
identifies the name of the digital signal.
The parameter
IS=<initial state name>
can be used as described above to override the initial (TIME=0) values from the file.
The file name DGTLPSPC is used with VIEWsim A/D to tell the simulator to get digital state
values from the VIEWsim A/D interface, rather than a file.
Any number of digital input models can be specified, and both file driven and digital
simulation driven digital inputs can be used in the same circuit. Different digital input models
can reference the same file, or different files. If the models reference the same file, the file
must be specified in the same way, or unpredictable results occur. For example, if the default
drive is C:, then one model should not have FILE=C:TEST.DAT if another has
FILE=TEST.DAT.
For diagnostic purposes, the state of the digital input can be viewed in Probe by specifying
B(Nxxx). The value of B(Nxxx) is 0.0 if the current state is S0NAME, 1.0 if the current state
is S1NAME, and so on through 19.0. B(Nxxx) cannot be specified on a .PRINT, .PLOT, or
.PROBE line. (For digital simulation, the digital window of Probe provides a better way to
look at the state of the digital net connected to the digital input.)
327
Digital devices Digital/analog interface devices
328
Digital devices Digital/analog interface devices
The general form for a digital output device, and some of the model parameters, are different
for devices that drive a file (or VIEWsim A/D) and those that drive the digital simulation
feature. The digital simulation inserts digital output devices automatically when a digital
device’s input is connected to an analog component. The automatic insertion of digital output
devices is discussed in your PSpice user’s guide, and examples of the devices which are
inserted can be found in the dig_io.lib library file.
For more information on using the digital output device to simulate mixed
analog/digital systems, refer to your PSpice user’s guide.
As shown in Figure , the digital output device is modeled as a resistor and capacitor, of the
values specified in the model statement, connected between <interface node> and
<reference node>. At times which are integer multiples of TIMESTEP, the state of the device
node is determined and written to the specified file.
The process of converting the input node voltage to a logic state begins by first obtaining the
difference in voltage between the <interface node> and the <reference node>. The
DOUTPUT model defines a voltage range, form SxVLO to SxVHI, for each state. If the input
voltage is within the range defined for the current state, no state change occurs. Otherwise,
the simulator searches forward through the model, starting at the current state, to find the next
state whose voltage range contains the input voltage. This state then becomes the new state.
When the end of the list (S19) is reached, the simulator wraps around to S0 and continues.
329
Digital devices Digital/analog interface devices
If the entire model has been searched and no valid voltage range has been found, the simulator
generates a simulation warning message. Further if the O device is interfacing at the digital
simulator, and the SXNAME parameter has not been specified in the model, the simulator
uses the state whose voltage range is closed to the input voltage. Otherwise it uses SXNAME
as the new state.
This circular state searching mechanism allows hysteresis to be modeled directly. The
following model statement models the input thresholds of a 7400 series TTL Schmitt-trigger
input. Notice that the 0.8 volt overlap between the 0 state voltage range and the 1 state voltage
range.
.model D074_STd output (
+s0name=”0” s0vlo=1.5 s0vhi=1.7
+s1name=”1” s1vlo=0.9 s1vhi-7.0
+)
Starting from the 0 state, a positive-going voltage must cross 1.7 volts to get out of the 0
state’s voltage range. The next state which contains that voltage is 1. Once there, a
negative-going voltage must go below 0.9 volts to leave the 1 state’s range. Since no further
states are defined, the simulator wraps around back to state 0, which contains the new voltage
For a digital output driving digital simulation, the parameters
DGTLNET = <digital net name> <digital I/O model name>
must be specified. Refer to your PSpice user’s guide for more information on digital I/O
models. The digital net must not be connected to any analog devices, otherwise the automatic
analog/digital interface process disconnects the digital output device from the analog net.
For interfacing using digital simulation, the state names must be 0, 1, X, R, F, or Z (Z is
usually not used however, since high impedance is not a voltage level). Other state names
cause the simulator to stop if they occur; this includes the state ? that occurs if the voltage is
outside all the ranges specified.
The model parameters TIMESCALE, FILE, CHGONLY, and FORMAT are not used for
digital outputs which drive digital simulation, but the TIMESTEP is used. The TIMESTEP
value controls how accurately the analog simulator tries to determine the exact time at which
the node voltage crosses a threshold.
To be sure that the transition time is accurately determined, the analog simulator has to
evaluate the analog circuit at intervals no larger than TIMESTEP when a transition is about
to occur. The default value for TIMESTEP is 1ns, or 1/DIGFREQ (a
.OPTIONS (analysis options) option) if it is larger. In many circuits, this is a much greater
timing resolution than is required, and some analog simulation time can be saved by
increasing the TIMESTEP value.
For digital outputs which write files, or drive VIEWsim A/D, the parameter
SIGNAME = <digital signal name>
can be used to specify the name written to the file of the digital signal (or for VIEWsim A/D,
the name of the VIEWsim net). If SIGNAME is not specified, then the portion of the device
name after the leading O identifies the name of the digital signal.
For digital outputs which write files, the FILE parameter defines the name of the file to be
written, and the FORMAT parameter defines the format of the data written to that file.
The file name PSPCDGTL is used with VIEWsim A/D to tell the simulator to send the digital
state values to the VIEWsim A/D interface, rather than a file. For VIEWsim A/D, the
parameters FORMAT and CHGONLY are ignored.
330
Digital devices Digital/analog interface devices
The state of each device is written to the output file at times which are integer multiples of
TIMESTEP. The time that is written is the integer:
time = TIMESCALE·TIME/TIMESTEP
TIMESCALE defaults to 1, but if digital simulation is using a very small timestep compared
to the analog simulation timestep, it can speed up the simulation to increase the value of both
TIMESTEP and TIMESCALE. This is because the simulator must take timesteps no greater
than the digital TIMESTEP size when a digital output is about to change, in order to
accurately determine the exact time that the state changes. The value of TIMESTEP should
therefore be the time resolution required at the analog-digital interface. The value of
TIMESCALE is then used to adjust the output time to be in the same units as digital
simulation uses.
For example, if a digital simulation using a timestep of 100 ps is being run, but the circuit has
a clock rate of 1us, setting TIMESTEP to 0.1us should provide enough resolution. Setting
TIMESCALE to 1000 scales the output time to be in 100 ps units.
If CHGONLY = 1, only those timesteps in which a digital output state changes are written to
the file.
Any number of digital output models can be specified, and both file writing and digital
simulation driving digital outputs can be used in the same circuit. Different digital output
models can reference the same file, or different files. If the models reference the same file, the
file must be specified in the same way, or unpredictable results occur. For example, if the
default drive is C:, then one model should not have FILE=C:TEST.DAT if another has
FILE=TEST.DAT.
For diagnostic purposes, the state of the digital output can be viewed in Probe by specifying
B(Oxxx). The value of B(Oxxx) is 0.0 if the current state is S0NAME, 1.0 if the current state
is S1NAME, and so on through 19.0. B(Oxxx) cannot be specified on a .PRINT, .PLOT, or
.PROBE line. (For digital simulation, the digital window of Probe provides a better way to
look at the state of the digital net connected to the digital output.)
331
Digital devices Digital model libraries
332
Digital devices Digital model libraries
333
Digital devices Digital model libraries
This example creates a 14H4 PAL which is programmed by the JEDEC file myprog.jed.
334
Customizing device
equations
Introduction to device Specifying new internal device
equations structure
Device Equations extensions are implemented using a dynamic-link library, which means you
can share your models with other users by distributing just a DLL.
If you want to run PSpice on Windows 95 or NT with a Device Equations DLL developed by
someone else, then you do not need a compiler or a Device Equations license. Just copy the
DLL into the directory with your PSpice program file. For more information, see Simulating
with the Device Equations option.
336
Customizing device equations Making device model changes
Do not change the transistor structure (struct_m), except when changing the internal
device topology. It is included only to allow compiling of MOS.C.
The simulator needs to associate each entry in the model structure with a model parameter
name (and default value) in the .MODEL statement. You can accomplish this by using the
ASSOCIATE macro. Just below the model structure in M.H there is a list of all the parameters,
each in an ASSOCIATE macro. The occurrence of ASSOCIATE binds together the structure entry,
the parameter name, and the default value. The read-in section of the simulator uses this
information to parse the .MODEL statement.
337
Customizing device equations Making device model changes
When model parameters are listed, the first name found in the ASSOCIATE list
(searching downward) is the name which is echoed on the output.
Insert the new name first if it is the name to be printed.
Adding a parameter
Adding a parameter is probably the most common case. The parameter must be added to both
the model structure (e.g., struct M_) and the corresponding ASSOCIATE list. It is
recommended to follow the OrCAD naming convention (e.g., M_wd and M_vto), but it is not
required.
Model parameters are set forth as pairs of elements instead of simple floating point values.
This is to provide the use of expressions for model parameters. Because of this, when adding
a parameter (for example, M_new), the following line is required:
MXPR( M_new, Mx_new );
instead of
float M_new;
338
Customizing device equations Making device model changes
When the simulator is doing a read-in, model parameters are listed for each .MODEL statement
(unless NOMOD has been specified on the .OPTIONS statement). Normally, only those
parameters that have not been defaulted are listed. A parameter can be forced to be listed, even
if it has been defaulted, by preceding its name using an asterisk (*) in the ASSOCIATE macro.
For instance, VTO in M.H is listed in that manner.
The default value, OMITTED, is used by the simulator to force the calculation of a parameter’s
value during read-in. For instance, VTO is calculated from other values if it is not given a value.
These calculations are built into the read-in and are fixed. OrCAD recommends that
parameters that you add be given a normal default value and not be computed by using
OMITTED.
Once the parameter has been added, the model structure becomes one parameter longer, and
the read-in section of PSpice places a value in its entry. The parameter can now be used in the
device code (e.g., MOS.C).
339
Customizing device equations Making device model changes
Subsection Description
Initialization This consists of locating and binding the device instance and its
model, initializing any local variables, and obtaining appropriate
values for the device branch voltages. The branch voltages (e.g.,
vds, vgs) are set differently depending upon whether there are
user-specified initial conditions (using IC= or .IC), and on
whether the present Newton Raphson cycle has finished or not.
Computing new This is needed to monitor progress towards a Newton Raphson
nonlinear branch solution.
voltage:
Test if the solution has If there is not significant change bypass the rest of the
changed: computation. Otherwise, continue.
Limit any nonlinear This code uses the macro PNJLIM() to insure that the branch
branch voltages: voltages are in the appropriate operating region.
Compute currents and This is the meat of the Device Equations code, and involves
conductances: obtaining all the branch currents (e.g., ibs, ibd) as well as all the
derivatives to be used in the conductance matrix.
Charge calculations: Internal charges are calculated and updated.
Check convergence: Check to see if the nonlinear device branches now have values
that are within a small tolerance range of those obtained in the last
repeat cycle, and set a return flag to signal whether the device
converged.
Load the current vector The macro Y_MATRIX () is used to obtain handles to the proper
and conductance matrix elements, and the elements are assigned their values based
matrix: on the present evaluation of the device equations and derivatives.
340
Customizing device equations Making device model changes
which are then used in MOS.C. This may seem like a roundabout way of constructing the state
vector information, but the actual usage (in MOS.C) is quite straightforward and is similar to
that in SPICE.
341
Customizing device equations Making device model changes
Example
This process can be illustrated by looking at the PSpice JFET and GaAsFET devices, as
shown below. The topologies of these two devices are nearly identical, except that the
GaAsFET has an additional internal capacitance, CDS, between the source and drain, and an
additional internal resistance, RG, at the gate. This gives the GaAsFET topology one
additional node where RG joins the rest of the structure and two additional internal branches.
Drain Drain
Cgd RD RD
Cgd
RG
Gate Id CDS
Gate Id
Cgs
RS
Cgs
RS
Source
Source
342
Customizing device equations Making device model changes
Procedure
Step one: editing the device header file
These differences are reflected in the device structure definitions in J.H and B.H. Each of the
device nodes is given a name and declared to be of type CKT_IDX.
The JFET device structure, j_, lists the two internal nodes j_d and j_s, while the GaAsFET
device structure, b_, has three internal nodes b_d, b_s, and a new one, b_g. The two additional
branches in the GaAsFET require three new matrix conductance terms.
The conductance terms are declared type MTX_IDX and are listed immediately following the
internal nodes.
The JFET has a term j_GG, which appears on the matrix diagonal for the external gate node.
The GaAsFET has an additional gate node which requires one additional matrix diagonal
conductance term, b_gg, along with two off-diagonal conductance terms, b_Gg and b_gG.
These are used by the source code in GASFET.C to designate where the conductance terms
associated with RG go when the matrix is loaded. CDS doesn’t need any additional nodes or
matrix terms because the items required are already in place to accommodate the parallel
current source, id.
With the nodes and conductance terms taken care of in the device header file, the first step is
completed.
Step two: setting up memory allocation for the new matrix elements
You can set up memory allocation to properly incorporate the new equations into the
conductance matrix by modifying DEMATPTR.C. In this file are the functions j_MatPtr() and
b_MatPtr(). These functions call the function Reserve() once for each conductance matrix
term that was declared in the header file. For instance, when b_gg, b_Gg, and b_gG are added
for the GaAsFET, these require corresponding code in b_MatPtr() as follows:
flag &= Reserve (ng,ng);
flag &= Reserve (nG,ng);
flag &= Reserve (ng,nG);
The arguments ng and nG are local variables that serve as aliases for the respective device
nodes, b_g and b_G, and are assigned at the beginning of b_MatPtr() as follows:
ng = bloc -> b_g;
nG = bloc -> b_G;
343
Customizing device equations Making device model changes
INTERNAL_NODE() is a macro that performs the required logic, depending on whether the
model parameter B_rg is zero or not. The other two calls to this macro in
b_AddInternalNodes() correspond to the RD and RS resistances that also exist for the JFET.
344
Customizing device equations Recompiling and linking the Device Equations option
345
Customizing device equations Simulating with the Device Equations option
If your PSpice license has the Device Equations option, PSpice will locate and load
deveq.dll when you start the program. The code in the DLL will be substituted for the device
model code that ships with the plain version of PSpice. The title bar will indicate that PSpice
is using the DLL by showing the program name as PSpice/DE. The presence of the DLL is
also noted in the About box and in the .out file.
If PSpice doesn’t find the DLL, it runs as the normally configured PSpice.
3 Save pspice.ini.
4 Start PSpice and run a simulation.
346
Glossary
348
Glossary
invocation To start a software program by invoking an initial power from a higher power
invoke To call or activate; used in reference to commands and subroutines.
ionization knee A bend in the response curve where ionization starts.
IS temperature The temperature of the JFET and other transistor types junction saturation
current or the input leakage current
iteration A repeating series of arithmetic operations to arrive at a solution.
Jiles-Atherton model A state equation model rather than an explicit function for an inductor
junction A junction graphically indicates that wires, buses, and/or pins are electrically
connected.
keyword The significant word in a syntax statement that directs the process of the
operation.
labels Is a word or symbol used to identify a file or other element defined in a
computer program.
LIBPATH A variable that specifies the directory that the model library is in, and is first
set in the msim.ini file.
link A branch instruction, or an address in such an instruction, used to leave a
subroutine to return to some point in the main program.
lot tolerance The tolerance of a group of items taken as one unit.
lsb least significant bit
metafile A file that contains or defines other files.
mobility movement of electrons in semiconductor devices such as MOSFETs
model library consists of analog models of off-the-shelf parts that can be used directly in
circuits that are being developed
mouse A common pointing device used in a windows environment. The physical
movement of the mouse will move the pointer (cursor) on the screen.
msb most significant bit
msim.ini The MicroSim configuration file that has the default elements that are used to
complete a simulation.
nesting The embedding of one construct (such as a table in a database; a data
structure, a control structure) inside another—for example, a nested procedure
is a procedure declared within a procedure.
NETLIST The netlist provides the circuit definition and connectivity information in
simulation netlist format.
NODESET A nodeset symbol contains one or two pins, permitting you to initialize a node
voltage for simulation.
NOREUSE flag A piece of information that tells the simulator that the automatic saving and
restoring of bias point information between different temperatures, Monte
Carlo runs, worst-case runs, or parametric analyses is suppressed. It is one of
the options in the .OPTIONS (analysis options) command.
349
Glossary
NOSUBCKT A variable that tells the simulator not to save the node voltages and inductor
currents for subcircuits.
NUMDGT An option that tells the simulator the number of digits that will be printed for
the analog values. It is one of the options in the
.OPTIONS (analysis options) command.
object A variable comprising both routines and data that is treated as a discrete
entity, in object-oriented programing.
operator A symbol (mathematical, as an example) or other character indicating an
operation that acts on one or more elements.
OUTPUT ALL An option that asks for an output from the sensitivity runs, after the nominal
(first) run. The output from any run is governed by the .PRINT (print),
.PLOT (plot), and .PROBE (Probe) command in the file. If OUTPUT ALL
is omitted, then only the nominal and worst-case runs produce output.
OUTPUT ALL ensures that all sensitivity information is saved for Probe.
package A package is an enclosure for an electronic device or subsystem. A physical
device consisting of one or more gates.
page A page may contain both parts (represented by symbols), port instances,
connectors, and annotation symbols. A page may or may not have a title. Each
schematic page represents a single page of a circuit design.
parameter A value that is given to a variable for programing.
part A part is an electrical component that is represented by a schematic symbol.
The term refers to the logical, rather than the physical, component.
part definition See symbol.
part instance A part instance refers to an occurrence of a symbol in a schematic.
pin Pins are contained in parts, ports, and offpage connectors. Parts can contain
multiple pins. Each part contains specific pin names associated with the part.
Pins may connect to a wire, a bus, or another pin.
pin current The current that flows into or out-of a defined pin.
POLY Specifies the number of dimensions of the polynomial.
port A port provides connectivity across schematic pages. A port provides the
anchor for a single pin. Ports are chosen from library files, placed, moved, and
deleted in the same way as are parts. Ports may have multiple connections.
Ports consist of three types: global, interface, and offpage.
run The execution of a computer routine or operation.
SCBE substrate current induced body effect (MOSFET device)
schematic A schematic consists of the following components: one or more pages, a set of
symbols representing local part definitions or parts in a library file, and/or
text.
setpoint A setpoint provides a graphical way of introducing
.IC (initial bias point condition) or .NODESET (set approximate node
voltage for bias point) commands for each instance of a symbol. These
commands set one or more node voltages for the bias point calculation.
350
Glossary
SIMLIBPATH A variable that defines the environment that the simulator is working in (path
to the directory that the library is in).
simulation The use of a mathematical model to represent a physical device or process.
skipbp (skip bias point)
statement The smallest executable entity within a programming language. In general,
each line of a program is an individual statement and is considered an
individual instruction. (Examples: command statements, option statements,
control statements, assignment statements, comment statements.)
Statz model A GaAsFET model
subcircuit A small collection of components working together to perform a task.
symbol A symbol consists of the graphical representation of a logical or physical
electronic part on the schematic page, and its definition. Symbols can be
created either for a specific schematic or extracted from a library file, and may
contain schematic pages nested within them.
syntax The grammar of a particular computer language, with rules that govern the
structure and content of the statement.
TEXTINT A function which returns a text string which is the integer value closest to the
value of the <value or expression>; (<value or expression> is a floating-point
value)
tick number The number generated from a regular recurring signal emitted by a clocking
circuit, or from the interrupt generated by this signal.
TOM model a GaAsFET device
VARY BOTH The default option is VARY BOTH. When VARY BOTH is used, sensitivity
to parameters using both DEV and LOT specifications is checked only with
respect to LOT variations. The parameter is then maximized or minimized
using both DEV and LOT tolerances for the worst-case. All devices
referencing the model have the same parameter values for the worst-case
simulation.
VARY DEV See VARY BOTH
VARY LOT See VARY BOTH
VTO temperature The temperature of the JFET or MOSFET device when there is zero-bias
threshold (pinchoff) voltage.
window An area on the screen in a graphical computer interface that contains
instructional documentation or a message.
351
Glossary
352
Index
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
354
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
355
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
356
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
.ENDS, 84 frequency
environment variables expression, 136
LIBPATH, 45 modulation, 143
equation response, AC analysis, 32
changing, 339 FSTIM, 86, 88, 317, 319, 348
ERRORLIMIT, 308 .FUNC, 42
examples function definition, 42
CONSTRAINT primitive, 309 functions
EXPAND (.OPTIONS), 46, 59 absolute value (ABS), xix
exponential (EXP), xix arc tangent (ATAN and ARCTAN), xix
exponential temperature coefficient (TCE), 217 arccosine (ACOS), xix
expressions, xx, 42 arctangent (ARCTAN), xix
conventions, xviii arsine (ASIN), xix
numeric conventions, xix ATAN2, xix
text, 88 cosine (COS), xix
.EXTERNAL, 40 cosine hyperbolic, xix
external port specifications, 40 differential (Ddt), xix
exponential (EXP), xix
hyperbolic tangent (TANH), xx
F IF, xix
FALSE, 306 imaginary (IMG), xix
ferromagnetic, 169 integral (Sdt), xx
Ferroxcube, 162 limit (LIMIT), xix
FET, 51 log base 10 (LOG10), xix
file, xxvi, 317 log base E (LOG), xix
data, xxvi MAX, xix
header, 317 MIN, xix
input, xxv phase (P), xix
output, xxvi power (PWR), xx, xxi
stimulus, 317 real (R), xx
transitions, 317 signed power (PWRS), xx
files signum (SGN), xx
log, xxiii, xxvi sine (SIN), xx
stimulus, 93 square root (SQRT), xx
filter shift, 80 step (STP), xx
final time value, 90, 142 table (TABLE), xx
flicker noise, 126, 135, 159, 202, 214, 348 tangent (TAN), xx
flip-flops and latches, 248, 264
initialize, 264
timing constraints, 264 G
X-level handling, 264 GaAs MESFET, 51
flush interval, xxvi GaAsFET, 105, 108, 110, 113, 343
FORMAT, 326 device model, 51
format array, 316 illustration, 342
.FOUR, 41 Level 1 parameters, 113
Fourier analysis, 30, 41, 90, 348 Level 2 parameters, 113
FREQ (constraint check), 307 Level 3 parameters, 115
357
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
359
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
360
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
361
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
362
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
363
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
364
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
365
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
366
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
X
X devices, 84
XOR, 256
XOR3, 259
Z
zero impedance voltage source, DAC, 289
367