HSPICE Simulation and Analysis User GuideHSPICE® Simulation and
Analysis User Guide Version Z-2007.03, March 2007
ii HSPICE® Simulation and Analysis User Guide
Copyright Notice and Proprietary Information Copyright © 2007
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 __________.”
Destination Control Statement All technical data contained in this
publication is subject to the export control laws of the United
States of America. Disclosure to nationals of other countries
contrary to United States law is prohibited. It is the reader’s
responsibility to determine the applicable regulations and to
comply with them.
Disclaimer SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Registered Trademarks (®) Synopsys, AMPS, Cadabra, CATS, CRITIC,
CSim, Design Compiler, DesignPower, DesignWare, EPIC, Formality,
HSIM, HSPICE, iN-Phase, in-Sync, Leda, MAST, ModelTools, NanoSim,
OpenVera, PathMill, Photolynx, Physical Compiler, PrimeTime, SiVL,
SNUG, SolvNet, System Compiler, TetraMAX, VCS, Vera, and
YIELDirector are registered trademarks of Synopsys, Inc.
Trademarks (™) AFGen, Apollo, Astro, Astro-Rail, Astro-Xtalk,
Aurora, AvanWaves, Columbia, Columbia-CE, Cosmos, CosmosEnterprise,
CosmosLE, CosmosScope, CosmosSE, DC Expert, DC Professional, DC
Ultra, Design Analyzer, Design Vision, DesignerHDL, Direct Silicon
Access, Discovery, Encore, Galaxy, HANEX, HDL Compiler, Hercules,
Hierarchical Optimization Technology, HSIMplus, HSPICE-Link,
iN-Tandem, i-Virtual Stepper, Jupiter, Jupiter-DP, JupiterXT,
JupiterXT-ASIC, Liberty, Libra-Passport, Library Compiler,
Magellan, Mars, Mars-Xtalk, Milkyway, ModelSource, Module Compiler,
Planet, Planet-PL, Polaris, Power Compiler, Raphael, Raphael-NES,
Saturn, Scirocco, Scirocco-i, Star-RCXT, Star-SimXT, Taurus,
TSUPREM-4, VCS Express, VCSi, VHDL Compiler, VirSim, and VMC are
trademarks of Synopsys, Inc.
Service Marks (SM) MAP-in, SVP Café, and TAP-in are service marks
of Synopsys, Inc.
SystemC is a trademark of the Open SystemC Initiative and is used
under license. ARM and AMBA are registered trademarks of ARM
Limited. Saber is a registered trademark of SabreMark Limited
Partnership and is used under license. All other product or company
names may be trademarks of their respective owners.
Printed in the U.S.A.
Z-2007.03
Contents
Other Related Publications . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . xxvii
Simulation Structure . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 5
Simulation Process Overview . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 7
Setting Environment Variables. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 9
License Variable. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 9 Temporary Directory Variable
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
License Queuing Variable . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 10 Windows Variable . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 11
Standard Input Files. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 11
Output Configuration File (meta.cfg) . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 12
Initialization File (hspice.ini) . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 13
Input Netlist File . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 14
Library Input File . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 14
Standard Output Files . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 14
AC Analysis Measurement Results File . . . . . . . . . . . . . . .
. . . . . . . . . . . 15
iii
Contents
DC Analysis Measurement Results File. . . . . . . . . . . . . . . .
. . . . . . . . . . 16
Digital Output File. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 16
Hardcopy Graph Data File . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 16
Operating Point Information File. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 16
Operating Point Node Voltages File . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 16
Output Listing File . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 17
Output Status File . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 17
Transient Analysis Results File . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 18
Running HSPICE Simulations . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 18
Running HSPICE Interactively . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 21
To Run a Command File in Interactive Mode . . . . . . . . . . . . .
. . . . . . . . . 22
To Quit Interactive Mode . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 22
Running Multithreading HSPICE Simulations . . . . . . . . . . . . .
. . . . . . . . . . . . 22
To Run Multithreading . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 23 Performance Improvement
Estimations . . . . . . . . . . . . . . . . . . . . . . 23
Using HSPICE in Client/Server Mode . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 24
To Start Client/Server Mode. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 24 Server. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24 Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 25
To Simulate a Netlist in Client/Server Mode. . . . . . . . . . . .
. . . . . . . . . . . 26
To Quit Client/Server Mode . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 26
Launching the Advanced Client/Server (C/S) Mode . . . . . . . . . .
. . . . . . 26 Command Syntax. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 26
Application Instances . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 27
To Calculate New Measurements . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 30
3. Input Netlist and Data Entry . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 31
Input Netlist File Guidelines . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 31
Input Line Format . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 32
Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 38
Schematic Netlists . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 44
Title of Simulation. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 47
Defining Subcircuits . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 51
Node Naming Conventions . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 51 Node Naming Conventions. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 52 Using Wildcards
on Node Names . . . . . . . . . . . . . . . . . . . . . . . . . .
53
Element, Instance, and Subcircuit Naming Conventions . . . . . . .
. . . . . . 55
Subcircuit Node Names . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 55
Abbreviated Subcircuit Node Names . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 57
Automatic Node Name Generation . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 58
Global Node Names. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 58
Automatic Library Selection (HSPICE). . . . . . . . . . . . . . . .
. . . . . . . . . . . 60
Defining Parameters. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 61 Predefined Analysis . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Measurement Parameters . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . 61
Altering Design Variables and Subcircuits . . . . . . . . . . . . .
. . . . . . . . . . 61 Using Multiple .ALTER Blocks . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 63
Connecting Nodes . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 63
v
Contents
Hierarchical Parameters. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 67 M (Multiply) Parameter . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 S
(Scale) Parameter . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 69 Using Hierarchical Parameters to
Simplify Simulation . . . . . . . . . . . 69
Undefined Subcircuit Search (HSPICE). . . . . . . . . . . . . . . .
. . . . . . . . . . 70
Subcircuit Call Statement Discrete Device Libraries . . . . . . . .
. . . . . . . . . . . . 70
DDL Library Access . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 71
Values for Elements . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 76
Resistor Elements in a HSPICE or HSPICE RF Netlist . . . . . . . .
. . . . . . 76 Linear Resistors . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 79 Behavioral Resistors
in HSPICE or HSPICE RF . . . . . . . . . . . . . . . 80
Frequency-Dependent Resistors . . . . . . . . . . . . . . . . . . .
. . . . . . . . 80 Skin Effect Resistors . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 81
Capacitors . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 82 Linear Capacitors . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 84 Frequency-Dependent Capacitors . . . . . . . . . . . . . . .
. . . . . . . . . . . 85 Behavioral Capacitors in HSPICE or HSPICE
RF . . . . . . . . . . . . . . 87 DC Block Capacitors . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Charge-Conserved Capacitors. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 87
Inductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 89 Mutual Inductors. . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 92 Ideal Transformer . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 94 Linear Inductors . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
96 Frequency-Dependent Inductors . . . . . . . . . . . . . . . . .
. . . . . . . . . . 97 AC Choke Inductors . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 98 Reluctors . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 98
Multi-Terminal Linear Elements . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 101
T-element (Ideal Transmission Lines). . . . . . . . . . . . . . . .
. . . . . . . . . . . . 106 Ideal Transmission Line . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 108
U-element (Lumped Transmission Lines) . . . . . . . . . . . . . . .
. . . . . . . . . 110
S-element (Generic Multiport). . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 111 Group Delay Handler in Time Domain
Analysis . . . . . . . . . . . . . . . . 111 Preconditioning
S-parameters . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 112
vi
Contents
JFETs and MESFETs . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 118
IBIS Buffers (HSPICE Only). . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 125
5. Sources and Stimuli . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 127
Independent Source Elements . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 127
Source Element Conventions. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 127
Independent Source Element . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 128
Independent Source Functions . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 136
Trapezoidal Pulse Source . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 136
Sinusoidal Source Function . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 139
Exponential Source Function . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 143
Piecewise Linear Source . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 146 General Form . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
MSINC and ASPEC Form . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 146 Data-Driven Piecewise Linear Source . . . . .
. . . . . . . . . . . . . . . . . . 149
Single-Frequency FM Source . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 150
Pseudo Random-Bit Generator Source . . . . . . . . . . . . . . . .
. . . . . . . . . . 159 Linear Feedback Shift Register . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 161 Conventions for
Feedback Tap Specification . . . . . . . . . . . . . . . . . .
162
Voltage and Current Controlled Elements . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 162
Polynomial Functions . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 164 One-Dimensional Function. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Two-Dimensional Function . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 166 Three-Dimensional Function . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 166 N-Dimensional
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 168
Piecewise Linear Function . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 168
Controlled Sources. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 171
Voltage-dependent Voltage Sources — E-elements . . . . . . . . . .
. . . . . . . . . . 172
Voltage-Controlled Voltage Source (VCVS) . . . . . . . . . . . . .
. . . . . . . . . . 172 Linear . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Polynomial (POLY) . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 172 Piecewise Linear (PWL) . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Multi-Input Gates . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 172 Delay Element . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 173 Pole-Zero Function . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Frequency Response Table . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . 175 Foster Pole-Residue Form . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 176 Behavioral
Voltage Source (Noise Model) . . . . . . . . . . . . . . . . . . .
. 177 Ideal Op-Amp . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 178 Ideal Transformer . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
178 E-element Parameters . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 179
E-element Examples . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 181 Ideal OpAmp . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Voltage Summer. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 182 Polynomial Function . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Zero-Delay Inverter Gate . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 182 Ideal Transformer . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Voltage-Controlled Oscillator (VCO). . . . . . . . . . . . . . . .
. . . . . . . . . 183
Using the E-element for AC Analysis . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 184
Current-Dependent Current Sources — F-elements . . . . . . . . . .
. . . . . . . . . . 185
Current-Controlled Current Source (CCCS) Syntax. . . . . . . . . .
. . . . . . . 185 Linear . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Polynomial (POLY) . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 186 Piecewise Linear (PWL) . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Multi-Input Gates . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 186 Delay Element . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
F-element Parameters . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 186 F-element Examples . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 188
Voltage-Dependent Current Sources — G-elements. . . . . . . . . . .
. . . . . . . . . 189
Voltage-Controlled Current Source (VCCS). . . . . . . . . . . . . .
. . . . . . . . . 190 Linear . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Polynomial (POLY) . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 190 Piecewise Linear (PWL) . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Multi-Input Gate . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 190
viii
Contents
Delay Element . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 191 Laplace Transform . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Pole-Zero Function . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 191 Frequency Response Table . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 191 Foster
Pole-Residue Form . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . 191
Behavioral Current Source (Noise Model) . . . . . . . . . . . . . .
. . . . . . . . . . 191
Voltage-Controlled Resistor (VCR) . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 193 Linear . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Polynomial (POLY) . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 193 Piecewise Linear (PWL) . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Multi-Input Gates . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 194
Voltage-Controlled Capacitor (VCCAP) . . . . . . . . . . . . . . .
. . . . . . . . . . . 194 NPWL Function . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 194 PPWL
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 194 G-element Parameters . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 195
G-element Examples . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 198 Switch. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 198 Switch-Level MOSFET . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 198 Voltage-Controlled Capacitor . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Zero-Delay Gate. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 198 Delay Element . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Diode Equation. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 199 Diode Breakdown . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Triodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 199 Behavioral Noise Model . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
199
Current-Dependent Voltage Sources — H-elements . . . . . . . . . .
. . . . . . . . . . 200
Current-Controlled Voltage Source (CCVS). . . . . . . . . . . . . .
. . . . . . . . . 200 Linear . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Polynomial (POLY) . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 200 Piecewise Linear (PWL) . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Multi-Input Gate . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 200 Delay Element . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
201
Specifying a Digital Vector File and Mixed Mode Stimuli . . . . . .
. . . . . . . . . . . 204
Commands in a Digital Vector File . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 204
Vector Patterns. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 204
Defining Tabular Data. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 205 Input Stimuli . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 206 Expected Output. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 206 Verilog Value Format . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Periodic Tabular Data . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 208
Waveform Characteristics . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 209
Using the Context-Based Control Option . . . . . . . . . . . . . .
. . . . . . . . . . . 210
Comment Lines and Line Continuations . . . . . . . . . . . . . . .
. . . . . . . . . . 211
Parameter Usage . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 211 First Group . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 212 Second Group . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 212 Third Group . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
213
Digital Vector File Example . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 214
6. Parameters and Functions . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 215
Using Parameters in Simulation (.PARAM) . . . . . . . . . . . . . .
. . . . . . . . . . . . . 215
Defining Parameters . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 215
Assigning Parameters . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 217 Inline Parameter Assignments .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Parameters in Output . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 218
User-Defined Function Parameters . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 218
Predefined Analysis Function. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 219
Multiply Parameter . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 219
Library Integrity . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 226
Reusing Cells . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 226
String Parameter (HSPICE Only) . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 229
String Parameters in Passive and Active Component Keywords . . . .
. . . 230
Parameter Defaults and Inheritance. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 231 Parameter Passing . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Parameter Passing Solutions . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 234
7. Simulation Output . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 235
Output Commands. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 235
Output Variables. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 236
Statement Order. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 238
.PROBE Statement . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 238
Using Wildcards in PRINT and PROBE Statements . . . . . . . . . . .
. . . . . 238 Supported Wildcard Templates (HSPICE only) . . . . .
. . . . . . . . . . . 239
Print Control Options . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 239 Changing the File Descriptor
Limit (HSPICE Only) . . . . . . . . . . . . . 240
Printing the Subcircuit Output . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 240
Selecting Simulation Output Parameters . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 242
DC and Transient Output Variables . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 242 Nodal Capacitance Output . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 242 Nodal Voltage
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . 243 Current: Independent Voltage Sources . . . . .
. . . . . . . . . . . . . . . . . 243 Current: Element Branches . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Current: Subcircuit Pin . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 246 Power Output . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Wildcard Support . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 247 Print Power . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Diode Power Dissipation . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 248 BJT Power Dissipation . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 248 JFET Power
Dissipation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . 249 MOSFET Power Dissipation. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 250
AC Analysis Output Variables . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 251 Nodal Capacitance Output . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Nodal
Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 252 Current: Independent Voltage Sources .
. . . . . . . . . . . . . . . . . . . . . 254 Current: Element
Branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 254 Current: Subcircuit Pin . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 255 Group Time Delay . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 256 Noise and Distortion. . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
256
Element Template Output (HSPICE Only) . . . . . . . . . . . . . . .
. . . . . . . . . 257
Specifying User-Defined Analysis (.MEASURE) . . . . . . . . . . . .
. . . . . . . . . . . 258
.MEASURE Statement Order. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 259
.MEASURE Parameter Types . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 259
Equation Evaluation . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 261
INTEGRAL Function . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 261
DERIVATIVE Function . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 262
xi
Contents
Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 264
DC Initialization and Operating Point Calculation . . . . . . . . .
. . . . . . . . . . . . . 278
.OP Statement — Operating Point . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 279 Output. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
279
Element Statement IC Parameter . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 280
Initial Conditions . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 280
Accuracy and Convergence. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 283
Reducing DC Errors. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 291
Shorted Element Nodes. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 292
Floating-Point Overflow . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 294
Solutions for Non-Convergent Circuits . . . . . . . . . . . . . . .
. . . . . . . . . . . 296 Poor Initial Conditions. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Inappropriate Model Parameters . . . . . . . . . . . . . . . . . .
. . . . . . . . . 297 PN Junctions (Diodes, MOSFETs, BJTs). . . . .
. . . . . . . . . . . . . . . . 299
9. Transient Analysis . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 301
Transient Analysis Output . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 303
Transient Analysis of an Inverter . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 306
Using the .BIASCHK Statement (HSPICE only) . . . . . . . . . . . .
. . . . . . . . . . . 308
Data Checking Methods. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 309 Limit and Noise Method . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Maximum Method. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 310 Minimum Method . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Region
Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 310
Transient Control Options . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 311
Matrix Manipulation Options . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 312
Simulation Speed . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 312
Simulation Accuracy. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 313 Timestep Control for Accuracy
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Models and Accuracy . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 314 Guidelines for Choosing Accuracy
Options . . . . . . . . . . . . . . . . . . . 315
Numerical Integration Algorithm Controls . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 315
Gear and Trapezoidal Algorithms. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 316
Selecting Timestep Control Algorithms . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 318
Iteration Count Dynamic Timestep. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 319
Local Truncation Error Dynamic Timestep . . . . . . . . . . . . . .
. . . . . . . . . . 319
DVDT Dynamic Timestep. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 319
Timestep Controls in HSPICE . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 321 Effect of TSTEP on Timestep Size
Selection . . . . . . . . . . . . . . . . . . 322
Fourier Analysis . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 322
Using the .AC Statement . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 327
.AC Control Options . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 327
AC Analysis of an RC Network . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 329
Other AC Analysis Statements . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 332
Using .DISTO for Small-Signal Distortion Analysis . . . . . . . . .
. . . . . . . . 332
Using .NOISE for Small-Signal Noise Analysis . . . . . . . . . . .
. . . . . . . . . 333
Using .SAMPLE for Noise Folding Analysis . . . . . . . . . . . . .
. . . . . . . . . . 334
xiii
Contents
.LIN Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 335
Using the P-element for Mixed-Mode Measurement . . . . . . . . . .
. . . . . . 340
.LIN Input Syntax . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 340
.LIN Output Syntax. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 341 .PRINT and .PROBE Statements.
. . . . . . . . . . . . . . . . . . . . . . . . . . 341 Hybrid
Parameter Calculations. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . 343
Multi-Port Scattering (S) Parameters . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 344
Two-Port Transfer and Noise Calculations . . . . . . . . . . . . .
. . . . . . . . . . . 345 Equivalent Input Noise Voltage and
Current. . . . . . . . . . . . . . . . . . . 345 Equivalent Noise
Resistance and Conductance . . . . . . . . . . . . . . . 346 Noise
Correlation Impedance and Admittance. . . . . . . . . . . . . . . .
. 346 Optimum Matching for Noise . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 346 Noise Figure and Minimum Noise Figure
. . . . . . . . . . . . . . . . . . . . . 346 Associated Gain . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . 347 Output Format for Group Delay in .sc* Files. . . . . . .
. . . . . . . . . . . . 347 Output Format for Two-Port Noise
Parameters in .sc* Files . . . . . . . 347
Noise Parameters. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 348
Impedance Characterizations . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 351
Stability Measurements . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 351
Gain Measurements. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 351
Noise Measurements . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 352
Two-Port Transfer and Noise Measurements . . . . . . . . . . . . .
. . . . . . . . . 352
Output Format for Two-Port Noise Parameters in .sc* Files. . . . .
. . . . . . 353 VSWR. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 353 ZIN(i) . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . 354 YIN(i) . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
K_STABILITY_FACTOR (Rollett Stability Factor) . . . . . . . . . . .
. . . . 354 MU_STABILITY_FACTOR (Edwards-Sinsky Stability Factor) .
. . . . 354 Maximum Available Power Gain—G_MAX. . . . . . . . . . .
. . . . . . . . . 355 Maximum Stable Gain - G_MSG . . . . . . . . .
. . . . . . . . . . . . . . . . . . 355 Maximum Unilateral
Transducer Power Gain —G_TUMAX . . . . . . . 355 Unilateral Power
Gain—GU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 356 Simultaneous Conjugate Match for G_MAX. . . . . . . . . . . .
. . . . . . . 356 Equivalent Input Noise Voltage and Current—IN2,
VN2, RHON . . . 358 Equivalent Noise Resistance and Conductance—RN,
GN . . . . . . . 358
xiv
Contents
Noise Correlation Impedance and Admittance—ZCOR, YCOR. . . . 358
ZOPT, YOPT, GAMMA_OPT – Optimum Matching for Noise. . . . . . 358
Noise Figure and Noise Figure Minimum—NF, NFMIN . . . . . . . . . .
359 Associated Gain—G_As. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 360
Extracting Mixed-Mode Scattering (S) Parameters . . . . . . . . . .
. . . . . . . . . . . 360
Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 361
Features Supported . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 364
Reported Statistics for the Performance Log (HSPICE RF Only) . . .
. . . 364
Errors and Warnings . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 365
Mathematical Functions . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 375
Transcendental Functions . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 376
System Tasks and I/O Functions . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 379
Simulator Environment Functions . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 382
Loading Verilog-A Devices. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 384
Verilog-A File Search Path . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 385
Verilog-A File Loading Considerations . . . . . . . . . . . . . . .
. . . . . . . . . . . . 386
Instantiating Verilog-A Devices . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 387
Restrictions on Verilog-A Module Names. . . . . . . . . . . . . . .
. . . . . . . . . . 390
Overriding Subcircuits with Verilog-A Modules . . . . . . . . . . .
. . . . . . . . . 390 Netlist Option . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Command-line Option . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . 391
Disabling .OPTION vamodel with .OPTION spmodel (HSPICE Only) . . .
. . . . 392
Using Vector Buses or “Ports” . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 392
Using Integer Parameters . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 393
Module and Parameter Name Case Sensitivity . . . . . . . . . . . .
. . . . . . . . . . . . 394
Module Names. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 394
Module Parameters . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 394
Output Bus Signals . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 396
Output Module Parameters (HSPICE only) . . . . . . . . . . . . . .
. . . . . . . . . 397
Case Sensitivity in Simulation Data Output . . . . . . . . . . . .
. . . . . . . . . . . 398
Using Wildcards in Verilog-A (HSPICE only) . . . . . . . . . . . .
. . . . . . . . . . 398
Port Probing and Branch Current Reporting Conventions . . . . . . .
. . . . . 399
Unsupported Output Function Features. . . . . . . . . . . . . . . .
. . . . . . . . . . 399
Running 32-bit HSPICE Verilog-A on Linux x86_64 . . . . . . . . . .
. . . . . . . . . . 400
Using the Standalone Compiler . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 401
Setting Environment Option for HSPICE Verilog-A Compiler. . . . . .
. . . . . . . . 401
The Compiled Model Library Cache . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 402
Cache Location . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 402
Variation Block Replaces Previous Approaches . . . . . . . . . . .
. . . . . . . . . . . . 411
xvi
Contents
General Section . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 415 Control Options and Syntax
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
416
Sub-Blocks for Global, Local and Spatial Variations . . . . . . . .
. . . . . . . . 417 Independent Random Variables . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 417 Dependent Random
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
419 Variations of Model Parameters . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 420 Variations of Element Parameters . . .
. . . . . . . . . . . . . . . . . . . . . . . 421 Absolute Versus
Relative Variation. . . . . . . . . . . . . . . . . . . . . . . . .
. 423 Access Functions . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 424 Spatial Variation . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
425
Variation Block Examples . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 425
Variation Block and Statistical Sensitivity Coefficients . . . . .
. . . . . . . . . . 427
Usage Example and Input Syntax . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 428 1: Interconnect Variation Block. . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 428 2: Model Card
in the Header Section . . . . . . . . . . . . . . . . . . . . . . .
. 430 3: Parasitic Section . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 431
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 433
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 435
Input Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 438
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 443
DCMatch Table Output. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 452
Output from .PROBE and .MEASURE Commands . . . . . . . . . . . . .
. . . . 455 Syntax for .PROBE Command . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 455 Syntax for .MEASURE Command . . . . .
. . . . . . . . . . . . . . . . . . . . . 456
DCMatch Example Netlist . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 456
ACMatch Analysis . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 458
Input Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 459
ACMatch Table Output . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 460 Output from .PROBE and .MEASURE
Commands . . . . . . . . . . . . . 462
Application Considerations. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 463
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 464
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 465
.MOSRA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 467
.MODEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 470 NBTI for PMOS . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 471 HCI for NMOS and PMOS . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 475
.APPENDMODEL. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 476
Optimization Statements . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 482 Optimizing Analysis (.DC, .TRAN,
.AC) . . . . . . . . . . . . . . . . . . . . . . 483
Optimization Examples . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 484 MOS Level 3 Model DC
Optimization. . . . . . . . . . . . . . . . . . . . . . . . 484 MOS
Level 13 Model DC Optimization. . . . . . . . . . . . . . . . . . .
. . . . 487 RC Network Optimization . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 488
xviii
Contents
Optimizing CMOS Tristate Buffer . . . . . . . . . . . . . . . . . .
. . . . . . . . . 492 BJT S-parameters Optimization . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 495 BJT Model DC
Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . 497 Optimizing GaAsFET Model DC. . . . . . . . . . . . . .
. . . . . . . . . . . . . . 499 Optimizing MOS Op-amp . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 500
19. RC Reduction . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . 503
20. Running Demonstration Files. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 509
Using the Demo Directory Tree . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 509
Two-Bit Adder Demo . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 511
MOS I-V and C-V Plotting Demo . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 513
Printing Variables . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 514
CMOS Output Driver Demo . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 517
Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . 518
Temperature Coefficients Demo . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 522
Optimization Section . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 523
Modeling Wide-Channel MOS Transistors . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 525
Demonstration Input Files . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 528
Applications of General Interest Examples . . . . . . . . . . . . .
. . . . . . . . . . 530
Behavioral Application Examples. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 533
xix
Contents
Device Optimization Examples . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 546
Variability Examples . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 558
Verilog-A Examples . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 558
Analytical Model Types . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 562
Temperature Analysis. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 565
.TEMP Statement. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 566
Worst Case Analysis . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 566
Model Skew Parameters . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 566 Using Skew Parameters . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 568 Skew File
Interface to Device Models. . . . . . . . . . . . . . . . . . . . .
. . . 570
Monte Carlo Analysis. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 571
Monte Carlo Setup . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 572
Monte Carlo Output . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 574
.PARAM Distribution Function . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 574
Monte Carlo Parameter Distribution. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 576
Monte Carlo Examples. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 577 Gaussian, Uniform, and Limit
Functions . . . . . . . . . . . . . . . . . . . . . 577 Major and
Minor Distribution . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . 579
xx
Contents
Worst Case and Monte Carlo Sweep Example . . . . . . . . . . . . .
. . . . . . . . . . . 583
Transient Sigma Sweep Results . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 585 Operating-Point Results in Transient
Analysis . . . . . . . . . . . . . . . . . 585
Monte Carlo Results . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 586
Simulating the Effects of Global and Local Variations with Monte
Carlo . . . . . 593
Variations Specified on Geometrical Instance Parameters . . . . . .
. . . . . 593
Variations Specified in the Context of Subcircuits . . . . . . . .
. . . . . . . . . . 595
Variations on a Model Parameter Using a Local Model in Subcircuit.
. . . 596
Indirect Variations on a Model Parameter . . . . . . . . . . . . .
. . . . . . . . . . . 596
Variations Specified on Model Parameters . . . . . . . . . . . . .
. . . . . . . . . . 597
Variations Specified Using DEV and LOT . . . . . . . . . . . . . .
. . . . . . . . . . 597
Combinations of Variation Specifications . . . . . . . . . . . . .
. . . . . . . . . . . . 598
Variation on Model Parameters as a Function of Device Geometry. . .
. . 599
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 600
B. Full Simulation Examples . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 601
Simulation Example Using AvanWaves . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 601
Input Netlist and Circuit . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 601
Execution and Output Files . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 603 Example.ic . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
604 Example.lis . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 605 Example.st0 . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 609
Simulation Graphical Output in AvanWaves. . . . . . . . . . . . . .
. . . . . . . . . 611
Simulation Example Using CosmosScope. . . . . . . . . . . . . . . .
. . . . . . . . . . . . 617
Input Netlist and Circuit . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 617
Execution and Output Files . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 619
View HSPICE Results in CosmosScope . . . . . . . . . . . . . . . .
. . . . . . . . . 620 Viewing HSPICE Transient Analysis Waveforms .
. . . . . . . . . . . . . . 620 Viewing HSPICE AC Analysis
Waveforms . . . . . . . . . . . . . . . . . . . . 622 Viewing
HSPICE DC Analysis Waveforms . . . . . . . . . . . . . . . . . . .
. 624
C. HSPICE GUI for Windows . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 627
Working with Designs . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 627
Running Multiple Simulations. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 630
Using the Drag-and-drop Functions . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 632
Using the Multi-jobs Feature . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 632
Metaencrypt and Converter Utilities. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 634
D. Obsolete HSPICE Functionality . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 635
U-element Digital and Mixed Mode Stimuli . . . . . . . . . . . . .
. . . . . . . . . . . . . . 635
U-element Digital Input Elements and Models . . . . . . . . . . . .
. . . . . . . . . 635 General Form . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 636 Model
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 636 Digital-to-Analog Input Model
Parameters . . . . . . . . . . . . . . . . . . . . 637
U Element Digital Outputs . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 638 Model Syntax . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
Analog-to-Digital Output Model Parameters. . . . . . . . . . . . .
. . . . . . 639
Replacing Sources With Digital Inputs. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 641
.NET Parameter Analysis. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 643
.NET Parameter Analysis . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 646
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649
About this User Guide
This guide describes how to use HSPICE to simulate and analyze your
circuit designs.
Inside this Guide
This user guide contains the chapters described below. For
descriptions of the other manuals in the HSPICE documentation set,
see the next section, The HSPICE Documentation Set.
Chapter Description
Chapter 1, Overview Describes HSPICE features and the simulation
process.
Chapter 2, Setup and Simulation
Describes the environment variables, standard I/O files, invocation
commands, and simulation modes.
Chapter 3, Input Netlist and Data Entry
Describes the input netlist file and methods of entering
data.
Chapter 4, Elements Describes the syntax for the basic elements of
a circuit netlist in HSPICE or HSPICE RF.
Chapter 5, Sources and Stimuli
Describes element and model statements for independent sources,
dependent sources, analog-to- digital elements, and
digital-to-analog elements.
Chapter 6, Parameters and Functions
Describes how to use parameters within an HSPICE netlist.
Chapter 7, Simulation Output
Describes how to use output format statements and variables to
display steady state, frequency, and time domain simulation
results.
Chapter 8, Initializing DC/Operating Point Analysis
Describes DC initialization and operating point analysis.
HSPICE® Simulation and Analysis User Guide xxiii Z-2007.03
About this User Guide Inside this Guide
Chapter 9, Transient Analysis
Describes how to use transient analysis to compute the circuit
solution.
Chapter 10, AC Sweep and Small Signal Analysis
Describes how to perform AC sweep and small signal analysis.
Chapter 11, Linear Network Parameter Analysis
Describes how to perform an AC sweep to extract small- signal
linear network parameters.
Chapter 12, Using Verilog-A
Describes how to use Verilog-A in HSPICE and HSPICE RF
simulations.
Chapter 13, Simulating Variability
Introduces variability, describes how it is defined in HSPICE, and
introduces the variation block.
Chapter 14, Variation Block
Describes the use model and structure of the variation block in
HSPICE.
Chapter 15, Monte Carlo Analysis
Describes Monte Carlo analysis in HSPICE.
Chapter 16, Mismatch Analyses
Chapter 17, HSPICE MOSFET Reliability Analysis (MOSRA)
Describes reliability analysis for MOSFET devices.
Chapter 18, Optimization
Chapter 19, RC Reduction
Chapter 20, Running Demonstration Files
Contains examples of basic file construction techniques, advanced
features, and simulation tricks. Lists and describes several HSPICE
and input files.
Appendix A, Statistical Analysis
Describes the features available in HSPICE for statistical analysis
before the Y-2006.03 release.
Chapter Description
The HSPICE Documentation Set
This manual is a part of the HSPICE documentation set, which
includes the following manuals:
The HSPICE Documentation Set
This manual is a part of the HSPICE documentation set, which
includes the following manuals:
Appendix B, Full Simulation Examples
Contains information and sample input netlists for two full HSPICE
simulation examples.
Appendix C, HSPICE GUI for Windows
Describes how to use the HSPICE GUI for Windows.
Appendix D, Obsolete HSPICE Functionality
Describes out-of-date, rarely used, or de-emphasized
functionality.
Manual Description
HSPICE Simulation and Analysis User Guide
Describes how to use HSPICE to simulate and analyze your circuit
designs. This is the main HSPICE user guide.
HSPICE Signal Integrity Guide
Describes how to use HSPICE to maintain signal integrity in your
chip design.
HSPICE Applications Manual
HSPICE and RF Command Reference
Provides reference information for HSPICE and HSPICE RF commands
and options.
HSPICE Elements and Device Models Manual
Describes standard models you can use when simulating your circuit
designs in HSPICE, including passive devices, diodes, JFET and
MESFET devices, and BJT devices.
Chapter Description
HSPICE® Simulation and Analysis User Guide xxv Z-2007.03
About this User Guide The HSPICE Documentation Set
Searching Across the HSPICE Documentation Set You can access the
PDF format documentation from your install directory for the
current release by entering -docs on the terminal command line when
the HSPICE tool is open.
Synopsys includes an index with your HSPICE documentation that lets
you search the entire HSPICE documentation set for a particular
topic or keyword. In a single operation, you can instantly generate
a list of hits that are hyper- linked to the occurrences of your
search term. For information on how to perform searches across
multiple PDF documents, see the HSPICE release notes (available on
SolvNet at http://solvnet.synopsys.com/ReleaseNotes) or the Adobe
Reader online help.
Note:
To use this feature, the HSPICE documentation files, the Index
directory, and the index.pdx file must reside in the same
directory. (This is the default installation for Synopsys
documentation.) Also, Adobe Acrobat must be invoked as a standalone
application rather than as a plug-in to your web browser.
You can also invoke HSPICE and RF documentation in a browser-based
help system by entering-help on your terminal command line when the
HSPICE tool is open. This provides access to all the HSPICE manuals
with the expection of the AvanWaves User Guide which is available
in PDF format only.
HSPICE MOSFET Models Manual
Describes standard MOSFET models you can use when simulating your
circuit designs in HSPICE.
HSPICE RF User Guide Describes a special set of analysis and design
capabilities added to HSPICE to support RF and high- speed circuit
design.
AMS Discovery Simulation Interface Guide for HSPICE
Describes use of the Simulation Interface with other EDA tools for
HSPICE.
AvanWaves User Guide Describes the AvanWaves tool, which you can
use to display waveforms generated during HSPICE circuit design
simulation.
Manual Description
Other Related Publications
For additional information about HSPICE, see: The HSPICE Release
Notes, available on SolvNet (see Known Limitations
and Resolved STARs, below) Documentation on the Web, which provides
PDF documents and is
available through SolvNet at
http://solvnet.synopsys.com/DocsOnWeb
You might also want to refer to the documentation for the following
related Synopsys products: CosmosScope Aurora Raphael
Known Limitations and Resolved STARs
You can find information about known problems and limitations and
resolved Synopsys Technical Action Requests (STARs) in the HSPICE
Release Notes in SolvNet.
To see the latest HSPICE Release Notes:
1. Go to https://solvnet.synopsys.com/ReleaseNotes. (If prompted,
enter your user name and password. If you do not have a Synopsys
user name and password, follow the instructions to register with
SolvNet.)
2. Click HSPICE, then click the release you want in the list that
appears at the bottom.
Conventions
Convention Description
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, which include downloading software, viewing Documentation
on the Web, and entering a call to the Support Center.
To access SolvNet:
1. Go to the SolvNet Web page at http://solvnet.synopsys.com.
Bold Indicates user input—text you type verbatim—in syntax and
examples.
[ ] Denotes optional parameters, such as:
write_file [-f filename]
... Indicates that parameters can be repeated as many times as
necessary:
pin1 pin2 ... pinN
low | medium | high
/ Indicates levels of directory structure.
Edit > Copy Indicates a path to a menu command, such as opening
the Edit menu and choosing Copy.
Control-c Indicates a keyboard combination, such as holding down
the Control key and pressing c.
Convention Description
About this User Guide Customer Support
2. If prompted, enter your user name and password. (If you do not
have a Synopsys user name and password, follow the instructions to
register with SolvNet.)
If you need help using SolvNet, click Help on the SolvNet menu
bar.
Contacting the Synopsys Technical Support Center
If you have problems, questions, or suggestions, you can contact
the Synopsys Technical Support Center in the following ways: Open a
call to your local support center from the Web by going to
http://solvnet.synopsys.com/EnterACall (Synopsys user name and
password required).
Send an e-mail message to your local support center.
• E-mail
[email protected] from within North
America.
• Find other local support center e-mail addresses at
http://www.synopsys.com/support/support_ctr.
Telephone your local support center.
• Call (800) 245-8005 from within the continental United
States.
• Call (650) 584-4200 from Canada.
• Find other local support center telephone numbers at
http://www.synopsys.com/support/support_ctr.
HSPICE® Simulation and Analysis User Guide xxix Z-2007.03
xxx HSPICE® Simulation and Analysis User Guide Z-2007.03
1 1Overview
Describes HSPICE features and the simulation process.
Synopsys HSPICE is an optimizing analog circuit simulator. You can
use it to simulate electrical circuits in steady-state, transient,
and frequency domains.
HSPICE is unequalled for fast, accurate circuit and behavioral
simulation. It facilitates circuit-level analysis of performance
and yield, by using Monte Carlo, worst-case, parametric sweep, and
data-table sweep analyses, and employs the most reliable
automatic-convergence capability (see Figure 1).
Figure 1 Synopsys HSPICE Design Features
HSPICE forms the cornerstone of a suite of Synopsys tools and
services that allows accurate calibration of logic and circuit
model libraries to actual silicon performance.
Monte Carlo Worst-Case Analysis
Chapter 1: Overview HSPICE Varieties
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.
For a description of commands that you can include in your HSPICE
netlist, see the Netlist Commands chapter in the HSPICE and RF
Command Reference.
HSPICE Varieties
Synopsys HSPICE is available in two varieties: HSPICE HSPICE
RF
Like traditional SPICE simulators, HSPICE is faster and has more
capabilities than typical SPICE simulators. HSPICE accurately
simulates, analyzes, and optimizes circuits, from DC, to microwave
frequencies that are greater than 100 GHz. HSPICE is ideal for cell
design and process modeling. It is also the tool of choice for
signal-integrity and transmission-line analysis.
HSPICE RF is newer and offers many (but not all) HSPICE simulation
capabilities and HSPICE RF simulations of radio-frequency (RF)
devices, which HSPICE does not support.
This guide describes all of the features that HSPICE supports.
HSPICE RF supports some—but not all—of these features as well. For
descriptions of HSPICE RF features and a list of the differences
between HSPICE and HSPICE RF, see the HSPICE RF Features and
Functionality chapter in the HSPICE RF User Guide.
Features
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
2 HSPICE® Simulation and Analysis User Guide Z-2007.03
Chapter 1: Overview Features
Interpreted Monte Carlo and worst-case design support Input,
output, and behavioral algebraics for cells with parameters Cell
characterization tools to characterize standard cell libraries
Geometric lossy-coupled transmission lines for PCB, multi-chip,
package,
and IC technologies Discrete component, pin, package, and vendor IC
libraries Interactive graphing and analysis of multiple simulation
waveforms by using
with AvanWaves and CosmosScope Flexible license manager that
allocates licenses intelligently based on run
status and user-specified job priorities you specify
If you suspend a simulation job (Ctrl-Z), the load sharing facility
(LSF) license manager signals HSPICE to release that job’s license.
This frees the license for another simulation job, or so the
stopped job can reclaim the license and resume. You can also
prioritize simulation jobs you submit; LSF automatically suspends
low-priority simulation jobs to run high-priority jobs. When the
high-priority job completes, LSF releases the license back to the
lower-priority job, which resumes from where it was suspended. To
resume the LSF job, on the same terminal, type either fg or
bg.
A number of circuit analysis types (see Figure 2) and device
modeling technologies (see Figure 3)
HSPICE® Simulation and Analysis User Guide 3 Z-2007.03
Chapter 1: Overview Features
Figure 3 Synopsys HSPICE Modeling Technologies
HSPICE
Chapter 1: Overview HSPICE Features for Running Higher-Level
Simulations
HSPICE Features for Running Higher-Level Simulations
Simulations at the integrated circuit level and at the system level
require 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.
You can use the following HSPICE features to organize how
simulation circuits and models run: Explicit include files –
.INCLUDE statement. Implicit include files – .OPTION
SEARCH=‘lib_directory’. Algebraics and parameters for devices and
models – .PARAM statement. Parameter library files – .LIB
statement. Automatic model selector – LMIN, LMAX, WMIN, and WMAX
model
parameters. Parameter sweep – sweep analysis statements.
Statistical analysis – sweep monte analysis statements. Multiple
alternative –.ALTER statement. Automatic measurements – .MEASURE
statement. Condition-controlled netlists (IF-ELSEIF-ELSE-ENDIF
statements).
Simulation Structure
Experimental Methods Supported by HSPICE
Typically, you use experiments to analyze and verify complex
designs. These experiments can be simple sweeps, more complex Monte
Carlo and optimization analyses, or setup and hold violation
analyses of DC, AC, and transient conditions.
HSPICE® Simulation and Analysis User Guide 5 Z-2007.03
Chapter 1: Overview Simulation Structure
Figure 4 Simulation Program Structure
For each simulation experiment, you must specify tolerances and
limits to achieve the desired goals, such as optimizing or
centering a design. Common factors for each experiment are: process
voltage temperature parasitics
HSPICE supports two experimental methods: Single point – a simple
procedure that produces a single result, or a single
set of output data. Multipoint – performs an analysis (single
point) sweep for each value in an
outer loop (multipoint) sweep.
The following are examples of multipoint experiments: Process
variation – Monte Carlo or worst-case model parameter variation .
Element variation – Monte Carlo or element parameter sweeps.
Voltage variation – VCC, VDD, or substrate supply variation.
Transient AC
Single point Analysis
Chapter 1: Overview Simulation Structure
Temperature variation – design temperature sensitivity. Timing
analysis – basic timing, jitter, and signal integrity analysis.
Parameter optimization – balancing complex constraints, such as
speed
versus power, or frequency versus slew rate versus offset (analog
circuits).
Simulation Process Overview
Figure 5 Simulation Process
Select version Select best architecture Run HSPICE
Find license file in LM_LICENSE_FILE Get FLEXlm license token
Read <installdir>/meta.cfg Read ~/meta.cfg or
Read input file: demo.sp Open temp. files in $tmpdir Open output
file Read hspice.ini file
Read .INCLUDE statement files Read .LIB
Read implicit include (.inc) files
Read .ic file (optional) Find operating point Write .ic file
(optional)
Open measure data files .mt0 Initialize outer loop sweep Set
analysis temperature
Open graph data file .tr0 Perform analysis sweep
Process library delete/add Process parameter and topology
changes
Close all files Release all tokens
2. Run script
Chapter 1: Overview Simulation Structure
8 HSPICE® Simulation and Analysis User Guide Z-2007.03
2 2Setup and Simulation
Describes the environment variables, standard I/O files, invocation
commands, and simulation modes.
For descriptions of individual HSPICE commands mentioned in this
chapter, see the HSPICE and RF Command Reference.
Setting Environment Variables
The following sections describe procedures for setting the
environment variables needed to run HSPICE. License Variable
License Queuing Variable Temporary Directory Variable Windows
Variable
License Variable
HSPICE or HSPICE RF requires you to set the LM_LICENSE_FILE
environment variable. This variable specifies the location of the
license.dat license file. Set the LM_LICENSE_FILE environment
variable to port@hostname to point to a license file on a
server. If you are using the C shell, add the following line to the
.cshrc file:
setenv LM_LICENSE_FILE port@hostname
If you are using the Bash or Bourne shell, add these lines to the
.bashrc or .profile file:
HSPICE® Simulation and Analysis User Guide 9 Z-2007.03
Chapter 2: Setup and Simulation Setting Environment Variables
LM_LICENSE_FILE=port@hostname export LM_LICENSE_FILE
The port and host name variables correspond to the TCP port and
license server host name specified in the SERVER line of the
Synopsys license file.
Each license file can contain licenses for many packages from
multiple vendors. You can specify multiple license files by
separating each entry. For UNIX, use a colon (:) and for Windows,
use a semicolon (;).
For details about setting license file environment variable, see
“Setting Up HSPICE for Each User” in the Installation Guide.
Temporary Directory Variable Specify the location to deposit
scratch files by setting the tmpdir (UNIX/ Linux), TEMP or TMP
(Windows) environment variable. HSPICE opens three scratch files in
the /tmp directory. To change this directory, reset the tmpdir
environment variable in the HSPICE command script.
In the Windows environment, HSPICE opens three scratch files in the
c:\<path>\TEMP (or \TMP) directory. To change this directory,
reset the TEMP or TMP environment variable in the HSPICE command
script.
License Queuing Variable The optional META_QUEUE environment
variable is a useful feature that causes HSPICE or HSPICE RF to
wait for an available license. It is particularly helpful in
environments where the tool is run sequentially from batch files
and a license checkout failure could result in the loss of
important data. (AvanWaves also supports use of this environment
variable.) META_QUEUE, however, does not queue across license
“pools” (which are disallowed in FLEXlm).
Setting the META_QUEUE environment variable to 1 enables
HSPICE/HSPICE RF licenses to be queued:
setenv META_QUEUE 1
A pool of licenses is created by an INCREMENT line that contains
one or more license tokens.
For example: If you have five HSPICE or RF floating licenses and
all five licenses are checked out with the META_QUEUE environment
variable enabled, then the next job submitted waits in the queue
until a license is available (when one of the previous five jobs
finishes). When META_QUEUE is enabled and all
10 HSPICE® Simulation and Analysis User Guide Z-2007.03
Chapter 2: Setup and Simulation Standard Input Files
available licenses are in use, an error message is issued that says
no licenses are available.
Additional pools can be created by having multiple INCREMENT lines
in the same license file, such as exist in the case of separate
tool purchases or off- maintenance keys.
Another way multiple pools can exist is with the addition of
multiple server entries in the LM_LICENSE_FILE variable. For
example:LM_LICENSE_FILE =
27000@server1:27000@server2:27000@server3
Without queuing enabled, the tool tries the INCREMENT lines in
server1, then server2, and so on, until all servers in the list are
exhausted. When you turn on queuing, however, the first INCREMENT
in the first pool that is queried (server1) queues the request, and
the application does not continue to look in other license pools
for available tokens.
Note:
A known issue with HSPICE and AvanWaves, where pooling fails unless
you set the variable SNPSLMD_DAEMON = OFF, does not change the
META_QUEUE operation. If META_QUEUE = 1, pooling is still limited
as described above. However, if license pooling is not working, set
SNPSLMD_DAEMON = OFF and verify that META_QUEUE is not set. Refer
to this SolvNet article for additional details:
https://solvnet.synopsys.com/retrieve/017508.html
Windows Variable Setting the HSPWIN_KEY environment variable to 1
checks out the hspicewin license token first when an HSPICE
simulation is run. If not set to 1, an hspice token is checked out
first. The HSPWIN_KEY environment variable is only available on the
Windows platform.
Standard Input Files
Design and File Naming Conventions
The design name identifies the circuit and any related files,
including:
HSPICE® Simulation and Analysis User Guide 11 Z-2007.03
Chapter 2: Setup and Simulation Standard Input Files
Schematic and netlist files. Simulator input and output files.
Design configuration files. Hardcopy files.
HSPICE and AvanWaves extract the design name from their input
files, and perform actions based on that name. For example,
AvanWaves reads the <design>.cfg configuration file to
restore node setups used in previous AvanWaves runs.
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 stdout on UNIX platforms, which you
can redirect.
Table 1 lists input file types, and their standard names. The
sections that follow describe these files.
Output Configuration File (meta.cfg)
You use the output configuration file to set up the printer,
plotter, and terminal. The HSPICE default search order for the
meta.cfg file is as follows:
1. <cwd>/meta.cfg — current working directory
2. -i <input.sp>/meta.cfg — same directory as input
case
3. $HOME/meta.cfg — user HOME directory
4. $installdir/meta.cfg —HSPICE installation directory
Table 1 Input Files
Output configuration file meta.cfg
Input netlist file <design>.sp
Library input file <library_name>
12 HSPICE® Simulation and Analysis User Guide Z-2007.03
Chapter 2: Setup and Simulation Standard Input Files
Besides the meta.cfg file, HSPICE also reads one
<cwd>/<casename_prefix>.cfg configuration file for
current simulation case output.
The configuration file can contain one line
(default_include=<$path>/<filename>) for HSPICE to read
one default-include file. The default-include filename is
case-sensitive (except for the Windows versions of HSPICE). The
default-include file can be overridden by setting the environment
variable 'default_include'(note lower case).
Initialization File (hspice.ini)
The initialization file enables you to specify user defaults. If
HSPICE reads one hspice.ini file, HSPICE includes its contents at
the top of the input file. (This does not apply to HSPICE
RF).
The HSPICE default search order for the hspice.ini file is:
1. <cwd>/hspice.ini —current working directory
2. $HOME/hspice.ini — user HOME directory
3. $installdir/hspice.ini —HSPICE installation directory
You can use an initialization file to set options (for .OPTION
statements) and to access libraries.
To include initialization files, you can define
default_include=<filename> in a command.inc or meta.cfg
file.
DC Operating Point Initial Conditions File
The DC operating point initial conditions file, <design>.ic#,
is an optional input file that contains initial DC conditions for
particular nodes. You can use this file to initialize DC
conditions, by using either a .NODESET or an .IC statement.
A .SAVE statement can also create a <design>.ic# file. A
subsequent .LOAD statement initializes the circuit to the DC
operating point values specified in this file.
HSPICE® Simulation and Analysis User Guide 13 Z-2007.03
Chapter 2: Setup and Simulation Standard Output Files
Input Netlist File
The input netlist file, <design>.sp, contains the design
netlist. Optionally, it can also contain statements specifying the
type of analysis to run, type of output desired, and what library
to use.
Library Input File
You use <library_name> files to identify libraries and macros
that need to be included for simulating <design>.sp.
Analog Transition Data File
When you run HSPICE in standalone mode, a <design>.d2a file
contains state information for a U Element mixed-mode
simulation.
Standard Output Files
This section describes the standard output files from HSPICE. The
various types of output files produced are listed in Table 2. For
information about the standard output file from HSPICE RF, see
HSPICE RF Output File Types in the HSPICE RF Manual.
Table 2 HSPICE Output Files and Extensions
Output File Type Extension
AC analysis results (from .POST statement) .ac#
DC analysis measurement results .ms#
DC analysis results (from .POST statement) .sw#
Digital output .a2d
AC Analysis Results File
HSPICE writes AC analysis results to file <output_file>.ac#,
where # is 0-9999, according to your specifications following the
.AC statement. These results list the output variables as a
function of frequency.
AC Analysis Measurement Results File
HSPICE writes AC analysis measurement results to file
<output_file>.ma# when the input file includes a .MEASURE AC
statement.
DC Analysis Results File
HSPICE writes DC analysis results to file <output_file>.sw#,
where # is 0-9999, when the input file includes a .DC statement.
This file contains the
Operating point information (from .OPTION OPFILE statement)
.dp#
Output listing .lis, or user-specified
Output status .st#
Subcircuit cross-listing .pa#
Transient analysis results (from .POST statement) .tr#
a. # can be either a sweep number or a hardcopy file number. For
.ac#, .dp#, .dm#, .ic#, .st#, .sw#, and .tr# files, # is from 0
through 9999.
b. Requires a .GRAPH statement, or a pointer to a file in the
meta.cfg file. The Windows and Linux versions of HSPICE do not
generate this file.
Table 2 HSPICE Output Files and Extensions
Output File Type Extension
HSPICE® Simulation and Analysis User Guide 15 Z-2007.03
Chapter 2: Setup and Simulation Standard Output Files
results of the applied stepped or swept DC parameters defined in
that statement. The results can include noise, distortion, or
network analysis.
DC Analysis Measurement Results File
HSPICE writes DC analysis measurement results to file
<output_file>.ms# when the input file includes a .MEASURE DC
statement.
Digital Output File
The digital output file, <design>.a2d, contains data that the
A2D conversion option of the U element converted to digital
form.
FFT Analysis Graph Data File
The FFT analysis graph data file, <output_file>.ft#, contains
the graphical data needed to display the FFT analysis
waveforms.
Hardcopy Graph Data File
HSPICE writes hardcopy graph data to file <output_file>.gr#
when the input file includes a .GRAPH statement. The file produced
is in the form of a printer file, typically in Adobe PostScript or
HP PCL format. This facility is not available in the Windows and
Linux versions of HSPICE.
Operating Point Information File
HSPICE writes operating point information to file
<design>.dp# when the input file includes an .OPTION OPFILE=1
statement.
Operating Point Node Voltages File
HSPICE writes operating point node voltages to file
<output_file>.ic#, where # is 0 to 9999, when the input file
includes a .SAVE statement. These node voltages are the DC
operating point initial conditions.
16 HSPICE® Simulation and Analysis User Guide Z-2007.03
Chapter 2: Setup and Simulation Standard Output Files
Output Listing File
The output listing is a text file. It can be named
<output_file> (no file extension), <output_file>.lis,
or with a file extension that you specify, depending on which
format you use to start the simulation.
The output file includes the following information: Name of the
simulator used. Version of the HSPICE simulator used. Synopsys
message block. Input filename. User name. License details. Copy of
the input netlist file. Node count. Operating point parameters.
Details of the volt drop, current, and power for each source and
subcircuit. Low-resolution ASCII plots, originating from a .PLOT
statement. Results of a .PRINT statement. Results of the .OPTION
statements.
Output Status File
The output status file, <output_file>.st#, where # is 0-9999,
contains the following runtime reports: Start and end times for
each CPU phase. Options settings, with warnings for obsolete
options. Status of preprocessing checks for licensing, input
syntax, models, and
circuit topology. Convergence strategies that HSPICE uses on
difficult circuits.
You can use the information in this file to diagnose problems,
particularly when communicating with Synopsys Customer
Support.
HSPICE® Simulation and Analysis User Guide 17 Z-2007.03
Chapter 2: Setup and Simulation Running HSPICE Simulations
Output Tables
The .DCMATCH output tables file, <output_file>.dm#, contains
the variability data from analysis.
Subcircuit Cross-Listing File
If the input netlist includes subcircuits, HSPICE automatically
generates a subcircuit cross-listing file, <output_file>.pa#,
where # is 0-9999. This file relates the subcircuit node names, in
the subcircuit call, to the node names used in the corresponding
subcircuit definitions. In HSPICE RF, you cannot replicate output
commands within subcircuit (subckt) definitions.
Transient Analysis Measurement Results File
HSPICE writes transient analysis measurement results to file
<output_file>.mt# when the input file includes an .MEASURE
TRAN statement.
Transient Analysis Results File
Both HSPICE and HSPICE RF place the results of transient analysis
in file <output_file>.tr#, where # is 0-9999, as set forth in
the -n command- line argument. This file lists the numerical
results of transient analysis. A .TRAN statement in the input file,
together with an .OPTION POST statement, creates this post-analysis
file.
If the input file includes an .OPTION POST statement, then the
output file contains simulation output suitable for a waveform
display tool.
Running HSPICE Simulations
hspice [-i path/input_file] [-o path/output_file] [-n number]
[-html path/html_file] [-b] [-d] [-C path/input_file] [-I] [-K] [-L
command_file] [-S] [-mt number>] [-meas measure_file] [-hdl
filename] [-hdlpath pathname] [-vamodel name] [-vamodel
name2...]
18 HSPICE® Simulation and Analysis User Guide Z-2007.03
Chapter 2: Setup and Simulation Running HSPICE Simulations
[-help] [-docs]
For a description of the hspice command syntax and arguments, see
“HSPICE Command Syntax” in the HSPICE and RF Command
Reference.
When you invoke an HSPICE simulation, the following sequence of
events occurs:
1. Invocation.
hspice demo.sp > demo.out &
This command invokes the UNIX hspice shell command on input netlist
file demo.sp and directs the output listing to file demo.out. The
“&” character at the end of the command invokes HSPICE in the
background, so that you can continue to use the window and keyboard
while HSPICE runs.
2. Script execution.
The hspice shell command starts the HSPICE executable from the
appropriate architecture (machine type) directory. The UNIX run
script launches a HSPICE simulation. This procedure establishes the
environment for the HSPICE executable. The script prompts for
information, such as the platform that you are using, and the
version of HSPICE to run. (Available versions are determined when
you install HSPICE.)
3. Licensing.
HSPICE supports the FLEXlm licensing management system. When you
use FLEXlm licensing, HSPICE reads the LM_LICENSE_FILE environment
variable to find the location of the license.dat file.
If HSPICE cannot authorize access, the job terminates at this
point, and prints an error message in the output listing
file.
4. Simulation configuration.
HSPICE reads the appropriate meta.cfg file. The search order for
the configuration file is the user logi