Hspice Simulation Manual
Hspice Simulation Manual
Hspice Simulation Manual
Comments?
E-mail your comments about Synopsys
documentation to doc@synopsys.com
i
Copyright Notice and Proprietary Information
Copyright 2003 Synopsys, Inc. All rights reserved. This software and documentation contain confidential
and proprietary information that is the property of Synopsys, Inc. The software and documentation are furnished
under a license agreement and may be used or copied only in accordance with the terms of the license
agreement. No part of the software and documentation may be reproduced, transmitted, or translated, in any
form or by any means, electronic, mechanical, manual, optical, or otherwise, without prior written permission of
Synopsys, Inc., or as expressly provided by the license agreement.
Right to Copy Documentation
The license agreement with Synopsys permits licensee to make copies of the documentation for its
internal use only. Each copy shall include all copyrights, trademarks, service marks, and proprietary
rights notices, if any. Licensee must assign sequential numbers to all copies. These copies shall
contain the following legend on the cover page:
“This document is duplicated with the permission of Synopsys, Inc., for the exclusive
use of __________________________________________ and its employees. This is
copy number __________.”
SystemC™ is a trademark of the Open SystemC Initiative and is used under license.
All other product or company names may be trademarks of their respective owners.
iii
Comments?
E-mail your comments about Synopsys
documentation to doc@synopsys.com
iv
Table of Contents
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Menu Text, File Names, and Examples . . . . . . . . . . . . . . . . . . . . xxv
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Accessing SolvNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Contacting the Synopsys Technical Support Center . . . . . . . . . . xxvii
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
v
Simulation Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Simulation Process Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
vi
Element and Node Naming Conventions . . . . . . . . . . . . . . . . . . 3-17
.GLOBAL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
.TEMP Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
.DATA Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
.INCLUDE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
.MODEL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
.LIB Call and Definition Statements . . . . . . . . . . . . . . . . . . . . . . 3-35
.OPTION SEARCH Statement . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39
.PARAM Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-41
.PROTECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43
.UNPROTECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44
.ALTER Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44
.ALIAS Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48
.MALIAS Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-50
.CONNECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-51
.DEL LIB Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-52
.END Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55
Condition-Controlled Netlists (IF-ELSE) . . . . . . . . . . . . . . . . . . . 3-56
vii
Using Standard Input Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-65
Design and File Naming Conventions . . . . . . . . . . . . . . . . . . . . . 3-65
Configuration File (meta.cfg) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-66
Initialization File (hspice.ini) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-67
DC Operating Point Initial Conditions File (<design>.ic#) . . . . . . 3-67
Starting HSPICE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-67
Executing a Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-70
Interactive Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-72
Sample HSPICE Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-73
4. Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
viii
Active Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
Diode Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
Bipolar Junction Transistor (BJT) Element . . . . . . . . . . . . . . . . . 4-20
JFETs and MESFETs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23
MOSFETs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
Transmission Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Input Syntax for the W Element . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
W Element Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29
T Element Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34
U Element Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36
Frequency-Dependent Multi-Terminal (S) Element . . . . . . . . . . . 4-37
Frequency Table Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42
Group Delay Handler in Time Domain Analysis . . . . . . . . . . . . . 4-42
Pre-Conditioning S Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 4-43
Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44
ix
Independent Source Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Pulse Source Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Sinusoidal Source Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
Exponential Source Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Piecewise Linear (PWL) Source Function . . . . . . . . . . . . . . . . . 5-17
Data-Driven Piecewise Linear Source . . . . . . . . . . . . . . . . . . . . 5-20
Single-Frequency FM Source Function . . . . . . . . . . . . . . . . . . . 5-22
Amplitude Modulation Source Function . . . . . . . . . . . . . . . . . . . 5-23
x
Voltage-Controlled Resistor (VCR) . . . . . . . . . . . . . . . . . . . . . . . 5-51
Voltage-Controlled Capacitor (VCCAP) . . . . . . . . . . . . . . . . . . . 5-52
G Element Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-53
G Element Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-55
xi
6. Parameters and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
xii
Displaying Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
.PRINT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
.PLOT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8
.PROBE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10
.GRAPH Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11
Using Wildcards in PRINT, PROBE, PLOT, and GRAPH Statements
7-14
Print Control Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16
Printing the Subcircuit Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-21
xiii
Reusing Simulation Output as Input Stimuli . . . . . . . . . . . . . . . . . . . 7-62
Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-66
Element Template Listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-67
xiv
.DC Statement—DC Sweeps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13
Keywords and Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15
Schmitt Trigger Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
xv
Using the .TRAN Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
.TRAN Keywords and Parameters . . . . . . . . . . . . . . . . . . . . . . . 10-5
.TRAN Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-7
.TRAN Output Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8
xvi
11. AC Sweep and Small Signal Analysis . . . . . . . . . . . . . . . . . . . . . . . 11-1
xvii
Monte Carlo Parameter Distribution . . . . . . . . . . . . . . . . . . . . . 12-17
Monte Carlo Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
Worst Case and Monte Carlo Sweep Example . . . . . . . . . . . . . . . 12-26
HSPICE Input File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-26
Transient Sigma Sweep Results . . . . . . . . . . . . . . . . . . . . . . . . 12-28
Monte Carlo Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-30
Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-35
Optimization Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-37
Simulation Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-37
Curve Fit Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-38
Goal Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-38
Timing Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-39
Optimization Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-40
xviii
Two-Bit Adder Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
One-Bit Subcircuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
MOS Two-Bit Adder Input File . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4
xix
xx
Preface FIX ME!
• Conventions
• Customer Support
New Features
See the Release Notes for information about new features and last-
minute changes.
xxi
Known Limitations and Resolved D/Es
Information about known problems and limitations, as well as about
resolved Defects and Enhancements (D/Es), is available in the
HSPICE Release Notes in SolvNet. 2003.03 is the last release of
HSPICE that uses the D/E terminology and numbering system; in
future releases, these defects and enhancements will be referred to
as Synopsys Technical Action Requests (STARs).
Improved Documentation
To improve its usefulness, HSPICE documentation has been
divided from the two thick manuals used in previous releases,
into five smaller manuals in the 2003.03 release. A table in the
HSPICE Release Notes maps the location of information from
the old manuals, to the equivalent location in the new manual set.
Conventions
This manual uses the following conventions.
Commands
SYNTAX:
command_name [argument(s)]
Preface: Audience
xxiii
Symbol Definition
| A pipe symbol ( | ) represents the word “or” and separates
choices between two or more arguments.
... An ellipsis (...) indicates that more than one argument can
be specified. Ellipses are used only for multiple arguments
with tags.
[] Open and closed square brackets indicate that the
enclosed argument is optional.
() Open and closed parenthesis indicate that there is a
choice between the enclosed arguments (two or more).
These are used only when a command has several groups
of argument choices; multiple pipe symbols ( | ), in this
case, would result in an ambiguous syntax.
SYNTAX:
report_node_i a[vg] | r[ms] | p[eak] | h[ist] node_name(s)
For this command, a[vg], r[ms], p[eak], and h[ist] are keywords–
choose one of these. The node_name(s) are user-determined.
EXAMPLE:
report_node_i a VDD GND
In this example, a is a keyword, and VDD and GND are values.
SYNTAX:
report_node_ic [a[ll]] [q[uoted]] [for=epic | spice] [time(s)]
For this command, a[ll] and q[uoted] are optional keywords. The tag
for= is part of an optional argument for which you can choose the
epic or spice keyword. The time(s) are user-determined and, in this
case, optional.
Preface: Conventions
xxiv
EXAMPLE:
report_node_ic all for=spice 1u
In this example, all is a keyword, for= is a tag, spice is a
keyword, and 1u is a value.
EXAMPLE 1:
To start setting up a run, select File > Design Data Setup.
File names are shown in the same font as the surrounding text, but
in italics.
EXAMPLE 2:
This is an example of a file_name.out being shown in text.
EXAMPLE 3:
add_node_cap RS100 275
In the example, the capacitance value of node RS100 is increased
by 275 femtofarads.
Preface: Conventions
xxv
Customer Support
Customer support is available through SolvNet online customer
support and through contacting the Synopsys Technical Support
Center.
Accessing SolvNet
SolvNet includes an electronic knowledge base of technical articles
and answers to frequently asked questions about Synopsys tools.
SolvNet also gives you access to a wide range of Synopsys online
services including software downloads, documentation on the Web,
and “Enter a Call With the Support Center.”
To access SolvNet,
If you need help using SolvNet, click SolvNet Help in the column on
the left side of the SolvNet Web page.
• Open a call to your local support center from the Web by going to
http://solvnet.synopsys.com (Synopsys user name and
password required), then clicking “Enter a Call With the Support
Center.”
• Applications
• Features
• Supported Platforms
• Simulation Structure
1-1
Applications
HSPICE is unequalled for fast, accurate circuit and behavioral
simulation. They facilitate circuit-level analysis of performance and
yield, using Monte Carlo, worst case, parametric sweep, and data-
table sweep analysis, and employ the most reliable automatic-
convergence capability.
The size of the circuits that HSPICE can simulate, is limited only by
memory. As a 32-bit application, HSPICE can address a maximum
of 2Gb or 4Gb of memory, depending on your system.
Features
Figure 1-1 Synopsys HSPICE Design Features
Overview: Applications
1-2
Synopsys HSPICE is compatible with most SPICE variations, and
has the following additional features:
• Superior convergence.
• Accurate modeling, including many foundry models.
• Hierarchical node naming and reference.
• Circuit optimization for models and cells, with incremental or
simultaneous multiparameter optimizations in AC, DC, and
transient simulations.
• Interpreted Monte Carlo and worst-case design support.
• Input, output, and behavioral algebraics for cells with
parameters.
• Cell characterization tools, to calibrate models for high-level logic
simulators.
• Geometric lossy-coupled transmission lines for PCB, multi-chip,
package, and IC technologies.
• Discrete component, pin, package, and vendor IC libraries.
• AvanWaves interactively graphs and analyzes multiple
simulation waveforms.
• If you suspend a simulation job, LSF license manager sends a
signal to that job, and HSPICE releases the occupied license.
Another simulation job can use that license, or the stopped job
can reclaim the license and continue from where you stopped it.
You can also submit simulation jobs with priority into the LSG
queue; LSF automatically suspends low-priority simulation jobs,
to run high-priority simulation jobs. When a high-priority job
completes, LSF automatically releases the license back to the
lower-priority job, which resumes from the point where LSF
suspended it.
Overview: Features
1-3
Figure 1-2 Synopsys HSPICE Circuit Analysis Types
Operating
Parametric Point
Monte Carlo Pole-Zero
BJT MOS
Common
Model
Lossy Device Models Interface
Transmission SOI
Lines
IBIS
JFET/
Mixed Signal Diode GaAsFET
Tunnel
Diode
Overview: Features
1-4
Simulation at the integrated circuit level, and at the system level,
requires careful planning of the organization and interaction between
transistor models and subcircuits. Methods that worked for small
circuits might have too many limitations when applied to higher-level
simulations.
Overview: Features
1-5
Supported Platforms
Table 1-1 HSPICE Supported Platforms
Platform Operating System
Sun Ultra Solaris 2.5.1, 2.7, and 2.8
Sun Blade Solaris 2.8
HP PA UX 10.20, UX 11.00
IBM RS6000 AIX 4.3 (4.3.3)
DEC Alpha OSF 4.0
PC Windows ME, 2000, NT 4.0, XP-Home, XP-Professional.
Linux RedHat 6.2, 7.0, 7.1, and 7.2 (Does not support MOSFET level 29 or 45).
Note: HSPICE supports a single AMD CPU for WinNT4.0, and RedHat 7.2. HSPICE is a 32-bit
executable.
Simulation Structure
Figure 1-4 Simulation Program Structure
Simulation Experiment
Transient DC AC
Options
<design>.tr#
hspice.ini (graph data
(initialization file) output file)
HSPICE
or
HSPICE Other output files:
<design>.sp
XT/RF <design>.lis
(netlist input file) (simulation) <design>.mt#
<design>.sw#
<design>.ms#
<design>.ac#
Models and <design>.ma#
device libraries <design>.gr#
<design>.pa#
<design>.st#
command.inc <design>.ft#
(command include <design>.a2d
file – optional)
Printer or Graphics
plotter hardcopy file
• Netlist Overview
2-1
Setting Environment Variables
HSPICE requires you to set the LM_LICENSE_FILE environment
variable. This variable specifies the full path to the license.dat
license file. Set the LM_LICENSE_FILE environment variable to
point to the HSPICE license file.
EXAMPLE:
If your HSPICE license file is in /usr/cad/hspice/license.dat path,
then enter:
Using Wildcards
You can use wildcards to match node names. For more information
about using wildcards in a configuration file, see Using Wildcards on
page 2-2.
• .PROBE
EXAMPLE:
.PRINT TRAN V(9?t*u)
This example prints out the results of a transient analysis, for the
voltage at the matched node name.
SYNTAX:
.PROBE wildcard_expression
[] Matches any character that appears within the brackets. For example,
[123] matches 1, 2, or 3.
A hyphen, inside the brackets, indicates a character range. For example,
[0-9] is the same as [0123456789], and matches any digit character.
Examples
The following examples use wildcards with .PRINT and .PROBE
statements. You must create an .admrc file to use these wildcards.
• Probe all top-level nodes.
.PROBE v(*)
• Probe all top-level nodes whose names start with a. For example:
a1, a2, a3, a00, ayz.
.PROBE v(a*)
• Match all first-level nodes with names that are exactly two
characters long. For example: x1.in, x4.12.
.PROBE v(x*.? ?)
Netlist Overview
The circuit description syntax, for HSPICE, is compatible with the
SPICE input netlist format.
Basic Structure
Figure 2-1 on page 2-5 shows the basic structure of an input netlist.
c, C, d, D, e, E, f, F, g, G, h, H, i, I, Element instantiation
k, K, l, L, m, M, q, Q, r, R, v, V
* Comment line
The first line of a netlist is a comment, no matter what letter starts the
line. The first line of an included file is a normal line, not a comment.
EXAMPLE:
The . character at the start of the line below, indicates that .TRAN is
a keyword:
.TRAN 0.5ns 20ns
D Diode D7 3 9 D1
V Voltage source V1 8 0 5
EXAMPLE:
.ABC Title Line (HSPICE ignores the
* netlist keyword on this line, because the first line
* is always a comment)
* This line is a comment
.MODEL n1 NMOS $this is an example of an inline comment
* The following line is a continuation
+ LEVEL = 3
EXAMPLE:
In Figure 2-2, the top-level (main) circuit is named ckt_xyz. This
circuit contains three subcircuits: subckt1, subckt2, and subckt3.
The subckt3 subcircuit contains another subcircuit, named subcktA.
To reference the node2 node, specify the path as follows:
subckt3.subcktA.node2
Reserved Keywords
Do not use any of these keywords as parameter names or node
names in your netlist.
EXAMPLE:
TIME
T tera 1e+12
G giga 1e+9
K kilo 1e+3
M milli 1e-3
U micro 1e-6
N nano 1e-9
P pico 1e-12
F femto 1e-15
A atto 1e-18
3-1
Using Netlist Input Files
This section describes how to use standard netlist input files.
Names
• Names must begin with an alphabetic character, but thereafter
can contain numbers and the following characters:
! # $ % * + - / < > [ ] _
Delimiters
• An input token is any item in the input file that HSPICE
recognizes. Input token delimiters are: tab, blank, comma, equal
sign (=), and parentheses ( ).
• Single or double quotes delimit expressions and filenames.
• Colons delimit element attributes (for example, M1:VGS).
• Periods indicate hierarchy. For example, X1.X2.n1 is the n1 node
on the X2 subcircuit of the X1 circuit.
Nodes
• Node identifiers can be up to 1024 characters long, including
periods and extensions.
• Numerical node names are valid in the range of 0 through
9999999999999999 (1-1E16).
• HSPICE ignores leading zeros in node numbers.
• HSPICE ignores trailing characters in node numbers. For
example, node 1A is the same as node 1. Exception: HSPICE
recognizes the following special alphabetic trailing characters (a,
d, e, f, g, i, k, m, n, o, p, t, u, x).
• A node name can begin with any of these characters: # _ ! %.
• To make nodes global across all subcircuits, use a .GLOBAL
statement.
• The 0, GND, GND!, and GROUND node names all refer to the
global HSPICE ground. Simulation treats nodes with any of these
names as a ground node, and produces v(0) into the output files.
Hierarchy Paths
• A period indicates path hierarchy.
• Paths can be up to 1024 characters long.
• Path numbers compress the hierarchy, for post-processing and
listing files.
• You can find path number cross references in the listing and in
the <design>.pa0 file.
• .OPTION PATHNUM controls whether the list files show full path
names or path numbers.
Numbers
• You can enter numbers as integer or real.
• Numbers can use exponential format or engineering key letter
format, but not both (1e-12 or 1p, but not 1e-6u).
• To designate exponents, use D or E.
• .OPTION EXPMAX limits the exponent size.
• HSPICE interprets trailing alphabetic characters as units
comments.
• HSPICE does not check units comments.
Schematic Netlists
HSPICE typically uses netlisters to generate circuits from
schematics, and accept either hierarchical or flat netlists. The normal
SPICE netlisters flatten all subcircuits, and rename all nodes to
numbers. Avoid flat netlisters if possible.
The process of creating a schematic involves:
• Symbol creation with a symbol editor.
• Circuit encapsulation.
• Property creation.
• Symbol placement.
• Symbol property definition.
• Wire routing and definition.
.LIB 3 Library.
As shown in the first syntax below, to set the title, you can place
a .TITLE statement on the first line of the netlist. However, HSPICE
does not require the .TITLE syntax.
In the second form shown, the string is the first line of the input file.
The first line of the input file is always the implicit title. If any
statement appears as the first line in a file, simulation interprets it as
a title, and does not execute it.
or
<string_of_up_to_72_characters>
Comments
An asterisk (*) as the first non-blank character, or an inline dollar sign
($) that is not the first character on the line, indicates a comment
statement.
SYNTAX:
* <comment_on_a_line_by_itself>
or
<HSPICE_statement> $ <comment_following_HSPICE_input>
EXAMPLE:
*RF = 1K GAIN SHOULD BE 100
$ MAY THE FORCE BE WITH MY CIRCUIT
VIN 1 0 PL 0 0 5V 5NS $ 10v 50ns
R12 1 0 1MEG $ FEED BACK
or
elname <node1 node2 ... nodeN> <mname>
+ <pname = ’expression’> <M = val>
or
elname <node1 node2 ... nodeN> <mname>
+ <val1 val2 ... valn>
elname Element name that cannot exceed 1023 characters, and must begin with a
specific letter for each element type:
B IBIS buffer
C Capacitor
D Diode
E,F,G,H Dependent current and voltage sources
I Current (inductance) source
J JFET or MESFET
K Mutual inductor
L Inductor model or magnetic core mutual inductor model
M MOSFET
Q BJT
R Resistor
S, T,U,W Transmission line
V Voltage source
X Subcircuit call
node1 ... Node names identify the nodes that connect to the element. Node names
must begin with a letter, followed by up to 1023 additional alphanumeric
characters. You cannot use the following characters in node names: = ( ),’
<space>
mname HSPICE requires a model reference name for all elements, except passive
devices.
pname1 ... An element parameter name identifies the parameter value that follows this
name.
val1 ... Value of the pname1 parameter, or to the corresponding model node. The
value can be a number or an algebraic expression.
M = val Element multiplier. Replicates the val element times, in parallel. Do not
assign a negative value or zero as the M value.
EXAMPLE 2:
M1 ADDR SIG1 GND SBS N1 w1+w l1+l
SYNTAX:
.SUBCKT subnam n1 < n2 n3 …> < parnam = val …>
.ENDS
or
n1 … Node numbers for external reference; cannot be the ground node (zero). Any
element nodes that are in the subcircuit, but are not in this list, are strictly local,
with three exceptions:
1. Ground node (zero).
2. Nodes assigned using BULK = node in MOSFET or BJT models.
3. Nodes assigned using the .GLOBAL statement.
parnam A parameter name set to a value. Use only in the subcircuit. To override this
value, assign it in the subcircuit call, or set a value in a .PARAM statement.
EXAMPLE:
*FILE SUB2.SP TEST OF SUBCIRCUITS
.OPTION LIST ACCT
V1 1 0 1
.PARAM P5 = 5 P2 = 10
.SUBCKT SUB1 1 2 P4 = 4
R1 1 0 P4
R2 2 0 P5
X1 1 2 SUB2 P6 = 7
X2 1 2 SUB2
.ENDS
The preceding example defines two subcircuits: SUB1 and SUB2. These
are resistor divider networks, whose resistance values are
parameters (variables). The X1, X2, and X3 statements call these
subcircuits. Because the resistor values are different in each call,
these three calls produce different subcircuits.
SYNTAX:
.ENDS <SUBNAM>
.EOM <SUBNAM>
EXAMPLE:
.ENDS OPAMP
.EOM MAC3
parnam A parameter name set to a value (val), for use only in the subcircuit. It overrides
a parameter value in the subcircuit definition, but is overridden by a value set in
a .PARAM statement.
M Multiplier. Makes the subcircuit appear as M subcircuits in parallel. You can use
this multiplier to characterize circuit loading. HSPICE does not need additional
calculation time, to evaluate multiple subcircuits. Do not assign a negative value
or zero as the M value.
EXAMPLE 1:
X1 2 4 17 31 MULTI WN = 100 LN = 5
EXAMPLE 2:
.SUBCKT YYY NODE1 NODE2 VCC = 5V
.IC NODEX = VCC
R1 NODE1 NODEX 1
R2 NODEX NODE2 1
.EOM
XYYY 5 6 YYY VCC = 3V
Node Names
Nodes are the points of connection between elements in the input
netlist file. You can use either names or numbers to designate nodes.
Node numbers can be from 1 to 999999999999999; node number 0
is always ground. HSPICE ignores letters that follow numbers in
node names. Node names must begin with a letter, followed by up to
1023 characters.
In addition to letters and digits, node names can include the following
characters:
Table 3-5 Node Name Legal Characters
Symbol Definition
+ plus sign
- minus sign or hyphen
* asterisk
/ slash
$ dollar sign
# pound sign
[] left and right square brackets
! exclamation mark
a-z, !, #, $, %, *, +, -, /
3 (X3) 4 (X4)
n (abc) is
circuit number (instance name)
In Figure 3-1 on page 3-20, the path name of the sig25 node in the
X4 subcircuit is X1.X4.sig25. You can use this path in HSPICE
statements, such as:
.PRINT v(X1.X4.sig25)
.GLOBAL Statement
The .GLOBAL statement globally assigns a node name, in HSPICE.
This means that all references to a global node name, used at any
level of the hierarchy in the circuit, connect to the same node.
The most common use of a .GLOBAL statement is if your netlist file
includes subcircuits. This statement assigns a common node name
to subcircuit nodes. Another common use of .GLOBAL statements is
to assign power supply connections of all subcircuits. For
example, .GLOBAL VCC connects all subcircuits with the internal
node name VCC.
SYNTAX:
.GLOBAL node1 node2 node3 ...
EXAMPLE:
This example shows global definitions for VDD and input_sig nodes.
.TEMP Statement
To specify the circuit temperature for a HSPICE simulation, use the
.TEMP statement, or the TEMP parameter in the .DC, .AC, and
.TRAN statements. HSPICE compares the circuit simulation
temperature against the reference temperature in the TNOM control
option. HSPICE uses the difference between the circuit simulation
temperature and the TNOM reference temperature to define
derating factors for component values. For information about
temperature analysis, see Temperature Analysis on page 12-6.
SYNTAX:
.TEMP t1 <t2 <t3 ...>>
The .TEMP statement sets the circuit temperatures for the entire
circuit simulation. To simulate the circuit, using individual elements
or model temperatures, HSPICE uses:
• Temperature, as set in the .TEMP statement.
• TNOM option setting (or the TREF model parameter).
• DTEMP element temperature.
EXAMPLE 2:
.TEMP 100
D1 N1 N2 DMOD DTEMP=30
D2 NA NC DMOD
R1 NP NN 100 TC1=1 DTEMP=-30
.MODEL DMOD D IS=1E-15 VJ=0.6 CJA=1.2E-13 CJP=1.3E-14
+ TREF=60.0
In this example:
.DATA Statement
In data-driven analysis, you can modify any number of parameters,
then use the new parameter values to perform an operating point,
DC, AC, or transient analysis. An array of parameter values can be
either inline (in the simulation input file) or stored as an external
ASCII file. The .DATA statement associates a list of parameter
names with corresponding values in the array.
HSPICE supports the full .DATA functionality.
• Data-driven analysis.
• Inline or external data files.
Data-driven analysis syntax requires a .DATA statement, and an
analysis statement that contains a DATA = dataname keyword.
You can use the .DATA statement to concatenate or column-
laminate data sets, to optimize measured I-V, C-V, transient, or
s-parameter data.
You can also use the .DATA statement for a first or second sweep
variable, when you characterize cells, and test worst-case corners.
Simulation reads data measured in a lab, such as transistor I-V data,
one transistor at a time, in an outer analysis loop. Within the outer
loop, the analysis reads data for each transistor (IDS curve, GDS
curve, and so on), one curve at a time, in an inner analysis loop.
SYNTAX:
Operating point:
.DC DATA = dataname
DC sweep:
.DC vin 1 5 .25 SWEEP DATA = dataname
AC sweep:
.AC dec 10 100 10meg SWEEP DATA = dataname
TRAN sweep:
.TRAN 1n 10n SWEEP DATA = dataname
For data-driven analysis, specify the start time (time 0) in the
analysis statement, so analysis correctly calculates the stop time.
SYNTAX:
.DATA datanm pnam1 <pnam2 pnam3 ... pnamxxx >
+ pval1<pval2 pval3 ... pvalxxx>
+ pval1’ <pval2’ pval3’ ... pvalxxx’>
.ENDDATA
datanm Specifies the data name, referenced in the .TRAN, .DC, or .AC statement.
pnami Specifies the parameter names used for source value, element value, device
size, model parameter value, and so on. You must declare these names in
a .PARAM statement.
EXAMPLE:
.TRAN 1n 100n SWEEP DATA= devinf
.AC DEC 101hz 10khz SWEEP DATA= devinf
.DC TEMP-55125 10 SWEEP DATA= devinf
.DATAdevinfwidth length thresh cap
+50u 30u 1.2v 1.2pf
+ 25u 15u 1.0v 0.8pf
+ 5u 2u 0.7v 0.6pf
+ .... ... ... ...
.ENDDATA
HSPICE then repeats the analyses for width = 25u, length = 15u,
thresh = 1.0v, and cap = 0.8pf, and again for the values on each
subsequent line in the .DATA block.
EXAMPLE:
The following is an example of .DATA as an outer sweep:
.PARAM W1 = 50u W2 = 50u L = 1u CAP = 0
.TRAN 1n 100n SWEEP DATA = d1
.DATA d1
W1 W2 L CAP
50u 40u 1.0u 1.2pf
25u 20u 0.8u 0.9pf
.ENDDATA
SYNTAX:
The following is the syntax for concatenated data files:
Concatenated data files are files with the same number of columns,
placed one after another. For example, if you concatenate the three
files (A, B, and C).
File AFile BFile C
a a ab b bc c c
a a ab b bc c c
a a a
The data appears as follows:
a a a
a a a
a a a
b b b
b b b
c c c
c c c
Note: The number of lines (rows) of data in each file does not need
to be the same. The simulator assumes that the associated
parameter of each column of the A file is the same as each
column of the other files.
EXAMPLE:
.DATA inputdata MER
FILE = ‘file1’ p1 = 1 p2 = 3 p3 = 4
FILE = ‘file2’ p1 = 1
FILE = ‘file3’
.ENDDATA
filenamei Name of a data file to read. HSPICE concatenates files in the order listed in
the .DATA statement. Specify up to 10 files.
pnami Parameter names used for source value, element value, device size, model
parameter value, and so on. Declare these names in a .PARAM statement.
colnum Column number in the data file, that contains the parameter value. The column
does not need to be the same between files.
fileouti Name of the data file, where HSPICE writes concatenated data. This file
contains the complete syntax for an inline .DATA statement, and can replace
the .DATA statement that created it. You can output the file, and generate one
data file from many.
Column lamination means that the columns of files with the same
number of rows, are arranged side-by-side.
EXAMPLE:
Three files (D, E, and F) contain the following columns of data:
d1 d2 d3e4 e5f6
d1 d2 d3e4 e5f6
d1 d2 d3e4 e5f6
The number of columns of data does not need to be the same in the
three files.
Note: The number of lines (rows) of data in each file does not need
to be the same. HSPICE interprets missing data points as
zero.
EXAMPLE:
.DATA dataname LAM
FILE = ‘file1’ p1 = 1 p2 = 2 p3 = 3
FILE = ‘file2’ p4 = 1 p5 = 2
OUT = ‘fileout’
.ENDDATA
.INCLUDE Statement
SYNTAX:
.INCLUDE ‘<filepath> filename’
filepath Path name of a file, for computer operating systems that support tree-
structured directories.
A .INC file can contain nested .INC calls to itself, or to another .INC file. If
you use a relative path in a nested .INC call, the path starts from the directory
of the parent .INC file, not from the work directory. If the path starts from the
work directory, HSPICE can also find the .INC file, but prints a warning.
filename Name of a file to include in the data file. The file path, plus the file name, can
be up to 1024 characters long. You can use any valid file name for the
computer’s operating system. You must enclose the file path and name in
single or double quotation marks.
.MODEL Statement
SYNTAX:
.MODEL mname type <VERSION = version_number>
+ <pname1 = val1 pname2 = val2 ...>
pname1 ... Parameter name. Assign a model parameter name (pname1) from the
parameter names for the appropriate model type. Each model section provides
default values. For legibility, enclose the parameter assignment list in
parentheses, and use either blanks or commas to separate each assignment.
Use a plus sign (+) to start a continuation line.
VERSION HSPICE version number. Allows portability of the BSIM (LEVEL=13) and BSIM2
(LEVEL = 39) models, between HSPICE releases. HSPICE release numbers,
and the corresponding version numbers, are:
HSPICE release Version number
9007B 9007.02
9007D 9007.04
92A 92.01
92B 92.02
93A 93.01
93A.02 93.02
95.3 95.3
96.1 96.1
EXAMPLE:
.MODEL MOD1 NPN BF=50 IS=1E-13 VBF=50 AREA=2 PJ=3,
+ N=1.05
SYNTAX:
.LIB ‘<filepath> filename’ entryname
filepath Path to a file. Used where a computer supports tree-structured directories. When
the LIB file (or alias) is in the same directory where you run HSPICE, you do not
need to specify a directory path; the netlist runs on any machine. Use the “../”
syntax in the filepath, to designate the parent directory of the current directory.
entryname Entry name, for the section of the library file to include. The first character of an
entryname cannot be an integer.
filename Name of a file to include in the data file. The combination of filepath plus filename
can be up to 256 characters long, structured as any filename that is valid for the
computer’s operating system. Enclose the file path and file name in single or
double quotation marks. Use the “../” syntax in the filename, to designate the
parent directory of the current directory.
EXAMPLE:
.LIB ’MODELS’ cmos1
SYNTAX:
.LIB entryname1
. $ ANY VALID SET OF HSPICE STATEMENTS
.ENDL entryname1
.LIB entryname2
.
. $ ANY VALID SET OF HSPICE STATEMENTS
.ENDL entryname2
.LIB entryname3
.
. $ ANY VALID SET OF HSPICE STATEMENTS
.ENDL entryname3
The text after a library file entry name must consist of HSPICE
statements.
EXAMPLE:
Below are an illegal example and a legal example for the file3 library.
Illegal:
.LIB MOS7
...
.LIB ’file3’ MOS7 $ This call is illegal in MOS7 library
...
...
.ENDL
Legal:
.LIB MOS7
...
.LIB ’file1’ MOS8
.LIB ’file2’ MOS9
.LIB CTT $ file2 is already open for the CTT entry point
.ENDL
You can nest library calls to any depth. Use nesting with the .ALTER
statement, to create a sequence of model runs. Each run can consist
of similar components, using different model parameters, without
duplicating the entire input file.
EXAMPLE:
.LIB TT
$TYPICAL P-CHANNEL AND N-CHANNEL CMOS LIBRARY
$ PROCESS: 1.0U CMOS, FAB7
$ following distributions are 3 sigma ABSOLUTE GAUSSIAN
.PARAM TOX = AGAUSS(200,20,3)$ 200 angstrom +/- 20a
+ XL = AGAUSS(0.1u,0.13u,3)$ polysilicon CD
+ DELVTON = AGAUSS(0.0,.2V,3)$ n-ch threshold change
+ DELVTOP = AGAUSS(0.0,.15V,3)$ p-ch threshold change
.INC ‘/usr/meta/lib/cmos1_mod.dat’$ model include file
.ENDL TT
.LIB FF
$HIGH GAIN P-CH AND N-CH CMOS LIBRARY 3SIGMA VALUES
.PARAM TOX = 220 XL = -0.03 DELVTON = -.2V
+ DELVTOP = -0.15V
.INC ‘/usr/meta/lib/cmos1_mod.dat’$ model include file
.ENDL FF
The model keyword (left side) equates to the skew parameter (right
side). A model keyword can be the same as a skew parameter.
SYNTAX:
.OPTION SEARCH = ‘directory_path’
EXAMPLE:
.OPTION SEARCH = ‘$installdir/parts/vendor’
$installdir/parts/vendor/buffer_f.inc
Use this file for directories that you want HSPICE to always search.
HSPICE searches for libraries in the order specified in
.OPTION SEARCH statements.
1. Read the input file, for a .SUBCKT or .MACRO with the specified
call name.
2. Read any .INC files or .LIB files, for a .SUBCKT or .MACRO with
the specified call name.
You can use the HSPICE library search and selection features to
simulate process corner cases, using .OPTION SEARCH = ‘<libdir>’
to target different process directories. For example, if you store an
input/output buffer subcircuit in a file named iobuf.inc, you can create
three copies of the file, to simulate fast, slow and typical corner
cases. Each file contains different HSPICE transistor models,
representing the different process corners. Store these files (all
named iobuf.inc) in separate directories.
SYNTAX:
.PARAM <ParamName>=<RealNumber>
SYNTAX:
.PARAM <ParamName>=’<AlgebraicExpression>’
.PARAM <ParamName1>=<ParamName2>
EXAMPLE:
.PRINT DC v(3) gain=PAR(‘v(3)/v(2)’)
+ PAR(‘V(4)/V(2)’)
EXAMPLE:
.para x=cos(2)+sin(2)
User-Defined Function
A user-defined function assignment is similar to the definition of an
algebraic parameter. HSPICE extends the algebraic parameter
definition to include function parameters, used in the algebraic that
defines the function. You can nest user-defined functions up to three
deep.
SYNTAX:
.PARAM <ParamName>(<pv1>[<pv2>])=’<Expression>’
SYNTAX:
.SUBCKT <SubName><PinList>[<SubDefaultsList>]
<SubParam1>=<Expression>[<SubParam1>=<Expression>...]
Measurement Parameters
.MEASURE statements produce a measurement parameter. In
general, the rules for measurement parameters are the same as
those for standard parameters. However, measurement parameters
are not defined in a .PARAM statement, but directly in
the .MEASURE statement. For more information, see .MEASURE
Parameter Types on page 7-42.
.PROTECT Statement
The .PROTECT statement keeps models and cell libraries private.
• The .PROTECT statement suppresses printing text from the list
file, such as when you use the BRIEF option.
• The .UNPROTECT command restores normal output functions.
• Any elements and models located between a .PROTECT and
an .UNPROTECT statement, inhibit the element and model
listing from the LIST option.
SYNTAX:
.PROTECT
.UNPROTECT Statement
In HSPICE, the .UNPROTECT statement restores normal output
functions that a .PROTECT statement restricted.
SYNTAX:
.UNPROTECT
.ALTER Statement
You can use the .ALTER statement to rerun a HSPICE simulation,
using different parameters and data.
Use parameter (variable) values for print and plot statements, before
you alter them. The .ALTER block cannot include .PRINT, .PLOT,
.GRAPH or any other input/output statements. You can include
analysis statements (.DC, .AC, .TRAN, .FOUR, .DISTO, .PZ, and so
on) in a .ALTER block in an input netlist file.
6. Each .ALTER simulation run prints only the actual altered input.
A special .ALTER title identifies the run.
1. Put the statements that precede the first .ALTER statement, into
a library.
SYNTAX:
.ALTER <title_string>
EXAMPLE:
Your netlist might contain the statement:
.ALIAS myfet nfet
Without a .ALTER statement, HSPICE does not use nfet to replace
myfet during simulation.
If your netlist contains one or more .ALTER commands, the first
simulation uses the original myfet model. After the first simulation, if
the netlist references myfet from a deleted library, .ALIAS substitutes
nfet in place of the missing model.
• If HSPICE finds model definitions for both myfet and nfet, it
reports an error and aborts.
• If HSPICE finds a model definition for myfet, but not for nfet, it
reports a warning, and simulation continues, using the original
myfet model.
• If HSPICE finds a model definition for nfet, but not for myfet, it
reports a replacement successful message.
EXAMPLE:
*file: test malias statement
.OPTION acct tnom=50 list gmin=1e-14 post
.temp 0.0 25
.tran .1 2
vdd 2 0 pwl 0 -1 1 1
d1 2 1 zend dtemp=25
d2 1 0 zen dtemp=25
* malias statements
.malias zendef = zen zend
* model definition
.model zendef d (vj=.8 is=1e-16 ibv=1e-9 bv=6.0 rs=10
+ tt=0.11n n=1.0 eg=1.11 m=.5 cjo=1pf tref=50)
.end
SYNTAX:
.connect node1 node2
node2 Name of the second of two nodes to connect to each other. The
first node replaces this node in the simulation.
EXAMPLE:
*example for .connect
vcc 0 cc 5v
r1 0 1 5k
r2 1 cc 5k
.tran 1n 10n
.print i(vcc) v(1)
.alter
.connect cc 1
.end
connects both node2 and node3 to node1. All connected nodes must
be in the same subcircuit, or all in the main circuit. The first HSPICE
simulation evaluates only node1; node2, and node3 are the same
node as node1. Use .alter statements to simulate node2 and node3.
If you set .option node, HSPICE prints out a node connection table.
SYNTAX:
.DEL LIB ‘<filepath>filename’ entryname
.DEL LIB libnumber entryname
filename Name of a file to delete from the data file. The file path, plus the file name, can
be up to 64 characters long. You can use any file name that is valid for the
operating system that you use. Enclose the file path and file name in single or
double quote marks.
filepath Path name of a file, if the operating system supports tree-structured directories.
EXAMPLE 2:
This example uses an .ALTER block.
FILE2: ALTER2.SP CMOS INVERTER USING SUBCIRCUIT
.OPTION LIST ACCT
.MACRO INV 1 2 3
M1 3 2 1 1 P 6U 15U
M2 3 2 0 0 N 6U 8U
.LIB ’MOS.LIB’ NORMAL
.EOM INV
XINV 1 2 3 INV
VDD 1 0 5
VIN 2 0
.DC VIN 0 5 0. 1
.PLOT V(3) V(2)
.ALTER
.DEL LIB ’MOS.LIB’ NORMAL
.TF V(3) VIN $DC small-signal transfer function
*
.MACRO INV 1 2 3 $change data within subcircuit def
M1 4 2 1 1 P 100U 100U $change channel length,width,also
$topology
M2 4 2 0 0 N 6U 8U $change topology
R4 4 3 100 $add the new element
C3 3 0 10P $add the new element
.LIB ’MOS.LIB’ SLOW $set slow model library
$.INC ’MOS2.DAT’ $not allowed to be used inside
$subcircuit allowed outside
$subcircuit
.EOM INV
.END
In this example, the .ALTER block adds a resistor and capacitor
network to the circuit. The network connects to the output of the
inverter, and HSPICE simulates a DC small-signal transfer function.
Simulation Input and Controls: Input Netlist File Composition
3-54
.END Statement
An .END statement must be the last statement in the input netlist file.
The period preceding END is a required part of the statement.
Any text that follows the .END statement is a comment, and has no
effect on that simulation.
An input file that contains more than one simulation run must include
an .END statement for each simulation run. You can concatenate
several simulations into a single file.
SYNTAX:
.END <comment>
EXAMPLE:
MOS OUTPUT
.OPTION NODE NOPAGE
VDS 3 0
VGS 2 0
M1 1 2 0 0 MOD1 L = 4U W = 6U AD = 10P AS = 10P
.MODEL MOD1 NMOS VTO = -2 NSUB = 1.0E15 TOX = 1000 UO = 550
VIDS 3 1
.DC VDS 0 10 0.5 VGS 0 5 1
.PRINT DC I(M1) V(2)
.END MOS OUTPUT
MOS CAPS
.OPTION SCALE = 1U SCALM = 1U WL ACCT
.OP
.TRAN .1 6
V1 1 0 PWL 0 -1.5V 6 4.5V
V2 2 0 1.5VOLTS
MODN1 2 1 0 0 M 10 3
.MODEL M NMOS VTO = 1 NSUB = 1E15 TOX = 1000 UO = 800
LEVEL = 1
+ CAPOP = 2
.PLOT TRAN V(1) (0,5) LX18(M1) LX19(M1) LX20(M1) (0,6E-13)
.END MOS CAPS
You can use this IF-ELSE structure to change the circuit topology,
expand the circuit, set parameter values for each device instance, or
select different model cards in each IF-ELSE block.
• In an IF, ELSEIF, or ELSE condition statement, complex Boolean
expressions must not be ambiguous. For example, change
(a==b && c>=d) to ( (a==b) && (c>=d) ).
• In an IF, ELSEIF, or ELSE statement_block, you can include most
valid HSPICE analysis and output statements. The exceptions
are:
.end, .alter, .subckt, .ends, .macro, .eom, .global, .del, .mailias, .
alias, .list, .nolist, and .connect statements.
search, d_ibis, d_imic, d_lv56, biasfi, modsrh, cmiflag, nxx, and
brief options.
• You can include IF-ELSEIF-ELSE statements in subcircuits, but
you cannot include subcircuits in IF-ELSEIF-ELSE statements.
• However, you can use IF-ELSEIF-ELSE blocks to select different
submodules, to structure the netlist (using .inc, .lib, and .vec
statements).
Using Subcircuits
Reusable cells are the key to saving labor in any CAD system. This
also applies to circuit simulation, in HSPICE.
• To create and simulate a reusable circuit, construct it as a
subcircuit.
• Use parameters to expand the utility of a subcircuit.
Traditional SPICE includes the basic subcircuit, but does not provide
a way to consistently name nodes. However, HSPICE provides a
simple method for naming subcircuit nodes and elements: use the
subcircuit call name as a prefix to the node or element name.
MP
MN
INV
Hierarchical Parameters
M (Multiply) Parameter
The most basic HSPICE subcircuit parameter is the M (multiply)
parameter. This keyword is common to all elements, including
subcircuits, except for voltage sources. The M parameter multiplies
the internal component values, which in effect creates parallel copies
of the element or subcircuit. To simulate 32 output buffers switching
simultaneously, you need to place only one subcircuit:
X1 in out buffer M = 32
X1 in out inv M = 2
M=8
UNEXPANDED EXPANDED
EXAMPLE:
X1 D Q Qbar CL CLBAR dlatch flip = 0
macro dlatch
+ D Q Qbar CL CLBAR flip = vcc
.nodeset v(din) = flip
xinv1 din qbar inv
xinv2 Qbar Q inv
m1 q CLBAR din nch w = 5 l = 1
m2 D CL din nch w = 5 l = 1
.eom
S (Scale) Parameter
To scale a sub-circuit, use the S (local scale) parameter. This
parameter behaves in much the same way as the M parameter in the
preceding section.
EXAMPLE:
x1 a y inv S=1u
subckt inv in out
x2 a b kk S=1m
.ends
In this example:
cl
D Q
din
.Nodeset
HSPICE does not limit the size or complexity of subcircuits; they can
contain subcircuit references, and any model or element statement.
To specify subcircuit nodes in .PRINT or .PLOT statements, specify
the full subcircuit path and node name.
EXAMPLE:
The following element statement creates an instance of the 1N4004
diode model:
X1 2 1 D1N4004
/usr/lib/vendor/buffer_f.inc
HSPICE and AvanWaves read and write files related to the current
circuit design. Files related to a design usually reside in one
directory. The output file is standard output on Unix platforms, and
you can redirect it.
Table 3-15 on page 3-66 lists input file types, and their standard
names. The following sections describe these files.
Starting HSPICE
Use the following syntax to start HSPICE:
input_file Specifies the input netlist file name, for which an extension <.ext> is optional.
If you do not specify an input filename extension in the command, HSPICE
searches for the <input_file>.sp file. Precede the input file with -i. HSPICE
uses the input filename as the root for the output files. Star- Hspice also checks
for an initial conditions file (.ic) that has the input file root name. The following
is an example of an input file name:
/usr/sim/work/rb_design.sp
In this file name:
• /usr/sim/work/ is the directory path to the design.
• rb_design is the design root name.
• .sp is the filename suffix.
-n Specifies the starting number for numbering output data file revisions
(output_file.tr#, output_file.ac#, output_file.sw#, where # is the revision number).
-html Specifies an HTML output file. If you do not specify a path, HSPICE saves
<path/>html_file the HTML output file in the same directory that you specified in the -o
option. If you do not specify the -o option, HSPICE saves the HTML
output in the running directory.
-i <input_file> Name of the input netlist file. If you do not enter an extension, HSPICE
assumes .sp.
-n <number> Revision number at which to start numbering .gr#, .tr#, and other output
files. By default, file numbers start at zero: .gr0, .tr0, and so on. Use this
option to specify the number (-n 7 for .gr7, .tr7, for example).
-o <output_file> Name of the output file. If you do not specify an extension, HSPICE
assigns .lis.
EXAMPLE:
hspice demo.sp -n 7 > demo.out
demo.sp Input netlist file; the .sp extension to the filename is optional.
-n 7 Starts the output data file revision numbers at 7: demo.tr7, demo.ac7, and
demo.sw7
Interactive Simulation
To invoke HSPICE in interactive mode, enter:
hspice -I
You can then use other HSPICE commands to help you simulate
circuits interactively. You can also use the help command for detailed
information about a command.
HSPICE interactive mode also supports saving commands into a
script file. To save the commands that you use, and replay them
later, enter:
hspice -I -L scriptifile.cmd
Running HSPICE-MT
To run HSPICE-MT, use the following syntax:
• If you omit the #num, or if the #num that you specify is larger than
the number of online CPUs, then HSPICE sets the number of
threads to the number of online CPUs.
• If you omit the -o output_file option, HSPICE prints the result to
the standard output.
Under Windows NT Explorer:
1. Double click the hsp_mt application icon.
2. Select the File/Simulate button, to select the input netlist file.
In Windows, the program automatically detects the number of online
CPUs. Under the Synopsys HSPUI (HSPICE User Interface):
The files are listed in Table 3-19 on page 3-76 and described below.
This chapter describes the syntax for the basic elements of a circuit
netlist in HSPICE. Refer to the HSPICE Elements and Device
Models Manual for detailed syntax descriptions and model
descriptions.
Elements:
4-1
• Buffers
Passive Elements
Resistors
The general syntax for a resistor element in a HSPICE netlist is:
SYNTAX:
Rxxx n1 n2 <mname> Rval <TC1 <TC2>> <SCALE=val> <M=val>
+<AC=val> <DTEMP=val> <L=val> <W=val> <C=val>
Rxxx n1 n2 <mname> <R = >resistance <<TC1 = >val>
+ <<TC2 = >val> <SCALE = val> <M = val> <AC = val>
+ <DTEMP = val> <L = val> <W = val> <C = val>
Rxxx n1 n2 R=‘user-defined_equation’
HSPICE Examples
In the following example, the R1 resistor connects from the Rnode1
node to the Rnode2 node, with a resistance of 100 ohms.
R1 Rnode1 Rnode2 100
The RC1 resistor connects from node 12 to node 17, with a resistance
of 1 kilohm, and temperature coefficients of 0.001 and 0.
RC1 12 17 R = 1k TC1 = 0.001 TC2 = 0
The Rterm resistor connects from the input node to ground, with a
resistance determined by the square root of the analysis frequency
(non-zero for AC analysis only).
Elements: Passive Elements
4-3
Rterm input gnd R = ’sqrt(HERTZ)’
The Rxxx resistor, from node 98999999 to node 87654321, with a
resistance of 1 ohm for DC and time-domain analyses, and 10
gigohms for AC analyses.
Rxxx 98999999 87654321 1 AC = 1e10
Linear Resistors
SYNTAX:
The input syntax of a resistor is:
Rxxx node1 node2 < modelname > < R = > value < TC1 = val >
+ < TC2 = val > < W = val > < L = val > < M = val >
+ < C = val > < DTEMP = val > < SCALE = val >
W Resistor width.
L Resistor length.
M Parallel multiplier.
EXAMPLE:
The first resistor, R1, is a simple 10-ohm linear resistor. The second
resistor, Rload, calls a resistor model named RVAL, defined later in
the netlist.
Note: If a resistor calls a model, then you do not need to specify a
constant resistance, as you do with R1.
• R3 takes its value from the RX parameter, and uses the TC1 and
TC2 temperature coefficients, which become 0.001 and 0,
respectively.
• RP spans across different circuit hierarchies, and is 0.5 ohms.
R1 1 2 10.0
Rload 1 GND RVAL
.param rx=100
R3 2 3 RX TC1 = 0.001 TC2 = 0
RP X1.A X2.X5.B .5
.MODEL RVAL R
Behavioral Resistors
HSPICE supports resistors with the following equation type:
Rxxx n1 n2 . . . <R=> ‘equation’ . . .
Note: The equation can be a function of any node voltage, and any
branch current, but not a function of time, frequency, or
temperature.
EXAMPLE:
R1 A B R = ‘V(A) + I(VDD)’
Polynomial Form
Cxxx n1 n2 POLY c0 c1... <above_options...>
You can specify capacitance as a numeric value, in units of farads,
as an equation, or as a polynomial of the voltage. The only required
fields are the two nodes, and the capacitance or model name.
• If you use the parameter labels, the nodes and model name must
precede the labels. Other arguments can follow in any order.
• If you specify a capacitor model (see Chapter 2, in the HSPICE
Elements and Device Models Manual), the capacitance value is
optional.
If you use an equation to specify capacitance, the CTYPE parameter
determines how HSPICE calculates the capacitance charge. The
calculation is different, depending on whether the equation uses a
self-referential voltage (that is, the voltage across the capacitor,
whose capacitance is determined by the equation).
To avoid syntax conflicts, if a capacitor model has the same name as
a capacitance parameter, HSPICE uses the model name.
EXAMPLE:
In the following example, C1 assumes its capacitance value from the
model, not the parameter.
EXAMPLE:
In the following example, the C1 capacitors connect from node 1 to
node 2, with a capacitance of 20 picofarads:
C1 1 2 20p
Cshunt refers to three capacitors in parallel, connected from the
node output to ground, each with a capacitance of 100 femtofarads.
Cshunt output gnd C = 100f M = 3
The Cload capacitor connects from the driver node to the output
node. The capacitance is determined by the voltage on the
capcontrol node, times 1E-6. The initial voltage across the capacitor
is 0 volts.
Cload driver output C = ’1u*v(capcontrol)’ CTYPE = 1
+ IC = 0v
The C99 capacitor connects from the in node to the out node. The
capacitance is determined by the polynomial C = c0 + c1*v + c2*v*v,
where v is the voltage across the capacitor.
C99 in out POLY 2.0 0.5 0.01
EXAMPLE:
Cbypass 1 0 10PF
C1 2 3 CBX
.MODEL CBX C
CB B 0 10P IC = 4V
CP X1.XA.1 0 0.1P
Behavioral Capacitors
HSPICE supports capacitors with the following equation type:
Note: You can specify the capacitor value as a function of any node
voltage, and any branch current, but not as a function of time,
frequency, or temperature.
CTYPE Parameter
CTYPEdetermines the calculation mode, for elements that use
capacitance equations. Set this parameter carefully, to ensure
correct simulation results.
EXAMPLE 1:CTYPE
V1 1 0 pwl(0n 0v 100n 10v)
V2 2 0 pwl(0n 0v 100n 10v)
C1 1 0 CTYPE = ‘(V(1) + V(2))*1e-12’
dQ
C = --------, V = V (n1,n2)
dV
Cxxx a b Q=’f(V(a,b))’
The above equation is equivalent to:
df ( x )
Cxxx a b Q=’f(V(a,b))’ where d ( x ) = -------------
dx
EXAMPLE 1:
C1 a b Q = ’sin(V(a,b)) + V(c,d)*V(a,b)’
Inductors
General Form
Lxxx n1 n2 <L = >inductance <mname> <<TC1 = >val>
+ <<TC2 = >val> <SCALE = val> <IC = val> <M = val>
+ <DTEMP = val> <R = val>
Lxxx n1 n2 L = ‘equation’ <LTYPE = val> <above_options...>
Polynomial Form
Lxxx n1 n2 POLY c0 c1... <above_options...>
• If you use parameter labels, the nodes and model name must be
first. Other arguments can be in any order.
The Lloop inductor connects from node 12 to node 17. Its inductance
is 1 microhenry, and its temperature coefficients are 0.001 and 0.
Lloop 12 17 L = 1u TC1 = 0.001 TC2 = 0
The Lcoil inductor connects from the input node to ground. Its
inductance is determined by the product of the current through the
inductor, and 1E-6.
Lcoil input gnd L = ’1u*i(input)’ LTYPE = 0
The L99 inductor connects from the in node to the out node. Its
inductance is determined by the polynomial L = c0 + c1*i + c2*i*i,
where i is the current through the inductor. The inductor also has a
specified DC resistance of 10 ohms.
L99 in out POLY 4.0 0.35 0.01 R = 10
Mutual Inductors
The general syntax for a mutual inductor element is:
EXAMPLE:
The Lin and Lout inductors are coupled, with a coefficient of 0.9.
K1 Lin Lout 0.9
The Lhigh and Llow inductors are coupled, with a coefficient equal to
the value of the COUPLE parameter.
Kxfmr Lhigh Llow K = COUPLE
• The K1 mutual inductor couples L1 and L2.
• The K2 mutual inductor couples L2 and L3.
The coupling coefficients are 0.98 and 0.87. HSPICE automatically
calculates the mutual inductance between L1 and L3, with a
coefficient of 0.98*0.87 = 0.853.
K1 L1 L2 0.98
K2 L2 L3 0.87
EXAMPLE:
LX A B 1E-9
LR 1 0 1u IC = 10mA
• LX is a 1 nH inductor.
• LR is a 1 uH inductor, with an initial current of 10 mA.
Active Elements
Diode Element
The general syntax for a diode element is:
The only required fields are the two nodes, and the model name. If
you use the parameter labels, the nodes and model name must be
first, and the other optional arguments can be in any order.
Examples
The D1 diode, with anode and cathode, connects to nodes 1 and 2.
Diode1 specifies the diode model.
D1 1 2 diode1
The Dprot diode, with anode and cathode, connects to the output
node. Ground references the firstd diode model, and specifies an
area of 10 (unitless for LEVEL = 1 model). The initial condition has
the diode OFF.
SYNTAX:
Qxxx nc nb ne <ns> mname <area> <OFF>
+ <IC = vbeval,vceval> <M = val> <DTEMP = val>
or
The only required fields are the collector, base, and emitter nodes,
and the model name. The nodes and model name must precede
other fields in the netlist.
EXAMPLE:
In the Q1 BJT element below:
Q1 1 2 3 model_1
Only drain, gate, and source nodes, and model name fields are
required. Node and model names must precede other fields.
The only required fields are the drain, gate and source nodes, and
the model name. The nodes and model name must precede other
fields in the netlist. If you did not specify a label, use the second
syntax with the .OPTION WL statement, to exchange the width and
length options.
W Element Statement
The general syntax for a lossy (W Element) transmission line
element is:
U-Model Form
Wxxx in1 <in2 <...inx>> refin out1 <out2 <...outx>>
+ refout <Umodel = mname> N = val L = val
The number of ports on a single transmission line are not limited. You
must provide one input and output port, the ground references, a
model or file reference, a number of conductors, and a length.
U-Model Form
Txxx in refin out refout mname L = val
EXAMPLE:
The T1 transmission line connects the in node to the out node:
EXAMPLE:
The U1 transmission line connects the in node to the out node:
U1 in gnd out gnd umodel_RG58 L = 5
SYNTAX:
In HSPICE, the syntax of the S Element is:
Sxxx nd1 nd2 ... ndN nd_ref <MNAME=Smodel_name>
+ [FQMODEL=sp_model_name | TSTONEFILE=filename |
+ CITIFILE=filename]<TYPE=[s | y]> <Zo=val | vector_value>
+ <Zof=ref_model> <FBASE=base_fequency>
+ <FMAX=maximum_frequency>
+ <PRECFAC=val> <DELAYHANDLE=ON|OFF> <DELAYFQ=val>
You can set all optional parameters, except MNAME, in both the S
element and the S model statement. Parameters in element
statements have higher priorities. You must specify either the
FQMODEL, TSTONEFILE, or CITIFILE parameter in either the S
model or the S element statement.
Table 4-16 S Element Syntax
Parameter Description
nd1 nd2 ... ndN N signal nodes (see Figure 4-2 on page 4-42). Required fields;
you must specify these parameters first. The other parameters
are optional, and you can specify them in any order.
FBASE Base frequency to use for transient analysis. This value becomes
the base frequency point for Inverse Fourier Transformation.
• If you do not set this value, the base frequency is a reciprocal
value of the transient period.
• If you set a frequency that is smaller than the reciprocal value
of the transient, then transient analysis performs circular
convolution, and uses the reciprocal value of FBASE as its
base period.
TSTONEFILE Name of the touch stone file. This file name must use the following file
extension syntax:
filename.[s|y|z]#
FBASE Base frequency to use for transient analysis. This value becomes the
base frequency point for Inverse Fourier Transformation.
• If you do not set this value, the base frequency is a reciprocal value of
the transient period.
• If you set a frequency that is smaller than the reciprocal value of the
transient, then transient analysis performs circular convolution, and
uses the reciprocal value of FBASE as its base period.
DELAYFQ Delay frequency for transmission line type parameters. For best
performance, set this to the inverse of the delay time. Default=FMAX.
.
.
.
. .
. .
. .
N+1 terminal system
[vinc]1 [vinc]N
[i]1 [i]N
[vref]1 [vref]N
nd1 ndN
(+) [v]1 (+) [v]N
(-) ndR
(reference node)
Pre-Conditioning S Parameters
Certain S parameters, such as series inductor (2-port), show a
singularity when converting S to Y parameters. To avoid this
singularity, the S element adds kRref series resistance, to pre-
condition S matrices:
–1
S ′ = [ kI + ( 2 – k ) S ] [ ( 2 + k ) I – kS ]
Buffers
The general syntax of an element card for input/output buffers is:
bname node_1 node_2 ... node_N keyword_1 = value_1 ...
+ [keyword_M = value_M]
node_1 node_2 ... List of input/output buffer external nodes. The number of nodes
node_N and their meaning are specific to different buffer types.
Elements: Buffers
4-44
EXAMPLE:
B1 nd_pc nd_gc nd_in nd_out_of_in
+ buffer = 1
+ file = ’test.ibs’
+ model = ’IBIS_IN’
Elements: Buffers
4-45
Elements: Buffers
4-46
5
Sources and Stimuli 5
This chapter describes element and model statements for
independent sources, dependent sources, analog-to-digital
elements, and digital-to-analog elements. It also explains each type
of element and model statement. Explicit formulas and examples
show how various combinations of parameters affect the simulation.
The chapter explains the following topics:
• Independent Source Elements
• Independent Source Functions
• Voltage and Current Controlled Elements
• Voltage-Dependent Voltage Sources — E Elements
• Current-Dependent Current Sources — F Elements
• Voltage-Dependent Current Sources — G Elements
• Current-Dependent Voltage Sources — H Elements
• Digital and Mixed Mode Stimuli
• Replacing Sources With Digital Inputs
• Specifying a Digital Vector File
5-1
Independent Source Elements
Use independent source element statements to specify DC, AC,
transient, and mixed independent voltage and current sources.
Some types of analysis use the associated analysis sources. For
example, in a DC analysis, if you specify both DC and AC sources in
one independent source element statement, HSPICE removes the
AC source from the circuit, for the DC analysis. If you specify an
independent source for an AC, transient, and DC analysis, HSPICE
removes transient sources, calculates the operating point, and
removes DC sources, for the AC analysis. Initial transient values
always override the DC value.
Vxxx Independent voltage source element name. Must begin with V, followed
by up to 1023 alphanumeric characters.
Iyyy Independent current source element name. Must begin with I, followed
by up to 1023 alphanumeric characters.
n+ Positive node.
n- Negative node.
DC=dcval DC source keyword and value, in volts. The tranfun value at time zero
overrides the DC value. Default=0.0.
tranfun Transient source function (one or more of: AM, DC, EXP, PE, PL, PU,
PULSE, PWL, SFFM, SIN). The functions specify the characteristics of a
time-varying source. See the individual functions, for syntax.
EXAMPLE 1:
VX 1 0 5V
• The VX voltage source has a 5 volt DC bias.
• The positive terminal connects to node 1.
• The negative terminal is grounded.
EXAMPLE 3:
VH 3 6 DC=2 AC=1,90
• The VH voltage source has a 2-volt DC bias, and a 1-volt RMS
AC bias, with 90 degree phase offset.
• The positive terminal connects to node 3.
• The negative terminal connects to node 6.
EXAMPLE 4:
IG 8 7 PL(1MA 0S 5MA 25MS)
• The piecewise-linear relationship defines the time-varying
response for the IG current source, which is 1 milliamp at time=0,
and 5 milliamps at 25 milliseconds.
• The positive terminal connects to node 8.
• The negative terminal connects to node 7.
EXAMPLE 5:
VCC in out VCC PWL 0 0 10NS VCC 15NS VCC 20NS 0
• The VCC parameter specifies the DC bias for the VCC voltage
source.
• The piecewise-linear relationship defines the time-varying
response for the VCC voltage source, which is 0 volts at time=0,
VCC from 10 to 15 nanoseconds, and back to 0 volts at 20
nanoseconds.
Sources and Stimuli: Independent Source Elements
5-4
• The positive terminal connects to the in node.
• The negative terminal connects to the out node.
• HSPICE determines the operating point for this source, without
the DC value (the result is 0 volts).
EXAMPLE 6:
VIN 13 2 0.001 AC 1 SIN (0 1 1MEG)
EXAMPLE 7:
ISRC 23 21 AC 0.333 45.0 SFFM (0 1 10K 5 1K)
EXAMPLE 8:
VMEAS 12 9The VMEAS voltage source has a 0-volt DC bias.
V1 1 0 DC=5V
V1 1 0 5V
I1 1 0 DC=5mA
I1 1 0 5mA
AC Sources
AC current and voltage sources are impulse functions, used for an
AC analysis. To specify the magnitude and phase of the impulse, use
the AC keyword.
V1 1 0 AC=10V,90
VIN 1 0 AC 10V 90
Mixed Sources
Mixed sources specify source values for more than one type of
analysis. For example, you can specify a DC source, an AC source,
and a transient source, all of which connect to the same nodes. In
this case, when you run specific analyses, HSPICE selects the
appropriate DC, AC, or transient source. The exception is the zero-
time value of a transient source, which over-rides the DC value; it is
selected for operating-point calculation for all analyses.
EXAMPLE:
VIN 13 2 0.5 AC 1 SIN (0 1 1MEG)
EXAMPLE 1:
The following example shows the pulse source, connected between
node 3 and node 0. In the pulse:
• The output high voltage is 1 V.
• The output low voltage is -1 V.
• The delay is 2 ns.
• The rise and fall time are each 2 ns.
• The high pulse width is 50 ns.
• The period is 100 ns.
VIN 3 0 PULSE (-1 1 2NS 2NS 2NS 50NS 100NS)
EXAMPLE 2:
The following example is a pulse source, which connects between
node 99 and node 0. The syntax shows parameter values for all
specifications.
V1 99 0 PU lv hv tdlay tris tfall tpw tper
EXAMPLE 3:
The following example shows an entire netlist, which contains a
PULSE voltage source. In the source:
• The initial voltage is 1 volt.
• The pulse voltage is 2 volts.
• The delay time, rise time, and fall time are each 5 nanoseconds.
• The pulse width is 20 nanoseconds.
• The pulse period is 50 nanoseconds.
SYNTAX:
The syntax for a sinusoidal source in an independent voltage or
current source is:
Vxxx n+ n- SIN <(> vo va <freq <td < q < j >>>> <)>
Ixxx n+ n- SIN <(> vo va <freq <td < q < j >>>> <)>
Vxxx, Ixxx Independent voltage source that exhibits the sinusoidal response.
2⋅Π⋅ϕ
0 to td vo + va ⋅ SIN --------------------
360
vo + va ⋅ Exp [ – ( Time – td ) ⋅ θ ] ⋅
ϕ
SIN 2 ⋅ Π ⋅ freq Þ . ( time – td ) + ---------
-
360
td to tstop
In these expressions, TSTOP is the final time.
EXAMPLE:
VIN 3 0 SIN (0 1 100MEG 1NS 1e10)
• Peak value is 1 V.
• Offset is 0 V.
• Frequency is 100 MHz.
See Figure 5-2 on page 5-14 for a plot of the source output.
( Time – td1 )
td2 to tstop v1 + ( v2 – v1 ) ⋅ 1 – Exp – ---------------------------------- +
τ1
( Time – td2 )
( v1 – v2 ) ⋅ 1 – exp – ----------------------------------
τ2
• Final voltage is -1 V.
• Waveform rises exponentially, from -4 V to -1 V, with a time
constant of 30 ns.
TD1
TD2
V2=-1v
TAU1
TAU2
V1=-4v
General Form
Vxxx n+ n- PWL <(> t1 v1 <t2 v2 t3 v3…> <R <=repeat>>
+ <TD=delay> <)>
Ixxx n+ n- PWL <(> t1 v1 <t2 v2 t3 v3…> <R <=repeat>>
+ <TD=delay> <)>
• Each pair of values (t1, v1) specifies that the value of the source
is v1 (in volts or amps), at time t1.
• Linear interpolation between the time points determines the
value of the source, at intermediate values of time.
• The PL form of the function accommodates ASPEC style
formats, and reverses the order of the time-voltage pairs to
voltage-time pairs.
• If you do not specify a time-zero point, HSPICE uses the DC
value of the source, as the time-zero source value.
• HSPICE does not force the source to terminate at the TSTOP
value, specified in the .TRAN statement.
If the slope of the piecewise linear function changes below a
specified tolerance, the timestep algorithm might not choose the
specified time points as simulation time points. To obtain a value for
the source voltage or current, HSPICE extrapolates neighboring
values. As a result, the simulated voltage might deviate slightly from
the voltage specified in the PWL list. To force HSPICE to use the
specified values, use the SLOPETOL option, which reduces the
slope change tolerance.
Sources and Stimuli: Independent Source Functions
5-18
R causes the function to repeat. You can specify a value after this R,
to indicate the beginning of the function to repeat. The repeat time
must equal a breakpoint in the function. For example, if t1 = 1, t2 =
2, t3 = 3, and t4 = 4, then the repeat value can be 1, 2, or 3.
EXAMPLE:
*FILE: PWL.SP THE REPEATED PIECEWISE LINEAR SOURCE
*ILLUSTRATION OF THE USE OF THE REPEAT FUNCTION “R”
*file pwl.sp REPEATED PIECEWISE LINEAR SOURCE
.OPTION POST
.TRAN 5N 500N
V1 1 0 PWL 60N 0V, 120N 0V, 130N 5V, 170N 5V, 180N 0V,
+ R 0N
R1 1 0 1
V2 2 0 PL 0V 60N, 0V 120N, 5V 130N, 5V 170N, 0V 180N,
+ R 60N
R2 2 0 1
.END
Repeat
from this Start repeating
point at this point
T1,V1 (0 ns) (180 ns)
Repeat
from this
point
(60 ns)
You must use this source with a .DATA statement that contains time-
value pairs. For each tn-vn (time-value) pair that you specify in
the .DATA block, the data-driven PWL function outputs a current or
voltage of the specified tn duration and with the specified vn
amplitude.
When you use this source, you can reuse the results of one
simulation, as an input source in another simulation. The transient
analysis must be data-driven.
EXAMPLE:
*DATA DRIVEN PIECEWISE LINEAR SOURCE
V1 1 0 PWL(TIME, pv1)
R1 1 0 1
V2 2 0 PWL(TIME, pv2)
R2 2 0 1
.DATA dsrc
TIME pv1 pv2
0n 5v 0v
5n 0v 5v
10n 0v 5v
.ENDDATA
.TRAN DATA=dsrc
.END
mdi Modulation index, which determines the magnitude of deviation from the
carrier frequency. Values normally lie between 1 and 10. Default=0.0.
EXAMPLE:
*FILE: SFFM.SP THE SINGLE FREQUENCY FM SOURCE
.OPTION POST
V 1 0 SFFM (0, 1M, 20K. 10, 5K)
R 1 0 1
.TRAN .0005M .5MS
.END
Vxxx, Ixxx Independent voltage source, which exhibits the amplitude-modulated response.
td Delay time (propagation delay) before the start of the signal, in seconds.
Default=0.0.
EXAMPLE:
.OPTION POST
.TRAN .01M 20M
V1 1 0 AM(10 1 100 1K 1M)
R1 1 0 1
V2 2 0 AM(2.5 4 100 1K 1M)
R2 2 0 1
V3 3 0 AM(10 1 1K 100 1M)
R3 3 0 1
.END
- Amplitude is 10.
- Offset constant is 1.
- Amplitude is 2.5.
- Offset constant is 4.
- Carrier frequency is 1 kHz.
- Amplitude is 10.
- Offset constant is 1.
- Carrier frequency is 100 Hz.
• MOS transistors
• bipolar transistors
• tunnel diodes
• SCRs
- operational amplifiers
- summers
- comparators
- voltage-controlled oscillators
- modulators
- An ideal op-amp.
- An ideal transformer.
- A voltage-controlled resistor.
One-Dimensional Function
If the function is one-dimensional (a function of one branch current
or node voltage), the following expression determines the FV
function value:
FV = P0 + ( P1 ⋅ FA ) + ( P2 ⋅ FA 2 ) + ( P3 ⋅ FA 3 ) + ( P4 ⋅ FA 4 ) + ( P5 ⋅ FA 5 ) + …
Table 5-12 One-Dimensional Syntax
Parameter Description
E1 5 0 POLY(1) 3 2 1 2.5
V ( 5, 0 ) = 1 + 2.5 ⋅ V (3,2)
You can also express V(5,0) as E1:
E1 = 1 + 2.5 ⋅ V (3,2)
Two-Dimensional Function
If the function is two-dimensional (that is, a function of two node
voltages or two branch currents), the following expression
determines FV:
2 2
FV = P0 + ( P1 ⋅ FA ) + ( P2 ⋅ FB ) + ( P3 ⋅ FA ) + ( P4 ⋅ FA ⋅ FB ) + ( P5 ⋅ FB )
3 2 2 3
+ ( P6 ⋅ FA ) + ( P7 ⋅ FA ⋅ FB ) + ( P8 ⋅ FA ⋅ FB ) + ( P9 ⋅ FB ) + ...
V ( 1, 0 ) = 3 ⋅ V (3,2) + 4 ⋅ V (7,6) 2
or
E1 = 3 ⋅ V (3,2) + 4 ⋅ V (7,6) 2
To implement this function, use this controlled-source element
statement:
E1 1 0 POLY(2) 3 2 7 6 0 3 0 0 0 4
• P1=3
• P2=0
• P3=0
• P4=0
• P5=4
FV = P0 + ( P1 ⋅ FA ) + ( P2 ⋅ FB ) + ( P3 ⋅ FC ) + ( P4 ⋅ FA 2 )
+ ( P5 ⋅ FA ⋅ FB ) + ( P6 ⋅ FA ⋅ FC ) + ( P7 ⋅ FB 2 ) + ( P8 ⋅ FB ⋅ FC )
+ ( P9 ⋅ FC 2 ) + ( P10 ⋅ FA 3 ) + ( P11 ⋅ FA 2 ⋅ FB ) + ( P12 ⋅ FA 2 ⋅ FC )
+ ( P13 ⋅ FA ⋅ FB 2 ) + ( P14 ⋅ FA ⋅ FB ⋅ FC ) + ( P15 ⋅ FA ⋅ FC 2 )
+ ( P16 ⋅ FB 3 ) + ( P17 ⋅ FB 2 ⋅ FC ) + ( P18 ⋅ FB ⋅ FC 2 )
+ ( P19 ⋅ FC 3 ) + ( P20 ⋅ FA 4 ) + …
FA = V (3,2)
FB = V (7,6)
FC = V (9,8)
P1 = 3
P7 = 4
P19 = 5
V ( 1, 0 ) POLY(3) 3 2 7 6 9 8 0 3 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 5
or
E1 1 0 POLY(3) 3 2 7 6 9 8 0 3 0 0 0 0 0 4 0 0 0 0 0 0
+ 0 0 0 0 0 5
• FA=V(3,2)
• FB=V(7,6)
• FC=V(9,8)
• P1=3
• P7=4
• P19=5
• Other coefficients are zero.
Independent Sources
A power source is a special kind of voltage or current source, which
supplies the network with a pre-defined power that varies by time or
frequency. The source produces a specific input impedance.
To apply a power source to a network, you can use either:
• A Norton-equivalent circuit (if you specify this circuit and a
current source)—the I (current source) element, or
• A Thevenin-equivalent circuit (if you specify this circuit and a
voltage source)—the V (voltage source) element.
As with other independent sources, simulation assumes that positive
current flows from the positive node, through the source, to the
negative node. A power source is a time-variant or frequency-
dependent utility source; therefore, the value/phase can be a
function of either time or frequency.
A power source is a sub-class of the independent voltage/current
source, with some additional keywords or parameters:
• You can use I and V elements in DC, AC, and transient analysis.
• The I and V elements can be data-driven.
Supported formats include:
• PULSE, a trapezoidal pulse function.
• PWL, a piecewise linear function, with repeat function.
• PL, a piecewise linear function. PWL and PL are the same
piecewise linear function, except PL uses the v1 t1 pair instead
of the t1 v1 pair.
EXAMPLE 1:
V11 10 20 power=5 imp=5K
EXAMPLE 3:
V5 6 0 power=FREQ(10HZ, 2, 10KHZ, 0.01) imp=2MEG
+ imp_ac=(100K, 60)
V5 6 0 power=func1 imp=2MEG imp_ac=(100K, 60DEC)
+ func1=FREQ(10HZ, 2, 10KHZ, 0.01)
Controlled Sources
In addition to independent power sources, you can also create four
types of controlled sources:
• Voltage-controlled voltage source (VCVS), or E element
• Current-controlled current source (CCCS), or F element
• Voltage-controlled current source (VCCS), or G element
• Current-controlled voltage source (CCVS), or H element
Linear
Exxx n+ n- <VCVS> in+ in- gain <MAX=val> <MIN=val>
+ <SCALE=val> <TC1=val> <TC2=val><ABS=1> <IC=val>
You must specify the MAX, MIN, SCALE, TC1, TC2, ABS, and IC
parameters.
You must specify the DELTA, SCALE, TC1, TC2, and IC parameters.
Multi-Input Gates
Exxx n+ n- <VCVS> gatetype(k) in1+ in1- ... inj+ inj-
+ <DELTA=val> <TC1=val> <TC2=val> <SCALE=val>
+ x1,y1 ... x100,y100 <IC=val>
Delay Element
Exxx n+ n- <VCVS> DELAY in+ in- TD=val <SCALE=val>
+ <TC1=val> <TC2=val> <NPDELAY=val>
You must specify the NPDELAY, SCALE, TC1, and TC2 parameters.
SYNTAX:
Exxx n+ n- VOL=’equation’ <MAX=val> <MIN=val>
Ideal Transformer
SYNTAX:
Exxx n+ n- TRANSFORMER in+ in- k
DELAY Keyword for the delay element. Same as for the voltage-controlled
voltage source, except it has an associated propagation delay, TD. This
element adjusts propagation delay in macro (subcircuit) modeling.
DELAY is a reserved word; do not use it as a node name.
DELTA Controls the curvature of the piecewise linear corners. This parameter
defaults to one-fourth of the smallest distance between breakpoints. The
maximum is one-half of the smallest distance between breakpoints.
in +/- Positive or negative controlling nodes. Specify one pair for each
dimension.
MAX Maximum output voltage value. The default is undefined, and sets no
maximum value.
MIN Minimum output voltage value. The default is undefined, and sets no
minimum value.
NPDELAY Sets the number of data points to use in delay simulations. The default
value is the larger of either 10, or the smaller of TD/tstep and tstop/tstep.
min 〈 TD, tstop〉
That is, NPDELAY default = max ------------------------------------------, 10
tstep
The .TRAN statement specifies tstep and tstop values.
POLY Keyword for the polynomial function. If you do not specify POLY(ndim),
HSPICE assumes a one-dimensional polynomial. Ndim must be a
positive number.
x1,... Controlling voltage across the in+ and in- nodes. The x values must be
in increasing order.
E Element Examples
Ideal OpAmp
You can use the voltage-controlled voltage source to build a voltage
amplifier, with supply limits.
• The output voltage across nodes 2,3 is v(14,1) * 2.
• The value of the voltage gain parameter is 2.
• The MAX parameter sets a maximum E1 voltage of 5 V.
• The MIN parameter sets a minimum E1 voltage output of -5 V.
EXAMPLE:
If V(14,1) = -4V, then HSPICE sets E1 to -5V, and not -8V as the
equation suggests.
Eopamp 2 3 14 1 MAX=+5 MIN=-5 2.0
You can also substitute Level=1 in place of OPAMP.
Voltage Summer
An ideal voltage summer specifies the source voltage, as a function
of three controlling voltage(s):
• V(13,0)
• V(15,0)
• V(17,0)
To describe a voltage source, the voltage summer uses this value:
V (13,0) + V (15,0) + V (17,0)
This example represents an ideal voltage summer. It initializes the
three controlling voltages, for a DC operating point analysis, to 1.5,
2.0, and 17.25 V.
EX 17 0 POLY(3) 13 0 15 0 17 0 0 1 1 1 IC=1.5,2.0,17.25
Polynomial Function
A voltage-controlled source can also output a non-linear function,
using a one-dimensional polynomial. This example does not specify
the POLY parameter, so HSPICE assumes it is a one-dimensional
polynomial—that is, a function of one controlling voltage. The
equation corresponds to the element syntax. Behavioral equations
replace this older method.
V (3,4) = 10.5 + 2.1 *V(21,17) + 1.75 *V(21,17)2”
E2 3 4 POLY 21 17 10.5 2.1 1.75
Ideal Transformer
If the turn ratio is 10 to 1, the voltage relationship is V(out)=V(in)/10.
Etrans out 0 TRANSFORMER in 0 10
You can also substitute Level=2 in place of TRANSFORMER.
You must specify the MAX, MIN, SCALE, TC1, TC2, M, ABS, and IC
parameters.
Polynomial (POLY)
Fxxx n+ n- <CCCS> POLY(ndim) vn1 <... vnndim> <MAX=val>
+ <MIN=val> <TC1=val> <TC2=val> <SCALE=val> <M=val>
+ <ABS=1> p0 <p1…> <IC=val>
Multi-Input Gates
Fxxx n+ n- <CCCS> gatetype(k) vn1, ... vnk <DELTA=val>
+ <SCALE=val> <TC1=val> <TC2=val> <M=val> <ABS=1>
+ x1,y1 ... x100,y100 <IC=val>
F Element Parameters
Table 5-16 F Element Syntax
Parameter Description
ABS Output is an absolute value, if ABS=1.
CCCS Keyword for current-controlled current source. CCCS is a HSPICE reserved
keyword; do not use it as a node name.
DELAY Keyword for the delay element. Same as for a current-controlled current
source, but has an associated propagation delay, TD. Adjusts the
propagation delay in the macro model (subcircuit) process. DELAY is a
reserved word; do not use it as a node name.
DELTA Controls the curvature of piecewise linear corners. The default is 1/4 of the
smallest distance between breakpoints. The maximum is 1/2 of the smallest
distance between breakpoints.
Fxxx Element name of the current-controlled current source. Must begin with F,
followed by up to 1023 alphanumeric characters.
gain Current gain.
gatetype(k) AND, NAND, OR, or NOR. k is the number of inputs for the gate. x and y are
the piecewise linear variation of the output, as a function of input. In multi-
input gates, only one input determines the output state. Do not use the above
keywords as node names.
IC Initial condition (estimate) of the controlling current(s), in amps. If you do not
specify IC, the default=0.0.
M Number of replications of the element, in parallel.
EXAMPLE 2:
F2 12 10 POLY VCC 1MA 1.3M
Example 2 is a current-controlled current source, with the value:
I(F2)=1e-3 + 1.3e-3 ⋅ I(VCC)
Current flows from the positive node, through the source, to the
negative node. The positive controlling-current flows from the
positive node, through the source, to the negative node of vnam
(linear), or to the negative node of each voltage source (nonlinear).
EXAMPLE 4:
Filim 0 out PWL(1) vsrc -1a,-1a 1a,1a
Linear
Gxxx n+ n- <VCCS> in+ in- transconductance <MAX=val>
+ <MIN=val> <SCALE=val> <M=val> <TC1=val> <TC2=val>
+ <ABS=1> <IC=val>
Polynomial (POLY)
Gxxx n+ n- <VCCS> POLY(NDIM) in1+ in1- ... <inndim+ inndim->
+ <MAX=val> <MIN=val> <SCALE=val> <M=val> <TC1=val>
+ <TC2=val> <ABS=1> P0<P1…> <IC=vals>
Multi-Input Gate
Gxxx n+ n- <VCCS> gatetype(k) in1+ in1- ...
+ ink+ ink- <DELTA=val> <TC1=val> <TC2=val> <SCALE=val>
+ <M=val> x1,y1 ... x100,y100<IC=val>
Delay Element
Gxxx n+ n- <VCCS> DELAY in+ in- TD=val <SCALE=val>
+ <TC1=val> <TC2=val> NPDELAY=val
Linear
Gxxx n+ n- VCR in+ in- transfactor <MAX=val> <MIN=val>
+ <SCALE=val> <M=val> <TC1=val> <TC2=val> <IC=val>
Polynomial (POLY)
Gxxx n+ n- VCR POLY(NDIM) in1+ in1- ...
+ <inndim+ inndim-> <MAX=val> <MIN=val><SCALE=val>
+ <M=val> <TC1=val> <TC2=val> P0 <P1…> <IC=vals>
Multi-Input Gates
Gxxx n+ n- VCR gatetype(k) in1+ in1- ... ink+ ink-
+ <DELTA=val> <TC1=val> <TC2=val> <SCALE=val> <M=val>
+ x1,y1 ... x100,y100 <IC=val>
NPWL Function
For the in- node, connected to n-:
• If v(n+,n-) > 0, then the controlling voltage is v(in+,in-).
• Otherwise, the controlling voltage is v(in+,n+).
For the in- node, connected to n+:
• If v(n+,n-) < 0, then the controlling voltage is v(in+,in-).
• Otherwise, the controlling voltage is v(in+,n+).
PPWL Function
For the in- node, connected to n-:
• If v(n+,n-) < 0, then the controlling voltage is v(in+,in1-).
• Otherwise, the controlling voltage is v(in+,n+).
For the in- node, connected to n+:
• If v(n+,n-) > 0, then the controlling voltage is v(in+,in-).
• Otherwise, the controlling voltage is v(in+,n+).
If the in- node does not connect to either n+ or n-, then HSPICE
changes NPWL and PPWL to PWL.
Sources and Stimuli: Voltage-Dependent Current Sources — G Elements
5-52
G Element Parameters
Table 5-17 G Element Syntax (Sheet 1 of 3)
Parameter Description
ABS Output is an absolute value, if ABS=1.
CUR, VALUE Current output that flows from n+ to n-. The equation that you define can be
a function of:
• node voltages
• branch currents
• TIME
• temperature (TEMPER)
• frequency (HERTZ)
DELAY Keyword for the delay element. Same as in the voltage-controlled current
source, but has an associated propagation delay, TD. Adjusts propagation
delay in macro (subcircuit) modeling. DELAY is a keyword; do not use it as
a node name.
DELTA Controls curvature of piecewise linear corners. Defaults to
1/4 of the smallest distance between breakpoints. Maximum is 1/2 of the
smallest distance between breakpoints.
Gxxx Name of the voltage-controlled element. Must begin with G, followed by up
to 1023 alphanumeric characters.
gatetype(k) AND, NAND, OR, or NOR. The k parameter is the number of inputs of the
gate. x and y represent the piecewise linear variation of the output, as a
function of the input. In multi-input gates, only one input determines the
state of the output.
IC Initial condition. Initial estimate of the value(s) of controlling voltage(s). If
you do not specify IC, the default=0.0.
in +/- Positive or negative controlling nodes. Specify one pair for each dimension.
M Number of replications of the elements in parallel.
MAX Maximum value of the current or resistance. The default is undefined, and
sets no maximum value.
MIN Minimum value of the current or resistance. The default is undefined, and
sets no minimum value.
n+/- Positive or negative node of the controlled element.
G Element Examples
Switch
A voltage-controlled resistor represents a basic switch
characteristic. The resistance between nodes 2 and 0 varies linearly,
from 10 meg to 1 m ohms, when voltage across nodes 1 and 0 varies
between 0 and 1 volt. The resistance remains at 10 meg when below
the lower voltage limit, and at 1 m ohms when above the upper
voltage limit.
Gswitch 2 0 VCR PWL(1) 1 0 0v,10meg 1v,1m
Switch-Level MOSFET
To model a switch level n-channel MOSFET, use the N-piecewise
linear resistance switch. The resistance value does not change when
you switch the d and s node positions.
Voltage-Controlled Capacitor
The capacitance value across the (out,0) nodes varies linearly (from
1 p to 5 p), when voltage across the ctrl,0 nodes varies between 2 v
and 2.5 v. The capacitance value remains constant at 1 picofarad
when below the lower voltage limit, and at 5 picofarads when above
the upper voltage limit.
Gcap out 0 VCCAP PWL(1) ctrl 0 2v,1p 2.5v,5p
Zero-Delay Gate
To implement a two-input AND gate, use an expression and a
piecewise linear table.
• The inputs are voltages at the a and b nodes.
• The output is the current flow from the out to 0 node.
• HSPICE multiplies the current by the SCALE value—which in this
example, is the inverse of the load resistance, connected across
the out,0 nodes.
Gand out 0 AND(2) a 0 b 0 SCALE=’1/rload’ 0v,0a 1v,.5a
+ 4v,4.5a 5v,5a
Delay Element
A delay is a low-pass filter type delay, similar to that of an opamp. In
contrast, a transmission line has an infinite frequency response. A
glitch input to a G delay attenuates in a way that is similar to a buffer
circuit. In this example, the output of the delay element is the current
flow, from the out node to the 1 node, with a value equal to the
voltage across the (in, 0) nodes, multiplied by the SCALE value, and
delayed by the TD value.
Gdio 5 0 CUR=’1e-14*(EXP(V(5)/0.025)-1.0)’
Diode Breakdown
You can model the diode breakdown region to a forward region.
When voltage across a diode is above or below the piecewise linear
limit values (-2.2v, 2v), the diode current remains at the
corresponding limit values (-1a, 1.2a).
Triodes
Both of the following voltage-controlled current sources implement a
basic triode.
• The first example uses the poly(2) operator, to multiply the anode
and grid voltages together, and to scale by .02.
• The second example uses the explicit behavioral algebraic
description.
gt i_anode cathode poly(2) anode,cathode
+ grid,cathode 0 0 0 0 .02
gt i_anode cathode
+ cur=’20m*v(anode,cathode)*v(grid,cathode)’
Linear
Hxxx n+ n- <CCVS> vn1 transresistance <MAX=val> <MIN=val>
+ <SCALE=val> <TC1=val><TC2=val> <ABS=1> <IC=val>
Polynomial (POLY)
Hxxx n+ n- <CCVS> POLY(NDIM) vn1 <... vnndim>
+ <MAX=val><MIN=val> <TC1=val> <TC2=val> <SCALE=val>
+ <ABS=1> P0 <P1…> <IC=val>
Multi-Input Gate
Hxxx n+ n- gatetype(k) vn1, ...vnk <DELTA=val> <SCALE=val>
+ <TC1=val> <TC2=val> x1,y1 ... x100,y100 <IC=val>
Delay Element
Hxxx n+ n- <CCVS> DELAY vn1 TD=val <SCALE=val> <TC1=val>
+ <TC2=val> <NPDELAY=val>
DELAY Keyword for the delay element. Same as for a current-controlled voltage
source, but has an associated propagation delay, TD. Use this element
to adjust the propagation delay in the macro (subcircuit) model process.
DELAY is a HSPICE reserved keyword; do not use it as a node name.
DELTA Controls curvature of piecewise linear corners. The default is 1/4 of the
smallest distance between breakpoints. Maximum is 1/2 of the smallest
distance between breakpoints.
gatetype(k) Can be AND, NAND, OR, or NOR. The k value is the number of inputs
of the gate. The x and y terms are the piecewise linear variation of the
output, as a function of the input. In multi-input gates, one input
determines the output state.
NPDELAY Number of data points to use in delay simulations. The default value is
the larger of either 10, or the smaller of TD/tstep and tstop/tstep. That
min 〈 TD, tstop〉
is: NPDELAY default = max ------------------------------------------, 10 .
tstep
The .TRAN statement specifies the tstep and tstop values.
vn1 … Names of voltage sources, through which controlling current flows. You
must specify one name for each dimension.
x1,... Controlling current, through the vn1 source. Specify the x values in
increasing order.
H Element Examples
HX 20 10 VCUR MAX=+10 MIN=-10 1000
EXAMPLE 2:
.PARAM CT=1000
HX 20 10 VCUR MAX=+10 MIN=-10 CT
HXY 13 20 POLY(2) VIN1 VIN2 0 0 0 0 1 IC=0.5, 1.3
General Form
The general syntax for a U Element digital source is:
Uxxx interface nlo nhi mname SIGNAME = sname IS = val
Model Syntax
.MODEL mname U LEVEL=5 <parameters...>
Digital input.
CLO Interface
Node to Node
Low_ref
source
RLO
EXAMPLE:
The following example shows how to use the U Element and model,
as a digital input for a HSPICE netlist.
* EXAMPLE OF U-ELEMENT DIGITAL INPUT
UC carry-in VLD2A VHD2A D2A SIGNAME=1 IS=0
VLO VLD2A GND DC 0
VHI VHD2A GND DC 1
.MODEL D2A U LEVEL=5 TIMESTEP=1NS,
+ S0NAME=0 S0TSW=1NS S0RLO = 15, S0RHI = 10K,
+ S2NAME=x S2TSW=3NS S2RLO = 1K, S2RHI = 1K
+ S3NAME=z S3TSW=5NS S3RLO = 1MEG,S3RHI = 1MEG
+ S4NAME=1 S4TSW=1NS S4RLO = 10K, S4RHI = 60
.PRINT V(carry-in)
.TRAN 1N 100N
.END
The associated digital input file is:
1
00 1:1
09 z:1
10 0:1
11 z:1
20 1:1
30 0:1
39 x:1
40 1:1
41 x:1
50 0:1
60 1:1
70 0:1
80 1:1
Sources and Stimuli: Digital and Mixed Mode Stimuli
5-65
U Element Digital Outputs
The general syntax for a digital output in a HSPICE output is:
U<name> interface reference mname SIGNAME = sname
Model Syntax
.MODEL mname U LEVEL=4 <parameters...>
Digital output.
Reference Node
EXAMPLE:
The following is an example of replacing sources with digital
inputs.
* EXAMPLE OF U-ELEMENT DIGITAL OUTPUT
VOUT carry_out GND PWL 0N 0V 10N 0V 11N 5V 19N 5V 20N 0V
+ 30N 0V 31N 5V 39N 5V 40N 0V
VREF REF GND DC 0.0V
UCO carry-out REF A2D SIGNAME=12
* DEFAULT DIGITAL OUTPUT MODEL (no “X” value)
12
0 0:1
1051:1
1970:1
3051:1
3970:1
The .VEC file must be a text file. If you transfer it between Unix and
Windows, use text mode.
A single .VEC statement should not reference more than four signal
names. Alphabetic characters in hexadecimal numbers must be
lower-case (for example, use f instead of F).
Vector Patterns
The Vector Pattern Definition section defines the vectors—their
names, sizes, signal direction, sequence or order for each vector
stimulus, and so on. It must occur first in the digital vector file. The
statements within this section (except the radix statement) can
appear in any order, and all keywords are case-insensitive.
A sample Vector Pattern Definition section follows:
RADIX 1111 1111
VNAME A B C D E F G H
IO IIII IIII
TUNIT ns
These lines are required, and should be the first lines in a vector file:
• The RADIX line defines eight single-bit vectors.
• VNAME gives each vector a name.
• IO determines which vectors are inputs, outputs, or bidirectional
signals. In this example, all eight are input signals.
• TUNIT indicates that the time unit for the tabular data to follow,
are in units of nanoseconds.
For an explanation of keywords, such as radix and vname, see
Defining Tabular Data on page 5-81.
1 2 Binary 0, 1
2 4 – 0–3
3 8 Octal 0–7
4 16 Hexadecimal 0–F
The file contains only one radix statement. It must be the first non-
comment line.
SYNTAX:
RADIX 1 1 1 1 1 1 1 1 1 1 1 1
EXAMPLE:
This example illustrates two 1-bit signals, followed by a 4-bit signal,
followed by one each 1-bit, 2-bit, 3-bit, and 4-bit signals, and finally
eight 1-bit signals.
EXAMPLE:
a[0:3]
This example represents a0, a1, a2, and a3, in that order. HSPICE
does not reverse the order to make a3 the first bit.
The bit order is MSB:LSB, which means most significant bit to least
significant bit. For example, you can represent a 5-bit bus such as:
{a4 a3 a2 a1 a0}, using this notation: a[4:0]. The high bit is a4, which
represents 2^4. It is the largest value, and therefore is the MSB.
RADIX 2 4
VNAME VA[0:1] VB[4:1]
HSPICE generates voltage sources with the following names:
EXAMPLE 2:
If you specify:
EXAMPLE 3:
To specify a single bit of a bus:
VNAME VA[[2:2]]
VA[2]
EXAMPLE 4:
This example generates signals named A0, A1, A2, ... A23:
RADIX 444444
VNAME A[0:23]
b Bidirectional vector.
SYNTAX:
IO I O B U
EXAMPLE:
• If you do not specify the io statement, HSPICE assumes that all
signals are input signals.
• If you define more than one io statement, the last statement
overrules previous statements.
io i i i bbbb iiiioouu
Tunit Statement
The TUNIT statement defines the time unit in the digital vector file,
for PERIOD, TDELAY, SLOPE, TRISE, TFALL, and absolute time.
• If you do not specify the tunit statement, the default time unit
value is ns.
• If you define more than one tunit statement, the last statement
overrules the previous statement.
EXAMPLE:
The TUNIT statement in this example specifies that the absolute
times in the Tabular Data section are 11.0ns, 20.0ns, and 33.0ns.
TUNIT ns
11.0 1000 1000
20.0 1100 1100
33.0 1010 1001 Period and Tskip Statements
The PERIOD statement defines the time interval for the Tabular Data
section. You do not need to specify the absolute time at every time
point. If you use a PERIOD statement, without the TSKIP statement,
the Tabular Data section contains only signal values, not absolute
times. The TUNIT statement defines the time unit of the PERIOD.
SYNTAX:
PERIOD x
• The first row of the tabular data (1000 1000) is at time 0ns.
The tskip statement specifies to ignore the absolute time field in the
tabular data. You can then keep, but ignore, the absolute time field
of each row in the tabular data, when you use the period statement.
EXAMPLE 2:
If your netlist contains:
You might do this, for example, if the absolute times are not perfectly
periodic for testing reasons. Another reason might be that a path in
the circuit does not meet timing, but you might still use it as part of a
test bench. Initially, HSPICE writes to the vector file, using absolute
time. After you fix the circuit, you might want to use periodic data.
SYNTAX:
ENABLE controlling_signalname mask
EXAMPLE:
In this example, the x and y signals are bidirectional, as defined by
the b in the io line.
SYNTAX:
The Tabular Data section defines (in tabular format) the values of the
signals, at specified times. Its general format is:
EXAMPLE:
10.0 1000 0000
15.0 1100 1100
20.0 1010 1001
30.0 1001 1111
This example feature eight signals, so it has eight vectors. The first
signal (starting from the left) vector is [1 1 1 1]; the second vector is
[0 1 0 0]; and so on.
EXAMPLE:
• The first line of the example below is a comment line, because of
the semicolon character.
• The next line expects the output to be 1 for the first and fourth
vectors, while all others are expected to be low.
• At 20 time units, HSPICE expects the first and second vectors to
be high, and the third and fourth to be low.
• At 30 time units, HSPICE expects only the first vector to be high,
and all others low.
• At 35 time units, HSPICE expects the output of the first two
vectors to be “don’t care”; it expects vectors 3 and 4 to be low.
...
IO OOOO; start of tabular section data
11.0 1 0 0 1
20.0 1 1 0 0
30.0 1 0 0 0
35.0 x x 0 0
You can also use unknown values (X) and high-impedance (Z) in the
<number> field. An X or Z sets four bits in the hexadecimal base,
three bits in the octal base, or one bit in the binary base.
EXAMPLE:
4’b1111
12’hABx
32’bZ
8’h1
EXAMPLE:
The PERIOD statement in this example sets the time interval to
10ns, between successive lines in the tabular data. This is a
shortcut, when you use the vectors in regular intervals, throughout
the entire simulation.
RADIX 1111 1111
VNAME A B C D E F G H
IO IIII IIII
TUNIT ns
PERIOD 10
; start of vector data section
1000 1000
1100 1100
1010 1001
EXAMPLE:
11.0 1000 1000
20.0 1100 1100
33.0 1010 1001
• At 11.0 time units, the value for the first and fifth vectors is 1.
• At 20.0 time units, the first, second, fifth, and sixth vectors are 1.
• At 33.0 time units, the first, third, fifth, and eighth vectors are 1.
For more information about this section of the digital vector file, see
Defining Tabular Data on page 5-81.
Waveform Characteristics
The Waveform Characteristics section defines various attributes for
signals, such as the rise or fall time, the thresholds for logic high or
low, and so on. A sample Waveform Characteristics section follows:
• The TRISE (signal rise time) setting of 0.3ns applies to the first
four vectors, but not to the last four.
• The example does not show how many bits are in each of the first
four vectors, although the first vector is at least one bit.
SYNTAX:
TDELAY x
EXAMPLE:
This example does not specify the TUNIT statement, so HSPICE uses
the default, ns, as the time unit for this example. The first TDELAY
statement indicates that all signals have the same delay time of
1.0ns. Subsequent TDELAY statements overrule the delay time of
some signals.
• The delay time for the V2 and Vx signals is -1.2.
• The delay time for the V4, V5[0:1], and V6[0:2] signals is 1.5.
• The input delay time for the V7[0:3] signals is 2.0, and the output
delay time is 3.0.
Slope Statement
• The slope statement specifies the fall times for the input signal.
SYNTAX:
SLOPE x
Default value = 0.1ns
• If you do not specify the slope statement, the default slope value
is 0.1 ns.
• If you specify more than one slope statement, the last statement
overrules the previous statements, and HSPICE issues a
warning message.
Trise Statement
The TRISE statement specifies the rise time of each input signal for
which the mask applies. The TUNIT statement defines the time unit
of TRISE.
SYNTAX:
TRISE x
• If you do not use any trise statement to specify the rising time of
the signals, HSPICE uses the value defined in the slope
statement.
• If you apply more than one trise statement to a signal, the last
statement overrules the previous statements, and HSPICE
issues a warning message.
TRISE statements have no effect on the expected output signals.
TRISE 0.3
TRISE 0.5 0 1 1 137F 00000000
TRISE 0.8 0 0 0 0000 11110000
Tfall Statement
The TFALL statement specifies the falling time of each input signal
for which the mask applies.The TUNIT statement defines the time
unit of TFALL.
SYNTAX:
TFALL x
• If you use more than one tfall statement for a signal, the last
statement over-rules previous statements. HSPICE issues a
warning.
• The first TFALL statement applies a 0.5 time unit fall time
globally.
• The second TFALL statement applies a fall time of 0.3 time units
to vectors 2, 3, and 4 through 7.
• The third TFALL statement applies a fall time of 0.9 time units to
vectors 8 to 11.
TFALL 0.5
TFALL 0.3 0 1 1 137F 00000000
TFALL 0.9 0 0 0 0000 11110000
The out (or outz) statements have no effect on the expected output
signals.
SYNTAX:
OUT x (or OUTZ x)
Default value = 0
OUT 15.1
OUT 150 1 1 1 0000 00000000
OUTZ 50.5 0 0 0 137F 00000000
Triz Statement
The triz statement specifies the output impedance, when the signal
(for which the mask applies) is in tristate; triz applies only to the input
signals.
• If you do not specify the tristate impedance of a signal, in a triz
statement, HSPICE assumes 1000M.
• If you apply more than one triz statement to a signal, the last
statement overrules the previous statements, and HSPICE
issues a warning.
TRIZ statements have no effect on the expected output signals.
SYNTAX:
TRIZ x
Default value = 1000Meg
EXAMPLE:
• The first TRIZ statement sets the high impedance resistance
globally, at 15.1 Mohms.
• The second TRIZ statement increases the value to 150 Mohms,
for vectors 1 to 3.
VIH Statement
The VIH statement specifies the logic-high voltage, for each input
signal to which the mask applies.
• If you do not specify the logic high voltage of the signals, in a vih
statement, HSPICE assumes 3.3.
• If you use more than one vih statement for a signal, the last
statement over-rules previous statements. HSPICE issues a
warning.
SYNTAX:
VIH x
Default value = 3.3
EXAMPLE:
• The first VIH statement sets all input vectors to 5V, when they are
high.
• The last VIH statement changes the logic-high voltage from 5V to
3.5V, for the last eight vectors.
VIH 5.0
VIH 3.5 0 0 0 0000 11111111
• If you apply more than one vil statement to a signal, the last
statement overrules the previous statements, and HSPICE
issues a warning.
SYNTAX:
VIL x
Default value = 0.0
EXAMPLE:
• The first VIL statement sets the logic-low voltage to 0V, for all
vectors.
• The second VIL statement changes the voltage to 0.5, for the last
eight vectors.
VIL 0.0
VIL 0.5 0 0 0 0000 11111111
VREF Statement
Similar to the tdelay statement, the VREF statement specifies the
name of the reference voltage, for each input vector to which the
mask applies. VREF applies only to input signals.
SYNTAX:
VREF vx
Default value = 0
EXAMPLE:
VNAME v1 v2 v3 v4 v5[1:0] v6[2:0] v7[0:3] v8 v9 v10
VREF 0
VREF 0 111 137F 000
VREF vss 0 0 0 0000 111
v1 V1 0 pwl(......)
However, v8 is realized by
V8 V8 vss pwl(......)
SYNTAX:
VTH x
Default value = 1.65
EXAMPLE:
• The first VTH statement sets the logic threshold voltage at 1.75V.
• The next line changes that threshold to 2.5V, for the first 7
vectors.
• The last line changes that threshold to 1.75V, for the last 8
vectors.
VTH 1.75
VTH 2.5 1 1 1 137F 00000000
VTH 1.75 0 0 0 0000 11111111
Note: All of these examples apply the same vector pattern, and both
output and input control statements, so the vectors are all
bidirectional.
SYNTAX:
VOH x
Default value = 3.3
EXAMPLE:
• The first line tries to set a logic-high output voltage of 4.75V, but
it is redundant.
• The second line changes the voltage level to 4.5V, for the first
seven vectors.
• The last line changes the last eight vectors to a 3.5V logic-high
output.
These second and third lines completely override the first VOH
statement.
VOH 4.75
VOH 4.5 1 1 1 137F 00000000
VOH 3.5 0 0 0 0000 11111111
Note: If you do not define either voh or vol, HSPICE uses vth (default
or defined).
• If you apply more than one vol statements to a signal, the last
statement overrules the previous statements, and HSPICE
issues a warning.
Note: If you do not define either VOH or VOL, then HSPICE uses
VTH (default or defined).
SYNTAX:
VOL x
Default value = 0.0
EXAMPLE:
• The first VOL statement below sets the logic-low output to 0V.
• The second VOL statement sets the output voltage to 0.2V, for
the fourth through seventh vectors.
• The last statement increases the voltage further to 0.5V, for the
first three vectors.
VOL 0.0
VOL 0.2 0 0 0 137F 00000000
VOL 0.5 1 1 1 0000 00000000
EXAMPLE:
; This is a comment line
radix 1 1 4 1234 ; This is a radix line
Continuing a Line
As in netlists, any line in a vector file that starts with a plus sign (+)
is a continuation from the previous line.
• Built-In Functions
• Parameter Scoping and Passing
Defining Parameters
Parameters in HSPICE are names that you associate with numeric
values (see .PARAM Statement on page 3-41). You can use any of
these methods to define parameters:
.PARAM DupParam = 1
...
.PARAM DupParam = 3
SYNTAX:
.PARAM <ParamName> = <RealNumber>
.PARAM <ParamName> = ’<Expression>’ $ Quotes are mandatory
.PARAM <ParamName1> = <ParamName2> $ Cannot be recursive!
EXAMPLE 1:(Numerical)
.PARAM TermValue = 1g
rTerm Bit0 0 TermValue
rTerm Bit1 0 TermValue
...
EXAMPLE 2:(Expression)
.PARAM Pi = ’355/113’
.PARAM Pi2 = ’2*Pi’
.PARAM npRatio = 2.1
.PARAM nWidth = 3u
.PARAM pWidth = ’nWidth * npRatio’
Mp1 ... <pModelName> W = pWidth
Mn1 ... <nModelName> W = nWidth
...
Parameters and Functions: Using Parameters in Simulation (.PARAM)
6-4
Inline Parameter Assignments
To define circuit values, using a direct algebraic evaluation:
r1 n1 0 R = ’1k/sqrt(HERTZ)’ $ Resistance for frequency
Parameters in Output
To use an algebraic expression as an output variable in
a .PRINT, .PLOT, .PROBE .GRAPH, or .MEASURE statement, use
the PAR keyword (see Simulation Output on page 7-1 for more
information about simulation output).
EXAMPLE:
.PRINT DC v(3) gain = PAR(‘v(3)/v(2)’) PAR(‘v(4)/v(2)’)
funcname Specifies the function name. This parameter must be distinct from array
names and built-in functions. In subsequently defined functions, all
embedded functions must be previously defined.
SYNTAX:
.PARAM <ParamName>(<pv1>[, <pv2>...]) = ’<Expression>’
EXAMPLE:
.PARAM CentToFar (c) = ’(((c*9)/5)+32)’
.PARAM F(p1,p2) = ’Log(Cos(p1)*Sin(p2))’
.PARAM SqrdProd (a,b) = ’(a*a)*(b*b)’
SYNTAX:
.SUBCKT <SubName> <PinList> [<SubDefaultsList>]
EXAMPLE:
This example implements an inverter that uses a Strength
parameter. By default, the inverter can drive three devices. Enter a
new value for the Strength parameter in the element line, to select
larger or smaller inverters for the application.
Measurement Parameters
.MEASURE statements produce a measurement parameter. The
rules for measurement parameters are the same as for standard
parameters, except that measurement parameters are defined in
a .MEASURE statement, not in a .PARAM statement. For a
description of the .MEASURE statement, see Specifying User-
Defined Analysis (.MEASURE) on page 7-39.
.PRINT|.PROBE|.PLOT|.GRAPH Parameters
.PRINT|.PROBE|.PLOT|.GRAPH statements in HSPICE produce a
print parameter. The rules for print parameters are the same as the
rules for standard parameters, except that you define the parameter
directly in a .PRINT|.PROBE|.PLOT|.GRAPH statement, not in
a .PARAM statement.
Multiply Parameter
The most basic subcircuit parameter, in HSPICE, is the M (multiply)
parameter. For a description of this parameter, see M (Multiply)
Parameter on page 3-58.
1.Synopsys HSPICE uses double-precision numbers (15 digits) for expressions, user-defined parameters, and sweep
variables. For better precision, use parameters (instead of constants) in algebraic expressions, because constants are
only single-precision numbers (7 digits).
• Algebra in elements:
R1 1 0 r = ’ABS(v(1)/i(m1))+10’
The basic syntax for using algebraic expressions for output is:
PAR(‘algebraic expression’)
Library Integrity
Integrity is a fundamental requirement for any symbol library. Library
integrity can be as simple as a consistent, intuitive name scheme, or
as complex as libraries with built-in range checking.
Library integrity might be poor if you use libraries from different
vendors in a circuit design. Because names of circuit parameters are
not standardized between vendors, two components can include the
same parameter name for different functions. For example, one
vendor might build a library that uses the name Tau as a parameter
to control one or more subcircuits in their library. Another vendor
might use Tau to control a different aspect of their library. If you set
a global parameter named Tau to control one library, you also modify
the behavior of the second library, which might not be the intent.
Reusing Cells
Parameter name problems also occur if different groups collaborate
on a design. Global parameters prevail over local parameters, so all
circuit designers must know the names of all parameters, even those
used in sections of the design for which they are not responsible.
This can lead to a large investment in standard libraries. To avoid this
situation, use local parameter scoping, to encapsulate all information
about a section of a design, within that section.
EXAMPLE 2:
In this example, the name of a global parameter conflicts with the
internal library parameter named Wid. Another user might specify
such a global parameter, in a different library. In this example, the
user of the library has specified a different meaning for the Wid
parameter, to define an independent source.
.Param Wid = 5u $ Default Pulse Width for source
v1 Pulsed 0 Pulse ( 0v 5v 0u 0.1u 0.1u Wid 10u )
...
* Subcircuit default definition
.SUBCKT Inv A Y Wid = 0 $ Inherit illegals by default
mp1 <NodeList> <Model> L = 1u W = ’Wid*2’
mn1 <NodeList> <Model> L = 1u W = Wid
.Ends
* Invoke symbols in a design
x1 A Y1 Inv $ Incorrect width!
x2 A Y2 Inv Wid = 1u $ Incorrect! Both x1 and x2
$ simulate with mp1 = 10u and
$ mn1 = 5u instead of 2u and 1u.
When you use the parameter inheritance method, you can specify to
use local scoping rules. This feature can cause different results than
you obtained using HSPICE versions before release 95.1, on
existing circuits.
When you use local scoping rules, the Example 2 netlist correctly
aborts in x1, for W = 0 (default Wid = 0, in the .SUBCKT definition,
has higher precedence, than the .PARAM statement). This results in
the correct device sizes for x2. This change can affect your
simulation results, if you intentionally or accidentally create a circuit
such as the second one shown above.
The default setting is GLOBAL, which uses the same scoping rules
that HSPICE used before Release 95.1.
EXAMPLE:
The following example explicitly shows the difference between local
and global scoping, for using parameters in sub-circuits.
The total resistance of the chain has two possible solutions: 0.3333
Ω and 0.5455 Ω .
You can use the PARHIER option to specify which parameter value
prevails, when you define parameters with the same name at
different levels of the design hierarchy.
Under global scoping rules, if names conflict, the top-level
assignment .PARAM Val = 1 overrides the subcircuit defaults, and
the total is 0.3333 Ω Under local scoping rules, the lower level
assignments prevail, and the total is 0.5455 Ω (one, two, and three
ohms in parallel).
r1 1.0 1.0
r2 2.0 1.0
r3 3.0 1.0
Simulation Output:
7-1
Overview of Output Statements
Output Commands
The input netlist file contains output statements, including .PRINT,
.PLOT, .GRAPH, .PROBE, .MEASURE, and .DOUT. Each
statement specifies the output variables, and the type of simulation
result, to display—such as .DC, .AC, or .TRAN. When you
specify .OPTION POST, Synopsys HSPICE puts all output variables,
referenced in .PRINT, .PLOT, .GRAPH, .PROBE, .MEASURE,
.DOUT, and .STIM statements, into AvanWaves interface files.
AvanWaves provides high-resolution, post-simulation, and
interactive display of waveforms.
Table 7-1 Output Statements
Output Description
Statement
.PRINT Prints numeric analysis results in the output listing file (and post-
processor data, if you specify .OPTION POST).
.PLOT Generates low-resolution (ASCII) plots in the output listing file (and post-
(HSPICE only) processor data, if you specify .OPTION POST), in HSPICE.
.PROBE Outputs data to post-processor output files, but not to the output listing
(used with .OPTION PROBE, to limit output).
.PRINT Statement
The .PRINT statement specifies output variables, for which HSPICE
prints values.
• The maximum number of variables in a single .PRINT statement,
was 32 before Release 2002.2, but has been extended. For
example, you can enter:
.PRINT v(1) v(2) ... v(32) v(33) v(34)
This function previously required two .PRINT statements:
.PRINT v(1) v(2) ... v(32)
.PRINT v(33) v(34)
• To simplify parsing of the output listings, HSPICE prints a single
x in the first column, to indicate the beginning of the .PRINT
output data. A single y in the first column indicates the end of
the .PRINT output data.
SYNTAX:
.PRINT antype ov1 <ov2 … >
antype Type of analysis for outputs. Antype is one of the following types: DC, AC, TRAN,
NOISE, or DISTO.
ov1 … Output variables to print. These are voltage, current, or element template
variables, from a DC, AC, TRAN, NOISE, or DISTO analysis.
EXAMPLE:
If your circuit contains four MOSFET elements (named m1, m2, m3,
and m4), then .print iall (m*) is equivalent to .print i(m1) i(m2) i(m3)
i(m4), and prints the output currents of all four MOSFET elements.
Statement Order
HSPICE creates different .sw0 and .tr0 files, based on the order of
the .print and .dc statements. If you do not specify an analysis type
for a .print command, the type matches the last analysis command
in the netlist, before the .print statement.
EXAMPLE 1:
CASE 1
.print v(din) i(mxn18)
.dc vdin 0 5.0 0.05
.tran 1ns 60ns
CASE 2
.dc vdin 0 5.0 0.05
.tran 1ns 60ns
.print v(din) i(mxn18)
CASE 3
.dc vdin 0 5.0 0.05
.print v(din) i(mxn18)
.tran 1ns 60ns
• If you replace the .print statement with:
.print TRAN v(din) i(mnx)
then all three cases have identical .sw0 and .tr0 files.
• If you replace the .print statement with:
.print DC v(din) i(mnx)
then the .sw0 and .tr0 files are different.
This example prints the results of a transient analysis, for the nodal
voltage named 4. It also prints the current, through the voltage
source named VIN. It also prints the ratio of the nodal voltage at the
OUT and IN nodes.
EXAMPLE 3:
.PRINT AC VM(4,2) VR(7) VP(8,3) II(R1)
EXAMPLE 4:
.PRINT AC ZIN YOUT(P) S11(DB) S12(M) Z11(R)
EXAMPLE 6:
.PRINT NOISE INOISE
EXAMPLE 7:
.PRINT DISTO HD3 SIM2(DB)
EXAMPLE 8:
.PRINT AC INOISE ONOISE VM(OUT) HD3
EXAMPLE 9:
.PRINT pj1 = par(‘p(rd) +p(rs)‘)
This statement prints the value of pj1, with the specified function.
Note: HSPICE ignores .PRINT statement references to nonexistent
netlist part names, and prints those names in a warning.
.PLOT Statement
The .PLOT statement plots the output values of one or more
variables, in a selected HSPICE analysis. Each .PLOT statement
defines the contents of one plot, which can contain more than one
output variable.
If you do not specify plot limits, HSPICE determines the minimum
and maximum values of each output variable that it plots, and scales
each plot to fit common limits. To force HSPICE to set limits for
certain variables, set the plot limits to (0,0) for the variables.
To make HSPICE find plot limits for each plot individually, use
.OPTION PLIM to create a different axis for each plot variable. The
PLIM option is similar to the plot limit algorithm in SPICE2G.6, where
each plot can have limits different from any other plot. A number from
2 through 9 indicates the overlap of two or more traces on a plot.
If more than one output variable appears on the same plot, HSPICE
prints and plots the first variable specified. To print out more than one
variable, include another .PLOT statement.
You can specify an unlimited number of .PLOT statements for each
type of analysis. To set the plot width, use the CO (columns out)
option. If you set CO to 80, the plot has 50 columns. If CO is 132, the
plot has 100 columns.
You can include wildcards in .PLOT statements. See Using
Wildcards on page 2-2.
Simulation Output: Displaying Simulation Results
7-8
SYNTAX:
.PLOT antype ov1 <(plo1,phi1)> <ov2> <(plo2,phi2)> ...>
antype Type of analysis for the specified plots. Analysis types are: DC, AC, TRAN,
NOISE, or DISTO.
ov1 … Output variables to plot: voltage, current, or element template, from a DC,
AC, TRAN, NOISE, or DISTO analysis. See the next sections for syntax.
plo1, Lower and upper plot limits. The plot for each output variable uses the first
phi1 … set of plot limits, after the output variable name. Set a new plot limit for each
output variable, after the first plot limit. For example, to plot all output
variables that use the same scale, specify one set of plot limits at the end of
the .PLOT statement. If you set the plot limits to (0,0) HSPICE automatically
sets the plot limits.
EXAMPLE:
In the following example, PAR plots the ratio of the collector current
and the base current, for the Q1 transistor.
.PLOT DC V(4) V(5) V(1) PAR(‘I1(Q1)/I2(Q1)’)
.PLOT TRAN V(17,5) (2,5) I(VIN) V(17) (1,9)
.PLOT AC VM(5) VM(31,24) VDB(5) VP(5) INOISE
The second of the two above examples uses the VDB output
variable to plot AC analysis results (in decibels), for node 5. The AC
plot can include NOISE results and other variables that you specify.
.PLOT AC ZIN YOUT(P) S11(DB) S12(M) Z11(R)
.PLOT DISTO HD2 HD3(R) SIM2
.PLOT TRAN V(5,3) V(4) (0,5) V(7) (0,10)
.PLOT DC V(1) V(2) (0,0) V(3) V(4) (0,5)
In the last example above, HSPICE sets the plot limits for V(1) and
V(2), but you specify 0 and 5 volts as the plot limits for V(3) and V(4).
antype Type of analysis for the specified plots. Analysis types are: DC, AC, TRAN,
NOISE, or DISTO.
ov1 … Output variables to plot. These are voltage, current, or element template
variables from a DC, AC, TRAN, NOISE, or DISTO analysis. A .PROBE
statement can include more than one output variable.
EXAMPLE:
.PROBE DC V(4) V(5) V(1) beta = PAR(‘I1(Q1)/I2(Q1)’)
EXAMPLE 2:
Derivative function:
.PROBE der=deriv(’v(NodeX)’)
.GRAPH Statement
Use the .GRAPH statement when you need high-resolution plots of
HSPICE simulation results.
Each .GRAPH statement creates a new .gr# file, where # ranges first
from 0 to 9, and then from a to z. You can create up to 36 graph files.
If you specify more than 36 .GRAPH statements, HSPICE overwrites
the graph files, starting with the .gr0 file.
pnam1 = val1… Each .GRAPH statement model includes several model parameters. If you
do not specify model parameters, HSPICE uses the default values of the
model parameters, described in the following table. Pnamn is one of the
model parameters of a .GRAPH statement, and valn is the value of pnamn.
Valn can be more than one parameter.
EXAMPLE:
* test wildcard
.option post=2
v1 1 0 10
r1 1 n20 10
r20 n20 n21 10
r21 n21 0 10
.dc v1 1 10 1
***Wildcard equivalent for:
*.print i(r1) i(r20) i(r21) i(v1)
.print i(*)
***Wildcard equivalent for:
*.probe v(0) v(1)
.probe v(?)
***Wildcard equivalent for:
*.plot v(n20) v(n21)
.plot v(n2?)
***Wildcard equivalent for:
*.graph v(n20, 1) v(n21, 1)
.graph v(n2*, 1)
.end
EXAMPLE:
Using wildcards in statements such as v(n2?) and v(n2*,1) in the
preceding test case (named test wildcard), you can also use the
following in statements (they are not equivalent), if you use an .ac
statement instead of a .dc statement:
vm(n2?) vr(n2?) vi(n2?) vp(n2?) vdb(n2?) vt(n2?)
vm(n2*,1) vr(n2*,1) vi(n2*,1) vp(n2*,1) vdb(n2*,1) vt(n2*,1)
iall is an output template, for all branch currents of diode, BJT, JFET,
or MOSFET output. For example, iall(m*) is equivalent to:
i1(m*) i2(m*) i3(m*) i4(m*).
.WIDTH Statement
You can use the .WIDTH statement to define the print-out width in
HSPICE.
SYNTAX:
.WIDTH OUT = {80 |132}
where OUT is the output print width
EXAMPLE:
.WIDTH OUT = 132 $ SPICE compatible style
.OPTION CO = 132 $ preferred style
Permissible values for OUT are 80 and 132. You can also use the
CO option to set the OUT value.
EXAMPLE 1:
.GLOBAL vdd vss
X1 1 2 3 nor2
X2 3 4 5 nor2
.SUBCKT nor2 A B Y
.PRINT v(B) v(N1) $ Print statement 1
M1 N1 A vdd vdd pch w = 6u l = 0.8u
M2 Y B N1 vdd pch w = 6u l = 0.8u
M3 Y A vss vss vss nch w = 3u l = 0.8u
M4 Y B vss vss nch w = 3u l = 0.8u
.ENDS
n1, n2 HSPICE prints or plots the voltage difference (n1-n2) between the specified
nodes. If you omit n2, HSPICE prints or plots the voltage difference between n1
and ground (node 0).
EXAMPLE:
.PLOT TRAN I(VIN)
.PRINT DC I(X1.VSRC)
.PLOT DC I(XSUB.XSUBSUB.VY)
EXAMPLE 1:
I1(R1)
This example specifies the current through the first R1 resistor node.
EXAMPLE 2:
I4(X1.M1)
This example specifies the current, through the fourth node (the
substrate node) of the M1 MOSFET, defined in the X1 subcircuit.
EXAMPLE 3:
I2(Q1)
The last example specifies the current, through the second node (the
base node) of the Q1 bipolar transistor.
To define each branch circuit, use a single element statement. When
HSPICE evaluates branch currents, it inserts a zero-volt power
supply, in series with branch elements.
If HSPICE cannot interpret a .PRINT or .PLOT statement that
contains a branch current, it generates a warning.
I1 (R1) node1
R1
I2 (R1) node2
I2(L1) I2(C1)
node2
Power Output
For power calculations, HSPICE computes dissipated or stored
power in each passive element (R, L, C), and source (V, I, G, E, F,
and H). To compute this power, HSPICE multiplies the voltage
across an element, and its corresponding branch current.
SYNTAX:
.PRINT <DC | TRAN> P(element_or_subcircuit_name)POWER
EXAMPLE:
.PRINT TRAN P(M1) P(VIN) P(CLOAD)POWER
.PRINT TRAN P(Q1) P(DIO) P(J10)POWER
.PRINT TRAN POWER $ Total transient analysis
* power dissipation
.PLOT DC POWER P(IIN) P(RLOAD) P(R1)
.PLOT DC POWER P(V1) P(RLOAD) P(VS)
.PRINT TRAN P(Xf1) P(Xf1.Xh1)
DB decibel
I imaginary part
M magnitude
P phase
R real part
T group delay
Nodal Voltage
SYNTAX:
Vx (n1,<,n2>)
x Specifies the voltage output type (see Table 7-20 on page 7-32])
n1, n2 Specifies node names. If you omit n2, HSPICE assumes ground (node 0).
• Magnitude:
VM(N1,0) = [VR(N1,0)2 + VI(N1,0)2]0.5
VM(N2,0) = [VR(N2,0)2 + VI(N2,0)2]0.5
VM(N1,N2) = VM(N1,0) - VM(N2,0)
• Decibel:
VDB(N1,N2) = 20 ⋅ LOG10(VM(N1,0)/VM(N2,0))
• Magnitude:
VM(N1,N2) = [VR(N1,N2)2+VI(N1,N2)2]0.5
• Phase:
VP(N1,N2) = ARCTAN[VI(N1,N2)/VR(N1,N2)]
• Decibel:
VDB(N1,N2) = 20 ⋅ LOG10[VM(N1,N2)]
SYNTAX:
Iz (Vxxx)
SYNTAX:
Izn (Wwww)
Wwww Element name. If the element is within a subcircuit, then to access its
current output, append a dot and the subcircuit name to the element
name. For example, IM3(X1.Wwww).
If you use the form In(Xxxx) for AC analysis output, then HSPICE
prints the magnitude value, IMn(Xxxx).
1 ( phase2 – phase1 )
TD = – ---------- ⋅ -----------------------------------------------------
360 ( f2 – f1 )
where phase1 and phase2 are the phases (in degrees) of the
specified signal, at the f1 and f2 frequencies (in Hertz).
EXAMPLE:
INTEG.SP ACTIVE INTEGRATOR
****** INPUT LISTING
******
V1 1 0 .5 AC1
R1 1 2 2K
C1 2 3 5NF
E3 3 0 2 0 -1000.0
.AC DEC 15 1K 100K
.PLOT AC VT(3) (0,4U) VP(3)
.END
Network
SYNTAX:
Xij (z), ZIN(z), ZOUT(z), YIN(z), YOUT(z)
SYNTAX:
ovar <(z)>
ovar Noise and distortion analysis parameter. It can be ONOISE (output noise),
INOISE (equivalent input noise), or any of the distortion analysis parameters
(HD2, HD3, SIM2, DIM2, DIM3).
z Output type (only for distortion). If you omit z, HSPICE outputs the magnitude
of the output variable.
EXAMPLE:
.PRINT DISTO HD2(M) HD2(DB)
Note: You can specify the noise and distortion output variable, and
other AC output variables, in the .PRINT AC or .PLOT AC
statements.
SYNTAX:
Elname:Property
nn Code number for the desired parameter (listed in tables in this section).
EXAMPLE:
.PLOT TRAN V(1,12) I(X2.VSIN) I2(Q3) DI01:GD
.PRINT TRAN X2.M1:CGGBO M1:CGDBO X2.M1:CGSBO
• propagation
• delay
• rise time
• fall time
• peak-to-peak voltage
You can also use .MEASURE with either the error function or GOAL
parameter, to optimize circuit component values, and to curve-fit
measured data to model parameters.
.MEASURE Performance
If you specify a large number of .measure statements, HSPICE
might not complete for several minutes, or several hours. Overall
simulation run time depends on the number of .measure statements
to process for each iteration, and the number of iterations required
to achieve convergence.
EXAMPLE 2:
Improved Case (Faster):
.meas tran val1 AVG v(1) FROM=0ms TO=50ms
.meas tran val3 AVG v(1) FROM=50ms TO=100ms
.meas tran val2 AVG v(2) FROM=0ms TO=50ms
.meas tran val4 AVG v(2) FROM=50ms TO=100ms
SYNTAX:
.option meassort=0 (default; does not sort .measure statements)
.option meassort=1 (internally sorts .measure statements)
EXAMPLE:
The following example illustrates how HSPICE handles .MEASURE
statement parameters.
...
.MEASURE tran length TRIG v(clk) VAL = 1.4
+ TD = 11ns RISE = 1 TARGv(neq) VAL = 1.4 TD = 11ns
+ RISE = 1
.SUBCKT path out in width = 0.9u length = 600u
+ rm1 in m1 m2mg w = ’width’ l = ’length/6’
...
.ENDS
SYNTAX:
.MEASURE <DC|AC|TRAN> result TRIG … TARG …
+ <GOAL = val> <MINVAL = val> <WEIGHT = val>
MINVAL If the absolute value of GOAL is less than MINVAL, the MINVAL replaces
the GOAL value, in the denominator of the ERRfun expression. Used
only in ERR calculation for optimization. Default = 1.0e-12.
WEIGHT Multiplies the calculated error by the weight value. Used only in ERR
calculation for optimization. Default = 1.0.
You can use the LAST keyword in TARG_SPEC to indicate the last
event. TRIG_SPEC and TARG_SPEC can also use the syntax:
TRIG AT = time
Trigger
TRIG trig_var VAL = trig_val <TD = time_delay>
+ <CROSS = c> <RISE = r> <FALL = f>
TRIG AT = val
HSPICE Example
.MEASURE TRAN tdlay TRIG V(1) VAL = 2.5 TD = 10n
+ RISE = 2 TARG V(2) VAL = 2.5 FALL = 2
This example measures propagation delay between nodes 1 and 2,
for a transient analysis. HSPICE measures the delay from the
second rising edge of the voltage at node 1, to the second falling
edge of node 2. The measurement begins when the second rising
voltage at node 1 is 2.5 V, and ends when the second falling voltage
at node 2 is 2.5 V. The TD = 10n parameter counts the crossings,
after 10 ns has elapsed. HSPICE prints results as tdlay = <value>.
.MEASURE TRAN riset TRIG I(Q1) VAL = 0.5m RISE = 3
+ TARG I(Q1) VAL = 4.5m RISE = 3
.MEASURE pwidth TRIG AT = 10n TARG V(IN) VAL = 2.5 CROSS = 3
In the last example, TRIG. AT = 10n starts measuring time at t = 10
ns, in the transient analysis. The TARG parameters end time
measurement, when V(IN) = 2.5 V, on the third crossing. pwidth is
the printed output variable.
SYNTAX:
.MEASURE < TRAN > out_var func var FROM = start TO = end
• RMS: Root mean squared: calculates the square root of the area under
the var2 curve, divided by the period of interest.
• INTEG: Integral of var over the specified period.
out_var Name of the output variable, which can be either the node voltage or the
var branch current of the circuit. You can also use an expression, consisting of
the node voltages or the branch current.
Parameter Definitions
Table 7-31 FIND and WHEN Syntax
Parameter Description
CROSS = c The numbers indicate which occurrence of a CROSS, FALL, or RISE event
RISE = r starts measuring.
FALL = f • For RISE = r, after the designated signal rises r rise times, the WHEN
condition is met, and measurement begins.
• For FALL = f, measurement starts when the designated signal has fallen
f fall times.
A crossing is a rise or a fall. For CROSS = c, measurement starts when the
designated signal has achieved a total of c crossing times, as a result of
either rising or falling.
<DC|AC| Analysis type for the measurement. If you omit this parameter, HSPICE
TRAN> assumes the last analysis type that you requested.
EXAMPLE:
In the following example, the first measurement, TRT, calculates the
difference between V(3) and V(4), when V(1) is half the voltage of
V(2) at the last rise event.
The second measurement, STIME, finds the time when V(4) is 2.5V
at the third rise-fall event. A CROSS event is a rising or falling edge.
.MEAS TRAN TRT FIND PAR(‘V(3)-V(4)’)
WHEN V(1)=PAR(‘V(2)/2’) + RISE = LAST
.MEAS STIME WHEN V(4) = 2.5 CROSS = 3
• RMS divides the square root of the area under the output variable
square, by the period of interest.
• MIN reports the minimum value of the output function, over the
specified interval.
• MAX reports the maximum value of the output function, over the
specified interval.
• PP (peak-to-peak) reports the maximum value, minus the
minimum value, over the specified interval.
SYNTAX:
.MEASURE <DC|AC|TRAN> result func out_var <FROM = val>
+ <TO = val> <GOAL = val> <MINVAL = val> <WEIGHT = val>
<DC|AC|TRAN> Specifies the analysis type for the measurement. If you omit this parameter,
HSPICE assumes the last analysis mode that you requested.
FROM Specifies the initial value for the func calculation. For transient analysis, this
value is in units of time.
GOAL Specifies the .MEASURE value. Optimization uses this value for ERR
calculation. This equation calculates the error:
ERRfun = ( GOAL – result ) ⁄ GOAL
MINVAL If the absolute value of GOAL is less than MINVAL, MINVAL replaces the
GOAL value in the denominator of the ERRfun expression. Used only in
ERR calculation for optimization. Default = 1.0e-12.
result Name of the measured value, in the output. The value is a function of the
variable (out_var) and func.
out_var Name of any output variable whose function (func) the simulation measures.
WEIGHT Multiplies the calculated error, by the weight value. Used only in ERR
calculation for optimization. Default = 1.0.
The example above calculates the average nodal voltage value for
node 10, during the transient sweep, from the time 10 ns to 55 ns. It
prints out the result as avgval.
EXAMPLE 2:
.MEAS TRAN MAXVAL MAX V(1,2) FROM = 15ns TO = 100ns
EXAMPLE 3:
.MEAS TRAN MINVAL MIN V(1,2) FROM = 15ns TO = 100ns
.MEAS TRAN P2PVAL PP I(M1) FROM = 10ns TO = 100ns
INTEGRAL Function
The INTEGRAL function reports the integral of an output variable,
over a specified period.
SYNTAX:
.MEASURE <DC|AC|TRAN> result INTEGRAL out_var
+ <FROM = val> <TO = val> <GOAL = val> <MINVAL = val>
+ <WEIGHT = val>
The INTEGRAL function (with func), uses the same syntax as the
average (AVG), RMS, MIN, MAX, and peak-to-peak (PP)
measurement mode, to defined the INTEGRAL (INTEG).
EXAMPLE:
The following example calculates the integral of I(cload), from 10 ns
to 100 ns.
.MEAS TRAN charge INTEG I(cload) FROM = 10ns TO = 100ns
CROSS = c The numbers indicate which occurrence of a CROSS, FALL, or RISE event
RISE = r starts a measurement.
FALL = f For RISE = r, when the designated signal has risen r rise times, the WHEN
condition is met, and measurement starts.
For FALL = f, measurement starts when the designated signal has fallen f fall
times.
A crossing is either a rise or a fall, so for CROSS = c, measurement starts
when the designated signal has achieved a total of c crossing times, as a
result of either rising or falling.
<DC|AC| Specifies the analysis type to measure. If you omit this parameter, HSPICE
TRAN> assumes the last analysis mode that you requested.
GOAL Specifies the desired .MEASURE value. Optimization uses this value for
ERR calculation. This equation calculates the error:
ERRfun = ( GOAL – result ) ⁄ GOAL
LAST Measures when the last CROSS, FALL, or RISE event occurs.
CROSS = LAST, measures the last time the WHEN condition is true, for a
rising or falling signal.
FALL = LAST, measures the last time WHEN is true, for a falling signal.
RISE = LAST, measures the last time WHEN is true, for a rising signal.
LAST is a reserved word; do not use it as a parameter name in the
above .MEASURE statements.
MINVAL If the absolute value of GOAL is less than MINVAL, MINVAL replaces the
GOAL value in the denominator of the ERRfun expression. Used only in ERR
calculation for optimization. Default = 1.0e-12.
WEIGHT Multiplies the calculated error, between result and GOAL, by the weight value.
Used only in ERR calculation for optimization. Default = 1.0.
EXAMPLE 1:
The following example calculates the derivative of V(out), at 25 ns:
.MEAS TRAN slew rate DERIV V(out) AT = 25ns
EXAMPLE 2:
The following example calculates the derivative of v(1), when v(1) is
equal to 0.9*vdd:
.MEAS TRAN slew DERIV v(1) WHEN v(1) = ’0.90*vdd’
ERROR Function
The relative error function reports the relative difference between
two output variables. You can use this format in optimization and
curve-fitting of measured data. The relative error format specifies the
variable to measure and calculate, from the .PARAM variable. To
calculate the relative error between the two, HSPICE uses the ERR,
ERR1, ERR2, or ERR3 function. With this format, you can specify a
group of parameters to vary, to match the calculated value and the
measured data.
SYNTAX:
.MEASURE <DC|AC|TRAN> result ERRfun meas_var calc_var
+ <MINVAL = val> < IGNORE | YMIN = val> <YMAX = val>
+ <WEIGHT = val> <FROM = val> <TO = val>
<DC|AC|TRAN> Specifies the analysis type, for the measurement. If you omit this parameter,
HSPICE assumes the last analysis mode that you requested.
ERRfun ERRfun indicates which error function to use: ERR, ERR1, ERR2, or ERR3.
meas_var Name of any output variable or parameter, in the data statement. M denotes
the meas_var, in the error equation.
IGNOR|YMIN If the absolute value of meas_var is less than the IGNOR value, then the
ERRfun calculation does not consider this point. Default = 1.0e-15.
FROM Specifies the beginning of the ERRfun calculation. For transient analysis, the
from value is in units of time. Defaults to the first value of the sweep variable.
WEIGHT Multiplies the calculated error, by the weight value. Used only in ERR
calculation for optimization. Default = 1.0.
YMAX If the absolute value of meas_var is greater than the YMAX value, then the
ERRfun calculation does not consider this point. Default = 1.0e+15.
TO End of the ERRfun calculation. Default is last value of the sweep variable.
MINVAL If the absolute value of meas_var is less than MINVAL, MINVAL replaces the
meas_var value in the denominator of the ERRfun expression. Used only in
ERR calculation for optimization. Default = 1.0e-12.
Error Equations
ERR
1. ERR sums the squares of (M-C)/max (M, MINVAL) for each point.
2. It then divides by the number of points.
3. Finally, it calculates the square root of the result.
- M (meas_var) is the measured value of the device or circuit
response.
- C (calc_var) is the calculated value of the device or circuit
response.
- NPTS is the number of data points.
NPTS 1/2
1 Mi – Ci 2
ERR = ----------------- ⋅
NPTS ∑ -----------------------------------------------
max (MINVAL,M i)
i=1
HSPICE does not print out each calculated ERR1 value. When you
set the ERR1 option, HSPICE calculates an ERR value, as follows:
NPTS 1/2
1
ERR = ----------------- ⋅ ∑ ERR1 i2
NPTS
i=1
ERR2
This option computes the absolute relative error, at each point. For
NPTS points, HSPICE calls NPTS error functions.
Mi – Ci
ERR2 i = ----------------------------------------------- , = 1,NPTS
max (MINVAL,M i)
SYNTAX:
.MEASURE < TRAN > varname PARAM = “expression”
EXAMPLE:
In the example below, the first two measurements, V3MAX and
V2MIN, set up the variables for the third measurement statement:
.MEAS TRAN V3MAX MAX V(3) FROM 0NS TO 100NS
.MEAS TRAN V2MIN MIN V(2) FROM 0NS TO 100NS
.MEAS VARG PARAM = “(V2MIN + V3MAX)/2”
• V3MAX is the maximum voltage of V(3) between 0ns and 100ns
of the simulation.
• V2MIN is the minimum voltage of V(2) during that same interval.
• VARG is the mathematical average of the V3MAX and V2MIN
measurements.
SYNTAX:
The .DOUT statement can use either of two syntaxes. In both
syntaxes, the time and state parameters describe the expected
output of the nd node.
The first syntax specifies a single threshold voltage, VTH. A voltage
level above VTH is high; any level below VTH is low.
.DOUT nd VTH ( time state < time state > )
Table 7-35 .DOUT Syntax
Parameter Description
Note: If you specify VTH, VLO, and VHI, then HSPICE processes
only VTH, and ignores VLO and VHI.
For both cases, the time, state pair describes the expected output.
During simulation, HSPICE compares the simulated results against
the expected output vector. If the states are different, HSPICE
reports an error message. The legal values for state are:
Table 7-37 State Values
Value Description
0 expect ZERO
1 expect ONE
X, x do not care
U, u do not care
filename Output file name. If you do not specify a file, HSPICE uses the input filename.
namei PWL Source Name that you specify. The name must start with V (for a voltage
source) or I (for a current source).
from Keyword; specifies the time to start output of simulation results. For transient
analysis, uses the time units that you specified.
to Keyword; specifies the time to end output of simulation results. For transient
analysis, uses the time units that you specified. The from value can be greater
than the to value.
tr | ac | sw • tr = transient analysis.
• ac = AC analysis.
• sw = DC sweep analysis.
IDC LX1 DC current, through diode (ID), excluding RS. Total diode current
is the sum of IDC and ICAP.
8-1
Setting Control Options
This section describes how to set control options.
.OPTION Statement
To set control options, use .OPTION statements. You can set any
number of options in one .OPTION statement, and you can include
any number of .OPTION statements in an input netlist file. Table 8-2
on page 8-3 lists all control options. Descriptions of the options
follow the table. For descriptions of options that are relevant to a
specific simulation type, see the appropriate DC, transient, and AC
analysis chapters.
SYNTAX:
.OPTION opt1 <opt2 opt3 ...>
opt1 ... Specifies any input control options. Many options are in the form
<opt> = x, where <opt> is the option name and x is the value
assigned to that option. This section describes all options.
Table 8-2 lists the keywords for the .OPTION statement, grouped by
their typical application. The sections that follow the table, describe
the options listed under each type of analysis.
ALTER DLENCSDF
BEEP
MEASDGT
MEASFAIL
GSCAL
PUTMEAS
EPSMIN DCCAP
EXPMAX VFLOOR
LIMTIM
CPTIME = x Sets the maximum CPU time, in seconds, allotted for this simulation job.
When the time allowed for the job exceeds CPTIME, HSPICE prints or plots
the results up to that point, and concludes the job. Use this option if you are
uncertain how long the simulation will take, especially when you debug new
data files. Also see LIMTIM. Default is 1e7 (400 days).
EPSMIN = x Specifies the smallest number that a computer can add or subtract, a
constant value. Default is 1e-28.
EXPMAX = x Specifies the largest exponent that you can use for an exponential, before
overflow occurs. Typical value for an IBM platform is 350.
LIMTIM = x Amount of CPU time reserved to generate prints and plots, if a CPU time limit
(CPTIME = x) terminates simulation. Default=2 (seconds), normally
sufficient for short printouts and plots.
ARTIST = x ARTIST = 2 enables the Cadence Analog Artist interface. This option requires
a specific license. Supported on Sun Solaris 2.5/2.7/2.8, HPUX 10.20 and
11.20, and IBM AIX 4.3 platforms only. Not available on Linux platforms.
CDS, SDA CDS = 2 produces a Cadence WSF (ASCII format) post-analysis file, for
Opus. This option requires a specific license. SDA is the same as CDS.
DLENCSDF If you use the Common Simulation Data Format (Viewlogic graph data file
format) as the output format, this digit length option specifies how many digits
to include, in scientific notation (exponents), or to the right of the decimal point.
Valid values are any integer from 1 to 10.
Default is 5.
If you assign a floating decimal point, or if you specify less than 1 or more than
10 digits, HSPICE uses the default. For example, it places 5 digits to the right
of a decimal point.
MEASOUT Outputs .MEASURE statement values and sweep parameters into an ASCII
file. Post-analysis processing (AvanWaves or other analysis tools) uses this
<design>.mt# file, where # increments for each .TEMP or .ALTER block.
For example, for a parameter sweep of an output load, which measures the
delay, the .mt# file contains data for a delay-versus-fanout plot. Default is 1.
You can set this option to 0 (off) in the hspice.ini file.
MONTECON Continues a Monte Carlo analysis in HSPICE. Retrieves the next random
value, even if non-convergence occurs. A random value can be too large, or
too small, to cause convergence to fail. Other types of analysis can use this
Monte Carlo random value.
POST = x Stores simulation results for analysis, using the AvanWaves graphical
interface or other methods.
• POST = 1 (default) saves the results in binary format.
• POST = 2 saves the results in ASCII format.
• POST = 3 saves the results in New Wave binary format.
Set the POST option, and use the .PROBE statement to specify the data to
save. To use binary values (with double precision) in the output file, include the
following in the input file:
**************************************************
.option post (or post=1) post_version=2001
********************************************************
For more accurate simulation results, comment this format.
post_version Sets the post-processing output version with a value of 2001. If you use this
=2001 option, a new output file header includes the right number of output variables,
rather than **** when the number exceeds 9999.
PSF = x Specifies whether HSPICE outputs binary or ASCII data, when you run an
HSPICE simulation from Cadence Analog Artist. Supported on Sun Solaris
2.5/2.7/2.8, HPUX 10.20 and 11.20, and IBM AIX 4.3 platforms only. Not
available on Linux platforms.
The value of x can be 1 or 2.
• If x is 2, HSPICE produces ASCII output.
• If .OPTION ARTIST PSF = 1, HSPICE produces binary output.
SDA CDS = 2 produces a Cadence WSF (ASCII) format, post-analysis file, for
Opus. This option requires a specific license. SDA is the same as CDS.
FFTOUT Prints 30 harmonic fundamentals, sorted by size, THD, SNR, and SFDR, but
only if you specify a .OPTION fftout statement and a .fft freq=xxx statement.
LIMPTS = x Number of points to print or plot in AC analysis. You do not need to set LIMPTS
for DC or transient analysis. HSPICE spools the output file to disk.
Default=2001.
PARHIER Selects parameter-passing rules that control the evaluation order of subcircuit
parameters. Applies only to parameters with the same name, at different levels
of subcircuit hierarchy.
LOCAL A parameter name in a subcircuit, prevails over the
same parameter name at a higher level of hierarchy.
GLOBAL A parameter name at a higher level of hierarchy.
Overrides the same parameter name at a lower level.
SEED Starting seed for random-number generator in HSPICE Monte Carlo analysis.
The minimum value is 1; the maximum value is 259200.
ASPEC Sets HSPICE to ASPEC-compatibility mode. When you set this option, the
simulator reads ASPEC models and netlists, and the results are compatible.
Default is 0 (HSPICE mode).
If you set ASPEC, the following model parameters default to ASPEC values:
ACM = 1:
Changes the default values for CJ, IS, NSUB, TOX, U0, and
UTRA.
Diode Model:
TLEV = 1 affects temperature compensation for PB.
MOSFET Model:
TLEV = 1 affects PB, PHB, VTO, and PHI.
SCALM, SCALE:
Sets the model scale factor to microns, for length dimensions.
WL:
Reverses implicit order for stating width and length in a
MOSFET statement. Default (WL = 0) assigns the length
first, then the width.
SPICE Makes HSPICE compatible with Berkeley SPICE. If you set this option,
HSPICE uses these options and model parameters:
Example of general parameters, used with .OPTION SPICE:
TNOM = 27 DEFNRD = 1 DEFNRS = 1 INGOLD = 2
ACOUT = 0 DC
PIVOT PIVTOL = IE-13 PIVREL = 1E-3 RELTOL = 1E-3
ITL1 = 100
ABSMOS = 1E-6 RELMOS = 1E-3 ABSTOL = 1E-12
VNTOL = 1E-6
ABSVDC = 1E-6 RELVDC = 1E-3 RELI = 1E-3
Example of transient parameters, used with .OPTION SPICE:
DCAP = 1 RELQ = 1E-3 CHGTOL-1E-14 ITL3 = 4 ITL4 = 10
ITL5 = 5000 FS = 0.125 FT = 0.125
Example of model parameters, used with .OPTION SPICE:
For BJT: MJS = 0
For MOSFET, CAPOP = 0
LD = 0 if not user-specified
UTRA = 0 not used by SPICE for LEVEL = 2
NSUB must be specified
NLEV = 0 for SPICE noise equation
NOWARN Suppresses all warning messages, except those generated from statements
in .ALTER blocks.
WARNLIMIT = x Limits how many times certain warnings appear in the output listing. This
reduces the output listing file size. x is the maximum number of warnings for
each warning type. This limit applies to these warning messages:
• MOSFET has negative conductance.
• Node conductance is zero.
• Saturation current is too small.
• Inductance or capacitance is too large.
Default is 1.
Version Options
You can use version options in HSPICE:
H9007 Sets default values for general-control options, to correspond to values for HSPICE
H9007D. If you set this option, HSPICE does not use the EXPLI model parameter.
HIER_SCALE If you set the HIER_SCALE option, you can use the S parameter to scale
sub-circuits.
• 0 interprets S as a user-defined parameter.
• 1 interprets S as a scale parameter.
For more information about the S parameter, see S (Scale) Parameter on
page 3-59.
MODMONTE If MODMONTE=1, then within a single simulation run, each device that
shares the same model card and is in the same Monte Carlo index receives
a different random value for parameters that have a Monte Carlo definition.
If MODMONTE=0 (default), then within a single simulation run, each device
that shares the same model card and is in the same Monte Carlo index,
receives the same random value for its parameters that have a Monte Carlo
definition.
CVTOL Changes the number of numerical integration steps, when calculating the
gate capacitor charge for a MOSFET, using CAPOP = 3. See the discussion
of CAPOP = 3 in the “Overview of MOSFETS” chapter of the HSPICE
Elements and Device Models Manual, for explicit equations and discussion.
DEFNRD Default number of squares for the drain resistor, on a MOSFET. Default is 0.
DEFNRS Default number of squares for the source resistor, on a MOSFET. Fault is 0.
SCALM Model scaling factor, in HSPICE. Scales model parameters by their value.
Default is 1. See the HSPICE Elements and Device Models Manual, for
parameters this option scales.
WL Reverses the specified order, in the VSIZE MOS element. Default order is
length-width; changes the order to width-length. Default is 0.
ABSH = x Sets the absolute current change, through voltage-defined branches (voltage
sources and inductors). Use ABSH with DI and RELH, to check for current
convergence. Default is 0.0.
ABSI = x Sets the absolute error tolerance for branch currents, in diodes, BJTs, and
JFETs, during DC and transient analysis. Decrease ABSI, if accuracy is more
important than convergence time.
To analyze currents less than 1 nanoamp, change ABSI to a value at least two
orders of magnitude smaller than the minimum expected current.
Default is 1e-9 for KCLTEST = 0, or 1e-6 for KCLTEST = 1.
ABSTOL = x Sets the absolute error tolerance for branch currents, for DC and transient
analysis. Decrease ABSTOL, if accuracy is more important than convergence
time. ABSTOL is the same as ABSI.
ABSMOS = x Current error tolerance (for MOSFET devices), in DC or transient analysis. The
ABSMOS setting determines whether the drain-to-source current solution has
converged. The drain-to-source current converged if:
• The difference between the drain-to-source current in the last iteration,
versus the present iteration, is less than ABSMOS, or
• This difference is greater than ABSMOS, but the percent change is less
than RELMOS.
If other accuracy tolerances also indicate convergence, HSPICE solves the
circuit at that timepoint, and calculates the next timepoint solution. For low-
power circuits, optimization, and single transistor simulations, set
ABSMOS = 1e-12. Default is 1e-6 (amperes).
ABSVDC = x Sets the minimum voltage, for DC and transient analysis. If accuracy is more
critical than convergence, decrease ABSVDC. If you need voltages less than
50 micro-volts, reduce ABSVDC, to two orders of magnitude less than the
smallest voltage. This ensures at least two digits of significance. Typically, you
do not need to change ABSVDC, unless you simulate a high-voltage circuit.
For 1000-volt circuits, a reasonable value is 5 to 50 millivolts. Default=VNTOL
(VNTOL default = 50 mV).
KCLTEST Activates KCL (Kirchhoff’s Current Law) test. increases simulation time,
especially for large circuits, but very accurately checks the solution. Default=0.
MAXAMP = x Sets the maximum current, through voltage-defined branches (voltage sources
and inductors). If the current exceeds the MAXAMP value, HSPICE reports an
error. Default is 0.0.
RELI = x Sets the relative error/tolerance change, from iteration to iteration. This
parameter determines convergence for all currents, in diode, BJT, and JFET
devices. (RELMOS sets tolerance for MOSFETs). This is the change in current,
from the value calculated at the previous timepoint.
• Default = 0.01 for KCLTEST = 0.
• Default = 1e-6 for KCLTEST = 1.
RELMOS = x Sets the relative error tolerance (percent) for drain-to-source current, from
iteration-to-iteration. This parameter determines convergence for currents in
MOSFET devices. (RELI sets the tolerance for other active devices.) Sets the
change in current, from the value calculated at the previous timepoint. HSPICE
uses the RELMOS value, only if the current is greater than the ABSMOS floor
value. Default is 0.05.
RELV = x Sets the relative error tolerance for voltages. If voltage or current exceeds the
absolute tolerances, a RELV test determines convergence. Increasing RELV
increases the relative error. You should generally maintain RELV at its default
value. RELV conserves simulator charge. For voltages, RELV is the same as
RELTOL. Default is 1e-3.
RELVDC = x Sets the relative error tolerance for voltages. If voltages or currents exceed
their absolute tolerances, the RELVDC test determines convergence.
Increasing RELVDC increases the relative error. You should generally maintain
RELVDC at its default value. RELVDC conserves simulator charge. Default is
RELTOL (RELTOL default = 1e-3).
CAPTAB Prints table of single-plate node capacitances, for diodes, BJTs, MOSFETs,
JFETs, and passive capacitors, at each operating point.
DCCAP Generates C-V plots. Prints capacitance values of a circuit (both model and
element), during a DC analysis. You can use a DC sweep of the capacitor, to
generate C-V plots. Default = 0 (off).
VFLOOR = x Minimum voltage to print in output listing. All voltages lower than VFLOOR,
print as 0. Affects only the output listing: VNTOL (ABSV) sets minimum
voltage to use in a simulation.
You can also use this option for convergence tests. Default is 1.0e-2.
PZTOL Relative error tolerance, for poles or zeros. Default=1.0e-6.
RITOL Minimum ratio for (real/imaginary), or (imaginary/real) parts of poles or
zeros.Default is 1.0e-6.
If X imag ≤ RITOL ⋅ X real , then X imag = 0 .
(X0R,X0I), Three complex starting points, in the Muller pole/zero analysis algorithm, are:
(X1R,X1I), X0R = -1.23456e6 X0I = 0.0
(X2R,X2I) X1R = -1.23456e5 X1I = 0.0
X2R = +.23456e6 X2I = 0.0
HSPICE multiplies these initial points, and FMAX, by FSCAL.
AUTOSTOP Stops a transient analysis in HSPICE, after calculating all TRIG-TARG and
FIND-WHEN measure functions. This option can substantially reduce CPU
time. By default, if the data file contains measure functions (such as AVG,
RMS, MIN, MAX, PP, ERR, ERR1,2,3, or PARAM), then AUTOSTOP is
disabled (that is, .OPTION autostop or .OPTION autostop from_to=0 is set). To
use AUTOSTOP with these measure functions, set .OPTION autostop from_to
or .OPTION autostsop from_to=1.
For trig-targ and find-when measure functions, if you set autostop, do not use
the preceding measure result as the measured parameter. Otherwise, the
measured result is probably inaccurate.
BKPSIZ = x Sets the size of the breakpoint table. Default is 5000. This is an old option,
provided only for backward-compatibility.
BYPASS Bypasses model evaluations, if the terminal voltages do not change. Can be 0
(off) or 1 (on). To speed-up simulation, this option does not update the status
of latent devices. To enable bypassing, set .OPTION BYPASS = 1, for
MOSFETs, MESFETs, JFETs, BJTs, or diodes. Default = 1.
Use the BYPASS algorithm cautiously. Some circuit types might not converge,
and might lose accuracy in transient analysis and operating-point calculations.
FAST To speed-up simulation, this option does not update the status of latent
devices. Use this option for MOSFETs, MESFETs, JFETs, BJTs, and diodes.
Default is 0.
A device is latent, if its node voltage variation (from one iteration to the next) is
less than the value of either the BYTOL control option, or the BYPASSTOL
element parameter. (If FAST is on, HSPICE sets BYTOL to different values, for
different types of device models.)
Besides the FAST option, you can also use the NOTOP and NOELCK options,
to reduce input pre-processing time. Increasing the value of the MBYPASS or
BYTOL option, also helps simulations to run faster, but can reduce accuracy.
ITLPZ Sets the iteration limit for pole/zero analysis. Default is 100.
TRCON Controls the speed of some special circuits. For some large non-linear circuits
with large TSTOP/TSTEP values, analysis might run for an excessively long
time. In this case, HSPICE might automatically set a new and bigger RMAX
value, to speed up the analysis for primary reference. In most cases, however,
HSPICE does not activate this type of autospeedup process.
For autospeedup to occur, all three of the following conditions must occur:
• N1 (Number of Nodes) > 1,000
• N2 (TSTOP/TSTEP) >= 10,000
• N3 (Total Number of Diode, BJTs, JFETs and MOSFETs) > 300
Autospeedup is most likely to occur if the circuit also meets either of the
following conditions:
• N2 >= 1e+8, and N3 > 500, or
• N2 >= 2e+5, and N3 > 1e+4
If HSPICE does activate autospeedup, you might need to disable it. To do this,
set TRCON=-1, and increase TSTEP or RMAX (or both), to balance accuracy
and speed.
• TRCON = 0 or TRCON=1 enables autospeedup for circuits that meet
necessary conditions.
• TRCON = -1 disables autospeedup.
The default value of TRCON is 1.
TRCON also controls the automatic convergence process. See on page 8-32.
ABSVAR = x Sets the absolute limit for the maximum voltage change, from one time point
to the next. Use this option with the DVDT algorithm. If the simulator produces
a convergent solution that is greater than ABSVAR, then HSPICE discards the
solution, sets the timestep to a smaller value, and recalculates the solution.
This is called a timestep reversal. Default=0.5 (volts).
DELMAX = x Sets the maximum Delta of the internal timestep. HSPICE automatically sets
the DELMAX value, based on the factors listed in Timestep Control for
Accuracy on page 10-25. The initial DELMAX value, shown in the HSPICE
output listing, is generally not the value used for simulation.
DVDT Adjusts the timestep, based on rates of change for node voltage. Default is 4.
• 0 - original algorithm
• 1 - fast
• 2 - accurate
3,4 - balance speed and accuracy
IMIN = x, Minimum timestep, in timestep algorithms for transient analysis. IMIN is the
ITL3 = x minimum number of iterations required, to obtain convergence. If the number
of iterations is less than IMIN, the internal timestep (Delta) doubles.
Use this option to decrease simulation times, in circuits where the nodes are
stable most of the time (such as digital circuits). If the number of iterations is
greater than IMIN, the timestep stays the same, unless the timestep exceeds
the IMAX option. ITL3 is the same as IMIN. Default is 3.0.
IMAX = x, Maximum timestep, in timestep algorithms for transient analysis. IMAX sets
ITL4 = x the maximum iterations, to obtain a convergent solution at a timepoint. If the
number of iterations needed is greater than IMAX, the internal timestep (Delta)
decreases, by a factor equal to the FT transient control option. HSPICE uses
the new timestep to calculate a new solution. IMAX also works with the IMIN
transient control option. ITL4 is the same as IMAX. Default is 8.0.
ITL5 = x Sets an iteration limit for transient analysis. If a circuit uses more than ITL5
iterations, the program prints all results, up to that point. The default (0.0)
allows an infinite number of iterations.
RELVAR = x Use this option with ABSVAR, and the DVDT timestep algorithm. RELVAR
sets the relative voltage change, for LVLTIM = 1 or 3. If the node voltage at the
current time point exceeds the node voltage at the previous time point by
RELVAR, then HSPICE reduces the timestep, and calculates a new solution
at a new time point. Default is 0.30 (30%).
RMAX = x Sets the TSTEP multiplier, which controls the maximum value (DELMAX) for
the Delta of the internal timestep:
DELMAX = TSTEP x RMAX
• Default = 5, if dvdt = 4 and lvltim = 1.
• Otherwise, the default = 2.
The maximum value is 1e+9, the minimum value is 1e-9. The recommended
maximum value is 1e+5.
RMIN = x Sets the minimum value of Delta (internal timestep). An internal timestep
smaller than RMINxTSTEP, terminates the transient analysis, and reports an
internal timestep too small error. If the circuit does not converge in IMAX
iterations, Delta decreases by the amount you set in the FT option.
Default = 1.0e-9.
SLOPETOL = x Minimum value, for breakpoint table entries in a piecewise linear (PWL)
analysis. If the difference in the slopes of two consecutive PWL segments is
less than the SLOPETOL value, HSPICE ignores the breakpoint, for the point
between the segments. Default is 0.5.
TIMERES = x Minimum separation between breakpoint values, for the breakpoint table. If
two breakpoints are closer together (in time) than the TIMERES value,
HSPICE enters only one of them in the breakpoint table. Default is 1 ps.
IMAX = x, Maximum timestep, in timestep algorithms for transient analysis. IMAX sets the
ITL4 = x maximum iterations, to obtain a convergent solution at a timepoint. If the
number of iterations needed is greater than IMAX, the internal timestep (Delta)
decreases, by a factor equal to the FT transient control option. HSPICE uses
the new timestep to calculate a new solution. IMAX also works with the IMIN
transient control option. ITL4 is the same as IMAX. Default is 8.0.
IMIN = x, Minimum timestep, in timestep algorithms for transient analysis. IMIN is the
ITL3 = x minimum number of iterations required, to obtain convergence. If the number
of iterations is less than IMIN, the internal timestep (Delta) doubles. Use this
option to decrease simulation times, in circuits where the nodes are stable
most of the time (such as digital circuits). If the number of iterations is greater
than IMIN, the timestep stays the same, unless the timestep exceeds the IMAX
option. ITL3 is the same as IMIN. Default is 3.0.
MAXORD = x Maximum order of integration, for the GEAR method in HSPICE (see
METHOD). The x value can be either 1 or 2.
• MAXORD = 1 uses the backward Euler integration method.
• MAXORD = 2 (default) is more stable, accurate, and practical.
METHOD = Sets the numerical integration method, for a transient analysis, to either GEAR
name or TRAP.
• To use GEAR, set METHOD = GEAR, which sets LVLTIM = 2.
• To change LVLTIM from 2 to 1 or 3, set LVLTIM = 1 or 3, after the
METHOD = GEAR option. This overrides METHOD=GEAR, which sets
LVLTIM = 2.
TRAP (trapezoidal) integration usually reduces program execution time, with
more accurate results. However, this method can introduce an apparent
oscillation on printed or plotted nodes, which might not result from circuit
behavior. To test this, run a transient analysis, using a small timestep. If
oscillation disappears, the cause was the trapezoidal method.
The GEAR method is a filter, removing oscillations that occur in the trapezoidal
method. Highly non-linear circuits (such as operational amplifiers) can require
very long execution times, when you use the GEAR method.
PURETP Integration method to use, for reversal time point. Default is 0. If you set
puretp=1, then if HSPICE finds non-convergence, it uses TRAP (instead of
B.E) for the reversed time point. Use this option, with the method=TRAP
statement, to help some oscillating circuits to oscillate, if the default simulation
process cannot satisfy the result.
INTERP Limits output for post-analysis tools, such as Cadence or Zuken, to only
the .TRAN timestep intervals. By default, HSPICE outputs all convergent
iterations. INTERP typically produces a much smaller design.tr# file.
If the netlist includes .MEASURE statements, use INTERP = 1 cautiously.
To compute measure statements, HSPICE uses the postprocessing output.
Reduced postprocessing output can incorrectly interpolate measure results.
If you run data-driven transient analysis (.TRAN DATA statement) within
optimization, HSPICE forces INTERP to 1. All measurement results are at
time points set in the data-driven sweep. To measure only at converged
internal timesteps (such as to calculate AVG or RMS), set ITRPRT = 1.
ITRPRT Prints output variables, at their internal time points. This option might
generate a long output list. Use the ITRPRT option if you use .PRINT
statements that include functions such as ABS, AVG, RMS, INT, NINT, and
so on, to avoid interpolation errors.
MEASFAIL • If measfail=0, outputs 0 into the .mt#, .ms#, or .ma# file, and prints failed
to the listing file.
• If measfail=1 (default), prints failed into the .mt#, .ms#, or .ma# file, and
into the listing file: .option measfail=1 | 0
MEASSORT To automatically sort large numbers of .MEASURE statements, use
the .OPTION MEASSORT statement.
• .OPTION MEASSORT=0 (default; do not sort .MEASURE statements).
• .OPTION MEASSORT=1 (internally sort .MEASURE statements).
Set this option to 1 only if you use a large number of .MEASURE
statements, where you need to list similar variables together (to reduce
simulation time). For a small number of .MEASURE statements, turning on
internal sorting can slow-down simulation while sorting, compared to not
sorting first.
PUTMEAS Controls the output variables, listed in the .MEASURE statement.
.option putmeas=0 or (1)
Does not save variable values, which are listed in the .MEASURE
statement, into the corresponding output file (such as .tr#, .ac# or .sw#).
This option decreases the size of the output file.
Default. Saves variable values, which are listed in the .MEASURE
statement, into the corresponding output file (such as .tr#, .ac# or .sw#).
This option is similar to the output of Hspice 2000.4.
UNWRAP Displays phase results from AC analysis, in unwrapped form (with a
continuous phase plot). HSPICE uses these results to accurately calculate
group delay. It also uses unwrapped phase results to compute group delay,
even if you do not set the UNWRAP option.
• Simulation Flow
9-1
Simulation Flow
Figure 9-1 shows the simulation flow, for DC analysis in Synopsys
HSPICE.
Simulation Experiment
DC Transient AC
The .IC statement provides both an initial guess and a solution for
selected nodes within the circuit. Nodes that you initialize with the .IC
statement, become part of the solution of the DC operating point.
You can also use the OFF option to initialize active devices. The OFF
option works with .IC and .NODESET voltages, as follows:
1. If the netlist includes any .IC or .NODESET statements, HSPICE
sets node voltages, according to those statements.
2. If you set the OFF option, then HSPICE sets values to zero, for
the terminal voltages of all active devices (BJTs, diodes,
MOSFETs, JFETs, MESFETs) that are not set in .IC
or .NODESET statements, or by sources.
EXAMPLE 2:
The following example calculates the complete DC operating point
solution. The next section shows a printout of the solution.
.OP
Output
***** OPERATING POINT INFORMATIONTNOM = 25.000
TEMP = 25.000
***** OPERATING POINT STATUS IS ALL SIMULATION TIME IS 0.
NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE
+ 0:2 = 0 0:3 = 437.3258M 0:4 = 455.1343M
+ 0:5 = 478.6763M 0:6 = 496.4858M 0:7 = 537.8452M
+ 0:8 = 555.6659M 0:10 = 5.0000 0:11 = 234.3306M
**** VOLTAGE SOURCES
SUBCKT
ELEMENT 0:VNCE 0:VN7 0:VPCE 0:VP7
VOLTS 0 5.00000 0 -5.00000
AMPS -2.07407U -405.41294P 2.07407U 405.41294P
POWER 0. 2.02706N 0. 2.02706N
TOTAL VOLTAGE SOURCE POWER DISSIPATION = 4.0541 N WATTS
**** BIPOLAR JUNCTION TRANSISTORS
SUBCKT
ELEMENT 0:QN1 0:QN2 0:QN3 0:QN4
MODEL 0:N1 0:N1 0:N1 0:N1
IB 999.99912N 2.00000U 5.00000U 10.00000U
IC -987.65345N -1.97530U -4.93827U -9.87654U
VBE 437.32588M 455.13437M 478.67632M 496.48580M
VCE 437.32588M 17.80849M 23.54195M 17.80948M
VBC 437.32588M 455.13437M 478.67632M 496.48580M
The current, through VIN1, initializes to 0.5 mA. The current, through
VIN2, initializes to 1.3 mA.
SYNTAX:
.IC V(node1) = val1 V(node2) = val2 ...
.DCVOLT V(node1) = val1 V(node2) = val2 ...
val1 ... Specifies voltages. The significance of these voltages depends on whether
you specify the UIC parameter in the .TRAN statement.
node1 ... Node numbers or names can include full paths, or circuit numbers.
EXAMPLE:
.IC V(11) = 5 V(4) = -5 V(2) = 2.2
.DCVOLT 11 5 4 -5 2 2.2
SYNTAX:
.NODESET V(node1) = val1 <V(node2) = val2 ...>
or
node1 ... Node numbers or names can include full paths or circuit numbers.
EXAMPLE:
.NODESET V(5:SETX) = 3.5V V(X1.X2.VINT) = 1V
.NODESET V(12) = 4.5 V(4) = 2.23
.NODESET 12 4.5 4 2.23 1 1
.SAVE Statement
The .SAVE statement in HSPICE stores the operating point of a
circuit, in a file that you specify. For quick DC convergence in
subsequent simulations, use the .LOAD statement to input the
contents of this file. HSPICE saves the operating point by default,
even if the HSPICE input file does not contain a .SAVE statement. To
not save the operating point, specify .SAVE LEVEL = NONE.
type_keyword Storage method, for saving the operating point. The type can be one of the
following. Default is NODESET.
• .NODESET: Stores the operating point as a .NODESET statement. Later
simulations initialize all node voltages to these values, if you use
the .LOAD statement. If circuit conditions change incrementally, DC
converges within a few iterations.
• .IC: Stores the operating point as a .IC statement. Later simulations
initialize node voltages to these values if the netlist includes the .LOAD
statements.
save_file Name of the file that stores DC operating point data. The file name format is
<design>.ic#. Default is <design>.ic0.
level_keyword Circuit level, at which you save the operating point. The level can be one of
the following.
• ALL (default): Saves all nodes, from the top to the lowest circuit level. This
option offers the greatest improvement in simulation time.
• TOP: Saves only nodes in the top-level design. Does not save subcircuit
nodes.
• NONE: Does not save the operating point.
save_time Time during transient analysis, when HSPICE saves the operating point.
HSPICE requires a valid transient analysis statement, to save a DC operating
point. Default = 0.
EXAMPLE:
If the input netlist file contains the statement:
.TEMP -25 0 25
Data-Driven Sweep:
.DC var1 type np start1 stop1 <SWEEP DATA = datanm>
.DC DATA = datanm<SWEEP var2 start2 stop2 incr2>
.DC DATA = datanm
Monte Carlo:
.DC var1 type np start1 stop1 <SWEEP MONTE = val>
.DC MONTE = val
Optimization:
.DC DATA = datanm OPTIMIZE = opt_par_fun
+ RESULTS = measnames MODEL = optmod
.DC var1 start1 stop1 SWEEP OPTIMIZE = OPTxxx
+ RESULTS = measname MODEL = optmod
EXAMPLE 2:
The following example sweeps the drain-to-source voltage, from 0 to
10 V, in 0.5 V increments, at VGS values of 0, 1, 2, 3, 4, and 5 V.
.DC VDS 0 10 0.5 VGS 0 5 1
EXAMPLE 3:
The following example starts a DC analysis of the circuit, from -55°C
to 125°C, in 10°C increments.
.DC TEMP -55 125 10
EXAMPLE 4:
The following script runs a DC analysis, at five temperatures: 0, 30,
50, 100, and 125°C.
EXAMPLE 5:
The following example runs a DC analysis on the circuit, at each
temperature value. The temperatures result from a linear
temperature sweep, from 25°C to 125°C (five points), which sweeps
a resistor value named xval, from 1 k to 10 k, in 0.5 k increments.
EXAMPLE 7:
The next example also requests a DC analysis, at specified
parameters in the .DATA datanm statement. It also sweeps the par1
parameter, from 1k to 100k, in increments of 10 points per decade.
EXAMPLE 8:
The final example invokes a DC sweep of the par1 parameter from
1k to 100k by 10 points per decade, using 30 randomly generated
(Monte Carlo) values.
SYNTAX:
.SENS ov1 <ov2 ...>
EXAMPLE:
.SENS V(9) V(4,3) V(17) I(VCC)
• Input resistance.
• Output resistance.
SYNTAX:
.TF ov srcnam
EXAMPLE:
.TF V(5,3) VIN
.TF I(VLOAD) VIN
For the first example, HSPICE computes the ratio of V(5,3) to VIN.
This is the ratio of small-signal input resistance at VIN, to the small-
signal output resistance (measured across nodes 5 and 3). If you
specify more than one .TF statement in a single simulation, HSPICE
runs only the last .TF statement.
EXAMPLE:
.PZ V(10) VIN
.PZ I(RL) ISORC
MAXAMP = x Sets the maximum current, through voltage-defined branches (voltage sources
and inductors). If the current exceeds the MAXAMP value, HSPICE reports an
error. Default = 0.0.
NEWTOL Calculates one or more iterations past convergence, for every calculated DC
solution and timepoint circuit solution. If you do not set NEWTOL, after HSPICE
determines convergence, the convergence routine ends, and the next program
step begins. Default is 0.
NOPIV Prevents HSPICE from automatically switching to pivoting-matrix factoring, if a
nodal conductance is less than PIVTOL. NOPIV inhibits pivoting (see PIVOT).
OFF For all active devices, initializes terminal voltages to zero, if you did not initialize
them to other values. For example, if you did not initialize the drain and source
nodes of a transistor (using .NODESET or .IC statements, or connecting them
to sources), then OFF initializes all nodes of the transistor to zero.
HSPICE checks the OFF option before element IC parameters. If you assign an
element IC parameter to a node, simulation initializes the node to the element
IC parameter value, even if the OFF option has set it o zero. Use the OFF
element parameter to initialize terminal voltages to zero (for specific active
devices), or for exact DC operating-point solutions for large circuits.
Accuracy Tolerances
HSPICE uses accuracy tolerances that you specify, to assure
convergence. These tolerances determine when, and whether, to
exit the convergence loop. For each iteration of the convergence
loop, HSPICE subtracts previously-calculated values from the new
solution, and compares the result with the accuracy tolerances.
Table 9-12 RELV vs. Accuracy and Simulation Time for 2 Bit Adder
RELVDC Iteration Delay (ns) Period (ns) Fall time (ns)
.001 540 31.746 14.336 1.2797
.005 434 31.202 14.366 1.2743
.01 426 31.202 14.366 1.2724
.02 413 31.202 14.365 1.3433
.05 386 31.203 14.365 1.3315
.1 365 31.203 14.363 1.3805
.2 354 31.203 14.363 1.3908
.3 354 31.203 14.363 1.3909
.4 341 31.202 14.363 1.3916
.4 344 31.202 14.362 1.3904
Autoconverge Process
If a circuit does not converge in the number of iterations that ITL1
specifies, HSPICE initiates an auto-convergence process. This
process manipulates DCON, GRAMP, and GMINDC, and even
CONVERGE in some cases. Figure 9-3 on page 9-33 shows the
autoconverge process.
Note: HSPICE uses autoconvergence in transient analysis, but it
also uses autoconvergence in DC analysis, if the Newton-
Raphson (N-R) method fails to converge.
Start
STEP 1
Iterate
Y
Converged? Results
STEP 2
N
Sets DCON = 1.
Try DCON = 1 If DV = 1000, sets DV from 1000 to max(0.1. Vmax/50).
Sets GRAMP = (Imax/GMINDC).
Ramps GMINDC, from GMINDC⋅10GRAMP to 1e-12.
Y
Converged? Results
STEP 3
N Sets DCON = 2.
Relaxes DV to 1e6.
Try DCON = 2
Sets GRAMP = (Imax/GMINDC).
Ramps GMINDC, from GMINDC⋅10GRAMP to 1e-12.
Y
Converged? Results
STEP 4
N Adds CSHDC and GSHUNT, from each node, to ground.
Try CONVERGE = 1 Ramps supplies, from zero to the set values.
Removes CSHDC and GSHUNT, after DC convergence. Also
iterates further, to a stable DC-bias point.
Y
Converged? Results
STEP 5
N Adds CSHDC, from each node, to ground.
Try CONVERGE = 4 Ramps gmath=cshdc/delta in the range of 1.0e-12 to 10.0.
Set gmath to zero, if convergence occurs with gmath under
1.0e-12, and iterates further to a stable DC bias point.
Y
Converged? Results
N
Non-convergence report
GMINDC
Diode element
GMINDC
BJT element
GMINDC
GMINDC
JFET or MESFET
GMINDC element
GMINDC
** warning **
all nodes of element x:<name> are connected together
after conductance G
insertion
G = Cg/DCSTEP
G
Floating-Point Overflow
If MOS conductance is negative or zero, HSPICE might have
difficulty converging. An indication of this type of problem is a
floating-point overflow, during matrix solutions. HSPICE detects
floating-point overflow, and invokes the Damped Pseudo Transient
algorithm (CONVERGE = 1), to try to achieve DC convergence
without requiring you to intervene. If GMINDC is 1.0e-12 or less
when a floating-point overflows, HSPICE sets it to 1.0e-11.
For example, Table 9-14 identifies the xinv21, xinv22, xinv23, and
xinv24 inverters, as problem sub-circuits in a ring oscillator. It also
indicates that the p-channel transistors, in the xinv21, xinv22, xinv24
sub-circuits, are nonconvergent elements. The n-channel transistor
of xinv23 is also a nonconvergent element.
The table lists voltages and currents for the transistors, so you can
check whether they have reasonable values. The tolds, tolbd, and
tolbs error tolerances indicate how close the element currents (drain
to source, bulk to drain, and bulk to source) are, to a convergent
solution. For tol variables, a value close to or below 1.0 is a
convergent solution. In Table 9-14, the tol values that are around
100, indicate that the currents were far from convergence. The
element current and voltage values are also shown (id, ibs, ibd, vgs,
vds, and vbs). Examine whether these values are realistic, and
determine the transistor regions of operation.
ibd 0. 0. 0. -168.7011f 0.
tolbd 0. 0. 0. 0. 0.
1 2 3 4 5
The best way to set up the flip-flop is to use an .IC statement in the
subcircuit definition.
Vds
Vds
Vds
EXAMPLE:
PN junctions often have a high off resistance, resulting in an ill-
conditioned matrix. To overcome this, the GMINDC and GMIN
options automatically parallel every PN junction in a design, with a
conductance.
10-1
Simulation Flow
Figure 10-1 illustrates the simulation flow, for transient analysis in
Synopsys HSPICE.
Simulation Experiment
DC Transient AC
Unless you set the initial circuit operating conditions, some circuits
(such as oscillators, or circuits with feedback) do not have stable
operating point solutions. For these circuits, either:
EXAMPLE:
In the following example, the UIC parameter (in the .TRAN
statement) bypasses the initial DC operating point analysis. The .OP
statement calculates the transient operating point (at t = 20 ns),
during the transient analysis.
Single-Point Analysis
.TRAN tincr1 tstop1 <tincr2 tstop2 ...tincrN tstopN>
+ <START = val> <UIC>
Double-Point Analysis
.TRAN tincr1 tstop1 <tincr2 tstop2 ...tincrN tstopN>
+ <START = val> <UIC>
+ <SWEEP var type np pstart pstop>
.TRAN tincr1 tstop1 <tincr2 tstop2 ...tincrN tstopN>
+ <START = val> <UIC> <SWEEP var START="param_expr1"
+ STOP="param_expr2"
+ STEP="param_expr3">
.TRAN tincr1 tstop1 <tincr2 tstop2 ... tincrN tstopN>
+ <START=val> <UIC> <SWEEP var start_expr stop_expr
+ step_expr>
Data-Driven Sweep
HSPICE supports the following types of data-driven sweep syntax:
Optimization
HSPICE supports this Optimization syntax for transient analysis.
The ov1, ... ovN output variables can include the following:
• V(n): voltage at node n.
• V(n1,n2): voltage between the n1 and n2 nodes.
• Vn(d1): voltage at nth terminal of the d1 device.
• In(d1): current into nth terminal of the d1 device.
• ‘expression’: expression, involving the plot variables above
You can use wildcards (* or as specified in .admrc) to specify multiple
output variables in a single command. Output is affected by
.OPTION post, .OPTION probe
+ CLOAD
VIN
- 0.75 pF
M2
Input
Output
EXAMPLE:
A .BIASCHK statement might check for voltages that exceed a
specified limit, for MOS dielectric breakdown. BIASCHK can check
voltages from the gate, to the source, drain, or bulk.
BIASCHK cannot detect the bias that exceeds the limit, if the bias is
always the same value during transient analysis.
If a model name, referenced in an active element statement,
contains a period (.), then .BIASCHK reports an error. This occurs
because it is unclear whether a reference such as x.123 is a model
name or a sub-circuit name (123 model in the x sub-circuit).
Instance (element) and model names can contain wildcards, either ?
(stands for one character) or * (stands for 0 or more characters).
If you do not set name and mname, HSPICE checks all elements of
this type for bias voltage (you must include type in the .biaschk card).
You can use a wild card, to describe name and mname, in the
biaschk card.
• ? stands for one character.
• * stands for 0 or more characters.
Transient Analysis: Using the .BIASCHK Statement
10-13
EXAMPLE:
.biaschk NMOS terminal1=ng terminal2=nb limit=2v
+ noise=0.01v name=x1.x3.m1 mname=nch.1 name=m3
biasfile Option
• If you use this option, HSPICE outputs the results of all .biaschk
commands to a file that you specify.
• If you do not set this option, HSPICE outputs the results to the
*.lis file.
EXAMPLE:
.option biasfile=’biaschk/mos.bias’
biawarn Option
• If you set this option to 1, HSPICE immediately outputs a warning
message, when any local max bias voltage exceeds the limit
during transient analysis. After this transient analysis, HSPICE
outputs the results summary, as filtered by noise.
• If you set this option to 0 (the default), HSPICE does not output
a warning message during transient analysis. HSPICE outputs
the results, after this transient analysis.
EXAMPLE:
.option biawarn=1
ABSH = x Sets the absolute current change, through voltage- defined branches
(voltage sources and inductors). Use ABSH with DI and RELH, to check
for current convergence. Default is 0.0.
ABSV = x Absolute minimum voltage, for DC and transient analysis. ABSV is the
same as VNTOL. If accuracy is more critical than convergence, decrease
VNTOL. If you need voltages less than 50 microvolts, reduce VNTOL to
two orders of magnitude less than the smallest desired voltage. This
ensures at least two digits of significance. Typically, you do not need to
change VNTOL, except to simulate a high-voltage circuit. A reasonable
value for 1000-volt circuits is 5 to 50 millivolts. Default is 50 (microvolts).
ABSVAR = x Maximum voltage change, from one time point to the next. Use this
option with the DVDT algorithm. If the simulator produces a convergent
solution that is greater than ABSVAR, it:
• Discards the solution.
• Sets the timestep to a smaller value.
• Recalculates the solution.
This is a timestep reversal. Default is 0.5 (volts).
ACCURATE Selects a time algorithm that uses LVLTIM=3 and DVDT=2, for circuits
such as high-gain comparators. Use this option with circuits that combine
high gain and large dynamic range, to guarantee solution accuracy.
If you set ACCURATE to 1, HSPICE uses the following control options:
• LVLTIM = 3
• DVDT = 2
• RELVAR = 0.2
• ABSVAR = 0.2
• FT = 0.2
• RELMOS = 0.01
Default = 0.
CHGTOL = x Charge error tolerance, if LVLTIM = 2. Use CHGTOL with RELQ, to set
the absolute and relative charge tolerance, for all HSPICE capacitances.
Default = 1e-15 (coulomb).
FAST To speed-up simulation, this option does not update the status of latent
devices. Use this option for MOSFETs, MESFETs, JFETs, BJTs, and
diodes. Default = 0.
A device is latent if its node voltage variation (from one iteration to the
next) is less than the value of the BYTOL control option, or the
BYPASSTOL element parameter. (If FAST is on, HSPICE sets BYTOL to
different values, for different types of device models.)
Besides the FAST option, you can also use NOTOP and NOELCK to
reduce input pre-processing time. Increasing the MBYPASS or BYTOL
value also helps simulations to run faster, but can reduce accuracy.
RELI = x Sets the relative error/tolerance change, from iteration to iteration. This
value determines convergence for all currents, in diode, BJT, and JFET
devices. (RELMOS sets the tolerance for MOSFETs). This is the percent
change in current, from the value calculated at the previous timepoint.
• Default = 0.01 for KCLTEST = 0.
• Default = 1e-6 for KCLTEST = 1.
RELQ = x Used in the timestep algorithm for local truncation error (LVLTIM = 2).
RELQ changes the size of the timestep. If the capacitor charge
calculation (in the present iteration) exceeds that of the past iteration, by
a percentage greater than the value of RELQ, then HSPICE reduces the
internal timestep (Delta). Default = 0.01.
RELTOL, Sets the relative error tolerance, for voltages. Use RELV, with the ABSV
RELV control option, to determine voltage convergence. Increasing RELV
increases the relative error. RELV is the same as RELTOL. The RELI and
RELVDC options default to the RELTOL value. Default = 1e-3.
RELVAR = x Use this option with ABSVAR and the DVDT timestep algorithm, to set
the relative voltage change for LVLTIM = 1 or 3. If the node voltage at the
current time point exceeds the node voltage at the previous time point by
RELVAR, then HSPICE reduces the timestep, and calculates a new
solution at a new time point. Default = 0.30 (30%).
SLOPETOL = x Minimum value for breakpoint table entries in a piecewise linear (PWL)
analysis. If the difference in the slopes of two consecutive PWL
segments is less than the SLOPETOL value, HSPICE ignores the
breakpoint, for the point between the segments. Default=0.5.
TIMERES = x Minimum separation between breakpoint values, for the breakpoint table.
If two breakpoints are closer together (in time) than the TIMERES value,
HSPICE enters only one of them in the breakpoint table. Default = 1 ps.
TRTOL = x Used in the timestep algorithm for local truncation error (LVLTIM = 2).
After this algorithm generates TRTOL, HSPICE multiplies the internal
timestep by TRTOL. Although TRTOL reduces simulation time, it also
maintains accuracy. This factor estimates the amount of error introduced,
if you truncate Taylor series expansion, which the algorithm uses.
This error reflects the minimum timestep required, to reduce simulation
time and maintain accuracy. The range of TRTOL is 0.01 to 100; typical
values range from 1 to 10. If you set TRTOL to 1 (the minimum value),
HSPICE uses a very small timestep. As you increase the TRTOL setting,
the timestep size increases. Default = 7.0.
VNTOL = x, Absolute minimum voltage, for DC and transient analysis. ABSV is the
same as VNTOL. Decrease VNTOL, if accuracy is more critical than
convergence. If you need voltages less than 50 microvolts, reduce
VNTOL to two orders of magnitude less than the smallest desired
voltage. This ensures at least two significant digits. Typically, you do not
need to change VNTOL, unless you are simulating a high-voltage circuit.
For 1000-volt circuits, a reasonable value can be 5 to 50 millivolts.
Default = 50 (microvolts).
Simulation Speed
HSPICE can substantially reduce the computer time needed to solve
complex problems. Use the following options to alter the internal
algorithms to increase simulation efficiency.
SYNTAX:
Gear algorithm:
.OPTION METHOD = GEAR
Backward-Euler:
.OPTION METHOD = GEAR MU = 0
Trapezoidal algorithm (default):
.OPTION METHOD = TRAP
Each algorithm has advantages and disadvantages. Ideally, the
trapezoidal is the preferred algorithm overall, because of its highest
accuracy level and lowest simulation time.
However, selecting the appropriate algorithm for convergence is not
always that easy or ideal. Which algorithm you select, largely
depends on the type of circuit, and its associated behavior when you
use different input stimuli.
Initialization
.IC
.NODESET
Iteration
Solution
Converged
Time Step
Reversal Algorithm
∆ +
Advancement (tnew = told t
Time Step
Unit Check
Element Evaluation:
I.V.Q. Flux
Linearization of
non-linear elements
ABSI
Element RELI
Convergence ABSMOS
Test
RELMOS
METHOD
Gear or Trapezoidal
MAXORD
GMIN
Assemble and PIVOT
Solve Matrix PIVREL
Equations
PIVTOL
ABSV
Nodal Voltage
Convergence RELV
FAIL Test NEWTOL
Converged
IMAX Controls the internal timestep size, based on the number of iterations required
for a timepoint solution. If the number of iterations per timepoint exceeds the
IMAX value, the internal timestep decreases. Default = 8.
IMIN Controls the internal timestep size, based on the number of iterations required
for the previous timepoint solution. If the last timepoint solution completes in
fewer than IMIN iterations, the internal timestep increases. Default = 3.
Timestep Controls
The RMIN, RMAX, FS, FT, and DELMAX control options define the
minimum and maximum internal timestep, for the DVDT algorithm. If
the timestep is below the minimum, program execution stops.
EXAMPLE:
If the timestep becomes less than the minimum internal timestep
(defined as TSTEPxRMIN), HSPICE reports an internal timestep too
small error.
The TSTOP time is the transient sweep range, as set in the .TRAN
statement.
min[(TSTOP/20),(TSTEPxRMAX)]
.FOUR Statement
Transient
.FFT Statement
SYNTAX:
.FOUR freq ov1 <ov2 ov3 ...>
freq Fundamental frequency.
ov1 … Output variables to analyze.
EXAMPLE:
.FOUR 100K V(5)
Fourier Equation
The total harmonic distortion is the square root of the sum of the
squares, of the second through ninth normalized harmonic, times
100, expressed as a percent:
9 1/2
1 2
R1 ∑
THD = -------- ⋅ Rm ⋅ 100%
m = 2
EXAMPLE:
If the transient analysis runs at intervals longer than 1/(501*f), then
the frequency response of the interpolation dominates the power
spectrum. Furthermore, this interpolation does not derive an error
range for the output.
9 9
g( t) = ∑ C m ⋅ cos ( mt ) + ∑ D m ⋅ sin ( mt )
m=0 m=0
π
1
C m = --- ⋅
π ∫ g ( t ) ⋅ cos ( m ⋅ t ) ⋅ dt
–π
π
1
D m = --- ⋅
π ∫ g ( t ) ⋅ sin ( m ⋅ t ) ⋅ dt
–π
9 9
g(t) = ∑ C m ⋅ cos ( m ⋅ t ) + ∑ D m ⋅ sin ( m ⋅ t )
m=0 m=0
The following equations approximate the C and D values:
500
2⋅π⋅m⋅n
Cm = ∑ g ( n ⋅ ∆ t ) ⋅ cos ----------------------------
501
n=0
500
2⋅π⋅m⋅n
Dm = ∑ g ( n ⋅ ∆ t ) ⋅ sin ----------------------------
501
n=0
The following equations calculate the magnitude and phase:
2 + D 2 )1 / 2
Rm = ( Cm m
C m
Φ m = arctan ---------
D m
EXAMPLE: (Output)
******
cmos inverter
**** fourier analysistnom = 25.000 temp = 25.000 ****
fourier components of transient response v(2)
dc component = 2.430D+00
harmonic frequency fourier normalized phase normalized
no (hz) component component (deg) phase (deg)
1 20.0000x 3.0462 1.0000 176.5386 0.
2 40.0000x 115.7006m 37.9817m -106.2672 -282.8057
3 60.0000x 753.0446m 247.2061m 170.7288 -5.8098
4 80.0000x 77.8910m 25.5697m -125.9511 -302.4897
5 100.0000x 296.5549m 97.3517m 164.5430 -11.9956
6 120.0000x 50.0994m 16.4464m -148.1115 -324.6501
7 140.0000x 125.2127m 41.1043m 157.7399 -18.7987
8 160.0000x 25.6916m 8.4339m 172.9579 -3.5807
9 180.0000x 47.7347m 15.6701m 154.1858 -22.3528
total harmonic distortion = 27.3791 percent
• .AC Statement
• AC Control Options
• AC Analysis of an RC Network
• Other AC Analysis Statements
11-1
AC Small Signal Analysis
AC small signal analysis in HSPICE computes AC output variables
as a function of frequency (see Figure 11-1). HSPICE first solves for
the DC operating point conditions. It then uses these conditions to
develop linear, small-signal models, for all non-linear devices in the
circuit.
Simulation Experiment
DC Transient AC
.AC Statement
You can use the .AC statement in several different formats,
depending on the application, as shown in the examples below. You
can also use the .AC statement to perform data-driven analysis in
HSPICE.
SYNTAX:
Single/Double Sweep
.AC type np fstart fstop
.AC type np fstart fstop <SWEEP var <START=>start
+ <STOP=>stop <STEP=>incr>
Optimization
SYNTAX:
.AC DATA = datanm OPTIMIZE = opt_par_fun
+ RESULTS = measnames MODEL = optmod
Random/Monte Carlo
You can use the following syntax in HSPICE:
incr Increment value of the voltage, current, element, or model parameter. If you
use type variation, specify the np (number of points) instead of incr.
fstart Starting frequency. If you use POI (list of points) type variation, use a list of
frequency values, not fstart fstop.
start Starting voltage or current, or any parameter value for an element or model.
stop Final voltage or current, or any parameter value for an element or a model.
SWEEP This keyword indicates that the .AC statement specifies a second sweep.
EXAMPLE 2:
The next line runs a 100-point frequency sweep from 1 Hz to 100 Hz.
.AC LIN 100 1 100HZ
EXAMPLE 3:
The following example performs an AC analysis, for each value of
cload. This results from a linear sweep of cload between 1 pF and 10
pF (20 points), sweeping the frequency by 10 points per decade,
from 1 Hz to 10 kHz.
.AC DEC 10 1 10K SWEEP cload LIN 20 1pf 10pf
EXAMPLE 4:
The following example performs an AC analysis, for each value of rx,
5 k and 15 k, sweeping the frequency by 10 points per decade, from
1 Hz to 10 kHz.
.AC DEC 10 1 10K SWEEP rx POI 2 5k 15k
EXAMPLE 5:
The next example uses the .DATA statement to perform a series of
AC analyses, modifying more than one parameter. The datanm file
contains the parameters.
.AC DEC 10 1 10K SWEEP DATA = datanm
EXAMPLE 6:
The following example illustrates a frequency sweep, and a Monte
Carlo analysis, with 30 trials.
.AC DEC 10 1 10K SWEEP MONTE = 30
AC Control Options
Table 11-2 AC Control Options
Parameter Description
R1
1k
2
V1
10 VDC +
- R2
1 VAC 1k C1
0.001 mF
- quickAC.ac0
- quickAC.ic0
- quickAC.lis
- quickAC.st0
3. Use an editor to view the .lis and .st0 files, to examine the
simulation results and status.
4. Run AvanWaves and open the .sp file.
As you sweep the input from 1 kHz to 1 MHz, the quickAC.lis file
displays:
• Input netlist.
SYNTAX:
.DISTO Rload <inter <skw2 <refpwr <spwf>>>>
Rload The resistor element name of the output load resistor, into which the output
power feeds.
refpwr Reference power level, used to compute the distortion products. If you omit
refpwr, the default value is 1mW, measured in decibels magnitude (dbM).
The value must be ≥ 1e-10.
skw2 Ratio of the second frequency (F2) to the nominal analysis frequency (F1),
in the range 1e-3 < skw2 < 0.999. If you omit skw2, the default value is 0.9.
spwf Amplitude of the second frequency (F2). The value must be ≥ 1e-3.
Default = 1.0.
SYNTAX:
.NOISE ovv srcnam inter
ovv Nodal voltage output variable. Defines the node at which HSPICE sums the
noise.
srcnam Name of the independent voltage or current source, to use as the noise input
reference
inter Interval at which HSPICE prints a noise analysis summary. inter specifies
how many frequency points to summarize in the AC sweep. If you omit inter,
or set it to zero, HSPICE does not print a summary. If inter is equal to or
greater than one, HSPICE prints summary for the first frequency, and once
for each subsequent increment of the inter frequency. The noise report is
sorted according to the contribution of each node to the overall noise level.
Use the .NOISE and .AC statements, to control the noise analysis of
the circuit.
Noise Calculations
Noise calculations in HSPICE are based on complex AC nodal
voltages, which in turn are based on the DC operating point. For
descriptions of noise models for each device type, see the HSPICE
Elements and Device Models Manual. Each noise source does not
statistically correlate to other noise sources in the circuit; the
HSPICE simulator calculates each noise source independently. The
total output noise voltage is the RMS sum of the individual noise
contributions:
n
onoise = ∑ Zn ⋅ In 2
n=1
Table 11-6 Noise Calculations
Parameter Description
The input noise (inoise) voltage is the total output noise, divided by
the gain or transfer function of the circuit. HSPICE prints the
contribution of each noise generator in the circuit, for each inter
SYNTAX:
.SAMPLE FS = freq <TOL = val> <NUMF = val>
+ <MAXFLD = val> <BETA = val>
TOL Sampling-error tolerance: the ratio of the noise power (in the highest folding
interval) to the noise power (in baseband). Default = 1.0e-3.
NUMF Maximum number of frequencies that you can specify. The algorithm
requires about ten times this number of internally-generated frequencies, so
keep this value small. Default = 100.
RIN Keyword, for input or source resistance. RIN calculates output impedance, output
admittance, and scattering parameters. The default RIN value is 1 ohm.
ROUT Keyword, for output or load resistance. ROUT calculates input impedance,
admittance, and scattering parameters. Default=1 ohm.
EXAMPLE:
One-Port Network
Two-Port Network
EXAMPLE:
.PRINT AC Z11(R) Z12(R) Y21(I) Y22 S11 S11(DB) Z11(T)
.PRINT AC ZIN(R) ZIN(I) YOUT(M) YOUT(P) H11(M) H11(T)
.PLOT AC S22(M) S22(P) S21(R) H21(P) H12(R) S22(T)
I1 I1
+ +
VCE
+ -
V2 IC + - V2
IB V1 VBE V1
- -
I1 I1
+ +
I2
+ - V2
VCE + - V2
IB V1 VBE V1
- -
EXAMPLE:
To calculate the H parameters, HSPICE uses the .NET statement.
.NET I(VC) IB
$S-parameter
References
1. Goyal, Ravender. “S-Parameter Output From SPICE Program”,
MSN & CT, February 1988, pp. 63 and 66.
12-1
Analytical Model Types
To model parametric and statistical variation in circuit behavior, use:
• The .PARAM statement investigates the performance of a circuit
as you change circuit parameters. See Simulation Input and
Controls on page 3-1, for details about the .PARAM statement.
• Temperature Variation Analysis varies the circuit and component
temperatures, and compares the circuit responses. You can
study the temperature-dependent effects of the circuit, in detail.
• Monte Carlo Analysis. If you know the statistical standard
deviations of component values, use this analysis to center a
design. This provides maximum process yield, and determines
component tolerances.
• Worst Case Corners Analysis. If you know the component value
limit, use this analysis to automate quality assurance, for:
- Basic circuit function.
- Process extremes.
- Quick estimation of speed and power trade-offs.
- Best case and worst case model selection.
- Parameter corners.
- Library files.
• Data-Driven Analysis. Use for cell characterization, response
surface, or Taguchi analysis. See “Characterizing Cells” in the
HSPICE Applications Manual. Automates characterization of
cells, and calculates the coefficient of polynomial delay for timing
simulation. You can simultaneously vary any number of
parameters, and perform an unlimited number of analyses. This
analysis uses ASCII file format, so HSPICE can automatically
generate parameter values. This analysis can replace hundreds
or thousands of HSPICE simulation runs.
x1 + x2 + … + xn
Mean = ---------------------------------------------
N
( x 1 – Mean ) 2 + … ( x n – Mean ) 2
Variance = ---------------------------------------------------------------------------------------
N–1
Sigma = Variance
x 1 – Mean + … + x n – Mean
Average Deviation = ----------------------------------------------------------------------------------
N–1
Ambient Temperature
EXAMPLE:
The following example uses DTEMP in a MOSFET element
statement:
.TEMP Statement
To specify the temperature of a circuit for a HSPICE simulation, use
the .TEMP statement. See .TEMP Statement on page 3-22.
You can use these parameters in any level of MOS model, within the
True-Hspice device models. The DELVTO parameter shifts the
threshold value. HSPICE adds this value to VTO for the Level 3
model, and adds or subtracts it from VFB0 for the BSIM model.
Table 12-1 on page 12-9 shows whether HSPICE adds or subtracts
deviations from the average.
NMOS XL + -
RSH + -
DELVTO + -
TOX + -
XW - +
PMOS XL + -
RSH + -
DELVTO - +
TOX + -
XW - +
101 +0.04u
102 -0.06u pop.#
103 +0.03u
...
XL value
Figure 12-3 Worst Case Corners Library File for a CMOS Process Model
pop.
IDS
Note: The model keyname (left side) equates to the skew parameter
(right side). Model keynames and skew parameters can use
the same names.
• Metal1 and metal2 transmission line models, for long metal lines.
• Models must accept elements. Sizes are based on a drawn
dimension. If you draw a cell at 2 µ dimension, and shrink it to 1
µ, the physical size is 0.9 µ. Τhe effective electrical size is 0.8 µ.
Account for the four dimension levels:
drawn size
shrunken size
physical size
electrical size
2m LMLT 1m
WMLT
XL
XW
Electrical Size
Physical Size
source drain source drain
gate gate
LD
WD
0.9 m
0.8 m
Functions
SYNTAX:
Select the type of analysis to run, such as operating point, DC
sweep, AC sweep, or TRAN sweep.
.DC MONTE=val
DC Sweep
AC Sweep
TRAN Sweep
SYNTAX:
.PARAM xx=UNIF(nominal_val, rel_variation
+ <, multiplier>)
.PARAM xx=AUNIF(nominal_val, abs_variation <,
+ multiplier>)
.PARAM xx=GAUSS(nominal_val, rel_variation, sigma <,
+ multiplier>)
.PARAM xx=AGAUSS(nominal_val, abs_variation, sigma <,
+ multiplier>)
.PARAM xx=LIMIT(nominal_val, abs_variation)
nominal_val Nominal value in Monte Carlo analysis and default value in all other analyses.
rel_variation UNIF and GAUSS vary the nominal_val, by +/- (nominal_val ⋅ rel_variation).
multiplier If you do not specify a multiplier, the default is 1. HSPICE recalculates many
times, and saves the largest deviation. The resulting parameter value might
be greater than or less than nominal_val. The resulting distribution is bimodal.
minor distribution
pop.#
XL
(polysilicon linewidth variation)
RC Time Constant
This simple example shows uniform distribution, for resistance and
capacitance. It also shows the resulting transient waveforms, for 10
different random values.
C1a C1b
C1c C1d
C1c C1d
run-to-run
(model)
Electrical Approach
• You can match the capacitors to ±1%, for the 2-sigma population.
• The process can maintain a ±10% variation, from run to run, for a
2-sigma distribution.
C1a 1 0 CMOD SCALE=ELCAP
C1b 1 0 CMOD SCALE=ELCAP
C1C 1 0 CMOD SCALE=ELCAP
C1D 1 0 CMOD SCALE=ELCAP
.PARAM ELCAP=Gauss(1,.01,2) $ 1% at 2 sigma
+ MODCAP=Gauss(.25p,.1,2) $10% at 2 sigma
.MODEL CMOD C CAP=MODCAP
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-26
Circuit Netlist Section
.global 1
vcc 1 0 5.0
vin in 0 pwl 0,0 0.2n,5
x1 in 2 inv
x2 2 3 inv
x3 3 out inv
x4 out 5 inv
.macro inv in out
mn out in 0 0 nch W=10u L=1u
mp out in 1 1 pch W=10u L=1u
.eom
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-27
+ trs=1.6e-03 bex=-1.5 tcv=1.4e-03
* dc model
+ x2e=0 x3e=0 x2u1=0 x2ms=0 x2u0=0 x2m=0
+ vfb0=-.5 phi0=0.65 k1=.9 k2=.1 eta0=0
+ muz=500 u00=.075
+ x3ms=15 u1=.02 x3u1=0
+ b1=.28 b2=.22 x33m=0.000000e+00
+ alpha=1.5 vcr=20
+ n0=1.6 wfac=15 wfacu=0.25
+ lvfb=0 lk1=.025 lk2=.05 lalpha=5
.model pch pmos
+ LEVEL=28
+ lmlt=mult1 wmlt=mult1 wref=22u lref=4.4u
+ xl=xl xw=xwp tox=tox delvto=delvtop rsh=rshp
+ ld=0.08u wd=0.2u
+ acm=2 ldif=0 hdif=2.5u
+ rs=0 rd=0 rdc=0 rsc=0 rsh=rshp
+ js=3e-04 jsw=9e-10
+ cj=3e-04 mj=.5 pb=.8 cjsw=3e-10 mjsw=.3 php=.8 fc=.5
+ capop=4 xqc=.4 meto=0.08u
+ tlev=1 cta=0 ctp=0 tlevc=0 nlev=0
+ trs=1.6e-03 bex=-1.5 tcv=-1.7e-03
* dc model
+ x2e=0 x3e=0 x2u1=0 x2ms=0 x2u0=0 x2m=5
+ vfb0=-.1 phi0=0.65 k1=.35 k2=0 eta0=0
+ muz=200 u00=.175
+ x3ms=8 u1=0 x3u1=0.0
+ b1=.25 b2=.25 x33m=0.0
+ alpha=0 vcr=20
+ n0=1.3 wfac=12.5 wfacu=.2
+ lvfb=0 lk1=-.05
.end
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-28
Figure 12-12 Sweep of Skew Parameters from -3 Sigma to +3 Sigma
To view the transient curves, plot the .MEASURE output file. The plot
in Figure 12-13 on page 12-29 shows the measured pair delay, and
the total dissipative power, against the SIGMA parameter.
Figure 12-13 Sweep MOS Inverter, Pair Delay and Power: -3 Sigma to 3
Sigma
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-29
Monte Carlo Results
This section evaluates the output of the Monte Carlo analysis in
HSPICE. The plot in Figure 12-14 on page 12-30 is a quality-control
step, which plots TOX against XL (polysilicon critical dimension).
Synopsys graphing software returned the cloud of points, based on:
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-30
*** monte carlo index = 68 ***
MONTE CARLO PARAMETER DEFINITIONS
polycd: xl = -1.6245E-07
nactcd: xwn = 3.4997E-08
pactcd: xwp = 3.6255E-08
toxcd: tox = 191.0
vtoncd: delvton = -2.2821E-02
vtopcd: delvtop = 4.1776E-02
rshncd: rshn = 45.16
rshpcd: rshp = 166.2
m_delay = 1.7946E-10 targ= 3.4746E-10 trig= 1.6799E-10
m_power = 7.7781E-03 from= 0.0000E+00 to= 1.7946E-10
Plotting against the Monte Carlo index number does not help to
center the design. To center the design:
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-31
2. Select the pair delay, as the X-axis independent variable.
The next plot shows the TOX parameter, against the pair delay
(Figure 12-17 on page 12-33). The scatter plot does not have a clear
tilt, because TOX is a secondary process parameter, compared to
XL. To explore this in more detail, set the XL skew parameter to a
constant, and run a simulation.
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-32
Figure 12-17 Sensitivity of Delay with TOX
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-33
Figure 12-18 Superimposing Sigma Sweep Over Monte Carlo
+3 sigma
-3 sigma
• Bin1 - 13%
• Bin2 - 37%
• Bin3 - 27%
• Bin4 - 23%
Statistical Analysis and Optimization: Worst Case and Monte Carlo Sweep Example
12-34
Figure 12-19 Speed/Power Yield Estimation
Optimization
Optimization automatically generates model parameters and
component values, from a set of electrical specifications or
measured data. With you define an optimization program and a
circuit topology, HSPICE automatically selects the design
components and model parameters, to meet your DC, AC, and
transient electrical specifications.
• Output tolerance.
• Gradient tolerance.
Simulation Accuracy
For optimization, set the simulator with tighter convergence options
than normal. The following are suggested options:
absmos=1e-8
relmos=1e-5
relv=1e-4
absi=1e-10
reli=1e-5
relv=1e-4
relv=1e-4
relvar=1e-2
Goal Optimization
Goal optimization differs from curve-fit optimization, because it
usually optimizes only a particular electrical specification, such as
rise time or power dissipation.
1. To specify goal optimizations, use the GOAL keyword.
2. In the .MEASURE statement, select a relational operator, where
GOAL is the target electrical specification to measure.
For example, you can choose a relational operator in multiple-
constraint optimizations, when the absolute accuracy of some
criteria is less important than for others.
EXAMPLE:
• voltage
• current
• delay time
• gain
You can use the bisection feature, in either a pass-fail mode or a
bisection mode. In each case, the process is largely the same.
- MODEL=modname
- OPTIMIZE=OPTxxx
- RESULTS=measurename
Use the .PRINT, .PLOT, and .GRAPH output statements, with
the .DC, .AC, or .TRAN analysis statements.
MODEL The optimization reference name, which you also specify in the .MODEL
optimization statement.
OPTIMIZE Indicates that the analysis is for optimization. Specifies the parameter
reference name, used in the .PARAM optimization statement. In a .PARAM
optimization statements, if OPTIMIZE selects the parameter reference name,
then the associated parameters vary during an optimization analysis.
RESULTS The measurement reference name. You also specify this name in
the .MEASURE optimization statement. RESULTS passes the analysis data to
the .MEASURE optimization statement.
SYNTAX:
.PARAM parameter=OPTxxx (initial_guess, low_limit,
+ upper_limit)
or
delta The final parameter value is the initial guess ± (n⋅delta). If you do not specify
delta, the final parameter value is between low_limit and upper_limit. For
example, you can use this parameter to optimize transistor drawn widths and
lengths, which must be quantized.
In the following example, uox and vtx are the variable model
parameters, which optimize a model for a selected set of electrical
specifications.
.MODEL Statement
For each optimization within a data file, specify a .MODEL
statement. HSPICE can then execute more than one optimization
per simulation run. The .MODEL optimization statement defines:
• Convergence criteria.
• Number of iterations.
• Derivative methods.
SYNTAX:
.MODEL mname OPT <parameter=val ...>
mname Model name. Elements use this name to refer to the model.
CLOSE Initial estimate of how close parameter initial value estimates are, to the
solution. CLOSE multiplies changes in new parameter estimates. If you use a
large CLOSE value, the optimizer takes large steps toward the solution. For a
small value, the optimizer takes smaller steps toward the solution. You can use
a smaller value for close parameter estimates, and a larger value for rough
initial guesses. Default=1.0.
• If CLOSE is greater than 100, the steepest descent in the Levenburg-
Marquardt algorithm dominates.
• If CLOSE is less than 1, the Gauss-Newton method dominates.
For more details, see L. Spruiell, “Optimization Error Surfaces,” Meta-Software
Journal, Vol. 1, No. 4, December 1994.
CUT Modifies CLOSE, depending on how successful iterations are, toward the
solution.
If the last iteration succeeds, descent toward the CLOSE solution decreases by
the CUT value. That is, CLOSE = CLOSE / CUT
If the last iteration was not a successful descent to the solution, CLOSE
increases by CUT squared. That is, CLOSE = CLOSE * CUT * CUT
CUT drives CLOSE up or down, depending on the relative success in finding
the solution. The CUT value must be > 1. Default = 2.0.
DIFSIZ Increment change in a parameter value, for gradient calculations (∆x = DIFSIZ
⋅ max(x, 0.1) ). If you specify delta in a .PARAM statement, then ∆x = delta.
Default = 1e-3.
ITROPT Maximum number of iterations. Typically, you need no more than 20-40
iterations, to find a solution. Too many iterations can imply that the RELIN,
GRAD, or RELOUT values are too small. Default=20.
MAX Sets the upper limit on CLOSE. Use values > 100. Default=6.0e+5.
RELOUT Sets the relative tolerance to finish optimization. For RELOUT=0.001, if the
relative difference in the RESULTS functions, from one iteration to the next, is
less than 0.001, then optimization is finished. Default=0.001.
Circuit Input
vds 30 0 vds
vgs 20 0 vgs
vbs 40 0 vbs
m1 30 20 0 40 nch w=50u l=4u
$..
$..process skew parameters for this data
.PARAM xwn=-0.3u xln=-0.1u toxn=196.6 rshn=67
$..the model and initial guess
.MODEL nch NMOS LEVEL=3
+ acm=2 ldif=0 hdif=4u tlev=1 n=2
+ capop=4 meto=0.08u xqc=0.4
$...note capop=4 is ok for H8907 and later, otherwise
$...use Capop=2
$...fixed parameters
+ wd=0.15u ld=0.07u
+ js=1.5e-04 jsw=1.8e-09
+ cj=1.7e-04 cjsw=3.8e-10
+ nfs=2e11 xj=0.1u delta=0 eta=0
$...process skew parameters
+ tox=toxn rsh=rshn
+ xw=xwn xl=xln
Optimized Parameters
+ vto=vto gamma=gamma
+ uo=uo vmax=vmax theta=theta kappa=kappa
.PARAM
+ vto = opt1(1,0.5,2)
+ gamma = opt1(0.8,0.1,2)
+ uo = opt1(480,400,1000)
+ vmax = opt1(2e5,5e4,5e7)
+ theta = opt1(0.05,1e-3,1)
+ kappa = opt1(2,1e-2,5)
DC Sweeps
.DC DATA=gate
.DC DATA=drain
Print Sweeps
.PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids)
.PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids)
DC Sweep Data
$..data
.PARAM vds=0 vgs=0 vbs=0 ids=0
.DATA all vds vgs vbs ids
1.000000e-01 1.000000e+00 0.000000e+00 1.655500e-05
5.000000e+00 5.000000e+00 0.000000e+00 4.861000e-03
.ENDATA
.DATA gate vds vgs vbs ids
1.000000e-01 1.000000e+00 0.000000e+00 1.655500e-05
1.000000e-01 5.000000e+00 -2.000000e+00 3.149500e-04
.ENDDATA
.DATA drain vds vgs vbs ids
2.500000e-01 2.000000e+00 0.000000e+00 2.302000e-04
5.000000e+00 5.000000e+00 0.000000e+00 4.861000e-03
.ENDDATA
.END
If you use minval, low current data does not dominate the error.
EXAMPLE:
To optimize GAMMA, use data with back bias (VBS= -2 in this case).
To optimize KAPPA, the saturation region must contain data. In this
example, the all data set contains:
Circuit Input
vds 30 0 vds
vgs 20 0 vgs
vbs 40 0 vbs
m1 30 20 0 40 nch w=50u l=4u
$..
$..process skew parameters for this data
.PARAM xwn=-0.3u xln=-0.1u toxn=196.6 rshn=67
$..the model and initial guess
.MODEL nch NMOS LEVEL=13
+ acm=2 ldif=0 hdif=4u tlev=1 n=2 capop=4 meto=0.08u
+ xqc=0.4
$...parameters obtained from measurements
+ wd=0.15u ld=0.07u js=1.5e-04 jsw=1.8e-09
+ cj=1.7e-04 cjsw=3.8e-10
$...parameters not used for this data
+ k2=0 eta0=0 x2e=0 x3e=0 x2u1=0 x2ms=0 x2u0=0 x3u1=0
Optimization Sweeps
DC Data Sweeps
.DC DATA=gate
.DC DATA=drain
Print Sweeps
DC Sweep Data
$..data
.PARAM vds=0 vgs=0 vbs=0 ids=0
.DATA gate vds vgs vbs ids
1.000000e-01 1.000000e+00 0.000000e+00 1.655500e-05
1.000000e-01 5.000000e+00 -2.000000e+00 3.149500e-04
.ENDDATA
RC Network Optimization
The following example optimizes the power dissipation and time
constant, for an RC network. The circuit is a parallel resistor and
capacitor. Design targets are:
• 1 s time constant.
• 50 mW rms power dissipation, through the resistor.
ne
2
residual sum of squares = ∑ Ei
i=1
In this equation, E is the error function, and ne is the number of error
functions.
The norm of the gradient is another measure of the total error. The
smaller this value is, the more accurate the optimization results are.
The following equations calculates the G gradient:
ne
Gj = ∑ E i ⋅ ( D E i ⁄ DP j )
i=1
np
2
norm of the gradient = 2 ⋅ ∑ Gj
i=1
In this equation, P is the parameter, and np is the number of
parameters to optimize.
If the optimizer does not attain the optimal solution, it prints both an
error message, and a large Marquardt Scaling Parameter value.
Number of Iterations
Circuit Input
Optimization Parameters
.param
+ wp2=opt1(70u,30u,330u)
+ wn2=opt1(22u,15u,400u)
+ wp3=opt1(400u,100u,500u)
+ wn3=opt1(190u,80u,580u)
+ wp4=opt1(670u,150u,800u)
+ wn4=opt1(370u,50u,500u)
+ wp5=opt1(1200u,1000u,5000u)
+ wn5=opt1(600u,400u,2500u)
+ wp10=opt1(240u,150u,450u)
+ wn10=opt1(140u,30u,280u)
+ wp11=opt1(240u,150u,450u)
Control Section
Optimization Results
Optimization Completed
MN12
MP12 VCC
Cext
PENN
MP4 Cpad
MN10
MN11 NEN
MN5
MN4
ENB
VCC
MP13
ENBN
Cenb Cenbn
MN13
• AC optimization.
• Optimized element and model parameters.
Optimization Results
Optimization Results
*%NORM-SEN%CHANGE
.PARAM VTO= -1.1067 $ 64.6110 43.9224M
.PARAM VGEXP= 2.9475 $ 13.2024 219.4709M
.PARAM GAMDS= 0. $ 0. 0.
.PARAM BETA = 11.8701M $ 17.2347 136.8216M
.PARAM LAMBDA= 138.9821M $ 2.2766 -1.5754
.PARAM RDS= 928.3216M $ 704.3204M 464.0863M
.PARAM ALPHA= 2.2914 $ 728.7492M 168.4004M
.PARAM UCRIT= 1.0000M $ 18.2438M -125.0856
.PARAM SATEXP= 1.4211 $ 1.2241 2.2218
* %NORM-SEN%CHANGE
.PARAM WM1 = 47.9629U $ 1.6524 -762.3661M
.PARAM WM5 = 66.8831U $ 10.1048 23.4480M
.PARAM WM6 = 127.1928U $ 12.7991 22.7612M
.PARAM WM7 = 115.8941U $ 9.6104 -246.4540M
.PARAM LM = 6.2588U $ 20.3279 -101.4044M
.PARAM BIAS = 2.7180 $ 45.5053 5.6001M
*** OPTIMIZE RESULTS MEASURE NAMES AND VALUES
* DELAYR = 100.4231N
* DELAYF = 99.5059N
* TOT_POWER = 10.0131M
* AREA = 3.1408N
M3 M4 M6
vout
vin- M1 M2 vin+ M5
vbias M7
13-1
Using the Demo Directory Tree
Demonstration Input Files on page 13-24 lists demonstration files,
which are designed as good training examples. Most HSPICE
distributions include these examples in the demo directory tree,
where $installdir is the installation directory environment variable:
/filters filters
One-Bit Subcircuit
The ONEBIT subcircuit defines the two half adders, with carry in and
carry out. To create the two-bit adder, HSPICE uses two calls to
ONEBIT. Independent piecewise linear voltage sources provide the
input stimuli. The R repeat function creates complex waveforms.
#1_nand carry-out
X9
carry-in
carry-in One
One Bit
Bit One
One Bit
Bit carry-out_2
carry-out_2
carry-out_1
carry-out_1
C[0]
C[0] C[1]
C[1]
carry-out
# 1_nand X9
Stimuli
V1 carry-in gnd PWL(0NS,lo 1NS,hi 7.5NS,hi 8.5NS,lo 15NS lo R
V2 A[0] gnd PWL (0NS,hi 1NS,lo 15.0NS,lo 16.0NS,hi 30NS hi R
V3 A[1] gnd PWL (0NS,hi 1NS,lo 15.0NS,lo 16.0NS,hi 30NS hi R
V4 B[0] gnd PWL (0NS,hi 1NS,lo 30.0NS,lo 31.0NS,hi 60NS hi
V5 B[1] gnd PWL (0NS,hi 1NS,lo 30.0NS,lo 31.0NS,hi 60NS hi
SCALE=1u Sets the element units to microns (not meters). Most circuit designs use microns.
DCCAP Forces HSPICE to evaluate the voltage variable capacitors, during a DC sweep.
node names Makes a circuit easy to understand. Symbolic name contains up to 16 characters.
i(mn1) i1, i2, i3, or i4 can specify the true branch currents, for each transistor node.
LX7(mn1) GM gate transconductance. (LX8 specifies GDS, and LX9 specifies GMB).
- Leadframe capacitance.
- Six inches of 6-mil copper, on an FR-4 printed circuit board.
Strategy
The HSPICE strategy is to:
Input Signals
VIN IN LGND PWL(0N 0V, 2N 5V, 12N 5, 14N 0)
* OUTPUT DRIVER
MP1 LOUT IN LVDD LVDD P W=1400U L=1.2U
MN1 LOUT IN LVSS LVSS N W=800U L=1.2U
xout LOUT OUT LEADFRAME
*POWER AND GROUND LINE PARASITICS
Vd VDD GND 5V
xdd vdd lvdd leadframe
Vs VSS gnd 0v
xss vss lvss leadframe
*OUTPUT LOADING — 3 INCH FR-4 PC BOARD + 5PF LOAD +
*3 INCH FR-4 + 5PF LOAD
XLOAD1 OUT OUT1 GND LUMP5 LEN=3 WID=.006
CLOAD1 OUT1 GND 5PF
XLOAD2 OUT1 OUT2 GND LUMP5 LEN=3 WID=.006
CLOAD2 OUT2 GND 5PF
Model Section
.MODEL N NMOS LEVEL=3 VTO=0.7 UO=500 KAPPA=.25 ETA=.03
+ THETA=.04 VMAX=2E5 NSUB=9E16 TOX=200E-10 GAMMA=1.5 PB=0.6
+ JS=.1M XJ=0.5U LD=0.0 NFS=1E11 NSS=2E10 capop=4
.MODEL P PMOS LEVEL=3 VTO=-0.8 UO=150 KAPPA=.25 ETA=.03
+ THETA=.04 VMAX=5E4 NSUB=1.8E16 TOX=200E-10 GAMMA=.672
+ PB=0.6 JS=.1M XJ=0.5U LD=0.0 NFS=1E11 NSS=2E10 capop=4
.end
IVDD_MAX = 0.1141 AT= 1.7226E-08
FROM= 0.0000E+00 TO= 3.0000E-08
IVSS_MAX = 0.2086 AT= 3.7743E-09
FROM= 0.0000E+00 TO= 3.0000E-08
EXAMPLE:
The following example, the $installdir/demo/hspice/ciropt/
opttemp.sp demo file, simulates three circuits of a voltage source. It
also simulates a resistor at -25, 0, and +25 °C from nominal, using
the DTEMP parameter for element delta temperatures. The resistors
share a common model.
Optimization Section
.model optmod opt
.dc data=RES_TEMP optimize=opt1
+ results=r@temp1,r@temp2,r@temp3
+ model=optmod
.param tc1r_opt=opt1(.001,-.1,.1)
.param tc2r_opt=opt1(1u,-1m,1m)
.meas r@temp1 err2 par(R_meas_t1) par(’1.0 / lv1(r-25)’)
.meas r@temp2 err2 par(R_meas_t2) par(’1.0 / lv1(r0) ’)
.meas r@temp3 err2 par(R_meas_t3) par(’1.0 / lv1(r+25) ’)
EXAMPLE:
The following example illustrates how scaling affects the delay. For
example, for a device with:
• Channel width = 100 microns.
• Channel length = 5 microns.
• Gate oxide thickness = 800 Angstroms.
The resulting RC product for the polysilicon gate is:
W Esio ⋅ nsi
Rpoly = ----- ⋅ 40 poly = ------------------------- ⋅ L ⋅ W
L tox
100 3.9 ⋅ 8.86
Rpoly = ---------- ⋅ 40 = 800 , Co = ------------------------ ⋅ 100 ⋅ 5 = 215 fF RC = 138 ps
5 800
channel width
Rpoly = --------------------------------------------- ⋅ 40
channel length
3.9 ⋅ 8.86
Co = ------------------------ ⋅ channel width ⋅ channel length RC = 546 ps
Tox
You can use a nine-stage ladder model, to model the RC delay in
CMOS devices.
Drain
M1 M2 M3 M4 M5 M6 M7 M8 M9
W/18 W/9 W/9 W/9 W/9 W/9 W/9 M10
W/9 W/9 W/18
Bulk Source
A-1
Simulation Example Using AvanWaves
Figure A-1 is a circuit diagram, for the linear CMOS amplifier in the
circuit portion of the netlist. The two sources in the diagram are also
in the netlist.
Example.ic
* “simulator” “HSPICE”
* “version” “98.4 (981215) ”
* “format” “HSP”
* “rundate” “13:58:43 01/08/1999”
* “netlist” “example.sp ”
* “runtitle” “* example hspice netlist using a linear
* cmos amplifier ”
* time = 0.
* temperature = 25.0000
*** BEGIN: Saved Operating Point ***
.option gmindc= 1.0000p
.nodeset
+ clamp = 2.6200
+ in = 0.
+ infilt = 2.6200
+ inv1out = 2.6200
+ inv2out = 2.6199
+ vdd = 5.0000
*** END: Saved Operating Point ***
Example.pa0
1 xinv1.
2 xinv2.
Example.st0
***** HSPICE -- 98.4 (981215) 13:58:43
***** 01/08/1999 solaris
Input File: example.sp
lic: FLEXlm:v5.12 USER:hspiceuser HOSTNAME:hspiceserv
+ HOSTID:8086420f PID:1459
lic: Using FLEXlm license file:
lic: /afs/rtp/product/distrib/bin/license/license.dat
lic: Checkout hspice; Encryption code: AC34CE559E01F6E05809
lic: License/Maintenance for hspice will expire on
+ 14-apr-1999/1999.200
lic: 1(in_use)/10 FLOATING license(s) on SERVER hspiceserv
lic:
Figure A-7 Plot of Measured Variable falltime vs. Amplifier Input Voltage
SYNTAX:
*file: bjtdiff.sp bjt diff amp with every analysis type
*# ANALYSIS: ac dc tran tf noise new four sens pz disto temp
*# OPTIONS: list node ingold=2 measdgt=5 numdgt=8
+ probe post
*# TEMPERATURE: 25
* netlist options
.OPTION list node ingold=2 measdgt=6 numdgt=8 probe post
* defined parameters
.PARAM rb1x=aunif(20k,1k,30k) rb2x=aunif(20k,1k,30k)
* analysis specifications
.TF v(5) vin
.DC vin -0.20 0.20 0.01 sweep monte=3
.AC dec 10 100k 10meghz
.NOISE v(4) vin 20
.NET v(5) vin rout=10k
.PZ v(5) vin
.DISTRO rc1 20 .9 1m 1.0
.SENS v(4)
.TRAN 5ns 200ns
.FOUR 5meg v(5) v(15)
.TEMP -55 150
* output specifications
.MEAS qa_propdly trig v(1) val=0.09 rise=1
+ targ v(5) val=6.8 rise=1
.MEAS qa_magnitude max v(5)
where the input file is bjtdiff.sp, and the output file is bjtdiff.lis.
Simulation creates the following output files:
On a Windows-NT system:
Programs > (user_install_location)> Cosmos-Scope
3. In the Open Plotfiles dialog box, in the Files of Type fields, select
the Hspice Transient (*.tr*) item.
5. Hold down the Ctrl key, and select the v(4), v(5), and
ITPOWERD(power) signals.
6. Click on Plot from the bjtdiff Plot File window.
http:// www.synopsys.com
Index-1
ACOUT option 7-33–7-34, 8-6, 8-26, 11-8 analysis (continued)
adder DC 7-3
circuit 13-4 distortion 11-12
demo 13-3 element template 7-3
NAND gate binary 13-4 Fourier 10-37
subcircuit 13-3 initialization 9-3
admittance inverter 10-10
AC input 7-36 .MEASURE statement 7-3
AC output 7-36 Monte Carlo 12-3, 12-13, 12-13–12-34
Y parameters 7-32 network 11-17
AF model parameter 11-16 optimization 12-41
AGAUSS keyword 12-16 parametric 7-3
pole/zero 9-21
algebraic
expressions 6-8 RC network 10-9, 11-9
models 10-26 statistical 12-7–12-34
Taguchi 12-2
algorithms
temperature 12-2, 12-6
Damped Pseudo Transient algorithm 9-38
transient 7-3, 10-2
DVDT 8-30, 8-32, 10-16, 10-19, 10-32, 10-33
worst case 12-2, 12-7–12-34
GEAR 8-33, 10-16, 10-28
yield 12-2
integration 10-28
iteration count 10-32 arccos(x) function 6-10
Levenberg-Marquardt 12-56 arcsin(x) function 6-10
local truncation error 8-27, 8-28, 8-33, 10-16, arctan(x) function 6-10
10-20, 10-21, 10-32, 10-33 arithmetic expression measurement 7-59
pivoting 8-20, 9-25 arithmetic operators 6-10
timestep control 8-30, 10-16, 10-31, 10-32, ARTIST option 8-10, 8-12
10-34
ASCII output data 8-10, 8-11, 8-12
transient analysis timestep 8-32, 10-16
TRAP 8-33, 10-16 ASIC libraries 3-64
trapezoidal integration 8-33, 10-17, 10-28 asin(x) function 6-10
ALL keyword 9-6, 9-12 ASPEC option 8-13
.ALTER asterisk comment delimiter 3-10
blocks 3-45–3-46 AT keyword 7-46
statement 3-44, 3-46, 3-52, 7-21 atan(x) function 6-10
AM ATEM characterization system 3-62
source function 5-23, 5-23–5-24 AUNIF keyword 12-16
Analog Artist interface 8-10, 8-12 autoconvergence 8-23, 9-30, 9-32
See also Artist AUTOSTOP option 8-28, 10-21, 10-24
analysis average (AVG) measurement 7-47
AC 7-3
average deviation 12-3
accuracy 9-26–9-28
data driven 12-2, 12-3 average value, measuring 7-51
AVG keyword 7-52
Index-2
B C
B# node name in CSOS 3-21 C Element (capacitor) 4-9
backslash continuation character 3-3, 6-9 Cadence
BADCHR option 3-3, 8-14 Opus 8-10
behavioral WSF format 8-10
current source 5-51 capacitance
voltage source 5-39 charge tolerance, setting 8-26, 10-19
Behavioral capacitors 4-10 CSHUNT node-to-ground 8-26, 10-8, 10-15
Behavioral resistors 4-5 CTYPE 4-10
element parameter 4-7
BETA keyword 11-16
manufacturing variations 12-23
Biaschk 10-12
scale factor, setting 8-25
binary output 8-11 table of values 8-21, 9-22
Bipolar Junction Transistors. See BJTs capacitance-voltage plots, generating 8-21,
bisection 9-22
data, printing 8-9 capacitor
BJTs conductance requirement 9-37
current flow 7-27 current flow 7-26
element template listings 7-70 element 4-6, 4-9, 7-67
elements, names 4-20 linear 4-9
EXPLI 8-17 models 3-34, 4-7
power dissipation 7-29 voltage controlled 5-52, 5-56
S-parameters, optimization 12-63 capacitors
BKPSIZ option 8-28, 10-21 charge-conserving 4-11
bond wire example 13-10 CAPOP model parameter 10-27
branch current CAPTAB option 8-21, 9-22
error 8-17, 9-22, 9-29 CCCS element parameter 5-45
output 7-25
CCVS element parameter 5-58, 5-59
breakpoint table
cell characterization 12-2
reducing size 10-36
CENDIF optimization parameter 12-44
size 8-28, 10-21
characterization of models 9-13
BRIEF option 8-3, 8-7, 8-8, 8-9, 9-6
charge tolerance, setting 8-26, 10-19
Broyden update data, printing 8-9
BSIM model, LEVEL 13 3-34 CHGTOL option 8-26, 10-19, 10-33
circuits
BSIM2 LEVEL 39 model 3-34
adder 13-4
buffer 4-43
description syntax 2-5
bus notation 5-75 inverter, MOS 10-10
BYPASS option 8-28, 10-15 nonconvergent 9-42
BYTOL option 8-29, 10-19 RC network 11-9
reusable 3-57
Index-3
circuits (continued) continuation of line (digital vector file) 5-100
subcircuit numbers 3-20 control characters in input 3-3
temperature 12-6, 12-7 control options
See also subcircuits accuracy 8-17, 9-28
CLOAD model parameter 5-66 AC 8-26, 8-26–8-28
CLOSE optimization parameter 12-44 defaults 10-34
CMOS algorithm 8-32–??
output driver demo 13-10 algorithm selection 9-21
tristate buffer, optimization 12-58 analysis 8-10–8-12
CO option 7-16, 8-7 convergence 8-21–8-24, 9-21, 9-28
column laminated data 3-32 DC convergence 9-22
commands DC operating point analysis 9-22
Hspice 3-67–3-74 defaults 8-2
limit descriptors 7-21 error 8-14
output 7-2 initialization 9-21
comment line input and output 8-6–8-10, 8-21, 8-34
continuation 2-9 interface options 8-10–8-12
netlist 2-9 keyword table 8-3
comment line (digital vector files) 5-100 limit 10-21
matrix-related 8-19–8-21
comments 3-10
method 10-15
common
pole/zero 8-21–8-25
emitter gain 13-18
printing 7-16, 8-9
Common Simulation Data Format 8-10, 8-11
setting 8-3
compression of input files 3-2 speed 8-28–8-29
computer platforms for HSpice 1-6 table 8-6
concatenated data files 3-30 timestep 8-30–8-32
conductance tolerance 10-15
current source, initialization 8-23, 9-30 transient analysis
for capacitors 9-37 limit ??–8-21, 10-21–10-23
minimum, setting 8-26, 10-8, 10-22 method 10-15–10-17
models 8-22, 9-23 tolerance 10-15–??
MOSFETs 8-23, 9-30 version 8-14
negative, logging 8-14 controlled sources 5-26, 5-29
node-to-ground 8-23, 8-27, 9-23, 10-15 CONVERGE option 8-21, 8-23, 9-29, 9-32,
pn junction 9-45 9-38
scale, setting 8-25 convergence
sweeping 8-23, 9-23 control options 9-28
configuration file 3-66 current 8-17–??, 8-18, 8-26, 8-27, 9-29, 9-30,
continuation character, parameter strings 6-9 10-18–??, 10-20, 11-8
continuation of line ensuring 9-22
netlist 2-9 for optimization 12-45
Index-4
convergence (continued) current (continued)
increasing iterations 9-22 in HSPICE elements 7-26
problems 9-39 operating point table 9-6
analyzing 9-39 output 7-24
autoconverge process 9-32 sources 5-49
causes 8-28, 9-42, 10-15 CURRENT keyword 9-6
changing integration algorithm 8-33, 10-17 CUT optimization parameter 12-44
CONVERGE option 8-21, 8-23, 9-29, 9-38 C-V plots 8-21, 9-22, 13-7
DCON setting 8-22, 9-30, 9-33
CVTOL option 8-16
decreasing the timestep 8-30, 10-22
diagnosing 9-39–9-45
diagnostic tables 9-39 D
floating point overflow 9-38
D2A
GMINDC ramping 9-33
function 5-62
internal timestep too small 8-33, 10-16
input model parameters 5-64
.NODESET statement 9-10
model parameter 5-62
nonconvergent node listing 8-23, 9-30 See also mixed mode
operating point Debug mode 9-6
.d2a file 5-62
reducing 9-35
Damped Pseudo Transient algorithm 9-38
setting DCON 8-23, 9-30
steady state 8-23, 9-23 data
files, disabling printout 8-7, 8-8
cos(x) function 6-10
flow, overview 1-8
cosh(x) function 6-10
DATA keyword 3-24, 9-15, 10-5, 11-6
CPTIME option 8-10
.DATA statement 3-24, 3-29
CPU time
data-driven analysis 3-24
limiting 8-10
datanames 3-25
reducing 8-8
external file 3-29, 3-31
setting maximum 8-10
for sweep data 3-24
CROSS keyword 7-45 inline data 3-26
CSCAL option 8-25 inner sweep example 3-28
CSDF option 8-10, 8-11 outer sweep 3-28
CSHDC option 8-22, 9-22 outer sweep example 3-28
CSHUNT option 8-26, 10-8, 10-15 data-driven analysis 12-2, 12-3
CTYPE 4-10 PWL source function 5-21
current dataname 7-64
ABSMOS floor value for convergence 8-19, datanames 3-25
9-31 db(x) function 6-11
branch 7-26, 8-17, 9-22, 9-29
DC
controlled
analysis 7-3, 9-18–9-20
current sources 5-28, 5-45, 7-68
capacitor conductances 9-37
voltage sources 5-27, 5-58, 7-69
decade variation 9-15
Index-5
DC, analysis (continued) DEFPD option 8-16
initialization 8-22, 9-21, 9-22 DEFPS option 8-16
iteration limit 8-19, 9-24 DEFW option 6-17, 8-16
linear variation 9-15 .DEL LIB statement 3-7
list of points 9-15 in .ALTER blocks 3-46
octave variation 9-15 with .ALTER 3-52
sensitivity 9-19 with .LIB 3-52
transfer function 9-20 with multiple .ALTER statements 3-47
convergence control options 9-21, 9-22
DELAY element parameter 5-53, 5-59
errors, reducing 9-35
delays
operating point
element example 5-56
analysis 9-6
group 7-35
bypassing 10-3
measuring 7-43
initial conditions file 3-67
See also operating point time (TD) 7-35
optimization 9-14 DELMAX option 8-30, 8-31, 10-22, 10-23,
sensitivity analysis 9-19 10-25, 10-26, 10-35, 10-39
small-signal analysis 9-20 DELTA
sources 5-6 element parameter 5-53, 5-59
sweep 9-13 internal timestep 8-30, 10-22
transfer function 9-20 See also timestep
.DC statement 9-13, 12-6, 12-41 DELVTO model parameter 12-9
external data with .DATA 3-25 demo files
DCCAP option 8-21, 9-22, 13-6 2n2222 BJTs transistor characterization
13-31
DCFOR option 8-22, 9-22 2n3330 JFETs transistor characterization
DCHOLD option 8-22, 9-22 13-31
DCON option 8-22, 9-30, 9-32 A/D flash converter 13-28
DCSTEP option 8-22, 9-23, 9-37 A2D 13-28
DCTRAN option 9-30 AC analysis 13-25
.DCVOLT statement 9-8 acl gate 13-26
adders
DDL 3-62, 3-63, 13-18
72-transistor two-bit 13-27
DDLPATH environment variable 3-63, 13-18
BJT NAND gate two-bit 13-25
DEBUG keyword 9-6 BJT two-bit 13-25
DEC keyword 9-15, 10-6, 11-6 D2A 13-28
decibel function 6-11 MOS two-bit 13-25
DEFAD option 8-16 NAND gate four-bit binary 13-25
DEFAS option 8-16 air core transformer 13-34
DEFAULT_INCLUDE variable 3-67 algebraic
DEFL option 8-16 output variables 13-24
parameters 13-24
DEFNRD option 8-16
transmission lines 13-38
DEFNRS option 8-16
.ALTER statement 13-25
Index-6
demo files (continued) demo files, CMOS (continued)
AM source 13-37 inverter macro 13-26
amplifier 13-28 output buffer 13-28
amplitude modulator 13-26 coax transmission line 13-38
analog 13-27 crystal oscillator 13-25
AND gate 13-26 current controlled
automatic model selection program 13-35 current source 13-26
behavioral applications 13-26–13-27 voltage source 13-27
behavioral models 13-27 D2A 13-28
diode 13-26 DC analysis, MOS model LEVEL=34 13-35
D-latch 13-26 DDL 13-28–13-31
filter 13-24 delay 13-25, 13-28
NAND gate 13-26 device optimization 13-31–13-32
ring oscillator 13-26 differential amplifier 13-25
triode 13-27 differentiator 13-26
voltage to frequency converter 13-24 diffusion effects 13-25
benchmarks 13-27 diode photocurrent 13-36
bisection 13-27, 13-28 D-latch 13-26
BJTs E Element 13-26
analog circuit 13-27 edge triggered flip-flop 13-26
beta plot 13-27 exponential source 13-37
differential amplifier 13-25, 13-28 FFT
diodes 13-27 AM source 13-32
ft plot 13-27 analysis 13-32–13-33
gm, gpi plots 13-27 Bartlett window 13-32
photocurrent 13-37 Blackman window 13-32
Schmidt trigger 13-25 Blackman-Harris window 13-33
sense amplifier 13-25 data-driven transient analysis 13-33
BSIM3 model, LEVEL=47 13-34 exponential source 13-32
capacitances, MOS models Gaussian window 13-33
LEVEL=13 13-34 Hamming window 13-33
LEVEL=2 13-34 Hanning window 13-33
LEVEL=6 13-35 harmonic distortion 13-32
cell characterization 13-25, 13-26, 13-28 high frequency detection 13-32
charge conservation, MOS models intermodulation distortion 13-33
LEVEL=3 13-35 Kaiser window 13-33
LEVEL=6 13-35 modulated pulse source 13-33
circuit optimization 13-28 Monte Carlo, Gaussian distribution 13-33
CMOS product of waveforms 13-33
differential amplifier 13-25 pulse source 13-33
I/O driver ground bounce 13-25, 13-38 PWL 13-33
input buffer 13-28 rectangular window 13-33
Index-7
demo files, FFT (continued) demo files (continued)
single-frequency FM source 13-33 magnetic core transformer 13-34
sinusoidal source 13-33 magnetics 13-34
small-signal distortion 13-32 microstrip transmission lines 13-34, 13-38
switched capacitor 13-33 coupled 13-38
transient 13-32 optimization 13-38
window tests 13-33 series 13-38
filter matching 13-28 Monte Carlo analysis 13-25
filters 13-34 Gaussian distribution 13-25
behavioral 13-24 limit function 13-25
fifth-order 13-27, 13-34 uniform distribution 13-25
fourth-order Butterworth 13-34 MOS 13-27, 13-28
Kerwin’s circuit 13-34 MOSFETs 13-34–13-35
LCR bandpass 13-34 sigma sweep 13-28
matching lossy to ideal 13-28 sweep 13-25
ninth-order low-pass 13-26, 13-34 NAND gate 13-26
switched capacitor low-pass 13-25 NMOS E-mode model, LEVEL=8 13-37
FR-4 microstrip transmission line 13-34, noise analysis 13-25
13-37 op-amp 13-25, 13-26
G Element 13-25, 13-26 characterization 13-29–13-31
GaAsFET amplifier 13-25 voltage follower 13-26, 13-37
gamma model LEVEL=6 13-35 optimization 13-26
general applications 13-25 2n3947 Gummel model 13-32
ground bounce 13-25, 13-38 DC 13-31
group time delay 13-25 diode 13-32
impact ionization plot 13-35 GaAs 13-32
input 13-24 group delay 13-28
installation test 13-27 Hfe 13-31
integrator 13-26 I-V 13-32
inverter 13-25, 13-26, 13-28 JFETs 13-32
characterization 13-28 LEVEL=2 model beta 13-31
IRF340 NMOS transistor characterization LEVEL=28 13-32
13-31 MOS 13-32
I-V plots s-parameter 13-31
LEVEL=3 13-35 speed, power, area 13-28
MOSFETS model LEVEL=13 13-35 width 13-28
SOSFETS model LEVEL=27 13-35 parameters 13-24
JFETs photocurrent 13-37 phase
junction tunnel diode 13-27 detector 13-26
LCR circuit 13-28 locked loop 13-25
lumped photocurrent 13-35–13-37
MOS model 13-25 GaAs device 13-37
transmission lines 13-34, 13-38 photolithographic effects 13-25
Index-8
demo files (continued) demo files (continued)
pll 13-25 temperature effects
pole/zero analysis 13-25, 13-34 LEVEL=13 13-35
pulse source 13-37 LEVEL=6 13-35
PWL 13-37 timing analysis 13-27
CCCS 13-26 total radiation dose 13-36
CCVS 13-27 transient analysis 13-25
switch element 13-27 transistor characterization 13-31
VCCS 13-26, 13-27 transmission lines 13-37–13-38
VCO 13-27 triode model 13-27
VCVS 13-26 tunnel diodes 13-27
radiation effects 13-35–13-37 twinlead transmission line model 13-38
bipolar devices 13-35–13-36 U models 13-38
DC I-V, JFETs 13-37 unity gain frequency 13-28
GaAs differential amplifier 13-37 Viewsim
JFETs devices 13-36 A2D input 13-28
MOSFETs devices 13-36 D2A input 13-28
NMOS 13-37 voltage follower 13-26
RC circuit optimization 13-28 voltage-controlled
resistor temperature coefficients 13-28 current source 13-26, 13-27
RG58/AU coax test 13-34 oscillator 13-24, 13-27
ring oscillator 13-26 resistor inverter 13-37
Royer magnetic core oscillator 13-34 voltage source 13-26
Schmidt trigger 13-25 voltage-to-frequency converter 13-24
sense amplifier 13-25 voltage-variable capacitor 13-26
series source coupled transmission lines waveform smoothing 13-26
13-38 worst case skew model 13-25
setup 13-27, 13-28 DERIVATIVE keyword 7-54
characterization 13-28 derivative, measuring 7-48
shunt terminated transmission lines 13-38 design
silicon controlled rectifier 13-27 name 3-65
sine wave sampling 13-26 deviation, average 12-3
single-frequency FM source 13-37 device characterization 3-62
sinusoidal source 13-37
DI control option 8-18, 8-27, 9-30, 10-19, 11-8
skew models 13-25
DIAGNOSTIC option 8-14
SNAP to HSPICE conversion 13-27
sources 13-37 diagnostic tables 9-39–9-40
s-parameters 13-27, 13-34, 13-35 DIFSIZ optimization parameters 12-45
sweep 13-25 digital
switch 13-26 files 5-62
switched capacitor 13-25, 13-27, 13-37 input 5-62
vector file 5-72
Index-9
digital vector file electrical measurements 13-18
Waveform Characteristics section 5-86 Element
DIM2 capacitance
distortion measure 11-12 CTYPE 4-10
parameter 7-37 element
DIM3 active
distortion measure 11-12 BJTs 4-19
parameter 7-37 diodes 4-17
diodes JFETs 4-22
breakdown example 5-57 MESFETs 4-22
current flow 7-26 MOSFETs 4-24
elements 7-69 C (capacitor) 4-9
equations 5-57 checking, suppression of 8-8
junction 4-18 IC parameter 9-8
models 3-34, 4-18 identifiers 2-8
polysilicon capacitor length 4-18 independent source 5-2, 5-8
power dissipation 7-29 instantiate 2-8
directories L (inductor) 4-16
installation directory 3-62 markers, mutual inductors 4-15
tmp 3-71 names 3-18
.DISTO statement 11-12, 11-13 OFF parameter 8-24, 9-5, 9-24
distortion 7-37, 11-12 parameters See element parameters 4-1
passive
dollar sign ($) comment delimiter 3-10
capacitors 4-6
.DOUT statement 5-83 inductor 4-11
drain-to-source current 8-18, 9-29 mutual inductor 4-14
DTEMP parameter 12-5, 12-6, 12-7, 13-16 resistors 4-2
DV option 8-22, 8-23, 9-23, 9-30, 9-32 R (resistor) 4-4
DVDT statements 3-11, 3-62
algorithm 8-30, 8-31, 10-19, 10-20, 10-29, current output 7-25
10-32 independent sources 5-2
option 8-30, 8-32, 10-16, 10-25, 10-32, subcircuits 3-16
10-33, 10-34 temperature 12-7
DVTR option 8-32, 10-22 templates 7-38–7-67
dynamic timestep algorithm 10-33 analysis 7-3
BJTs 7-70
capacitor 7-67
E current-controlled 7-68
E Elements function 6-11
applications 5-27 independent 7-69
element multiplier 5-41 inductor 7-67
syntax statements 5-38 JFETs 7-72
temperature coefficients 5-42 MOSFETs 7-73
time delay keyword 5-42 mutual inductor 7-68
Index-
element, templates (continued) environment variables 2-2, 3-63, 13-18
resistor 7-67 .EOM statement 3-15
saturable core 7-76 EPSMIN option 8-10
voltage-controlled 7-68 equations 7-51, 7-57
transmission line 4-28, 4-33, 4-35
ERR function 7-56, 7-57
voltage-controlled 5-26
ERR1 function 7-56, 7-58, 12-38
element parameters
.ALTER blocks 3-46 ERR2 function 7-56, 7-58
BJTs 4-20 ERR3 function 7-56, 7-59
capacitors 4-7–4-8 errors
DTEMP 12-5 cannot open
F Elements ??–5-47 output spool file 7-21
G Elements ??–5-55 current exceeding MAXAMP 8-27, 10-20
H Elements 5-59–5-60 DC 9-35
IBIS buffers 4-43 digital file has blank first line 5-62
independent sources 5-2–5-3 file open 3-71
data driven PWL function 5-20 functions 7-56–7-59
PULSE function 5-9, 5-12, 5-15, 5-17 internal timestep too small 8-23, 8-26, 8-27,
SFFM function 5-22 8-32, 8-33, 9-5, 9-23, 9-43, 10-4, 10-8,
inductors 4-12–4-13 10-15, 10-16, 10-23
JFETs and MESFETs 4-22 missing .END statement 3-2
linear inductors 4-12 no DC path to ground 9-37
MOSFETs 4-24–4-25 no input data 3-71
mutual inductors, Kxxx 4-15 optimization goal 7-44
POLY 5-29 parameter name conflict 7-42
PWL 5-18, 5-21 special characters in input 3-3
resistors 4-2–4-3 system resource inaccessible 7-21
transmission lines tolerances
T Element 4-33 ABSMOS 8-18, 9-29
U Element 4-35 branch current 8-17, 9-22, 9-29
W Element 4-29, 4-29 pole/zero analysis 8-25
relative change 8-19, 8-27, 9-31, 10-20
enable (digital vector file) 5-80
RELMOS 8-18, 9-29
.END statement
voltage 8-19, 8-27, 9-31, 10-20
for multiple HSPICE runs 3-55
example
in libraries 3-38
AC analysis 7-33, 11-9
location 3-55
comment line 2-9
missing 3-2
.DATA 3-28
with .ALTER 3-47
digital vector file 5-100
ENDDATA keyword 3-27, 3-29, 3-31
experiments 1-7
.ENDL statement 3-35, 3-36 first character 2-7
.ENDS statement 3-15 HSPICE vs. SPICE methods 7-33
Index-
example (continued) files (continued)
Monte Carlo 12-18, 12-26 .ac# 3-76
netlist file 2-6 column lamination 3-32
network analysis, bipolar transistor 11-23 concatenated data files 3-30
optimization 12-46 .d2a 5-62
.OPTION SEARCH 3-39 DC analysis 3-78
subcircuit 3-16 external data 3-8, 3-24
subcircuit node names 2-10 filenames 3-26
subcircuit test 3-14 .ft# 3-76, 3-79
transient analysis 10-9, 10-10 .gr# 3-76
worst case 12-26 graph data 1-8, 3-79
EXP source function hspice.ini 3-63, 8-11
fall time 5-15 .ic 3-77, 9-5
initial value 5-15 include files 3-7, 3-33, 3-38
pulsed value 5-15 including 3-67
rise time 5-15 initialization 3-67
exp(x) function 6-11 input 1-8, 3-68
experiment 1-7 limit on number 7-21
EXPLI option 8-17 .lis 3-76
.ma# 3-76
EXPMAX option 8-10
.ms# 3-76
exponential function 5-15, 6-11
.mt# 3-76
expressions, algebraic 6-8 multiple simulation runs 3-55
external data files 3-8, 3-25 names 3-65, 3-68–3-69
output
listing 3-77
F names 3-69
F Elements status 3-79
applications 5-28 version number 3-68
multiply parameter 5-46 .pa# 3-76
syntax statements 5-45 scratch files 3-71
time delay keyword 5-47 .st# 3-77
value multiplier 5-47 subcircuit node cross-listing 3-79
FALL keyword 7-45 .sw# 3-76
fall time .tr# 3-76
EXP source function 5-15 transient analysis 3-78
FAST option 8-29, 10-19, 10-24 FIND keyword 7-48
FIL keyword 3-25 first character descriptions 2-7
file descriptors limit 7-21 floating point overflow
files CONVERGE setting 8-22, 9-30
.a2d 3-76, 3-79, 5-62 setting GMINDC 8-23, 9-30
AC analysis 3-78 FMAX 8-25
Index-
Fourier G Elements (continued)
analysis 10-37 initial conditions 5-53
coefficients 10-39 multiply parameter 5-53
equation 10-39 names 5-53
.FOURIER statement 10-38 polynomial 5-54
FREQ resistance 5-53
model parameter 7-13 syntax statements 5-49
frequency time delay keyword 5-54
maximum transconductance 5-54
setting 8-25 voltage to resistance factor 5-55
ratio 11-13 GaAsFET model DC optimization 12-70
setting scale 8-25 gain, calculating 7-33
sweep 11-7 GAUSS
variable 6-13 functions 12-19
FROM parameter 7-57 keyword 12-16
FS option 8-30, 8-32, 10-22, 10-23, 10-35, parameter distribution 12-13, 12-14
11-16 GEAR algorithm 8-33, 10-16, 10-28
FSCAL option 8-25 GENK option 8-17
FT option 8-31, 8-32, 10-22, 10-23, 10-34, global
10-35 node names 3-22
.ft# file 3-76, 3-79 parameters 6-15
functions .GLOBAL statement 3-21
A2D 5-62 GMAX option 8-23, 9-30
built-in 6-10–6-13 GMIN option 8-23, 8-26, 9-30, 9-45, 10-8,
D2A 5-62 10-22
DERIVATIVE 7-54 GMINDC option 8-23, 9-30, 9-32, 9-45
ERR 7-56
GND node 3-19
INTEG 7-53
GOAL keyword 7-52, 12-38
NPWL 5-52
PPWL 5-52 .gr# file 3-76, 3-79, 7-11
table 6-10 GRAD optimization parameter 12-45
See also independent sources gradient data, printing 8-9
GRAMP
calculation 8-22, 9-30
G option 8-23, 9-23, 9-30, 9-32, 9-36
G Elements graph data file (Viewlogic format) 1-8, 8-10,
applications 5-28 8-11
controlling voltages 5-53, 5-55 .GRAPH statement 7-2, 7-11, 7-21, 13-6
current 5-53 ground
curve smoothing 5-54 node name 3-19
element value multiplier 5-54 GSCAL
gate type 5-53 multiplier 8-25
option 8-25
Index-
GSHUNT option 8-23, 8-27, 9-23, 10-15 .ic file 3-77, 9-5
Gxxx element parameters 5-53 IC parameter 5-53, 5-59, 9-8, 9-9, 9-12
.IC statement 9-3, 9-4, 9-9
from .SAVE 9-11
H ICSWEEP option 8-24, 9-23
H Elements ideal
applications 5-28 current sources 9-36
controlling voltage 5-60 delay elements 5-27, 5-28, 10-26
data points 5-59 op-amp 5-27, 5-40, 5-42
element multiplier 5-60 transformer 5-27, 5-40, 5-44
element name 5-59 idelay (digital vector file) 5-87
gate type 5-59
IDELAY statement 5-87
initial conditions 5-59
IGNOR keyword 7-56
maximum current 5-59
imaginary
minimum current 5-59
part of AC voltage 7-33–7-34
syntax statements 5-58
vs. real component ratio 8-25
time delay keyword 5-60
transresistance 5-60 IMAX option 8-31, 8-32, 10-22, 10-32
H parameters 11-23 IMIN option 8-31, 8-32, 10-22, 10-32
H9007 option 8-14 impedance
AC 7-36
harmonic distortion 11-12
Z parameters 7-32
HD2 distortion 7-37, 11-12
inactive devices
HD3 distortion 7-37, 11-12 See latent devices
hertz variable 6-13 include files 3-33, 3-38, 3-67
hierarchical designs, flattened 3-7 .INCLUDE statement 3-7, 3-33, 3-46, 3-63,
HSPICE 3-65
installation directory 3-62 independent sources
job statistics report 7-18–7-20 AC 5-3, 5-6
output, redirecting 3-69 AM function 5-23
starting 3-70 current 5-3, 7-69
version data driven PWL function 5-20
95.3 compatibility 10-35 DC 5-3, 5-6
H9007 compatibility 8-14 elements 5-2
parameter 3-34 EXP function 5-15
hspice command 3-67–3-74 functions 5-8
hspice.ini file 3-63, 8-11 mixed types 5-7
hybrid (H) parameters 7-32 PULSE function 5-8
PWL function 5-17
SFFM function 5-22
I SIN function 5-12
IBIS buffers 4-43 transient 5-3, 5-7
Index-
independent sources (continued) input (continued)
types 5-8 files
voltage 5-3, 7-69 character case 3-3
See also sources compression 3-2
indepout 7-64 configuration file 3-66
indepvar 7-63, 7-64, 7-65 control characters 3-3
individual element temperature 12-6 DC operating point 3-67
demonstration 13-24
inductance, scale 8-25
initialization 3-67
inductors
names 3-65, 3-68
current flow 7-26
netlist 3-2
element 4-11, 7-67
structure 3-7
GENK 8-17
table of components 3-8
KLIM 8-17
unprintable characters 3-3
mutual models 3-34
impedance 7-36
node names 4-12
netlist 2-5
INGOLD option 8-7, 8-8 netlist file
initial conditions 9-3 See also input files
file 3-67 3-9–3-55, A-2
saving and reusing 8-24, 9-23 input stimuli 7-62
statement 9-8 input/output
transient 10-6 cell modeling 13-21
initialization 8-24, 9-3, 9-4, 9-24 digital vector file 5-77
file 3-67 installation directory $installdir 3-62
saved operating point 9-11
int(x) function 6-11
inline data 3-26
INTEG keyword 7-52, 7-53
inner sweep 3-29
integer function 6-11
INOISE parameter 7-37 integration
input algorithms 10-28
admittance 7-36 backward Euler method 8-33, 10-16
data order of 8-33, 10-16
adding library data 3-52
interfaces
column laminated 3-32
Analog Artist 8-10
concatenated data files 3-30
AvanWaves 7-2
deleting library data 3-52
Mentor 8-11
external, with .DATA statement 3-24
MSPICE 8-11
filenames on networks 3-33
ZUKEN 8-12
for data driven analysis 3-24
intermodulation distortion 11-12
formats 3-27, 3-31, 3-32
internal
include files 3-33
nodes, referencing 3-19
printing 8-7
suppressing printout 8-7 INTERP option 8-34, 10-16
interstage gain 7-33
Index-
inverter keywords (continued)
analysis, transient 10-10 FS 11-16
circuit, MOS 10-10 GOAL 12-38
iterations LAST 7-46, 7-49, 7-50
algorithm 10-30 .MEASUREMENT statement parameters
count algorithm 10-32 7-52
limit 8-19, 9-24 .MODEL statement parameters 7-12
maximum number of 8-31, 10-22 MONTE 12-14
number 12-56 optimization syntax 12-40
ITL1 option 8-19, 8-22, 9-24, 9-30 PAR 6-9
ITL2 option 9-24 PP 7-51, 7-52
source functions 5-2
ITL3 option 8-31
target syntax 7-46
ITL4 option 8-31
.TRAN statement parameters 10-5
ITL5 option 8-31, 10-22 weight 7-52
ITLPZ option 8-25, 8-29 KF model parameter 11-16
ITROPT optimization parameter 12-45 Kirchhoff’s Current Law (KCL) test 8-18, 9-24
ITRPRT option 8-34, 10-16 KLIM option 8-17
I-V and C-V plotting demo 13-6
L
J L Element (inductor) 4-16
Jacobian data, printing 8-9 LAM keyword 3-25, 3-32
JFETs laminated data 3-32
current flow 7-26
LAST keyword 7-46, 7-49, 7-50
elements 4-22, 7-72
latent devices
length 4-22
BYPASS option 8-28, 8-29, 10-15, 10-19
power dissipation 7-30
BYTOL option 8-29, 10-19
width 4-22
excluding 8-29, 10-19
MBYPASS option 8-29, 10-19
K removing from simulation 8-29, 10-19
VNTOL option 8-29, 10-19
KCLTEST 8-18, 9-24
leadframe example 13-10
keyword
reserved 2-11 LENGTH model parameter 12-22
keywords LENNAM option 8-7
.AC statement parameters 11-6 LEVEL parameter 12-45
analysis statement syntax 12-41 Levenberg-Marquardt algorithm 12-56
DATA statement parameters 3-24 .LIB
.DC statement parameters 9-15 call statement 3-35
DTEMP 12-5 definition statement 3-36
ERR1 12-38 statement 3-7, 3-65
Index-
.LIB (continued) local
in .ALTER blocks 3-35, 3-46 parameters 6-15
nesting 3-37 truncation error algorithm 8-27, 8-28, 8-33,
with .DEL LIB 3-52 10-16, 10-20, 10-21, 10-32, 10-33
with multiple .ALTER statements 3-47 log(x) function 6-10
libraries log10(x) function 6-10
adding with .LIB 3-52 logarithm function 6-10
ASIC cells 3-64 LSCAL option 8-25
building 3-36, 3-37
LV 7-38
configuring 6-18
LV18 model parameter 13-7
creating parameters 6-15
DDL 3-39, 3-62 LVLTIM option 8-28, 8-31, 8-32, 8-33, 10-16,
10-17, 10-20, 10-21, 10-26, 10-32, 10-34
defining macros 3-36
deleting 3-52 LX 7-38
duplicated parameter names 6-15 LX7 model parameter 13-7
.END statement 3-38 LX8 model parameter 13-7
integrity 6-14 LX9 model parameter 13-7
private 3-43
protecting 3-43
search 3-63 M
selecting 3-40 M element parameter 5-46, 5-53
subcircuits 3-65 .ma# file 3-76, 3-78
vendor 3-64 .MACRO statement 3-14
limit descriptors command 7-21 macros 3-36, 3-52
LIMIT keyword 12-16 magnetic core models 3-34
LIMPTS option 8-12 magnitude
LIMTIM option 8-10 AC voltage 7-34
LIN keyword 9-15, 10-6, 11-6 magnitude, AC voltage 7-31, 7-33
linear .MALIAS
capacitor 4-9 statement 3-50
inductor 4-16 manufacturing tolerances 12-21
resistor 4-4 Marquardt scaling parameter 12-56
.lis file 3-76, 3-77 mask (digital vector file) 5-88
LIST option 8-7 matrix
listing calculations 8-19, 9-24
page width 7-16 minimum pivot values 8-21, 9-26
suppressing 3-43 parameters 11-17
LM_LICENSE_FILE 2-2 row/matrix ratio 8-20, 9-25
LMAX model parameter 1-5 size limitation 8-20, 9-25
LMIN model parameter 1-5 MAX parameter 5-53, 5-59, 7-52, 12-45
.LOAD statement 9-10 max(x,y) function 6-11
Index-
MAXAMP option 8-18, 8-27, 9-24, 10-20, 11-8 model analysis options 8-15, 8-15–8-16
MAXFLD keyword 11-16 BJTs, EXPLI 8-17
maximum DCAP 8-15
number size 8-10 inductors 8-17
value, measuring 7-51 MODSRH 8-15
MAXORD option 8-33, 10-16 MOSFETs 8-16
MBYPASS option 8-29, 10-19, 10-20 SCALM 8-15
TNOM 8-15
mean, statistical 12-3
MODEL keyword 9-15, 12-41
MEASDGT option 8-7
model parameters
MEASFAIL option 8-35
A2D 5-62
MEASOUT option 8-11 .ALTER blocks 3-46
measure capacitance distribution 12-23
data output formatting 8-7 D2A 5-62, 5-64
parameter types 7-42 DELVTO 12-9
.MEASURE statement 7-2, 7-3, 7-42, 8-7, 8-11 DTEMP 12-6
expression 7-59 .GRAPH statement parameters 7-13
failure message 7-40 LENGTH 12-22
parameters 6-7 LEVEL 12-45
performance 7-40 manufacturing tolerances 12-21
Mentor interface 8-11 MONO 7-13
MENTOR option 8-11 output 7-13
MER keyword 3-25, 3-30, 3-32 PHOTO 12-22
MESFETs 4-22 RSH 12-9
messages sigma deviations, worst case analysis 12-9
pivot change 8-20, 9-25 skew 12-8
See also errors, warnings suppressing printout of 8-8
METHOD option 8-33, 10-17 TEMP 3-22, 12-6
Meyer and Charge Conservation parameters temperature analysis 12-6
7-75 TIC 7-13
MIN parameter 5-53, 5-59, 7-52 TOX 12-9
TREF 12-4, 12-6, 12-7
min(x,y) function 6-11
XPHOTO 12-22
minimum
model parameters See model parameters
number size 8-10
diodes
value, measuring 7-51
.MODEL statement 3-33, 12-6
MINVAL keyword 7-52, 7-57
for .GRAPH 7-12
mixed mode HSPICE version parameter 3-34
simulation 5-62
model name 3-34
See also D2A, A2D
optimization syntax 12-43
mixed sources 5-7
Index-
models MOSFETs
algebraic 10-26 current flow 7-27
BJTs 3-34 drain diffusion area 4-24
BSIM LEVEL 13 3-34 elements 4-24, 7-73
BSIM2 LEVEL 39 3-34 initial conditions 4-25
capacitors 3-34 model analysis options 8-16–??
characterization 9-13 node names 4-24
diode 3-34 perimeter 4-25
DTEMP parameter 13-16 power dissipation 7-31
JFETs 3-34 SCALM 8-16
LV18 13-7 source 4-24, 4-25
LX7, LX8, LX9 13-7 squares 4-25
magnetic core 3-34 temperature differential 4-25
Monte Carlo analysis 12-13, 12-17, 12-26 WL 8-16
MOSFETs 3-34 zero-bias voltage threshold shift 4-25
mutual inductors 3-34 .ms# file 3-76, 3-78
names 3-34 MSPICE simulator interface 8-11
op-amps 3-34 .mt# file 3-76, 3-78
optimization 3-34
MU option 8-33, 10-20
plot 3-34
Muller algorithm 8-25
private 3-43
protecting 3-43 MULTI 3-16
reference temperature 12-6 multiple .ALTER statements 3-46
simulator access 3-38 multiplier
specifying 3-63 GSCAL 8-25
subcircuit MULTI 3-16 multiply parameter 3-16, 3-58, 4-3, 5-3
types 3-34 multipoint experiment 1-7
typical set 12-12 multithreading 3-74
MONO model parameter 7-13 mutual inductor 4-14, 7-68
Monte Carlo
AC analysis 11-5
analysis 12-2, 12-3, 12-26–12-34 N
demo files 13-25 namei 7-63, 7-64, 7-65
distribution options 12-16–12-17 NAND gate adder 13-4
DC analysis 9-14 natural
time analysis 10-5 log function 6-10
MONTE keyword 10-5, 11-6, 12-14 n-channel, MOSFET’s models 3-34
MOS NDIM 5-29
inverter circuit 10-10
negative conductance, logging 8-14
op-amp optimization 12-73
nested library calls 3-37
.NET statement 11-17
Index-
netlist 3-7 noise (continued)
file example 2-6 input 7-37
flat 3-7 numerical 8-26, 10-8, 10-15
input files 3-2 output 7-37, 11-15
schematic 3-7 sampling 11-16
structure 2-5 .NOISE statement 11-14
network NOMOD option 8-8
analysis 11-17 NONE keyword 9-6, 9-12
filenames 3-33 NOPAGE option 8-8
output 7-36, 11-18
NOPIV option 8-19, 9-24
variable specification 11-21
norm of the gradient 12-55
NEWTOL option 8-24, 9-24
NOTOP option 8-8
nodal voltage output 7-24, 7-32
NOWARN option 8-14
NODE option 3-44, 8-8
NPDELAY element parameter 5-59
nodes
npn BJT models 3-34
connection requirements 3-19
cross-reference table 8-8 npoints 7-63, 7-64, 7-65
floating supply 3-19 NPWL
global versus local 3-22 function 5-52
internal 3-19 numbers
MOSFET’s substrate 3-19 formatting 8-7, 8-8
names 3-17, 3-19, 3-21, 13-6 maximum size 8-10
automatic generation 3-21 minimum size 8-10
ground node 3-19 NUMDGT option 8-8
period in 3-18 numerical integration algorithms 8-33, 10-17
subcircuits 3-19 numerical noise 8-23, 8-26, 8-27, 9-23, 10-8,
zeros in 3-20 10-15
numbers 3-17, 3-19 NUMF keyword 11-16
phase or magnitude difference 7-33 NXX option 8-7, 8-8
printing 8-8
shorted 9-37
terminators 3-19 O
NODESET keyword 9-12 OCT keyword 9-15, 10-6, 11-6
.NODESET statement 8-22, 9-3, 9-22 odelay (digital vector file) 5-87
DC operating point initialization 9-10 ODELAY statement 5-87
from .SAVE 9-11 OFF parameter 8-24, 9-5, 9-24
node-to-element list 8-20, 9-25 one-dimensional function 5-29
NOELCK option 8-8 ONOISE parameter 7-37
noise .OP statement 9-5, 9-6, 10-3
calculations 11-15
.OP statement parameters 9-6
folding 11-16
Index-
op-amps optimization (continued)
model parameters 12-63
names 3-34 magnitude and phase 12-63
open loops 9-36 measured vs. calculated 12-63
optimization 12-73 .MODEL statement 12-44–12-45
operating point results
capacitance 8-21, 9-22 function evaluations 12-56
estimate 9-5, 10-3 iterations 12-56
.IC statement initialization 9-9 Marquadt scaling parameter 12-56
initial conditions 3-67 norm of the gradient 12-55
.NODESET statement initialization 9-10 residual sum of squares 12-55
restoring 9-13 S parameters 12-63
saving 3-21, 9-11 simulation accuracy 12-37
solution 8-24, 9-4, 9-5, 9-24 simultaneous 12-58, 12-70, 12-73
transient 10-3 statements 12-40
voltage table 9-6 syntax 12-40
operating systems, HSPICE 1-6 time
operators 6-10 analysis 10-5, 12-39
required 12-37, 12-44
OPT keyword 12-40
optimization OPTIMIZE keyword 9-15, 12-40
AC analysis 11-5, 12-63 .OPTION 9-26
algorithm 12-45 ACCT, summary of job statistics 7-18
analysis statements 12-41 ALT999 or ALT9999 extension 7-17
CMOS tristate buffer 12-58 .ALTER blocks 3-46
control 12-37 CO, for printout width 7-16
convergence options 12-37 DCSTEP 9-37
curve-fit 12-38 DI 8-18, 8-27, 9-30, 10-19, 11-8
cv 13-32 INGOLD, for printout numerical format 7-17
data-driven vs. s-parameters 12-63 keyword application table 8-3
DC analysis 9-14, 12-48, 12-51, 12-66, 12-70 POST, for high resolution graphics 7-18
error function 7-44 SEARCH 3-39
example 12-46, 13-22 statement 8-2
goal 12-38 OPTLST option 8-9
incremental 12-66 OPTS option 8-9
iterations 12-45 OPTxxx parameter 12-38, 12-40
lengths and widths 12-73 Opus 8-10
MODEL keyword 12-41 oscillation, eliminating 8-33, 10-17
.MODEL statement 12-43 oscillators
models 3-34 DELMAX option setting 10-26
MOS 12-51, 12-73
out (digital vector file) 5-92
network 12-53, 12-63
.PARAM statement 12-42
outer sweep 3-29
Index-
output
admittance 7-36
P
commands 7-2 .pa# file 3-76, 3-79
current 7-24 packed input files 3-2
data page eject, suppressing 8-8
format 8-7, 8-12 PAR keyword 6-5, 6-9
limiting 8-12, 8-34, 10-16 .PARAM statement 3-16–3-22, 3-41, 7-42,
number format 8-7 7-62, 12-2
redirecting 3-69 in .ALTER blocks 3-46
significant digits specification 8-8 optimization 12-42
specifying 8-12 parameters
storing 8-11 AC sweep 11-4
driver example 13-10 ACM 10-27
files 3-67 admittance (Y) 7-32
names 3-65, 3-69 AF 11-16
redirecting 3-66 algebraic 6-8, 6-10
reducing size of 8-12, 8-14 analysis 6-7
version number, specifying 3-68 assignment 6-4
graphing 7-11 CAPOP 10-27
impedance 7-36 cell geometry 6-14
.MEASURE results 7-39 constants 6-4
network 7-36 data type 6-3
nodal voltage, AC 7-32 data-driven analysis 3-24
noise 7-37, 11-15 DC sweep 9-14
parameters 7-23 defaults 6-18
plotting 7-9 defining 6-2, 6-15
power 7-27 DIM2 7-37
printing 7-6–7-23 DIM3 7-37
printout format 7-17 evaluation order 6-3
reusing 7-62 HD2 7-37
saving 7-10 HD3 7-37
statements 7-2 hierarchical 3-58, 6-13, 7-42–7-43
variables 7-3 hybrid (H) 7-32
AC formats 7-34 IC 9-9
function 6-12 impedance (Z) 7-32
printing 8-34, 10-16 inheritance 6-17, 6-18
probing 7-10 INOISE 7-37
specifying significant digits for 8-8 input netlist file 3-6
voltage 7-24 KF 11-16
outz (digital vector file) 5-92 libraries 6-15–6-18
ovari 7-63, 7-65 M 3-58
overview of data flow 1-8 matrix 11-17
overview of simulation process 1-9 measurement 6-7
Index-
parameters (continued) period (digital vector file) 5-77
model 5-64, 5-66 PERIOD statement 5-77, 5-78
modifying 3-24 phase
multiply 6-8 AC voltage 7-34
names 3-34 calculating 7-33
ONOISE 7-37 PHOTO model parameter 12-22
optimization 6-14 piecewise linear sources See PWL
OPTxxx 12-38, 12-40
pivot
output 7-23 algorithm, selecting 8-20, 9-25
overriding 6-15, 6-19 change message 8-20, 9-25
PAR keyword 6-5 matrix calculations 8-19, 9-24
PARHIER option 6-18 reference 8-20, 9-25
passing 6-13–6-21 selection 10-23
order 6-3
PIVOT option 8-20, 9-25, 10-23
problems 6-21
PIVREF option 8-20, 9-25
Release 95.1 and earlier 6-21
repeated 7-42 PIVREL option 8-20, 9-25
scattering (S) 7-32 PIVTOL option 8-20, 8-21, 9-25, 9-26
scope 6-13–6-15, 6-21 platforms for Hspice 1-6
SIM2 7-37 PLIM option 8-9
simple 6-4 plot
simulator access 3-38 limits 7-8
skew, assigning 3-38 models 3-34
subcircuit 3-58, 6-6 value calculation method 8-6, 8-26, 11-8
UIC 9-9 PLOT keyword 7-12
user-defined 6-5 .PLOT statement 7-2
UTRA 9-35 in .ALTER block 3-44
See also model parameters, optimization simulation results 7-8, 7-21
parameters
pn junction conductance 9-45
parametric analysis 7-3
pnp BJT models 3-34
PARHIER option 6-18
POI keyword 9-15, 10-6, 11-6
PARMIN optimization parameter 12-45
pole/zero
path names 3-19, 8-9 analysis
path numbers, printing 8-9 absolute tolerance 8-25
PATHNUM option 8-9 frequency 8-25
p-channel maximum iterations 8-25, 8-29
JFETs models 3-34 real to imaginary ratio 8-25
MOSFET’s models 3-34 starting points, Muller algorithm 8-25
peak measurement 7-47 control options 8-21–??, 8-25, ??–8-25
peak-to-peak value, measuring 7-51 POLY parameter 5-29, 5-54, 5-60
Index-
polynomial function 5-29 PULSE source function (continued)
one-dimensional 5-29 onset ramp duration 5-9
three-dimensional 5-32 plateau value 5-9
two-dimensional 5-30 recovery ramp duration 5-9
POST option 1-8, 8-11 repetition period 5-9
POST_VERSION option 8-9 width 5-9
pow(x,y) function 6-10 PUTMEAS option 7-40, 8-35
power PWL
dissipation 7-28, 7-31 current controlled gates 5-28
function 6-10 data driven 5-20
operating point table 9-6 element parameter 5-47, 5-54, 5-60
output 7-27 functions 5-28, 5-34
stored 7-27 gates 5-28
PP keyword 7-51, 7-52 output values 5-18
parameters 5-17
PPWL
repeat parameter 5-18
element parameter 5-54
segment time values 5-18
function 5-52
simulation time 10-36
precision numbers 6-8
sources, data driven 5-20
print
voltage-controlled capacitors 5-28
control options 7-16
voltage-controlled gates 5-27
.PRINT statement 7-2 See also data driven PWL source
in .ALTER 3-44 pwr(x,y) function 6-10
simulation results 7-4, 7-21
.PZ statement 9-18
printer, device specification 7-11
PZABS option 8-25
printout
PZTOL option 8-25
columns, number 8-7
disabling 8-7, 8-8
page ejects 8-8
suppressing 3-43
Q
value calculation method 8-6, 8-26, 11-8 quality assurance 12-2
PROBE option 8-12
.PROBE statement 7-2, 7-10, 7-21 R
program structure 1-6
R Element (resistor) 4-4
.PROTECT statement 3-43
radix (digital vector file) 5-74
protecting data 3-43
random limit parameter distribution 12-14
PRTDEFAULT printer 7-11 RC
PSF option 8-12 analysis 10-9, 11-9
PULSE source function 5-9, 5-12, 5-15, 5-17 circuit 11-9
delay time 5-9 optimizing 12-53
initial value 5-9 rcells, reusing 6-15
Index-
real part of AC voltage 7-33–7-34 RMAX option 8-31, 10-23, 10-35
real vs. imaginary component ratio 8-25 RMIN option 8-32, 10-23, 10-35
reference temperature 3-22, 12-6 RMS (root mean squared) measurement 7-47
RELH option 8-18, 8-27, 9-30, 10-20, 11-8 RMS keyword 7-52
RELI option 8-18, 8-19, 8-27, 9-24, 9-27, 9-31, rms value, measuring 7-51
10-20 ROUT keyword 11-17
RELIN optimization parameter 12-45 row/matrix ratio 8-20, 9-25
RELMOS option 8-18, 8-19, 9-24, 9-27, 9-29, RSH model parameter 12-9
9-31, 10-26 runtime statistics 8-6
RELOUT optimization parameter 12-45
RELQ option 8-27, 10-20, 10-33
RELTOL option 8-26, 8-27, 10-19, 10-20 S
RELV option 8-19, 8-27, 8-29, 9-27, 9-31, S parameter
10-19, 10-20 model type 3-34
RELVAR option 8-31, 10-20, 10-26 S19NAME model parameter 5-67
RELVDC option 8-19, 9-31 S19VHI model parameter 5-67
repeat function 13-3 S19VLO model parameter 5-67
residual sum of squares 12-55 S1NAME model parameter 5-66
resistance 8-24, 9-26, 11-3 S1VHI model parameter 5-67
resistor S1VLO model parameter 5-66
current flow 7-26 .SAMPLE statement 11-16
element 4-2 sampling noise 11-16
element template listings 7-67 saturable core
length parameter 4-3 elements 4-15, 7-76
linear 4-4 models 4-13, 4-15
model name 4-2 winding names 7-76
node to bulk capacitance 4-3
.SAVE statement 9-10
voltage controlled 5-51
.SAVE statement parameter 9-12
width parameter 4-3
scale factors 2-11
RESMIN option 8-24, 9-26
SCALE parameter 4-2, 5-41, 5-47, 5-54, 5-60,
RESULTS keyword 9-15
13-6
reusing simulation output 7-62
scaling, effect on delays 13-21
RIN keyword 11-17
SCALM option 8-16
rise and fall times 7-43
scattering (S) parameters 7-32
RISE keyword 7-45 schematic
rise time netlists 3-7
specify 5-90
Schmitt trigger example 9-17
RISETIME option 8-27
scope of parameters 6-15
RITOL option 8-25
scratch files 3-71
RLOAD model parameter 5-66
SDA option 8-12
Index-
SEARCH option 3-39, 3-65, 8-10, 13-18 simulation, results (continued)
search path, setting 3-40 printing 7-6–7-23
SEED option 8-12 specifying 7-39–7-43
.SENS statement 9-18, 9-19 storing 8-11
reusing output 7-62
sensitivity analysis 9-19
speed 8-8, 10-24
SFFM source function
structure 1-6
carrier frequency 5-22
time
modulation index 5-22
reducing 8-29, 8-31, 8-32, 10-19
output amplitude 5-22
RELVAR option 10-34
output offset 5-22
title 3-9
signal frequency 5-22
SIN source function 5-12
sgn(x) function 6-11
sin(x) function 6-10
shorted nodes 9-37
single point experiment 1-7
sign function 6-11
single-frequency FM source function 5-22
SIGNAME element parameter 5-66
sinh(x) function 6-10
signed power function 6-10
sinusoidal source function 5-12
silicon-on-sapphire devices 3-21
skew
SIM2 distortion measure 7-37, 11-12 file 12-12
simulation parameters 3-38, 12-8
ABSVAR option 10-34
slope (digital vector file) 5-89
accuracy 8-26, 8-33, 10-16, 10-19, 10-25,
12-37 SLOPE statement 5-77
improvement 8-30, 10-16 SLOPETOL option 8-32, 10-21
models 10-26 simulation time 10-36
option 10-27, 10-34 timestep control 10-34
reduced by BYPASS 8-28, 10-15 small-signal
timestep 10-25 DC sensitivity 9-19
tolerances 9-26, 9-27, 10-24 distortion analysis 11-12
electrical measurements 13-18 transfer function 9-20
example A-1 SMOOTH element parameter 5-54
graphical output A-11 SONAME model parameter 5-66
multiple analyses, .ALTER statement 3-44 source
multiple runs 3-55 AC sweep 11-4
performance, multithreading 3-74 data driven 5-20
process, overview 1-9 DC sweep 9-14
reducing time 3-25, 8-28, 8-30, 8-31, 8-32, keywords 5-2
10-15, 10-16, 10-19, 10-21, 10-22, 10-36 statements 3-11
results See also independent sources
graphing 7-11 SOVHI model parameter 5-66
output variables 8-12 SOVLO model parameter 5-66
plotting 7-9 SPARSE option 9-26
Index-
SPICE statements (continued)
compatibility 8-13 .FOUR 10-38
AC output 7-33–7-34, 8-6, 8-26, 11-8 .GLOBAL 3-22
numeric format 8-7 .GRAPH 7-2, 7-11, 7-21
plot 7-8, 8-9 .IC 9-9
option 8-13 .INCLUDE 3-33
sqrt(x) function 6-10 initial conditions 9-8
square root function 6-10 .LIB 3-35, 3-36
.st# file 3-77, 3-79 call 3-35
Star-Hspice nesting 3-37
conventions 2-10 .LOAD 9-10, 9-13
.MACRO 3-14
START keyword 10-6
.MALIAS 3-50
statement
.MEASURE 7-2, 7-3, 7-39, 8-7, 8-11
.DOUT 5-83
.MODEL 3-33, 7-12, 12-6, 12-43
.PARAM 7-62
.NET 11-17
PERIOD 5-77, 5-78
.NODESET 8-22, 9-10, 9-22
SLOPE 5-77
.NOISE 11-14
TDELAY 5-77
.OP 9-6
TFALL 5-77
.OPTION 8-2
TRISE 5-77
ACCT 7-18
TSKIP 5-78
ALT999(9) 7-17
TUNIT
CO 7-16
with TFALL statement 5-91
INGOLD 7-17
with TRISE statement 5-90
POST 7-18
statements
.OPTION SEARCH 3-39
.AC 11-4, 12-6, 12-41
.PARAM 3-41, 12-42
.ALTER 3-44
.PLOT 7-2, 7-8, 7-21
call subcircuit 3-16
.PRINT 7-2, 7-4, 7-21
.DATA 3-24
.PROBE 7-2, 7-10, 7-21
external file 3-29, 3-31
.PROTECT 3-43
inline 3-26
.SAMPLE 11-16
inner sweep example 3-28
.SAVE 9-10, 9-11
outer sweep example 3-28
.SENS 9-19
.DC 9-13, 12-6, 12-41
source 3-11
.DCVOLT 9-8, 9-9
.STIM 7-2, 7-62
.DEL LIB 3-52
.SUBCKT 3-14, 7-42
.DISTO 11-12
.TEMP 3-22, 12-6, 12-7
DOUT 7-2
.TF 9-20
element 3-11
.TITLE 3-10
.END 3-55
.TRAN 12-6, 12-41
.ENDL 3-35, 3-36
.UNPROTECT 3-44
.ENDS 3-15
.WIDTH 7-16
.EOM 3-15
Index-
statistical analysis 12-7–12-34 sweep (continued)
statistics inner 3-29
calculations 12-3 outer 3-29
listing 7-18 variables 13-16
report 8-6 SWEEP keyword 9-15, 10-6, 11-6
.STIM statement 7-2, 7-62 switch example 5-55
stimuli 7-62 switch-level MOSFET’s example 5-55
structure simulation 1-6 symbols, reserved 2-11
subcircuit
node names 2-10
subcircuits T
adder 13-3 tabular data 5-81, 5-86
call statement 3-16 Tabular Data section
calling 3-15, 3-16 time interval 5-78
calling tree 3-20 Taguchi analysis 12-2
changing in .ALTER blocks 3-45 tan(x) function 6-10
creating reusable circuits 3-57 tanh(x) function 6-10
element names 3-16
TARG keyword 7-45
global versus local nodes 3-22
target specification 7-44
hierarchical parameters 3-58
library structure 3-65 TC1, TC2 element parameters 5-42
model names 3-16 TD parameter 5-42, 5-47, 5-54, 5-60, 7-35,
multiply parameter 3-16 7-48
multiplying 3-59 tdelay (digital vector file) 5-87
names 3-14 TDELAY statement 5-77, 5-87
node names 3-16, 3-19, 3-20 TEMP
node numbers 3-14 keyword 9-15, 11-6
output printing 7-21 model parameter 3-22, 12-6
parameter 3-14, 3-15, 3-16 sweep variable 13-16
path names 3-19 .TEMP statement 3-22–3-24, 12-6, 12-7–??
power dissipation computation 7-28 temper variable 6-13
.PRINT and .PLOT statements 3-61 temperature
printing path numbers 8-9 AC sweep 11-4
search order 3-61 circuit 12-4, 12-6, 12-7
test example 3-14 coefficients 4-2, 13-16
zero prefix 3-20 DC sweep 9-14, 9-16
.SUBCKT statement 3-14, 7-42 derating 3-22, 3-24, 12-6
.sw# file 3-76, 3-78 element 12-6, 12-7
sweep optimizing coefficients 13-16
data 3-29, 8-11 reference 3-22, 12-6
frequency 11-7 sweeping 13-16
variable 6-13
Index-
Temperature Variation Analysis 12-2 timestep (continued)
.TF statement 9-18 reversal 8-30, 10-19, 10-33
tfall (digital vector file) 5-91 setting initial 8-30, 10-22
TFALL statement 5-77, 5-91 transient analysis algorithm 8-32, 10-16
variation by HSPICE 8-30, 10-22
three-dimensional function 5-32
TIMESTEP model parameter 5-67
threshold voltage 7-60
title for simulation 3-9
TIC model parameter 7-13
.TITLE statement 3-9
time 9-6
delay 7-35 tmp directory 3-71
domain TMPDIR environment variable 3-71
algorithm 10-29 TNOM option 3-22, 12-6
variable 6-13 TO keyword 7-52, 7-57
See also CPU time TOL 11-16
TIMERES option 8-32, 10-21 tolerance options 9-22
TIMESCALE model parameter 5-67 TOP keyword 9-12
timestep topology 8-8
algorithms 8-30, 10-16, 10-32 TOX model parameter 12-9
calculation for DVDT=3 8-30, 10-22
.tr# file 3-76, 3-78
changing size 8-27, 10-20
.TRAN statement 12-6, 12-41
control 8-28, 8-30, 8-31, 10-20, 10-21, 10-22
algorithms 10-31–10-34 transfer function 9-20
CHGTOL 10-33 transfer sign function 6-11
DELMAX 10-35 transient
FS 10-35 analysis 7-3
FT 10-35 accuracy 8-26
IMAX 10-32 Fourier analysis 10-38
IMIN 10-32 initial conditions 9-8, 10-3
minimum internal timestep 10-35 inverter 10-10
Minimum Timestep Coefficient 10-35 number of iterations 8-31, 10-22
options 10-25, 10-34 RC network 10-9
RELQ 10-33 sources 5-7
RMAX 10-35 output variables 7-23
RMIN 10-35 transmission lines
TRTOL 10-33 example 13-10
TSTEP 10-35 U Element 4-35
default control algorithm 10-29 TRAP algorithm
DVDT algorithm 10-33 See trapezoidal integration
internal 8-30, 10-22 trapezoidal integration
local truncation error algorithm 10-33 algorithm 8-33, 10-16, 10-28
maximum 8-31, 8-32, 10-22, 10-23 coefficient 8-33, 10-20
minimum 8-31, 8-32, 10-22, 10-23 TREF model parameter 12-6, 12-7
Index-
TRIG keyword 7-44 V
trigger specification 7-44
variables
triode tube 5-57 AC formats 7-34
trise (digital vector file) 5-90 changing in .ALTER blocks 3-45
TRISE statement 5-77, 5-90 DEFAULT_INCLUDE 3-67
tristate impedance 5-93 Hspice-specific 6-13
triz (digital vector file) 5-93 output 7-3
TRTOL option 8-28, 10-21, 10-33 AC 7-31
truncation algorithm 10-32 DC 7-23
transient 7-23
tskip (digital vector file) 5-77
plotting 13-7
TSKIP statement 5-78
sweeping 13-16
TSTEP TMPDIR 3-71
multiplier 8-31, 8-32, 10-23
variables, environment 2-2
option 8-31, 8-32, 10-23
timestep control 10-35 variance, statistical 12-3
tunit (digital vector file) 5-77 VCCAP 5-52
VCCS See voltage controlled current source
TUNIT statement 5-77
with TFALL statement 5-91 VCR See voltage controlled resistor
with TRISE statement 5-90 VCVS See voltage controlled voltage source
two-dimensional function 5-30 vector patterns 5-73
vendor libraries 3-64
VERIFY option 8-7, 8-10
U Verilog value format 5-84
U Elements 5-62 version
digital input 5-62 95.3 compatibility 10-35
transmission line model 3-34 H9007 compatibility 8-14
UIC HSPICE 3-34
analysis parameter 9-5 VFLOOR option 8-21, 10-23
keyword 10-6 Viewlogic 5-62
parameter 9-9 graph data file 8-10, 8-11
transient analysis parameter 10-3 Viewsim simulator 5-62
UNIF keyword 12-16 vih (digital vector file) 5-94
uniform parameter distribution 12-14 VIH statement 5-94
unity gain frequency 13-18 vil (digital vector file) 5-95
unprintable characters in input 3-3 VIL statement 5-95
.UNPROTECT statement 3-44 vname (digital vector file) 5-75
UNWRAP option 8-35, 11-8 Vnn node name in CSOS 3-21
UTRA model parameter restriction 9-35 VNTOL option 8-28, 8-29, 10-19, 10-21
voh (digital vector file) 5-98
Index-
VOH statement 5-98 vtl 7-65
vol (digital vector file) 5-99 Vxxx source element statement 5-2
VOL keyword 5-44
VOL statement 5-99
voltage
W
error tolerance W Elements 4-28
DC analysis 8-19, 9-31 transmission line model 3-34
transient analysis 8-27, 10-20 warnings
failure 9-39 all nodes connected together 9-37
initial conditions 9-8 floating power supply nodes 3-19
iteration-to-iteration change 8-23, 9-23 limiting repetitions 8-14
limiting, in transient analysis 8-32, 10-22 misuse of VERSION parameter 3-35
logic high 5-94, 5-98 suppressing 8-14
logic low 5-95 zero diagonal value detected 9-39
maximum change 8-30, 10-19 WARNLIMIT option 8-14
minimum waveform
DC analysis 8-18, 9-29 characteristics 5-86, 5-87
listing 8-21, 10-23 Waveform Characteristics section 5-86
transient analysis 8-26, 8-28, 10-21 WEIGHT keyword 7-52, 7-57
nodal output DC 7-24
WHEN keyword 7-48, 13-18
operating point table 9-6
width of printout 7-16
relative change, setting 8-31, 10-20
sources 5-38, 5-58, 7-24 .WIDTH statement 7-16
summer 5-43 wildcard uses 2-2
tolerance WL option 8-16
BYTOL option 8-29, 10-19 WMAX model parameter 1-5
MBYPASS multiplier 8-29, 10-20 WMIN model parameter 1-5
value for BYPASS 8-29, 10-19 worst case analysis 12-7, 12-26, 12-34
VOLTAGE keyword 9-6 Worst Case Corners Analysis 12-2
voltage-controlled WSF output data 8-10
capacitor 5-52, 5-56
current source 5-28, 5-45, 5-49, 5-50, 5-55,
7-68 X
oscillator 5-44
XGRID model parameter 7-13
resistor 5-28, 5-51, 5-55
voltage source 5-27, 5-38, 7-68 XL model parameter 12-9
vref (digital vector file) 5-95 XMAX model parameter 7-13
VREF statement 5-95 XMIN model parameter 7-13
vth 7-65 XnR, XnI option 8-25
vth (digital vector file) 5-97 XPHOTO model parameter 12-22
VTH statement 5-97 XSCAL model parameter 7-13
XW model parameter 12-9
Index-
Y Z
YGRID model parameter 7-13 zero delay gate 5-44, 5-56
yield analysis 12-2 ZIN keyword 7-36, 11-18
YIN keyword 7-36, 11-18 ZOUT keyword 7-36, 11-18
YMAX parameter 7-13, 7-57 ZUKEN option 8-12
YMIN parameter 7-13, 7-56
YOUT keyword 7-36, 11-18
YSCAL model parameter 7-14
Index-