Hspice Sa PDF
Hspice Sa PDF
Hspice Sa PDF
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, AEON, AMPS, ARC, Astro, Behavior Extracting Synthesis Technology, Cadabra, CATS, Certify, CHIPit,
CoMET, Confirma, CODE V, Design Compiler, DesignSphere, DesignWare, Eclypse, Formality, Galaxy Custom Designer,
Global Synthesis, HAPS, HapsTrak, HDL Analyst, HSIM, HSPICE, Identify, Leda, LightTools, MAST, MaVeric, METeor,
ModelTools, NanoSim, NOVeA, OpenVera, ORA, PathMill, Physical Compiler, PrimeTime, SCOPE, SiVL, SNUG,
SolvNet, Sonic Focus, STAR Memory System, SVP Caf, Syndicated, Synplicity, the Synplicity logo, Synplify, Synplify
Pro, Synthesis Constraints Optimization Environment, TetraMAX, UMRBus, VCS, Vera, and YieldExplorer are registered
trademarks of Synopsys, Inc.
Trademarks ()
AFGen, Apollo, ARC, ASAP, Astro-Rail, Astro-Xtalk, Aurora, AvanWaves, BEST, Columbia, Columbia-CE, Cosmos,
CosmosLE, CosmosScope, CRITIC, Custom WaveView, CustomExplorer, CustomSim, DC Expert, DC Professional,
DC Ultra, Design Analyzer, Design Vision, DesignerHDL, DesignPower, DFTMAX, Direct Silicon Access, Discovery,
Encore, EPIC, Galaxy, HANEX, HDL Compiler, Hercules, Hierarchical Optimization Technology, High-performance ASIC
Prototyping System, HSIMplus, i-Virtual Stepper, IC Compiler, IICE, in-Sync, iN-Tandem, Intelli, Jupiter, Jupiter-DP,
JupiterXT, JupiterXT-ASIC, Liberty, Libra-Passport, Library Compiler, Macro-PLUS, Magellan, Mars, Mars-Rail,
Mars-Xtalk, Milkyway, ModelSource, Module Compiler, MultiPoint, ORAengineering, Physical Analyst, Planet, Planet-PL,
Platform Architect, Polaris, Power Compiler, Processor Designer, Raphael, RippledMixer, Saturn, Scirocco, Scirocco-i,
SiWare, SPW, StarRC, Star-RCXT, Star-SimXT, Synphony Model Compiler, System Compiler, System Designer, Taurus,
TotalRecall, TSUPREM-4, VCSi, VHDL Compiler, Virtualizer, VMC, and Worksheet Buffer are trademarks of Synopsys,
Inc.
ii
Contents
Part I:
1.
2.
xxxiii
xxxvi
xxxvii
xxxviii
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxxviii
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxxix
Introduction to HSPICE
HSPICE Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HSPICE Varieties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Case Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Custom CMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simulation Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
12
12
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
15
License Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
License Queuing Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Controlling the License Queueing Interval . . . . . . . . . . . . . . . . . . . .
16
17
17
iii
Contents
iv
18
18
18
18
19
Windows Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
20
20
21
21
22
22
22
23
23
24
24
24
24
25
26
26
26
26
27
27
27
27
29
Output Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
29
29
29
30
30
31
Contents
3.
4.
33
34
36
37
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
38
39
39
40
40
40
40
41
42
43
43
44
45
48
49
49
50
53
Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
HSPICE DP Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
Multithread Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
58
60
61
62
62
63
63
64
Contents
5.
vi
64
66
67
69
69
71
Case Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
73
Special Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
74
First Character . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
78
Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
78
Instance Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
79
Hierarchy Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
80
Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
80
82
Reserved Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
83
85
Schematic Netlists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
86
87
88
90
Title of Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
91
92
93
Defining Subcircuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
95
95
97
97
99
99
100
101
101
102
Circuit Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
102
Data-Driven Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
102
103
103
104
Contents
6.
Defining Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Predefined Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Measurement Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
104
104
105
105
106
Connecting Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
106
Deleting a Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
107
Ending a Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
107
107
Using Subcircuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
110
Hierarchical Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
M (Multiply) Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S (Scale) Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Hierarchical Parameters to Simplify Simulation . . . . . . . . . . .
111
111
112
113
114
114
117
118
Vendor Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119
120
121
121
122
122
122
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
122
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
123
Creating a Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
124
Specifying an Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
124
Running an Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
124
Viewing a Netlist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
124
125
126
126
127
128
128
vii
Contents
7.
8.
viii
129
130
131
133
135
136
136
137
Running Multithreading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
139
139
140
Troubleshooting Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
140
140
142
142
142
145
Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
145
Library Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
146
146
147
147
Installing metaencrypt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
148
Running metaencrypt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
148
Encryption Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
149
General Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the -pipe Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
150
152
152
153
153
154
155
157
158
Contents
Part II:
9.
158
159
160
161
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
162
162
162
163
Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
167
Passive Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
167
168
168
171
172
172
173
Capacitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Linear Capacitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Frequency-Dependent Capacitors . . . . . . . . . . . . . . . . . . . . . . . . . .
Behavioral Capacitors in HSPICE or HSPICE RF . . . . . . . . . . . . . .
DC Block Capacitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DC Block and Choke Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Charge-Conserved Capacitors. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
174
176
178
179
179
180
180
Inductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Linear Inductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Frequency-Dependent Inductors . . . . . . . . . . . . . . . . . . . . . . . . . . .
AC Choke Inductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reluctors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mutual Inductors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ideal Transformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ideal Transformer Format in HSPICE RF . . . . . . . . . . . . . . . . . . . . .
182
184
185
186
187
190
192
194
194
195
195
198
198
ix
Contents
202
204
204
S-element Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Node Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
205
211
213
Port Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
215
219
Active Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
220
Diode Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
220
223
225
MOSFETs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
227
230
234
235
237
238
238
238
DC Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
243
AC Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
243
Transient Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
243
Mixed Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
244
244
245
249
253
256
256
257
257
259
260
261
Single-Frequency FM Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
262
Single-Frequency AM Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
264
Contents
Pattern Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Nested-Structure Pattern Source . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pattern-Command Driven Pattern Source . . . . . . . . . . . . . . . . . . . .
Workaround to 1024 Character Limitation for Long Pattern Sources
266
269
270
271
272
274
275
276
277
Polynomial Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
One-Dimensional Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two-Dimensional Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Three-Dimensional Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
N-Dimensional Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
279
279
280
281
283
283
Power Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
284
Independent Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Keyword POWER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Calculation for Total Dissipated Power and for Voltage Source Power
Subcircuit Power Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
284
285
287
288
Controlled Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
289
289
290
291
293
293
294
294
294
294
295
296
298
299
300
300
E-element Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ideal OpAmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Voltage Summer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Polynomial Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Zero-Delay Inverter Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Delayed and Inverted Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
301
302
302
303
303
303
xi
Contents
xii
306
307
308
308
308
308
308
309
309
311
312
313
314
317
317
318
318
318
319
319
319
319
319
321
321
321
321
322
322
322
323
G-element Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modeling Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Switch-Level MOSFET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Runtime Current Source with Equation Containing Output Variable
Voltage-Controlled Capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Zero-Delay Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Delay Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Diode Equation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
323
324
324
325
325
325
326
326
Contents
Diode Breakdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Diode Lookup Table (vs. Model) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Triodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Behavioral Noise Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Turning off Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Dependent Sources to Convert I to V and V to I . . . . . . . . . .
Additional Full Demonstration Netlists Using G-Element . . . . . . . . .
326
326
327
327
327
328
328
328
329
329
329
329
330
330
333
333
333
Steady-State HB Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
337
339
340
342
343
345
346
346
347
347
348
348
350
356
357
357
358
358
358
359
361
362
Vector Patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
362
363
xiii
Contents
Input Stimuli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expected Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Verilog Value Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Periodic Tabular Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
364
364
365
366
Waveform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
367
367
368
369
Parameter Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
First Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Second Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Third Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
369
369
370
371
371
373
373
Defining Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
373
Assigning Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Modeling an eFuse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inline Parameter Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Parameters in Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
375
376
376
376
xiv
380
Measurement Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
380
380
Multiply Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
381
381
382
387
Library Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
387
Reusing Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
388
388
391
392
393
394
396
Contents
397
398
Output Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
398
Output Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
399
400
.PRINT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Statement Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
401
401
.PROBE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
401
402
403
403
404
404
405
405
406
407
409
409
409
410
411
411
412
412
415
415
416
416
417
417
418
419
420
420
421
422
422
423
423
423
xv
Contents
Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Noise and Distortion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
424
425
425
426
427
428
429
Continuous Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Continuous Measure Output Files . . . . . . . . . . . . . . . . . . . . . . . . . .
430
430
Equation Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
431
431
432
INTEGRAL Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
433
DERIVATIVE Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
433
ERROR Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Error Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
433
433
Generating a Measure File (*.mt0, *.ac0, etc.) with All Values in a Single Row
435
xvi
435
436
437
439
Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
439
440
Vdmargin Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
448
449
452
453
454
454
455
456
457
457
459
460
Contents
PSF Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
460
PWL/DATA/VEC Converter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Line Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Running the Converter Utility in Batch Mode . . . . . . . . . . . . . . . . . .
461
463
464
Troubleshooting Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
465
465
465
467
471
471
475
475
476
476
477
478
478
479
480
480
Accuracy Tolerances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
481
Autoconverge Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Effects of GMINDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
483
483
Reducing DC Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
487
488
489
Floating-Point Overflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
490
490
490
492
493
493
494
xvii
Contents
xviii
501
502
502
502
503
AC Analysis of an RC Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
505
508
512
512
513
513
514
514
515
516
518
519
520
521
Simulation Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
522
522
523
526
527
528
530
531
RUNLVL Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interactions Between .OPTION RUNLVL and Other Options . . . . . .
532
533
Contents
535
TRAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
536
537
BDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
537
538
541
542
544
544
Usage Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
545
545
546
546
547
548
549
551
551
553
Fourier Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
553
Fourier Equation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
553
.FFT Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
555
556
560
562
AM Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
563
Graphical Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
564
566
571
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
571
xix
Contents
xx
577
577
578
Matrix Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
578
Muller Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
579
579
580
580
583
584
585
588
589
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
596
597
598
598
601
602
603
604
Cell Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
605
609
MOSRA Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
609
610
Example Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
611
611
.MOSRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MOSRA Support for DC/AC/MC Analysis in Post-Stress Simulation
612
617
619
.MOSRAPRINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
620
.MOSRA_SUBCKT_PIN_VOLT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
621
.MODEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
621
Contents
.APPENDMODEL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION APPENDALL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION DEGF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION DEGFN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION DEGFP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION MOSRALIFE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION MOSRASORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION MRAAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION MRAEXT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION MRAPAGED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION MRA00PATH, MRA01PATH, MRA02PATH, MRA03PATH.
.OPTION RADEGFILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.OPTION RADEGOUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
622
624
624
624
625
625
626
626
627
627
627
628
628
629
20.
633
634
643
Linear Acceleration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
644
PACT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
645
PI Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
646
LNE Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
646
647
648
649
Post-Layout Back-Annotation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
652
Full Back-Annotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flow for Full Back-Annotation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
653
653
655
655
657
Warnings/Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
658
659
661
xxi
Contents
Full Back-Annotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Selective Back-Annotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Recommended Settings for STAR-RC-XT Command File . . . . . . . .
661
666
669
669
673
673
674
IC Module Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
674
675
677
679
679
681
682
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IC
Module Instance-Specific Properties Scope . . . . . . . . . . . . . . . . . .
683
Over-writing Circuit Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
684
687
687
688
.ALTER Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
689
692
xxii
697
698
699
700
Temperature Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
701
Worst-Case Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
703
703
705
707
Contents
708
711
712
714
715
718
718
720
720
721
723
723
725
727
728
730
730
731
736
737
737
739
739
740
740
741
742
742
743
747
747
Variability in HSPICE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
749
751
753
xxiii
Contents
xxiv
General Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
753
754
755
758
760
760
762
764
764
765
769
771
771
771
773
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Syntax Extension with Bins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rules for Using the Group Operator. . . . . . . . . . . . . . . . . . . . . . . . .
773
774
774
775
777
778
780
780
782
782
783
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
785
787
787
789
Input Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
792
793
796
796
797
797
Sampling Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
802
802
Contents
802
Factorial Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
803
804
805
External Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Usage Model for External Sampling. . . . . . . . . . . . . . . . . . . . . . . . .
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Controlling the Read-in of an External File . . . . . . . . . . . . . . . . . . .
Using the MC_File_Only Option. . . . . . . . . . . . . . . . . . . . . . . . . . . .
806
807
807
808
809
810
Using Traditional Variation Format with Advanced Sampling Methods in Monte Carlo
819
Gaussian Style Random Variable Definition . . . . . . . . . . . . . . . . . . . . . .
Input/Output with New Capability . . . . . . . . . . . . . . . . . . . . . . . . . . .
821
822
823
826
Application Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
830
830
830
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
833
835
Mismatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
836
DCMatch Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
837
Input Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
838
839
842
843
844
844
ACMatch Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
846
847
Input Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
848
849
852
Application Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
854
855
xxv
Contents
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
856
857
857
Summary Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
858
Variable Screening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
866
871
872
875
875
877
877
Input Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
878
Part V:
xxvi
Optimization
883
884
Usage Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
884
884
885
885
886
887
887
888
Exploration Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
889
890
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Control Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Option secondary_param=yes . . . . . . . . . . . . . . . . . . . . .
Parameters Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Device Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Property Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
890
891
893
893
895
895
Contents
Area Measurement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rules for Area Measurement using design_area Keyword . . . . . . .
Specifying Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
897
898
899
901
901
Syntax Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
902
903
EXCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Option:
Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data
Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Action
904
Exploration Data Block Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
904
905
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
905
29. Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
907
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
907
Optimization Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
908
Simulation Accuracy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
908
909
Goal Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
909
Timing Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
910
Optimization Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
910
911
Optimization Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
912
912
913
915
916
RC Network Optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Optimization Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Optimized Parameters OPTRC . . . . . . . . . . . . . . . . . . . . . . . . . . . .
916
917
918
920
921
923
925
927
928
xxvii
Contents
933
Overview of Bisection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
934
Bisection Methodology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
936
Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
936
Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
936
Using Bisection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
937
938
940
940
944
945
948
950
951
951
960
xxviii
963
963
965
One-Bit Subcircuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
965
966
966
Printing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
967
971
971
Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
972
976
976
977
Optimization Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
978
Contents
978
980
981
982
984
986
Benchmark Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
988
988
989
989
991
991
Encryption Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
993
Filters Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
993
995
IBIS Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
996
997
Magnetics Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
997
997
RF Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
999
1000
Sources Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1001
S-parameter Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1002
1002
1003
Variability Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1003
Verilog-A Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1004
1007
Warning Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1008
Topology Warnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Topology Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
No DC Path to Ground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Duplicate Initialization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1008
1008
1008
1009
Model Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Zero or Negative Conductance . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Encryption-Related Warnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Model Binning Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Key Model Parameter Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1009
1009
1009
1010
1010
xxix
Contents
A.
xxx
1010
1010
1010
1011
1011
1011
Device Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Device Geometry Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Device Parameter Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1011
1011
1011
Analysis Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transient. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bisection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.DC and .OP Analysis Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . .
1012
1012
1012
1013
1013
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1014
Topology Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1014
Model Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1015
Analysis Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.DC and Operating Convergence Errors . . . . . . . . . . . . . . . . . . . . .
Convergence/Conductance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Convergence/Diode Resistance . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1016
1016
1019
1020
1021
1022
1022
Transient Non-Convergence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1022
1023
1024
1027
1027
1037
Exit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1040
1043
1043
1043
1045
1046
1046
Contents
Example.lis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example.pa0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example.st0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1047
1050
1050
1053
1061
1061
1061
1062
1062
1063
1064
1065
1065
1067
1069
1072
1072
1072
1073
1074
1074
1075
1081
Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1082
1084
1085
1085
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1091
B.
C.
xxxi
Contents
xxxii
Description
Chapter 2, Setup
Chapter 3, Startup and Simulation Describes the invocation commands and types of
simulation and analysis available in HSPICE.
Chapter 4, Multiple Simulations,
DP, and HPP
Chapter 6, Using Interactive Mode Provides details on invoking and using interactive mode.
Chapter 7, HSPICE GUI for
Windows
xxxiii
Chapter
Description
Chapter 18, Performing Digital Cell Describes how to characterize cells in a data-driven
Characterization
analysis.
Chapter 19, MOSFET Model
Reliability Analysis (MOSRA)
xxxiv
Chapter
Description
Part 5, Optimization
Chapter 28, Exploration Block
Appendices
xxxv
Chapter
Description
Description
HSPICE User Guide: Basic Describes how to use HSPICE to simulate and analyze your circuit
Simulation and Analysis
designs, and includes simulation applications. This is the main
HSPICE user guide.
HSPICE User Guide:
Signal Integrity Modeling
and Analysis
HSPICE Reference
Manual: Elements and
Device Models
HSPICE Reference
Manual: MOSFET Models
HSPICE Integration to
Cadence Virtuoso
Analog Design
Environment User Guide
xxxvi
Manual
Description
Describes use of the Simulation Interface with other EDA tools for
HSPICE.
xxxvii
Conventions
The following typographical conventions are used in Synopsys HSPICE
documentation.
Table 1
Convention
Description
Courier
Italic
Bold
Bold
[]
( )
...
xxxviii
Customer Support
Table 1
Convention
Description
Ctrl-C
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 https://solvnet.synopsys.com.
2. If prompted, enter your user name and password. (If you do not have a
Synopsys user name and password, follow the instructions to register with
SolvNet.)
If you need help using SolvNet, click Help on the SolvNet menu bar.
xxxix
Customer Support
xl
Go to either the Synopsys SolvNet site or the Synopsys Global Support site
and open a case online (Synopsys user name and password required).
Introduction to HSPICE
Errors-Warnings/Demonstration Files
Chapter 2, Setup
1
HSPICE Overview
Transmission Line
Signal Integrity
Monte Carlo
Worst-Case Analysis
HSPICE
Circuit Cell
Optimization
Cell
Characterization
Incremental
Optimization
AC, DC,
Transient
Figure 1
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.
Only memory can limit the size of the circuits that HSPICE can simulate. As a
32-bit application, HSPICE can address a maximum of 4GB memory on UNIX/
Linux depending on your system. While on Windows, HSPICE normally can
address a maximum of 2GB memory, or maximum of 3GB memory with
Windows large memory mode enabled. For details, consult with Microsoft
regarding application memory limitation on Windows.
For a description of commands and options that you can include in your
HSPICE netlist, see the HSPICE and HSPICE RF Netlist Commands and
HSPICE Netlist Simulation Control Options chapters in the HSPICE Reference
Manual: Commands and Control Options.
These topics are covered in the following sections:
HSPICE Varieties
Features
Simulation Structure
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.
HSPICE RF can be launched with either the integrated executable (hspice) or
in standalone mode (hspicerf).
This guide describes all of the features that HSPICE supports. Standalone
HSPICE RF supports most but not all of these features as well. For
descriptions of HSPICE RF features (See HSPICE User Guide: Advanced
Simulation and Analysis for all information relating to HSPICE RF, noise
analysis, behavioral modeling, and Verilog-A.
Features
Synopsys HSPICE is compatible with most SPICE variations and has the
following additional features:
Superior convergence
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 at the point of suspension. To resume the
LSF job, on the same terminal, type either fg or bg.
Support for the Compiled Function Library (CFL) function: Enables dynamic
linking to HSPICE during run time through a built-in mathematical function
or user-defined function written in C. You can include multiple C functions in
each library. A general CFL function input argument can come from a
predefined parameter value, a mathematical expression of multiple
predefined parameter values, a built-in mathematical function in the
standard library, or an output of another evaluated CFL function. The CFL
function allows users to initialize a data structure and return its address as
an input argument of another CFL function on 32-bit and 64-bit machines.
CFL is a static function is usable only for parameter evaluations. See
Compiled Function Library Environment Variable to set the required
environment variable and file path. See also, .OPTION CFLFLAG in the
HSPICE Reference Manual: Commands and Control Options.
SPICE
BJT
Magnetics
MOS
Common Model
Interface
Lossy
Transmission
Lines
Device Models
SOI
IBIS
Mixed Signal
Diode
JFET/GaAsFET
Tunnel Diode
Figure 2
Case Sensitivity
Custom CMI
Case Sensitivity
See Case Sensitivity on page 73. When HSPICE RF runs in integrated
executable mode (hspice), the case sensitivity feature applies. (When run in
standalone mode, HSPICE RF does not support case sensitivity.)
Custom CMI
HSPICE provides the ability to integrate models with the Custom CMI for which
HSPICE uses a dynamically linked shared library. Consult your HSPICE
technical support team for access to the HSPICE CMI API application note and
source code.
Use the existing HSPICE and FastSPICE commands to run the simulation.
The API also performs automatic platform selection on the .so file. Both
HSPICE and HSIM provide the tool binaries and support the same *.so file.
Use the existing HSPICE and HSIM commands to run the simulation.
HSICE supports hybrid simulation with both TMI models and non-TMI
models.
(Contact Synopsys Technical Support for further information.) See also the
HSPICE Reference Manual: Commands and Control Options for .OPTION
TMIFLAG and .OPTION TMIPATH.
Simulation Structure
The following sections discuss these topics:
Simulation Experiment
Single point
Analysis
Optimization
Initial
Conditions
Circuit
Transient
Sweep
Results
Analysis
Timing
Violations
Statistical
Worst Case
DC
Library
Stimuli
AC
Options
Figure 3
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
To get the results you expect, use caution when mixing units of measure.
For reference, some other m units can become confusing. Mega, sometimes
expressed as meg or x, may look like m (mili):
1m = 1e-3 (mili)
1meg = 1x = 1e6 (mega)
1u = 1e-6 (micro)
1. Invocation
2. Run script
3. Licensing
Select version
Select best architecture
Run HSPICE
Find license file in
LM_LICENSE_FILE
Get FLEXlm license token
4. Simulation
initial file
5. Design input
6. Library input
7. Operating point
initialization
8. Multipoint analysis
11. Clean up
Figure 4
Simulation Process
10
Examples
Result
1.
Unsupported format/syntax in
any line
".temp 55"
2.
+ P_CGDL'
3.
Warning message
issued
4.
+ "XTIS = 3"
5.
.measure dc VT find
+ par('v(2)*pnorp')
+ when I1(MAIN) pspvtl
7.
XW=
or
+ CGDL =
slow=slow
'slow'='slow'
otherwise, error issued
With 2009.03-SP1, the Windows version of HSPICE uses the new parser
similar to the Linux version in 2009.03.
See Reserved Keywords and HSPICE Parser Strict Syntax Requirements for
additional information.
11
Synopsys SolvNet
Synopsys SolvNet
A wealth of useful information relating to HSPICE in the form of application
notes, articles, troubleshooting, workarounds, recorded trainings, white papers,
and time-saving scripts is available through Synopsys SolvNet (https://
solvnet.synopsys.com).
Sign up for an account if you do not already have one and enter "HSPICE" to
search for supplementary information, from getting started to in-depth articles
of Synopsys User Group (SNUG) presentations.
To get tool and methodology training:
1. Go to https://solvnet.synopsys.com/trainingcenter/view.faces3.
2. Click on Getting Started with HSPICE
3. Choose from these modules:
12
Starting HSPICE
From that same web page you can access training modules that highlight and
demonstrate changes to HSPICE and use models for new features and
enhancements in recent years.
HSPICE Product Website
Enter www.hspice.com on your Internet browser to view presentations and
mini-demos of recent HSPICE features.
This website provides links to:
13
14
2
2
Setup
License Variables
Windows Variables
15
Chapter 2: Setup
Setting Environment Variables
License Variables
HSPICE 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:
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/Linux 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.
The following sections discuss:
16
Chapter 2: Setup
Setting Environment Variables
17
Chapter 2: Setup
Setting Environment Variables
#!/bin/csh -f
setenv META_QUEUE 1
setenv META_QUEUE_TIME 3600
setenv LM_LICENSE_FILE 27000@corp_lic_server
hspice -i myjob.sp -o outfile
Advanced Analyses1
18
Chapter 2: Setup
Setting Environment Variables
238.17.159.4
.... the first line creates a group named HSPICEGR followed by a list of the IP
addresses of the machines in that group. The second line defines (for the
license server) that the group is allowed a maximum of two HSPICE licenses.
You can change the name of the file and its directory. The option file also allows
you to reserve licenses for a group and create groups by user name instead of
IP address. For more information about license option files, see the
Administration_Guide.pdf (installed with the Synopsys Common
Licensing product).
Windows Variables
Setting the HSPWIN_KEY environment variable to 1 checks out the hspicewin
license token first when an you run an HSPICE simulation. If you do not set the
environment variable to 1, HSPICE checks out an hspice token first. The
HSPWIN_KEY environment variable is only available on the Windows platform.
Note:
You may encounter the licensing prompt either when using non-administrator
priority installed HSPICE or even after correctly setting the
LM_LICENSE_FILEor SNPS_LICENSE_FILE. If this occurs, set the
FLEXLM_BATCH environment variable to 1 as the user environment to disable
the pop-up. For details on licensing management and control, scroll down to
Documentation > FLEXnet User Manual on the Synopsys license supporting
19
Chapter 2: Setup
Setting Environment Variables
website: http://www.synopsys.com/Support/Licensing/Licensing/Pages/
default.aspx
Environment Variables in Windows HSPUI
There are a number of environment variables which are useful in HSPICE but if
you add or change one in Windows, you must close and reopen the application
for the variable to take effect. HSPUI retrieves the current environment
variables on startup and does not have a mechanism to dynamically update
environment variables.
/usr/lib:/usr/lib64
/path/libcfl.so
20
Chapter 2: Setup
Setting Environment Variables
Result: HSPICE includes the file defined by the environment variable in the
netlist.
Always invoke HSPICE from the bin directory which uses the
wrapper script and performs important functions for setting the
HSPICE environment.
setenv HSPICE_64 1
hspice -v HSPICE Version D-2010 64-BIT
unsetenv HSPICE_64
hspice -v HSPICE Version C-2009.09 32-BIT
21
Chapter 2: Setup
Standard Input Files
$abs|relative_path/xyz
22
Chapter 2: Setup
Standard Input Files
Hardcopy files
HSPICE extracts the design name from their input files, and performs actions
based on that name. HSPICE reads and writes 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.
Table 1
Input Files
File Name
meta.cfg
Initialization file
hspice.ini
design.ic#
design.sp
library_name
design.d2a
23
Chapter 2: Setup
Standard Input Files
does not apply to HSPICE RF). All HSPICE simulations look for ONE implicit
hspice.ini file. The HSPICE default search order for the hspice.ini file
is:
1. cwd/hspice.ini
2. $HOME/hspice.ini
3. $installdir/hspice.ini
You can use an initialization file to set options (for .OPTION statements) and to
access libraries. To include customized initialization files, you can define
default_include=filename in a command.inc or meta.cfg file.
24
Chapter 2: Setup
Standard Output Files
Extension
.ma#1
.ac#
.mc#
.mpp0
.ms#
.sw#
Digital output
.a2d
.ft#
.gr#2
.dp#
.ic#
Output listing
.lis, or user-specified
Output status
.st#
.dm#
Subcircuit cross-listing
.pa#
.mt#
.tr#
25
Chapter 2: Setup
Standard Output Files
Table 2
Extension
Waveform viewing files from .OPTION WDF argument for use with
Synopsys WaveView/SX tools
*_wdf.tr#,
*_wdf.sw#, or
*_wdf.ac#
1. # 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.
2. Requires a .GRAPH statement (obsolete), or a pointer to a file in the meta.cfg file. The Windows and
Linux versions of HSPICE do not generate this file.
26
Chapter 2: Setup
Standard Output Files
Input filename.
User name.
License details.
Node count.
27
Chapter 2: Setup
Standard Output Files
Actual control option values that HSPICE uses for the present simulation
(useful when options such as RUNLVL override user-set values.)
Details of the volt drop, current, and power for each source and subcircuit.
Total CPU time (the sum of op point, transient, readin, errchk, setup, and
output times).
In the following snippet of a *.lis file, you can see that the total cpu time
is the sum of op point, transient, readin, errchk, setup and output analysis
times.
analysis
op point
transient
readin
errchk
setup
output
total cpu time
time
# points
0.00
1
0.07
446328
0.01
0.01
0.00
0.00
0.09 seconds
tot. iter
4
64
conv.iter
32 rev= 3
28
Readin:
Read the user data file and any additional library files, and
generate an internal representation of the information.
Errchk:
Output:
Prepare the output files and to process all prints and plots.
Setup:
Total CPU time is the time taken for the simulation only. It differs slightly
from run to run, even though runs are identical. It does not include
memory/disk allocation time or disk I/O time. You can calculate this by
subtracting job ended time from job started time.
Chapter 2: Setup
Standard Output Files
You can use the information in this file to diagnose problems, particularly when
communicating with Synopsys Customer Support.
Output Tables
The .DCMATCH output tables file, output_file.dm#, contains the variability
data from analysis.
29
Chapter 2: Setup
Working Directory Path Character Limit
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.
Workaround
Because this can be an issue for automated programs that create pathnames
based on appending long design and cell names, there is a workaround. Users
on Linux/UNIX platforms can create a soft link in their local design directory to
the file at the end of the long path.
% ln -s /long/directory/path/target.inc target.inc
30
Chapter 2: Setup
Continuing HSPICE Simulations after a Power Down
This way, the file created by the automated program doe not require relocation.
After the transient analysis starts, the store operation occurs at 300 wallclock seconds and repeats at every 7200 wall-clock seconds until the
simulation completes. (7,500 wall-clock seconds, 14,700 wall-clock
seconds, etc). Each new time interval overwrites the previously stored
time intervals' check-point files.
.store time=300 repeat=7200
You can also create a checkpoint file store by interrupting the simulation. The
following system command interrupts the HSPICE simulation and creates
checkpoint files:
31
Chapter 2: Setup
Continuing HSPICE Simulations after a Power Down
Example:
kill -USR2 8561
When the system command kills process 8561, HSPICE generates checkpoint
files and continues the current simulation. If the HSPICE simulation (process
8561 in this example) is later terminated, you can use the checkpoint files to
continue the simulation when you issue the -restore command.
To restart a simulation from a previously stored checkpoint file, use the restore command line option:
hspice -restore checkpoint_file.store.gz
Example:
% hspice -restore test_1000.store.gz
The simulation continues from the time point where the saved checkpoint data
begins. The names of the checkpoint data files are test_1000.store.gz
and test_1000.tar.
32
3
Startup and Simulation
HSPICE ships numerous examples for your use; see Listing of Demonstration
Input Files for paths to demo files.
For descriptions of individual HSPICE commands mentioned in this chapter,
see the HSPICE Reference Manual: Commands and Control Options.
For simulatiuon sinvolving multiple cores, distributed processing, multithreading
and HSPICE Precision Parallel (HPP), see Chapter 4, Multiple Simulations, DP,
and HPP.
The following sections discuss these topics:
33
For a description of the hspice command syntax and arguments, see hspice
in the HSPICE Reference Manual: Commands and Control Options. For
multiple processing, multithreading, distributed processing, and HSPICE
Parallel Process features, see Chapter 4, Multiple Simulations, DP, and HPP.
HSPICE provides a quick demo file for a simple LRC circuit to test your
installation (see demo.sp under Benchmark Examples in this user guide).
When you invoke an HSPICE simulation, the following sequence of events
occurs:
1. Invocation.
For example, at the shell prompt, enter:
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
34
for the HSPICE executable. The script prompts for information, such as the
platform that you are using, and the version of HSPICE to run. (When you
install HSPICE, available versions are pre-determined.)
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 login directory, and then the product installation
directory.
5. Design input.
HSPICE opens the input netlist file demo.sp. If this file does not exist, a no
input data error appears in the output listing file.
(UNIX/Linux) HSPICE opens three scratch files in the /tmp directory. To
change this directory, reset the tmpdir environment variable in the
HSPICE command script. (Windows) 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.
HSPICE opens the output listing file demo.out for writing. If you do not own
the current directory, HSPICE terminates with a file open error.
The following is an example of a simple HSPICE input netlist:
*Inverter Circuit
.OPTION LIST NODE POST
.TRAN 200P 20N SWEEP TEMP -55 75 10
.PRINT TRAN V(IN) V(OUT)
M1 VCC IN OUT VCC PCH L=1U W=20U
M2 OUT IN 0 0 NCH L=1U W=20U
VCC VCC 0 5
VIN IN 0 0 PULSE .2 4.8 2N 1N 1N 5N 20N
CLOAD OUT 0 .75P
.MODEL PCH PMOS
.MODEL NCH NMOS
.ALTER
CLOAD OUT 0 1.5P
.END
35
6. Library input.
HSPICE reads any files that you specified in .INCLUDE and .LIB
statements.
7. Operating point initialization.
HSPICE reads any initial conditions that you specified in .IC
and .NODESET commands, finds an operating point (that you can save with
a .SAVE command), and writes any operating point information that you
requested.
8. Analysis.
HSPICE can perform a single or multipoint sweep of the design and produce
one set of output files. In the Step 5 example above, the .TRAN statement
causes HSPICE to perform a multipoint transient sweep analysis for 20ns
for temperatures that range from -55 C to 75 C, in steps of 10 C.
9. Worst-case .ALTER.
You can vary simulation conditions, and repeat the specified single or
multipoint analysis. The above example changes CLOAD from 0.75 pF to 1.5
pF, and repeats the multipoint transient analysis. You can activate multiprocessing while running .ALTER cases by entering hspice -dp or -mp on
the command line.
10. Suspending a simulation
Suspend a simulation job by pressing Ctrl-Z. The load sharing facility (LSF)
frees up the license for another simulation job. To resume the job, on the
same terminal, type either fg or bg to access a license and continue the
simulation.
11. Normal termination.
After you complete the simulation, HSPICE closes all files it opened and
releases all license tokens.
perform the analyses. Each call of the subcircuit is an individual analysis with
its own set of parameters.
The syntax is as follows:
.subckt analyses_sb [start=p1 stop=p2 steps=p3]
.DC
.AC
.TRAN
.ends analyses_sb
...followed by the analysis call:
x1 analyses_sb [start=a1] [stop=a2] [steps=a3]
x2 analyses_sb [start=b1] [stop=b2] [steps=b3]
For information on the available analyses,
See also:
37
This example specifies both .DC and .TRAN analyses within the subckt. To
invoke these analyses you can call the subckts.
x1 analyses_sb start_dc=25 stop_dc=75 steps_dc=10
x2 analyses_sb steps_tran=2n
x3 analyses_sb
Parameters defined in the subcircuit calls override the default values in the
subcircuit definition.
If the subckt calls do not define the parameters they take the default values
given in the subcircuit.
Limitations
The subcircuit block only supports DC, AC, and transient analyses inside it.
38
c:\synopsys\Hspice_release_version\bin\hspice
cd
dc [...statement]
edit
help
info outflag
input
list [lineno]
load filename
ls [directory]
measure [statement]
op
print [tran/ac/dc],v/vm/vr/vi/vp/vdb
pwd
quit
run
tran [...statement]
39
You can also use the help command at the HSPICE prompt for an annotated
list of the commands supported in the interactive mode.
The interactive mode also supports saving commands into a script file. To save
the commands that you use and replay them later, enter:
hspice> save command filename
40
Supported Platforms
Linux RHEL
Linux SUSE
Sun/Solaris
Windows
Yes
Yes
Yes
Yes
After you create the server, it automatically runs in the background. If the server
does not receive any request from a client for one hour, the server releases the
license and exits automatically.
41
Client
The client can send a request to the server to determine the HSPICE license
status, or to kill the server.
If the request is to check the license status, the server checks, and replies
to the client. The syntax of this request is:
hspice -C casename.sp
Where casename is the name of the circuit design to simulate.
If the server receives several requests at the same time, it queues these
requests, and process them in the order that the server received them.
If HSPICE does not find a server, it creates a server first. Then the server
checks out an HSPICE license, and simulates the circuit.
If the request is to kill the server, the server releases the HSPICE license
and other sources, and exits.
When you kill the server, any simulation cases in the queue on that server
do not run, and the server's name disappears from the hidden .hspicecc
directory in your home directory.
If you do not specify an output file, HSPICE directs output to the client terminal.
Use this syntax to redirect the output to a file, instead of to the terminal:
% hspice -C casename.sp output_file
42
Note:
Reads in the common file only once in multiple simulations with different
circuits, when they include a common file, which may a contain subcircuit or
model definition.
Note:
setenv HSP_LIS_201012
Note:
Table 4
Linux RHEL
Linux SUSE
Sun-Solaris
Windows
Yes
Yes
Yes
No
43
Application Instances
Explanation: The port information must come after the input file
information on the command line.
3. To stop the HSPICE server, enter:
hspice -CC -K [-port hostname:port_num]
Argument
Description
-CC
Launches the advanced HSPICE C/S mode. After the server starts, it runs in
background.
44
Argument
Description
-mp
On UNIX platforms, option -mp [process_count] triggers a multi process
[process_count] simulation when the server receives a netlist with .alter and sweep analyses.
The optional process_count is a nonzero integer, (the initial value of available
child process number to fork). If you do not set process_count, then HSPICE
uses the CPU number of the server as the default.
On the client side, you do not need to specify -mp. See Running Multithread/
Multiprocess HSPICE Simulations on page 58 for details and limitations.
-stop idle_time
The idle time unit=hour(s).idle_time means that the server has not received
any client request. If you do not specify an idle_time the server quits
automatically after the default idle_time of 1 hour.
-o output_file
Specifies the output file name. If you do not specify an output_file i, HSPICE
uses the shared file root filename as the output file root filename. If there is no
shared file, no output file is generated.
-K
Application Instances
In the following instances, assume you want to run 5 netlist files (t1.sp, t2.sp,
t5.sp), and this group includes a common file. Also assume that all 5 files are in
the same directory: /home1/user1/test/testcase.
t1.sp
V1 1 0 dc 1.05
V2 2 0 dc 0
.temp 125
.inc "/home1/user1/test/model/model_file"
.inc "101.spc"
.end
t2.sp
V1 1 0 dc 1.05
V2 2 0 dc 0
.temp 125
.inc "/home1/user1/test/model/model_file"
.inc "102.spc"
.end
...
45
t5.sp
V1 1 0 dc 1.05
V2 2 0 dc 0
.temp 125
.inc "/home1/user1/test/model/model_file"
.inc "105.spc"
.end
Use the following commands, to invoke the HSPICE C/S mode to run this group
of cases. The work path is: /home1/user1/test/testcase
1. Start the HSPICE server on the default port and read in the common file:
hspice -CC -share /home1/user1/test/model/model_file
2. Run a simulation on the default port without reading in the common file
again.
hspice -CC t1.sp
Explanation: Since the .inc "/home1/user1/test/model/
model_file" statement appears in each netlist, HSPICE does not read it
in again because the server has already processed the information.
3. Repeat Step 2 until you simulate all cases.
4. Exit the HSPICE Client/Server mode.
hspice -CC -K
The sequence of commands is:
hspice
hspice
hspice
hspice
hspice
hspice
hspice
46
-CC
-CC
-CC
-CC
-CC
-CC
-CC
-share
t1.sp
t2.sp
t3.sp
t4.sp
t5.sp
-K
/home1/user1/test/model/model_file
Notes
If you start the server and run simulations by Perl script, use the system
($cmd) instead of '$cmd' to avoid hanging the server. For example,
#!/usr/bin/perl
##Start server without designated port, redirect output
##information
$cmd = "hspice -CC >& log ";
system($cmd);
##Get the port_num on which server is started
open (IN,"log");
while (<IN>) {
if ($_ =~ "started on") {
$portnum=$'; }
}
close (IN);
##Stop server
$cmdn ="hspice -CC -K -port $portnum";
system($cmdn);
To use multiple servers, you need to specify multiple ports. If you submit
several scripts to start multiple servers, you need to specify multiple ports.
If you do not designate port numbers to a multiple-cpu machine or to a
machine in computer farm environment, only one server starts on the default
port number. If the default port is not available, HSPICE chooses any free
port. HSPICE also prints out port information. The printed message is
similar to "Server is started on port=port_num".To assure that
the simulation runs successfully in a different script, add -port
port_num. For example,
#!/depot/perl-5.8.3/bin/perl -w
##start server without designated port, redirect output
##information
$cmd = "hspice -CC >& log ";
system($cmd) ;
##get the port_num on which server is started
$portnum=`grep port= log|awk {{print $6}}`;
##do simulation
$cmd1 = "hspice -CC test1.sp -port $portnum";
system($cmd1) ;
...
##stop server
$cmdn ="hspice -CC -K -port $portnum";
47
system($cmdn) ;
-CC
-CC
-CC
-CC
-CC
-CC
-CC
-share /home1/user1/test/model/model_file
t1.sp
t2.sp
t3.sp
t4.sp
t5.sp
-K
For a description of the options shown, see hspice in the HSPICE Reference
Manual: Commands and Control Options.
48
4
4
HSPICE ships numerous examples for your use; see Listing of Demonstration
Input Files for paths to demo files.
For descriptions of individual HSPICE commands mentioned in this chapter,
see the HSPICE Reference Manual: Commands and Control Options.
The following sections discuss these topics:
Multithread Simulations
For a description of the hspice command syntax and arguments, see hspice
in the HSPICE Reference Manual: Commands and Control Options.
49
You can run multiple simulation jobs on the Linux and Windows platforms, but
neither HSPICE Precision Parallel (-hpp) nor distributed processing (-dp) is
currently available on the Windows platform.
Script to Run Linux Multi-Jobs
To run multiple simulations on the Linux platform, you must create a script with
the HSPICE execution commands.
The following example script, runs four netlists and specifies their listing output.
hspice
hspice
hspice
hspice
-i
-i
-i
-i
net1.sp
net2.sp
net3.sp
net4.sp
-o
-o
-o
-o
./net1.lis
./net2.lis
./net3.lis
./net4.lis
50
Supported Platforms
Linux RHEL
Linux SUSE
Solaris
Windows
Yes
Yes
Yes
No
.ALTER blocks
Data block
Parametric sweep
Effectively, Monte Carlo simulations reduce time over sequential runs with no
loss in accuracy. For example, if 100 systems are available, then it takes only
the approximate time of 10 Monte Carlo points plus results integration to do
1000 Monte Carlo data points (see Chapter 22, Monte CarloTraditional Flow
Statistical Analysis and following chapters for details on Monte Carlo trials).
Typical configuration files have the following forms, depending on the type of
network grid:
# flag |hostname| slots | tmpDir | protocol | command
SGE
1 |
| -1
| /tmp
| SGE
arch=glinux
LSF
1 |
| -1
| /tmp
| LSF
RSH
1 | rhas74
1 | rhas75
|
|
1
3
| /tmp
| /tmp
| RSH
| RSH
|
|
rsh
rsh
SSH
1 | rhas78
1 | rhas79
|
|
2
2
| /tmp
| /tmp
| SSH
| SSH
|
|
ssh
ssh
where: the flag column posts the value 1 if the host can be used and 0 if it
cannot. The slots column notes the number of workers that can be started on
the particular host and has a value of -1 for grid types LSF and SGE.
The overall flow is shown in Figure 5 on page 52.
51
HSPICE
Input file(s)
DP Master
(local)
DP Workers
(compute farm)
HSPICE DP
pre-parser
CDPL:
SGE/LSF/
RSH/SSH
post-parser
Figure 5
Distributed
HSPICE jobs
Simulation is performed in parallel but the initial parse and final file merge/
summary steps are executed in scalar mode.
where:
52
specify #num, then DP defaults to the core count of the machine. When
running -dp with -dpconfig on multiple machines across the network, you
must specify #num.
-merge Merges the output files from HSPICE only if you specify this option.
Licensing
HSPICE DP uses the same license keys as HSPICE. Each process running on
the machine cluster checks out one copy of the license key.
The following sections discuss these topics:
Output Files
HSPICE DP Limitations
.ALTER blocks
Data block
Parametric sweep
The /tmp directory stores output files, then moves them back to the current
run directory when the simulation finishes.
-hpp
-mt mt#
-hdl
-hdlpath
53
-vamodel
-gz
HSPICE provides load balance for Monte Carlo analysis, data block, and
parametric sweeps:
Output Files
Table 6 (without -merge) and Table 7 on page 55 (with -merge) list the names
for output files generated for .ALTER, Monte Carlo, data block, and parametric
sweep simulations. (test is the name following the -o option on the
command line.) Table 8 on page 56 provides comments on the output file
listings.
Table 6
Alter Block
test_dp/test.dp_parseonly_report
test_dp/test.dp_parseonly_report
test_dp/worker#/test.lis
test_dp/worker#/test.lis
test_dp.lis
test_dp.lis
test.mc#
test.mc0
test.st#
test_dp/worker#/test.st0
test.mt#
test_dp/worker#/test.mt0
test.tr#
test_dp/worker#/test.tr0
[email protected] (Monte Carlo only)
[email protected] (Data block or parametric
sweep only)
54
Table 6
Alter Block
...
...
$HOME/.synopsys/cdpl/
master.hostname.pid.timestamp.bcast
$HOME/.synopsys/cdpl/
master.hostname.pid.timestamp.bcast
test_dp/master.hostname.pid.err
test_dp/master.hostname.pid.err
test_dp/master.hostname.pid.log
test_dp/master.hostname.pid.log
test_dp/thinworker.hostname.pid.err
test_dp/worker.W#.hostname.pid.err
test_dp/thinworker.hostname.pid.log
test_dp/worker.W#.hostname.pid.log
Table 7
Alter Block
test_dp/test.dp_parseonly_report
test_dp/test.dp_parseonly_report
test_dp.lis
test_dp.lis
test.lis
test.lis
test.st0
test.st0
test.mt#
test.mt0
test.mc#
test.mc0
test.tr#
test.tr0
[email protected] or [email protected] for HPP
...
...
$HOME/.synopsys/cdpl/
master.hostname.pid.timestamp/bcast
$HOME/.synopsys/cdpl/
master.hostname.pid.timestamp/bcast
test_dp/master.hostname.pid.err
test_dp/master.hostname.pid.err
test_dp/master.hostname.pid.log
test_dp/master.hostname.pid.log
test_dp/thinworker.hostname.pid.err
test_dp/thinworker.W#.hostname.pid.err
test_dp/thinworker.hostname.pid.log
test_dp/thinworker.W#.hostname.pid.log
55
where:
Table 8
Output files
Comments
test_dp/test.dp_parseonly_report
test_dp/task#/test.lis
test.lis
test_dp.lis
test.st0
test.mt# (ALTER)
test.mc# (ALTER)
test.tr#
test_dp/worker#/test.tr0
56
Table 8
Comments
$HOME/.synopsys/cdpl/master.hostname.pid.timestamp/bcast
test_dp/master.hostname.pid.err
test_dp/master.hostname.pid.log
test_dp/thinworker.hostname.pid.err
test_dp/thinworker.hostname.pid.log
test_dp/worker.W#.hostname.pid.err
test_dp/worker.W#.hostname.pid.log
HSPICE DP Limitations
The following limitations apply to the distributed processing (-dp) features:
When a case has both Alter blocks and Monte Carlo (Data block or
parametric sweep), DP is based on the Alter blocks only.
RF features
57
Multithread Simulations
HSPICE can make use of multiple cores or processors within a single node
through multithreading. Use models are available as follows:
Circuit Size
Thread Count
hspice -mt
4 threads and
above
Up to the core
count of the
single machine
58
MOSFET > = 64
If the circuit lacks the required number of active devices, HSPICE automatically
uses a single thread. You can manually enforce multithreading on model
evaluation by using .OPTION MTTHRESH. The default MTTHRESH value is 64.
You can set it to any positive integer number equal to or greater than 2.
For example, if MTTHRESH=50, HSPICE threads model evaluation of
MOSFETs if the number of MOSFETs is greater than 50. Similarly, a diode
model evaluation would receive benefit from multithreading if the circuit
contains more than 100 (50 x 2) diodes. This option has no effect on matrix
solving.
Note:
59
where,
60
Example 2:
hspice -mp 2 -mt 4 -I input.sp -o input
Core=8
Monte=1000
Total multiprocessed jobs=2
Thread count is reset to 2
Linux: Examine the processor, physical ID and core ID flags in the /proc/
cpuinfo file.
Windows: Invoke the Task Manager, select the Performance tab, and count
the number of CPU Usage History graphs.
61
T1cpu/(0.2T1cpu + 0.8T1cpu/2cpus)=1.67
:
:
:
:
2
2
2
2
62
DC Monte Carlo
DC Monte Carlo
In DC Monte Carlo analyses, MP works by creating (forking) child HSPICE
processes for multiple jobs based on the partition of a sweep or Monte Carlo
loop. Each of these HSPICE processes checks out a license.
For example:
If you start a simulation with 100 trials of DC Monte Carlo on a 4-CPU system,
HSPICE forks four child processes and divides the 100 trials among the 4
CPUs, so each child process runs 25 trials. Since a simulation checks out one
license at the beginning of the simulation, three additional licenses are checked
out and the related information is printed in the .lis file.
2. Submit the HSPICE job that has DC sweep statements with the following
command line:
% hspice -i netlist.sp -o netlist.lis -mp
3. In the top command you should observe that HSPICE has spawned a
process with the name hspice.
PID USER
PR NI VIRT RES SHR S %CPU %MEM
28739 uname 16 0 52364 10m 7388 R 21 0.2
28740 uname 16 0 52364 10m 7388 R 21 0.2
TIME+ COMMAND
0:00.63 hspice
0:00.65 hspice
63
Supported Platforms
Linux RHEL
Linux SUSE
Sun/Solaris
Windows
Yes
Yes
Yes
No
64
.BIASCHK
Multiprocessing (-mp)
Verilog-A
For data converter circuits: When running a transient simulation with HPP,
you can tighten tolerances to resolve the least significant bit by using
.OPTION RES_BITS. See .OPTION RES_BITS in the HSPICE Reference
Manual: Commands and Control Options.
BSIM4: .OPTION IVTH, options ivth, ivthn and ivthp (see HPP
Limitations on page 67 for ivth measurements)
Element
Resistor
Capacitor
Diode
MOS (level=54)
MOSFET Models
BJT Models
Other
BSIM3v3.3
HICUM L2.23
Diode Lvl 1
CMC R2 Lvl 2
BSIM4 4.6.5
BSIM3SOI 3.2.0
UCSD HBT
Diode Lvl 3
BSIMSOI 4.4
VBIC 95
Model APIs
65
MOSFET Models
BJT Models
Other
SSIMSOI 10500.2
VBIC 99
JUNCAP 200.3.3
PSP 103.1.2
BJT Lvl 1
EKV (MOSFET)
BJT Lvl 2
JFET/MESFET Lvl 2
MOS1
BJT Lvl 3
JFET/MESFET Lvl 3
MOS2
MOS3
MOS9 (NXP) 903
MOS11 (NXP) 1102.3
BSIM1
BSIM2
BSIMCMG 105.03
HiSIM251
HiSIM_HV 2.0.0
TFT Lvl 62
Level66 (HVMOS)
66
HPP Limitations
The following features and commands are not supported:
.Variation Block
External sampling
IBIS: .ICM
Back-Annotation
The following MOS element output templates are excluded from HPP
support: lx13,lx14,lx15,lx17, lx25, lx30, lx31,lv5,lv6,lv7,lv14,lv16,lv17,lv20,
lv23-26, and lv31-33.
67
68
5
Input Netlist and Data Entry
Describes the input netlist file and methods of entering data for HSPICE and
HSPICE RF.
HSPICE ships hundreds of examples for your use; for HSPICE demo cases,
see Listing of Demonstration Input Files for paths to demo files. For HSPICE
RF demo cases, see RF Demonstration Input Files in the HSPICE User Guide:
RF Analysis.
For descriptions of individual HSPICE commands referenced in this chapter,
see Chapter 2, HSPICE and HSPICE RF Netlist Commands, in the HSPICE
Reference Manual: Commands and Control Options.
The following sections discuss these topics:
Using Subcircuits
69
Each netlist line (logical record) cannot exceed 1024 characters. Use the +
line continuation character to break up lines > 1024 characters in length to
avoid generating an error.
An input filename can be up to 1024 characters long for all platforms except
PC Windows, which has a limitation of 256 characters.
Model names in a netlist must begin with a letter. If you enter a model name
with a leading integer HSPICE issues a parsing error.
To generate input netlist and library input files, HSPICE uses either a
schematic netlister or a text editor.
Statements in the input netlist file can be in any order, except that the first
line is a title line. In HSPICE, the last .ALTER submodule must appear at
the end of the file and before the .END statement.
Note: If you do not place an .END statement at the end of the input
netlist file, HSPICE issues an error message.
Netlist input processing is case insensitive, except for file names and their
paths (see Case Sensitivity on page 73).
70
Case Sensitivity
Special Characters
First Character
Delimiters
Instance Names
Hierarchy Paths
Numbers
Reserved Keywords
Schematic Netlists
A statement name
A node name
Continuation lines:
Prepend a "+" character at the beginning of the continued line when the
continuation is between tokens. For example:
R1 1 0
+ R='res1-res2'
Use a double blackslash "\\" at the end of the line for continuation when
the continuation is inside a token or string. Whitespaces are optional to
precede the string continuation. A whitespace must not precede the
token continuation, nor can a whitespace precede the double
blackslash. For example:
71
To indicate to the power of in your netlist, use two asterisks (**). For
example, 2**5 represents two to the fifth power (25).
HSPICE ignores all characters after the following listed statement lines:
.include 'filename'
72
$ semicolon ignored
$ comma ignored
When you use curly braces ( { }), HSPICE converts them to square
brackets ( [ ] ) automatically.
Names become input tokens. Token delimiters must precede and follow
names. See Delimiters.
Do not use these symbols as part of any parameter or node name that
you define. Use of these reserved operator keywords as names causes
a syntax error, and HSPICE stops immediately.
Case Sensitivity
Where net, instance, parameter, and measure names, and any other name
labels for downstream tools, require case sensitivity, HSPICE provides a
mechanism to enable case-sensitive simulation. (Case insensitivity is
unaffected for HSPICE keywords, commands, and options.) To invoke case
sensitivity, on the HSPICE command-line enter:
-case 1
For example, HSPICE reads a netlist with case sensitivity when you enter:
%hspice -case 1 -i design.sp -o design.lis
Parameter Names
Node Names
Instance Names
Model Names
Subcircuit Names
Data Names
Measure Names
73
Special Characters
Table 10 on page 74 lists the special characters usable as part of node names,
element parameter names, and element instance names. For details, see the
appropriate sections in this chapter.
To avoid unexpected results or error messages, do not use the following
mathematical characters in a parameter name in HSPICE: * - + ^ and /.
Table 10
Special Character
Node Name
Legal anywhere=first
character or any
position in name
Included only=any
position except first
character
Instance Name
(cannot be the
first character;
element key
letter only)
Parameter Name
Delimiters
(cannot be the first
character, element
key letter only)
tilde
Included only
n/a
exclamation
point
Included only
n/a
at sign
Included only
n/a
pound sign
Included only
n/a
dollar sign
Included only
In-line comment
character
percent
caret
HSPICE: included
only (avoid usage),
Illegal in HSPICE
RF
74
Table 10
Special Character
Node Name
Legal anywhere=first
character or any
position in name
Included only=any
position except first
character
Instance Name
(cannot be the
first character;
element key
letter only)
Parameter Name
Delimiters
(cannot be the first
character, element
key letter only)
&
ampersand
Included only
n/a
asterisk
HSPICE:
Included only
included only
(avoid using * in
node names),
Illegal for
HSPICE RF
HSPICE: included
only (avoid using
in parameter
names),
Illegal in HSPICE
RF
Comment in both
HSPICE/HSPICE
RF. Wildcard
character. Double
asterisk (**) is
To the power of.
()
parentheses
Illegal
Illegal
Token delimiter
minus
HSPICE:
Included only
included only
HSPICE RF:
Legal anywhere
Included only
(avoid usage)
n/a
underscore
Included only
n/a
plus sign
HSPICE:
Included only
included only
HSPICE RF:
Legal anywhere
HSPICE: included
only (avoid usage);
Illegal in HSPICE
RF
Continues
previous line
including
expressions and
algebraics except
for quoted strings
backslash
Illegal
Illegal
Continuation
character
(preferred usage
is a "+")
Illegal
Illegal
75
Table 10
Special Character
Node Name
Legal anywhere=first
character or any
position in name
Included only=any
position except first
character
Instance Name
(cannot be the
first character;
element key
letter only)
Parameter Name
Delimiters
(cannot be the first
character, element
key letter only)
\\
double
backslash
(requires a
whitespace
before to use
as a
continuation)
HSPICE:
Illegal
included only
HSPICE RF:
Legal anywhere
Illegal
Continuation
character for
quoted strings
(preserves
whitespace)
equals
Illegal
optional in
Token delimiter
Illegal
.PARAM
statements
< >
less/more
than; '<' and
'>' are treated
as a relation
operators in an
expression
Included only
Wildcard in
character in both
HSPICE and
HSPICE RF
forward slash
Illegal
Illegal
n/a
{}
curly braces
HSPICE:
Included only
included only,
converts { } to [ ]
No conversion
for HSPICE RF
Included only
Auto-converts to
square brackets
([])
Single ( { ) or ( } )
can be used in
Variation Blocks
[]
square
brackets
Included only
Included only
n/a
76
Included only
Included only
Table 10
Special Character
Node Name
Legal anywhere=first
character or any
position in name
Included only=any
position except first
character
Instance Name
(cannot be the
first character;
element key
letter only)
Parameter Name
Delimiters
(cannot be the first
character, element
key letter only)
pipe
Included only
n/a
comma
Illegal
Illegal
Illegal
Token delimiter
period
Illegal
Included only
Included only
Netlist keyword,
(i.e., .TRAN, .DC,
etc.). Hierarchy
delimiter when
used in node
names
colon
Included only
Included only
Illegal
Delimiter for
element attributes
semi-colon
Included only
Included only
Included only
n/a
""
double-quotes Illegal
Illegal
Illegal
Expression and
filename delimiter
single quotes
Illegal
Illegal
Illegal
Expression and
filename delimiter
Blank
(whitespace)
Use before \ or
\\ line
continuations
Tab
Tab
Token delimiter
Token delimiter
77
First Character
The first character in every line specifies how HSPICE and HSPICE RF
interprets the remaining line. Table 11 lists and describes the valid characters.
Table 11
Line
Indicates
Any character
Subsequent lines of
netlist, and all lines of
included files
. (period)
c, C, d, D, e, E, f, F, g, G, h,
H, i, I, j, J, k, K, l, L, m, M,
q, Q, r, R, s, S, v, V,w,W
Element instantiation
*(asterisk)
Comment line
+(plus)
Delimiters
An input token is any item in the input file that HSPICE recognizes. Input
token delimiters are: tab, blank (whitespace), comma (,), and parentheses
( ).
Periods (.) indicate hierarchy. For example, X1.X2.n1 is the n1 node on the
X2 subcircuit of the X1 circuit.
Note:
78
The equal sign (=) it is a token delimiter in the sense only that
when you define a parameter, both the parameter name and
parameter value are tokens, so the '=' is a token delimiter.
However, you cannot enter '=' anywhere in a line like you would
a comma, space, tab, or in the case of HSPICE, parentheses.
Instance Names
The names of element instances begin with the element key letter (see
Table 12), except in subcircuits where instance names begin with X.
(Subcircuits are interchangeably known as macros or modules.) Instance
names can be up to 1024 characters long. In HSPICE, the .OPTION LENNAM
defines the length of names in printouts (default=16).
Table 12
Element Identifiers
Letter
(First
Char)
Element
Example Line
IBIS buffer
Capacitor
Cbypass 1 0 10pf
Diode
D7 3 9 D1
Ea 1 2 3 4 K
G12 4 0 3 0 10
H3 4 5 Vout 2.0
Current source
I A 2 6 1e-6
JFET or MESFET
J1 7 2 3 GAASFET
Linear inductor
LX a b 1e-9
MOS transistor
M834 1 2 3 4 N1
79
Table 12
Letter
(First
Char)
Element
Example Line
Port
Bipolar transistor
Q5 3 6 7 8 pnp1
Resistor
R10 21 10 1000
S parameter element
Voltage source
V1 8 0 5
T,U,W
Transmission Line
Subcircuit call
Hierarchy Paths
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.
The .OPTION PATHNUM controls whether the list files show full path names
or path numbers.
Numbers
You can enter numbers as integer, floating point, floating point with an integer
exponent, or integer or floating point with one of the scale factors listed in
80
Table 13.
Table 13
Scale Factors
Scale Factor
Prefix
Symbol
Multiplying Factor
tera
1e+12
giga
1e+9
MEG or X
mega
1e+6
kilo
1e+3
MIL
n/a
none
25.4e-6
milli
1e-3
micro
1e-6
nano
1e-9
pico
1e-12
femto
1e-15
atto
1e-18
DB
DB
db
10(value/20)
Note:
Numbers can use exponential format or engineering key letter format (1e-12
or 1p), but to use both (1e-6u), you must specify .OPTION
MIXED_NUM_FORMAT = 1.
81
The DB scale factor s interpreted in the same manner by HSPICE, HPP, and
RF.
82
Parameter names in HSPICE use HSPICE name syntax rules, except that
names must begin with an alphabetic character. The other characters must
be either a number, or a special character. See Table 10 on page 74 in the
Special Characters section for a listing of legal parameter names. For
example, a % is legal if included in HSPICE, but illegal in HSPICE RF.
If you create multiple definitions for the same parameter or option, HSPICE
uses the last parameter definition or .OPTION statement, even if that
definition occurs later in the input than a reference to the parameter or
option. HSPICE does not warn you when you redefine a parameter.
You must define a parameter before you use that parameter to define
another parameter.
When you select design parameter names, be careful to avoid conflicts with
parameterized libraries.
The following definition is correct, but this definition points up the limitation
and is not permitted because HSPICE generates an incorrect result.
.param a='2*sqrt(v(p,n))'
.param b='a+1'
r1 p n '1k+b'
a(x)='2*sqrt(x)'
b(x)='a(x)+1'
'1k+a(V(p,n))'
'1k+b(V(p,n))'
Correct
G1 1 0 cur='((1-(a0*v(gate)))/b0)'
Incorrect
I1 1 0 cur='((1-(a0*v(gate)))/b0)'
Reserved Keywords
Reserved keywords are those which are illegal for a parameter name and/or
node name. The following keywords are not global and are analysis/syntaxspecific; that is, you can use these keywords in some specific statements, but
not in other statements. For example, you cannot use pwl as a parameter name
in the V source, but you can use it in an R-element. You can use these
keywords as parameter names with single quotes anywhere. Table 14 on
83
page 84 lists the illegal keywords for the specified element type. Table 15 on
page 85 lists the illegal keywords for the specified command.
For more information on the need for stringent adherence to parser
requirements see Appendix C, HSPICE Parser Strict Syntax Requirements.
Table 14
Elements
Illegal Keywords
B-element
Bjt/Jfet
element
OFF, IC,TNODEOUT
Capacitor
Diode
OFF, IC
E/G-element
POLY, PWL,AND, NAND, PPWL, NPWL, OR, NOR, LAPLACE, POLE, VCCS,
OPAMP, DELAY, TRANSFORMER, VCR, VCCAP, VCVS, SPUR, FREQ,
ZTRANS, VMRF, FOSTER, NOISE, NOISEFILE, MNAME, PHASE, SCALE,
MAX, PAR
F/H-elements
POLY, PWL, AND, NAND, OR, NOR, VMRF, CCCS, CCVS, DELAY
Independent
Sources and
Port element
SIN, PU, PWL, EXP, PULSE, PE, SFFM, AM, PAT, PL, HB, HBAC, DATA, AC,
DC, LSAC, SNAC, PHOTO, NEUT, COS, VMRF, LFSR, PUL, HBLIN, R,
BITSTREAM, PWLFILE, MOD, FILTER
Inductor
Resistor
POLY,TC,SENS
S-element
T/U- element
IC
W-element
84
Table 15
Commands
Illegal Keywords
.AC/.DC
UIC, MONTE, DATA, SWEEP, POI, DEC, LIN, OCT, RESULTS, LIST,
OPTIMIZE, SWEEPBLOCK, EXPLORE
.DATA
.FQMODEL
DATA
.FSOPTION
COMPUTETABLE
.LAYERSTACK
LAYER
.LIN
.PAT
DATA
FILE
.SHAPE
DATA, VERTEX, N
.STIM
.TRAN
85
Schematic Netlists
HSPICE typically uses netlisters to generate circuits from schematics, and
accept either hierarchical or flat netlists.
The process of creating a schematic involves:
Circuit encapsulation.
Property creation.
Symbol placement.
Table 16
Sections
Examples
Definition
Title
.TITLE
The first line in the netlist is the title of the input netlist
file. (HSPICE)
Set-up
.OPTION .IC or
.NODESET,
.PARAM,
.GLOBAL
Sources
Netlist
Circuit elements
.SUBKCT, .ENDS, or
.MACRO, .EOM
Analysis
86
Table 16
Sections
Examples
Definition
Output
.PRINT, .PROBE,
.MEASURE
Library,
Model
and File
Inclusion
.INCLUDE
.MALIAS
.MODEL
.LIB
Library.
.OPTION SEARCH
.OPTION BRIEF= 1
and .OPTION BRIEF= 0
Alter
blocks
(HSPICE
Only)
End of
netlist
.END
.inc
.lib
.load
87
However, HSPICE does not support the S-parameter and RLGC file input types
in the .gz format.
When both design.sp and design.sp.gz exist, HSPICE always selects
the exact match file first, if it exists. For example:
1. If .include design.sp is in the netlist, then HSPICE picks design.sp.
2. If .include design.sp.gz is in the netlist, then HSPICE picks
design.sp.gz
3. If .include design.sp is in the netlist and only design.sp.gz exists,
then HSPICE chooses design.sp.gz.
4. If .include design.sp.gz is in the netlist and only design.sp exists,
then HSPICE uses design.sp.
Figure 6
88
Figure 7
Sections of a netlist
89
Title of Simulation
Defining Subcircuits
Circuit Temperature
Data-Driven Analysis
Defining Parameters
Connecting Nodes
Deleting a Library
Ending a Netlist
1.
v
v
v
3.
I
4.
I
Figure 8
Title of Simulation
You set the simulation title in the first line of the input file. HSPICE always reads
this line, and uses it as the title of the simulation, regardless of the lines
contents. The simulation prints the title verbatim, in each section heading of the
output listing file.
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.
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.
An .ALTER statement does not support use of the .TITLE statement. To
change a title for a .ALTER statement, place the title content in the .ALTER
statement itself.
91
Whitespace
Comma (,)
You can also place the dollar sign within node or element names.
For 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
.PARAM a=1w$comment a=1, w treated as a space and ignored
.PARAM a=1k$comment a=1e3, k is a scale factor
A dollar sign is the preferred way to indicate comments because of the flexibility
of its placement within the code.
Line continuations require a plus sign (+) as the first character in the line that
follows. Here is an example of comments and line continuation in a netlist file:
.ABC Title Line (HSPICE or HSPICE RF ignores the netlist keyword
* on this line because the first line is always a comment)
* This is a comment line
.MODEL n1 NMOS $ this is an example of an inline comment
* This is a comment line and the following line is a continuation
+ LEVEL=3
92
Type of device.
Element statements can also reference model statements that define the
electrical parameters of the element.
Table 17 lists the parameters of an element statements.
Table 17
Element Parameters
Parameter
Description
elname
Element name that cannot exceed 1023 characters, and must begin with a
specific letter for each element type:
B IBIS buffer (HSPICE Only)
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
P Port
R Resistor
S, S-parameter mode
T, U, W Transmission line
V Voltage source
X Subcircuit call
node1 ...
Node names identify the nodes that connect to the element. The node name
begins with a letter and can contain a maximum of 1023 characters. For a listing
of legal and illegal special characters usable in node names, see the Special
Characters section, Table 10 on page 74.
93
Table 17
Parameter
Description
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.
expression
val1 ...
Value of the pname1 parameter, or of the corresponding model node. The value
can be a number or an algebraic expression.
M=positive
int
4000
The preceding example specifies a bipolar junction transistor, with its collector
connected to node 4000, its base connected to node 5000, its emitter
connected to node 6000, and its substrate connected to the SUBSTRATE node.
The BJTMODEL name references the model statement, which describes the
transistor parameters.
M1 ADDR SIG1 GND SBS N1 10U 100U
drain node=ADDR
gate node=SIG1
source node=GND
substrate nodes=SBS
94
Example 2
M1 ADDR SIG1 GND SBS N1 w1+w l1+l
drain node=ADDR
gate node=SIG1
source node=GND
substrate nodes=SBS
Defining Subcircuits
You can create a subcircuit description for a commonly used circuit, and include
one or more references to the subcircuit in your netlist.
95
In addition to letters and digits, node names can include, but NOT always
begin with some special characters. See the Special Characters section,
Table 10 on page 74. Note that use of special characters in node names
varies between HSPICE and HSPICE RF.
You should avoid using the dollar sign ($) after a numerical digit in a node
name because HSPICE assumes whatever follows the $ symbol is an inline comment (see Comments and Line Continuation on page 92 for
additional information). It can cause error and warning messages
depending on the location of the node with the $. For example, HSPICE
generates an error to indicate that a resistor node is missing:
R1 1$ 2 1k
Also, in this example, HSPICE issues a warning indicating that the value of
resistor R1 is limited to 1e-5 and interprets the line as R1 2 1 without a
defined value:
R1 2 1$ 1k
96
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. Besides these ground nodes,
HSPICE regards all node names as separate nodes. For example, 0 and 0.3
are different nodes, 1A and 1 are different nodes, 2~ and 2 are different
nodes.
The ? wildcard matches any single character. For example, 9? matches 92,
9a, 9A, and 9%.
The * wildcard matches any string of zero or more characters. For example:
And .PRINT v(o*) prints the voltages for all nodes whose names start
with o; if your netlist contains nodes named in and out, this example
prints only the v(out) voltage. For example, the following prints the
results of a transient analysis for the voltage at the matched node name.
.PRINT TRAN V(9?t*u)
Wildcards must begin with a letter or a number; wildcards must begin with
output type V, I or P; for example,
.PROBE v(*)
.PROBE *
.PROBE ix*
$ correct format
$ incorrect format
$ correct format
The statement .PRINT v(o*) prints the voltages for all nodes whose
names start with o; if your netlist contains nodes named in and out, this
example prints only the v(out) voltage.
97
Wildcards can set initial conditions in .IC and .NODESET statements. Node
names including wildcards in .IC and .NODESET must start with v(). For
example, .NODESET v(a*)=5.
Examples
The following examples use wildcards with .PRINT, .PROBE, .LPRINT, .IC
and .NODESET statements.
Probe all nodes whose names start with a. For example: a1, a2, a3, a00,
ayz.
.PROBE v(a*)
Print node voltages for nodes at the first level and all levels below the first
level, where zero-level are top-level nodes. For example: X1.A, X4.554,
Xab.abc123.
.PRINT v(*.*)
Probe node voltages for all nodes whose name start with x at the first level
and all levels below the first level, where zero-level are top-level nodes. For
example: x1.A, x4.554, xab.abc123.
.PROBE v(x*.*)
Print node voltages for nodes whose names start with x at the second-level
and all levels below the second level. For example: x1.x2.a,
xab.xdff.in.
.PRINT v(x*.??)
Match all first-level nodes with names that are exactly two characters long.
For example: x1.in, x4.12.
.PRINT v(x*.*.*)
98
In HSPICE RF, print the logic state of all top-level nodes, whose names start
with b. For example: b1, b2, b3, b56, bac.
.LPRINT (1,4) b*
To assign the first name, HSPICE uses the (.) extension to concatenate the
circuit path name with the node name for example, X1.XBIAS.M5. Node
designations that start with the same number, followed by any letter, are the
same node. For example, 1c and 1d are the same node.
99
To indicate the ground node, use either the number 0, the name GND,
or !GND. Every node should have at least two connections, except for
transmission line nodes (unterminated transmission lines are permitted)
and MOSFET substrate nodes (which have two internal connections).
HSPICE terminates floating power supply nodes with a 1Megohm resistor
and a warning message.
0 (CKT)
1 (X1)
3 (X3)
n (abc) is
circuit number (instance name)
4 (X4)
sig24
Figure 9
2 (X2)
sig25
sig26
100
.PRINT v(X1.X4.sig25)
101
Circuit Temperature
To specify the circuit temperature for an HSPICE simulation, use the .TEMP
command, the TEMP parameter in the .DC, .AC, and .TRAN statements, or the
TEMP/TEMPER parameter in the first column of the .DATA statement.
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.
HSPICE RF supports only the last .TEMP command in a netlist, if you use
multiple .TEMP commands.
Data-Driven Analysis
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.
102
HSPICE supports the entire functionality of the .DATA statement. (See .DATA
in the HSPICE Reference Manual: Commands and Control Options.) However,
HSPICE RF supports .DATA only for:
Data-driven analysis.
For more details about using the .DATA statement in different types of analysis,
see Chapter 13, Initializing DC-Operating Point Analysis and Chapter 15,
Transient Analysis.
A library can contain nested .LIB calls to itself or to other libraries. If you
use a relative path in a nested .LIB call, the path starts from the directory
of the parent library, not from the work directory. If the path starts from the
work directory, HSPICE can also find the library, but it prints a warning. Only
the constraints of your system configuration limit the depth of nested calls.
A library cannot contain a call to a library of its own entry name, within the
same library file.
103
Defining Parameters
The .PARAM statement defines parameters. Parameters in HSPICE are names
that have associated numeric values. You can define parameters through
predefined analysis or measurement
The following sections discuss these topics:
Predefined Analysis
Measurement Parameters
Predefined Analysis
HSPICE provides several specialized analysis types, which require a way to
control the analysis. For the syntax used in these .PARAM commands, see the
description of the .PARAM command in the HSPICE Reference Manual:
Commands and Control Options.
HSPICE supports the following predefined analysis parameters:
104
Optimization guess/range
HSPICE also supports the following predefined parameter types, that HSPICE
RF does not support:
frequency
time
Measurement Parameters
A .MEASURE statement produces a measurement parameter. In general, the
rules for measurement parameters are the same as those for standard
parameters. While a .PARAM statement disallows definition of measurement
parameters, the .MEASURE statement directly defines such parameters. For
more information, see .MEASURE Parameter Types on page 428.
You can alter element and .MODEL statements within a subcircuit definition.
You can also add a new element or .MODEL statement to a subcircuit
definition. To modify the topology in subcircuit definitions, put the element
into libraries. To add a library, use .LIB; to delete, use .DEL LIB.
If you used parameter (variable) values for elements (or model parameter
values) when you used .ALTER, use the .PARAM statement to change
these parameter values. Do not use numerical values to redescribe
elements or model parameters.
105
Each .ALTER simulation run prints only the actual altered input. A
special .ALTER title identifies the run.
For the first simulation run, HSPICE reads the input file, up to the
first .ALTER statement, and performs the analyses up to that .ALTER
statement.
After it completes the first simulation, HSPICE reads the input between the
first .ALTER statement, and either the next .ALTER statement or the .END
statement.
HSPICE then uses these statements to modify the input netlist file.
HSPICE then performs another simulation by using the input between the
current .ALTER statement, and either the next .ALTER statement or
the .END statement.
If you do not want to rerun the simulation that precedes the first .ALTER
statement, every time you run an .ALTER simulation, then do the following:
1. Put the statements that precede the first .ALTER statement, into a library.
2. Use the .LIB statement in the main input file.
3. Put a .DEL LIB statement in the .ALTER section, to delete that library for
the .ALTER simulation run.
Connecting Nodes
Use a .CONNECT statement to connect two nodes in your HSPICE netlist, so
that simulation evaluates two nodes as only one node. Both nodes must be at
the same level in the circuit design that you are simulating: you cannot connect
106
nodes that belong to different subcircuits. You also cannot use this statement in
HSPICE RF.
Deleting a Library
Use a .DEL LIB statement to remove library data from memory. The next time
you run a simulation the .DEL LIB statement removes the .LIB call
statement, with the same library number and entry name from memory. You
can then use a .LIB statement to replace the deleted library.
You can use a .DEL LIB statement with a .ALTER statement. HSPICE RF
does not support the .ALTER statement.
Ending a Netlist
An .END statement must be the last statement in the input netlist file. Text that
follows the .END statement is a comment, and has no effect on the 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.
107
.if (condition1)
statement_block1
# The following statement block in {braces} is
# optional, and you can repeat it multiple times:
{ .elseif (condition2)
statement_block2
}
# The following statement block in [brackets]
# is optional, and you cannot repeat it:
[ .else
statement_block3
]
.endif
108
In an IF, ELSEIF, or ELSE statement block, you can include most valid
HSPICE (not HSPICE RF) analysis and output statements. The exceptions
are:
If two or more models in an IF-ELSE block have the same model name and
model type, they must also be the same revision level.
Parameters in an IF-ELSE block do not affect the parameter value within the
condition expression. HSPICE updates the parameter value only after it
selects the IF-ELSE block.
You can include .SUBCKT and .MACRO statements within an IF-ELSE block.
You cannot use an IF-ELSE block within another statement. In the following
example, HSPICE does not recognize the IF-ELSE block as part of the
resistor definition:
r 1 0
.if (r_val>10k)
+ 10k
.else
+ r_val
.endif
109
Using Subcircuits
Reusable cells are the key to saving labor in any CAD system. This also applies
to circuit simulation, in HSPICE.
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.
In HSPICE RF, you cannot replicate output commands within subcircuit
(subckt) definitions.
MP
MN
INV
Figure 10
Subcircuit Representation
The following input creates an instance named X1 of the INV cell macro, which
consists of two MOSFETs, named MN and MP:
X1 IN OUT VD_LOCAL VS_LOCAL inv W=20
.MACRO INV IN OUT VDD VSS W=10 L=1 DJUNC=0
MP OUT IN VDD VDD PCH W=W L=L DTEMP=DJUNC
MN OUT IN VSS VSS NCH W=W/2 L=L DTEMP=DJUNC
.EOM
Note:
110
Hierarchical Parameters
Hierarchical Parameters
You can use two hierarchical parameters, the M (multiply) parameter and the S
(scale) parameter.
The following section discuss these topics:
M (Multiply) Parameter
S (Scale) Parameter
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.
This, in effect, creates parallel copies of the element.
For example, if you have an invertor and specify M=2, then HSPICE multiplies
the internal component by 2. The M parameter multiplies the internal
component values, which, in effect, creates parallel copies of the element. To
simulate 32 output buffers switching simultaneously, you need to place only one
subcircuit; for example,
X1 in out buffer M=32
111
M=8
mp out in vdd pch W=10 L=1 M=4
M=6
Figure 11
EXPANDED
S (Scale) Parameter
To scale a subcircuit, use the S (local scale) parameter. This parameter
behaves in much the same way as the M parameter in the preceding section.
.OPTION hier_scale=value
.OPTION scale=value
X1 node1 node2 subname S=valueM parameter
The .OPTION HIER_SCALE statement defines how HSPICE interprets the Sparameter, where value is either:
The .OPTION SCALE statement defines the original (default) scale of the
subcircuit. The specified S scale is relative to this default scale of the subcircuit.
The scale in the subname subcircuit is value*scale. Subcircuits can originate
from multiple sources, so scaling is multiplicative (cumulative) throughout your
design hierarchy.
112
x1 a y inv S=1u
subckt inv in out
x2 a b kk S=1m
.ends
In this example:
Q
clbar
cl
Q
D
din
.Nodeset
Figure 12
HSPICE does not limit the size or complexity of subcircuits; they can contain
subcircuit references, and any model or element statement. However, in
HSPICE RF, you cannot replicate output commands within subcircuit
definitions.
113
You add function valp() to refer to a parameter defined in subckt for output
(including a forward slash). For example:
.meas tran asdf param='valp(x1/p1)'
114
Duplicating Ports
HSPICE does not support subcircuit names that begin with a number.
Subcircuit names must begin with an alpha character and can contain up to
1023 additional alphanumeric and special characters.
Duplicated Subckt Definition Error
Use .OPTION REDEFSUB to define how multiple subcircuit definitions in the
netlist are treated.
The syntax for the REFDEFSUB option is as follows:
.OPTION REDEFSUB =[0|1|2]
The default value is 0 which causes HSPICE to issue an error message if there
are multiple subcircuit definitions.
Set REFDEFSUB=1 for HSPICE to use the last subcircuit definition.
Set REFDEFSUB=2 for HSPICE to use the first subcircuit definition.
Duplicate Node Message
In the .SUBCKT definition, if HSPICE finds two or more node names that are
the same, it issues the following error:
**error** subcircuit definition duplicates node node_name
**error**
.ends
In the following example, for the .SUBCKT definition, the node in gets two
definitions. The second definition of the node in is a duplicate of the first node,
which is illegal in HSPICE.:
.subckt ABC in in out
.
.
.ends
115
Duplicating Ports
To create duplicate ports in HSPICE you can define them in the instance
definition of the subcircuit.
For example:
.subckt DUP A B C D
.
.
.ends
116
3. An instance connected to a global net will make the subckt pin and its
internal connections global:
.subckt res2 net1
R1 net1 gnd 100 $ local gnd is connected to global net gnd
through interface pin gnd
.end
X1 net1 gnd res2
Vendor Libraries
117
HSPICE writes the search path for the DDL and vendor libraries into a
.OPTION SEARCH=lib_path statement.
This provides immediate access to all libraries for all users. It also
automatically includes the models in the input netlist. If the input netlist
references a model or subcircuit, HSPICE searches the directory to which
the DDLPATH environment variable points for a file with the same name as
the reference name. This file is an include file so its filename suffix is .inc.
HSPICE installation sets the DDLPATH variable in the meta.cfg configuration
file.
118
.INCLUDE path/T2N2211.inc
This method requires you to store each model in its own .inc file, so it is not
generally useful. However, you can use it to debug new models, when you
test only a small number of models.
Vendor Libraries
The vendor library is the interface between commercial parts and circuit or
system simulation.
Interface vendors supply complete cells for simple functions and output
buffers, to use in generic family output.
To avoid name and parameter conflicts, models in vendor cell libraries should
be within the subcircuit definitions.
.OPTION search=/usr/lib/vendor
/usr/lib/vendor/buffer_f.inc
/usr/lib/vendor/skew.dat
.inc /usr/lib/vendor/buffer.inc
.eom
/usr/lib/vendor/buffer.inc
/usr/lib/vendor/model.dat
.model nch nmos level=28
+ xl=vendor_xl ...
Figure 13
119
120
6
6
Note:
Examples
121
The interactive environment functions from a special HSPICE shell. You can
use the same commands as you do under UNIX. For example:
HSPICE > load case.sp
HSPICE > run
Examples
The examples in this section examples show you how to use the interactive
environment commands.
122
Getting Help
Creating a Netlist
Specifying an Analysis
Running an Analysis
Viewing a Netlist
Getting Help
You use the help command to show the interactive mode syntax; for example,
% hspice -I
HSPICE > help
list [lineno]
input
edit
ls [directory]
load filename
run
pwd
cd directory
info outflag
set outflag true/false
save [netlist/command] filename
quit
help
dc [...statement]
(as in the netlist)
ac [...statement]
(as in the netlist)
tran [...statement]
(as in the netlist)
op
measure [...statement]
(as in the netlist)
print [tran/ac/dc] v/vm/vr/vi/vp/vdb
123
Creating a Netlist
Use the input command to create a netlist by using the vi text editor; for
example,
% hspice -I
HSPICE > input
R1 1 0 2
V1 1 0 3
.print I(R1)
.end
Specifying an Analysis
Use the ac, dc, or tran command to specify an analysis; for example,
HSPICE > dc v1 -5v 5v 0.5v
Running an Analysis
Use the run command to simulate a netlist; for example,
HSPICE > run > info:
HSPICE outputs the simulation results. This output is equivalent to a .lis file.
Viewing a Netlist
Use the list command to view a netlist; for example,
HSPICE > list
1 * this is an interactive mode example
2
3 R1 1 0 2
4 V1 1 0 3
5 .print I(R1)
6 .end
124
Use the list command to view a netlist; for example, to view the tt1.sp netlist:
HSPICE > list
1 * this is an interactive mode example
2
3 R1 1 0 2
4 V1 1 0 3
5 .print I(R1)
6 .end
Use the list command to view a netlist again. Notice that the DC analysis is
in the interactive mode netlist. The original netlist, tt1.sp, is unchanged.
HSPICE > list
1 * this is an interactive mode example
2
3 R1 1 0 2
4 V1 1 0 3
5 .print I(R1)
6 .dc v1 -5v 5v 0.5v
7 .end
Use the pwd command to print the full pathname of the current directory:
HSPICE > pwd
> /home/usr
125
Use the ls command to list the files in the current working directory:
HSPICE > ls
tt.sp
tt.sw0
:
Use the info outflag command to view the current setting of outflag:
HSPICE > info outflag
false
HSPICE > quit
%
126
127
v(1, 0)
v(1, 0)
v(1, 0)
v(1, 0)
v(1, 0)
v(1, 0)
v(1, 0)
v(1, 0)
v(1, 0)
v(1, 0)
v(1, 0)
>info:
HSPICE >
%
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
***** hspice job concluded
quit
HSPICE checks out a license only one time and then simulates both tt.sp
and qq.sp netlists.
128
7
7
Design dir
Sim. input
*.sp
Figure 14
Design Config
*.cfg
Raw output
.tr#,.ac#,.sw#
Measures
.mt#,.ma#,.ms#
Sim. output
.lis
Directory Structure
Troubleshooting Guide
129
input filename
output filename
Table 18
Command
Description
LastDesigns
The Launcher checks the status of a given design when it opens. If the input file
exists, the Simulate button is active. If the listing file exists for the design, the
Edit Listing button is active. The Edit Netlist button is always active.
See Figure 15 on page 131 for the main window of the Launcher.
130
Figure 15
131
Figure 16
The check box enables: Automatic save configuration when exit (see
below)
The Simulation window mode panel presents radio button choices of:
Popup (default)
Minimized
Silent
If you change a value, the Launcher updates the installdir/hspui.cfg file. The
location of the hspui.cfg file depends on which choices you make in the
Launcher Options form. If %APPDATA%/Synopsys/HSPICE/hspui.cfg
exists, HSPICE reads it, and ignores installdir/hspui.cfg. (HSPICE
reads the installdir/hspui.cfg only if %APPDATA%/SynopsysHSPICE/
hspui.cfg does not exist.)
The hspui.cfg file location depends on the choice of Save configuration at:
1. If you select Installed Path (root permission), the configuration is written
to installdir/hspui.cfg.
2. If you select User local HOME, the configuration is written to %APPDATA%/
Synopsys/HSPICE/hspui.cfg.
132
To associate your design.sp file with the Launcher, use the Launcher
Options window. You can double-click an .sp file in the File Manager window
to automatically invoke the HSPICE/Win Launcher.
For further configuration tips see Setting the hspui.cfg File Values and Using
Arguments on the Command Lines of the hspui.cfg
Figure 17
2.
133
Figure 18
Use to
open
WaveView
Figure 19
WaveView button
134
For HSPICE the UI checks for the following files:*.sw, *.ac, *.tr, *.ms,
*.ma, *.mt, *.mcs, *.mca, *.mct, *.eps, *.epa, *.ept, and *.mex.
For HSPICE RF the UI checks for the following files:*.sw, *ac, *.tr, *.ms,
*.ma, *.mt, *.hb, *.sn, *.snf, *.hr, *.pn, *.snpn, *.snac, *.ls,
*.ss, *.p2d, and *.ev.
Figure 20
Running Multithreading
135
2. Using the Drive/Directory boxes, locate the directory of files that you wish to
simulate.
Open the Multi-Jobs window, click Load to load netlists and then click
Simulate.
or
136
Open the Multi-Jobs window, click Load to load netlists, then click the Save
button to create a batch simulation file (*.bat file), then run the *.bat file
on Explorer or by using the MS-DOS cmd window.
2. To run simulation on a single file or a group of files, set the selection box
option to Selected and select those files you wish to simulate from the batch
job list box.
Use the left mouse button to select a single file.
Press and hold the Control key and select another file with the left
mouse button to add to the selected list.
Press and hold the Shift key to select all files between the current file
and the last selected file.
137
2. Add files to the run list using the Load and Append buttons: When you
navigate to the folder containing the SPICE decks, they are displayed in the
left-hand list window. Although you can select files in this window, clicking
the Load button adds all the files in the left-hand list window, as well as
those in subdirectories. These files go into a run list and are numbered
sequentially. Load clears the contents of the run list, but you can navigate
to another folder containing HSPICE sources files and click the Append
button to add additional files to the run list.
3.
Edit the run list: Select files one at a time (CTRL-click) or a range of files
(SHIFT-click) and click the Delete button to remove them from the run list.
Note: Delete does not remove the file from your hard-drive, just the
run list. Clear removes the entire contents of the run list and
allows you to start over again.
4. Perform text edits on individual HSPICE jobs: Selecting a job and clicking
Edit displays that HSPICE deck in the text editor you designated in the
HSPICE UI Configuration > Options dialog. Save and close it to continue.
5. Simulate the jobs: Only selected jobs in the run list can be simulated. Select
(highlight) files by clicking on them, or by choosing All Files from the pulldown menu below the Append button. Click Simulate to run the jobs in
order, one at a time.
6. Save the run list for later use: Using the File > Save or File > Save As pulldown menu items, you can save the contents of the run list to a file and open
it with File > Open to begin work at a later time.
7. Invoke a waveform viewer graphical waveform analysis.
8. Create a batch (*.bat) file with a list of jobs to be run without using the UI:
Click the Save button (not File > Save) to create a DOS batch file containing
the full path to the HSPICE executable and the design name for each job in
the run list. This .bat file can be executed from a DOS command prompt
or by double-clicking on it in Windows.
138
Running Multithreading
To run multithreading:
1. Select the correct hspice.exe version in the Version combo box.
2. Select the correct number of CPUs in the MultiCpu Option box.
3. Click the Open button to select the input netlist file.
4. Click the Simulate button to start the simulation.
139
Troubleshooting Guide
The following sections discuss these topics:
In the hspui.cfg file you will find a listing similar to the following:
DesiDesignName=
DesignPath=
NetSuffix=.sp
LisSuffix=.lis
HspVersion=C:\synopsys\Hspice_C-2009.03\BIN\hspice.exe
DefEditor=C:\Program Files\Windows NT\Accessories\wordpad.exe
DefmCscope=
Nproc=1
LastFile(0)=
LastFile(1)=
LastFile(2)=
LastFile(3)=
LastFile(4)=
140
DesignName is the name of the last saved netlist run through HSPICE
DefEditor path to editor for netlist and output files, default is Notepad
To change the netlist extension, edit the NetSuffix line. Multiple file
extension support is not available.
To change the output listing file to have a different extension, edit the
LisSuffixline.
To use an editor other than Notepad, enter the path on the DefEditor line.
If you want to use CosmosScope as the waveform viewer, add the path to
the CosmosScope (cscope.exe) executable on the DefmCscope line.
You may also change the default number of processors used when running
HSPICE; edit the Nproc line.
141
Note:
With Notepad open, click Format on the tool bar and uncheck Word Wrap.
Configure the HSPUI to use another text editor to view the files:
142
143
144
8
8
Describes the Synopsys library encryption methods and their use to protect your
intellectual property.
HSPICE ships several suites of examples for your use; see Listing of
Demonstration Input Files for paths to demo files; for encryption demo files, see
Encryption Examples.
Organization
These sections present the HSPICE encryption methods according to the
following topics:
Library Encryption
Encryption Guidelines
General Example
Troubleshooting
145
Library Encryption
You can encrypt your own proprietary HSPICE custom models, parameters,
and circuits and distribute to others without revealing your companys sensitive
information. Recipients of an encrypted library can run HSPICE simulations
and your libraries, so that encrypted parameters, encrypted circuit netlists, and
internal node voltages do not appear in output files. Your library user sees the
devices and circuits as black boxes that provide terminal functions only.
The following topic discusses the metaencrypt utility:
If you encrypt both mylib.lib and mymodel.mdl, then you generate the error
message: Command exited with non-zero status 1 during the
HSPICE simulation. This is because HSPICE does not support the nesting of
encrypted files.
To correctly encrypt the model file, you need to change the library structure.
The model parameters and the models need encryption separately as shown in
the following steps:
1. The modified structure should be as follows:
.* model library mylib.lib
.lib tt
.inc myparam.par $ put parameter definitions into myparam.par
.inc mymodel.mdl $ original model file
.endl
2.
146
3. To simulate the circuit, include the encrypted files and call the library file,
mylib.lib in the top level netlist:
* top level netlist
.inc mynetlist.sp.enc
.lib mylib.lib tt
...
.end
* modified library mylib.lib
.lib tt
.inc myparam.par.enc
.inc mymodel.mdl.enc
.end
The metaencrypt utility can encrypt files with lines up to 254 characters or
shorter. You can include multiple types of encrypted files in a HSPICE
simulation.
Installing metaencrypt
Running metaencrypt
Encryption Guidelines
147
General Example
Installing metaencrypt
The metaencrypt utility is part of the general HSPICE distribution and found in
the $installdir/bin directory.
If you have not installed HSPICE on your system, first install HSPICE according
to the Installation Guide and the HSPICE Release Notes. Verify that the license
file contains the license token encrypt.
Running metaencrypt
Syntax
metaencrypt -i input_file|-pipe -o encrypted_output_file
-t encrypt_type [-d encrypt_dir]
[-r synopsys_tool[:access_control]]
[-r synopsys_tool[:access_control]]...
Argument
Description
-i inptfileName
-pipe
-o outfileName
-t encrypt_type
Encryption method:
148
Argument
Description
-d encrypt_dir
Encryption Guidelines
Before encrypting, you must test out any circuits and device parameters, as you
will not be able to see what is wrong after encryption because HSPICE does
not let you read the encrypted data.
You can use any legal HSPICE command inside subcircuits that you encrypt.
Refer to Using Subcircuits in Chapter 5, Input Netlist and Data Entry for more
information about how to construct subcircuits. The structure of your libraries
can affect how you encrypt them. If your library requires that you change the
name of a subcircuit, you must encrypt that circuit again.
To encrypt more than one file in a directory, use the following shell script, which
encrypts the files as a group. In this example, the script uses the traditional
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
149
encryption method. The script produces a .inc encrypted file, for each .dat
file in the current directory. The metaencrypt command assumes that
unencrypted files have a .dat suffix.
#!/bin/sh
for i in *.dat
do
Base=basename $i .dat
metaencrypt -i $Base.dat -o $Base.inc -t Freelib
done
Use an encrypted file much the same way as you do before encryption. The
name of the file may be different, however, and so you may need to update the
.include and .lib commands.
Note:
You can probe any specified encrypted nodes using .OPTION PROBE.
General Example
The requirements for encrypted libraries of subcircuits are the same as the
requirements for regular subcircuit libraries, as described in the HSPICE
Simulation and Analysis User Guide. To refer to an encrypted subcircuit, use its
subcircuit name in a subcircuit element line of the HSPICE netlist.
150
Design View
Top Level
File System
LibraryDir
Fast
iobuf
ioinv
iobuf.inc
Typical
ioinv.inc
models
iobuf.inc
Slow
ioinv.inc
ioinv.inc
iobuf.inc
models
models
Figure 21
The following example describes an encrypted I/O buffer library subcircuit. This
subcircuit consists of several subcircuits and model commands that you need
to protect with encryption. Figure 21 on page 151 shows the organization of
subcircuits and models, in the libraries used in this example.
The following input file fragment from the main circuit level selects the Fast
library. It also creates two instances of the iobuf circuit.
...
.Option Search=LibraryDir/Fast
$ Corner Spec
x1 drvin drvout iobuf
Cload=2pF
$ Driver
u1 drvout 0 recvin 0 PCBModel ...
$ Trace
x2 recvin recvout iobuf
$ Receiver
...
151
Note:
After encryption, the basic layout of the subcircuits is the same. However, you
cannot read the file. Only HSPICE can read this file.
Encryption also suppresses printouts of encrypted model information from
HSPICE. Only HSPICE can decrypt the model.
If you divide a data line into more than one line, and use the line
continuation character (+) to link the lines, you cannot
add .PROT or .UNPROT commands among these lines. The
following example fails:
.prot
.Model N1 NMOS Level= 57
+TNOM = 27 TOX = 4.5E-09 TSI = .0000001 TBOX = 8E-08
+MOBMOD = 0 CAPMOD = 2 SHMOD =0
.unprot
+PARAMCHK=0 WINT = 0 LINT = -2E-08
When metaencrypt reads the input file, it looks for .PROT and .UNPROT
pairs, and encrypts the text between them. You can encrypt only one file at a
time.
Example
metaencrypt -i newmos.lib -o newmos.inc -t freelib
Note:
If you use .sp encryption, the encrypted data must not use .INC,
.LIB, or .LOAD, to include another file.
153
*sample.sp*
......
.lib 'cmos.lib' TT
.prot
.... $ data to be encrypted
.... $ do not include .inc .lib .load in encrypted data
.unpr
.inc sample2.inc
......
.end
You use the above encrypted .lib file as you would any unencrypted one.
154
155
file enc.sp:
*test .inc .lib .load encryption
.inc "mm.spe"
.load "xx.ic"
.lib kk.lib pch
.OPTION post list
.tran 2ns 400ns
.end
file mm.spe:
.prot CUSTOM
-hs#ylB]*7[
+tY=O$S[t0]ajL
+C :Nx:$.$=<*X:$<#pP=020#ZWP=020x\K:[1:898
y[-x:$-#tRr0($x#4:/[U$<\K:I[U$<J <9 :P#ZQ
6%P2V7D6:]4l/0#+:IXj0#ZWP=020#ZWP/[U$=J++bZ
3[7D6:BxHpg8
/C902P73+26
mh$y#D:bX/$\KwI)U-0R#=-ib+\[
a$o) :P.#$<) :P.#to)V:\7*K-I1M$#;-[Xz:9qpy
eMDv0%wUoxZ>mzwF*-(3_;W6x.*P!uW.]a+P0.h:n=O>1q+H(J0
o.H#-/B+($;W Me*0x<6#9[UqpH/2h97%;-/B+T35Q
$\m;_-he[uE$%H) 5a:ZxRW9x=*77w$2]=*P!RW%.ahT3VQ
H0[I:[
file xx.ic:
.prot FREELIB
59yUH\$=x.3k77*<]8AT]8
<:7-(:9CV+7x15Xj+hx=5Xj+(2 +4]8
<:7_D:\[2x9Y>/.7q
59y3\#D$ *y2k=u]PIq:97jH=u1w5Xj+x6
92k#<2FW0k772<xBU677Q
59y3\#s# r21$],29b72[4/RW72wd#$:O.U
+ 0sW%5$;[4sv;9=zV7[WFW[(g8#/]=AH%T5:7Z
[$%C999A2P!8
<:X2o60$ 06($_#upe1:pX8
<5ax/toC n90;<0dw0]23G%C z9$Dh#Sw5a90
ZM*2!M[0
o729!=PAy73x(/1:6[
+ 0%2UT%8
_:-x*$X+q
$9P2y73x(/1:L
T#;*9A27!j+(/z
$$o#(:/b0
o7ZW-9 -PxJ+y
a9[$0\;n90;<0dw0]23G%C z9$Dh#Sw5a90
Zr
;6
156
file kk.lib:
.LIB NCH
.prot FREELIB
HO. T,# %fXz>MZWf*-(3_;w6X.*p!Uw.]A+p0.H:N=o>1Q+h(j0
o.H#-/B+($;W Me*0x<6#9[UqpH/2h97%;-/B+T35Q
$\m;_-he[uE$%H) 5a:ZxRW9x=*77w$2]=*P!RW%.ahT3VQ
H0[I:[
.ENDL
.LIB PCH
.prot FREELIB
HO. T,#t%fXz>MZWf*-(3_;w6X.*p!Uw.]A+p0.H:N=o>1Q+h(j0
o.H#-/B+($;W Me*0x<6#9[UqpH/2h97%;-/B+T35Q
$\m;_-he[uE$%H) 5a:ZxRW9x=*77w$2]=*P!RW%.ahT3VQH0[I:[
.ENDL
In a .sp file, you cannot encrypt the first line because it is the title. You also
cannot encrypt the last line because it marks the end of the file.
157
158
The HSPICE triple DES encryption uses a 192-bit key to achieve a maximum
level of security. You can generate the encryption keys for a new algorithm with
one of the following options:
159
The file that you are encrypting cannot contain an .inc, .lib, or .load
command that calls another file.
You can use embedded .LIB encryption only if you set it up using .prot
and .unprot inside of the .lib plus use the -d option.
Do not use .OPTION SEARCH, when you encrypt models and subcircuits.
(The old metaencryption functionality supported this method.) To directly
encrypt subcircuits and model libraries, use the traditional .INC and .LIB
encryption method.
160
Note:
Note:
161
Troubleshooting
The following sections discuss these issues:
The results of parameter expressions which contain output signals are not
correct. For example:
Note:
162
3. Encrypt the file. Use either 8-bit encryption or Triple DES encryption.
4. To use the encrypted file in the netlist you need to call the S-parameter data
as a .lib in addition to defining the S-element.
* Encrypted S-parameter Example
...
.lib 'filter.sdt' s
$ encrypted S-parameter library file
$ contains the model 'filter'
S1 in out 0 mname=filter
$ S-element with model name 'filter'
...
.end
163
The error messages only occur when using freelib encryption because this
method does not support the mathematical operator caret (^) used for power in
equations. If you are using freelib encryption, use '**' as an operator for power
in equations.
HSPICE recommends that you use either 8-byte or Triple DES encryption as
both the 8-byte and Triple DES encryption are much stronger encryption
methods than the freelib encryption method.
164
Chapter 9, Elements
165
166
9
9
Elements
Describes the syntax for the basic elements of a circuit netlist in HSPICE or
HSPICE RF.
Passive Elements
Port Element
Active Elements
Passive Elements
This section describes the passive elements: resistors, capacitors, and
inductors. See Multi-Terminal Linear Elements for discussion of the W-, U-, and
167
Chapter 9: Elements
Passive Elements
Capacitors
Inductors
Parameter
Description
Rxxx
n1
n2
168
Chapter 9: Elements
Passive Elements
Parameter
Description
mname
Resistor model name. Use this name in elements, to reference a resistor model.
TC
TC1
First-order temperature coefficient for the resistor. See the Passive Device
Models chapter in the HSPICE Elements and Device Models Manual for
temperature-dependent relations.
TC2
SCALE
R=
resistance
Multiplier to simulate parallel resistors. For example, for two parallel instances of
a resistor, set M=2, to multiply the number of resistors by 2. Default=1.0.
AC
DTEMP
Temperature difference between the element and the circuit, in degrees Celsius.
Default=0.0. To modify the temperature for a particular element, use the DTEMP
parameter in an instance line.
Resistor length in meters. Default=0.0, if you did not specify L in a resistor model.
Capacitance connected from node n2 to bulk. Default=0.0, if you did not specify
C in a resistor model
R= equation
169
Chapter 9: Elements
Passive Elements
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).
Rterm input gnd R=sqrt(HERTZ)
The Rxxx resistor connects 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
HSPICE RF Examples
Some basic examples for HSPICE RF include:
170
Chapter 9: Elements
Passive Elements
Linear Resistors
Rxxx node1 node2 modelname [R =] value [TC1=val]
+ [TC2=val] [W=val] [L=val] [M=val]
+ [C=val] [DTEMP=val] [SCALE=val]
Parameter
Description
Rxxx
Name of a resistor
modelname
value
TC1, TC2
Temperature coefficient
Resistor width
Resistor length
Parallel multiplier
DTEMP
SCALE
Scaling factor
Example
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
171
Chapter 9: Elements
Passive Elements
Note:
R3 takes its value from the RX parameter, and uses the TC1 and TC2
temperature coefficients, which become 0.001 and 0, respectively.
Behavioral Resistors
Rxxx n1 n2 . . . [R=] equation . . .
Note:
Example
R1 A B R=V(A) + I(VDD)
Frequency-Dependent Resistors
Rxxx n1 n2 [R=] equation [CONVOLUTION=[0|1|2]]
+ [FBASE=value] [FMAX=value]
Parameter
Description
CONVOLUTION Indicates which method to use (at the instance level only).
FBASE
172
Chapter 9: Elements
Passive Elements
Parameter
Description
FMAX
Specifies the possible maximum frequency of interest. The default value is the
frequency point where the function reaches close enough to infinity value. This
assumes that frequency point reaches 10THz and the monotonous function is
approaching the infinity value.
The equation should be a function of HERTZ. If CONVOLUTION turns on when
a HERTZ keyword is not in the equation, it is automatically turns off to let the
resistor behave conventionally. The equation can be a function of temperature,
but it cannot be node voltage or branch current and time.
In the time domain, HSPICE uses the following rational function to represent
Eq. 1:
Equation 2
H ( )
k
--------------k + j
173
Chapter 9: Elements
Passive Elements
Capacitors
For a full demonstration example of voltage variable capacitance see the path
to the calg2.sp netlist noted in the section Behavioral Application Examples.
Cxxx n1 n2 [mname] [C=]capacitance [TC1=val]
+ [TC2=val] [SCALE=val] [IC=val] [M=val]
+ [W=val] [L=val] [DTEMP=val]
Cxxx n1 n2 [C=]equation [CTYPE=0|1]
+ [above_options...]
Polynomial form:
Cxxx n1 n2 POLY c0 c1... [IC=val] [M=val]
174
Parameter
Description
Cxxx
n1
n2
mname
C=capacitance
TC1
TC2
SCALE
IC
Initial voltage across the capacitor, in volts. If you specify the UIC
parameter in the .TRAN statement, HSPICE does not calculate the
initial DC operating point, but directly enters transient analysis.
The .IC statement overrides the IC parameter.
Chapter 9: Elements
Passive Elements
Parameter
Description
DTEMP
C=equation
CTYPE
POLY
c0 c1...
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 the Passive Device Models chapter in
the HSPICE Elements and Device Models Manual), the capacitance value
is optional.
175
Chapter 9: Elements
Passive Elements
(that is, the voltage across the capacitor, where the equation determines the
capacitance).
To avoid syntax conflicts, if a capacitor model has the same name as a
capacitance parameter, HSPICE uses the model name.
For output templates for capacitor models, see Table 34 on page 441.
Example 1
In the following example, C1 assumes its capacitance value from the model,
not the parameter.
.PARAMETER CAPXX=1
C1 1 2 CAPXX
.MODEL CAPXX C CAP=1
Example 2
In the following example, the C1 capacitors connect from node 1 to node 2, with
a capacitance of 20 picofarads:
C1 1 2 20p
The Cload capacitor connects from the driver node to the output node. The
voltage on the capcontrol node, times 1E-6, determines the capacitance. 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 polynomial
C=c0 + c1*v + c2*v*v, where v is the voltage across the capacitor, determines
the capacitance.
C99 in out POLY 2.0 0.5 0.01
Linear Capacitors
Cxxx node1 node2 [modelname] [C=]val [TC1=val]
+ [TC2=val] [W=val] [L=val] [DTEMP=val]
+ [M=val] [SCALE=val] [IC=val] [SHRINK=val]
176
Chapter 9: Elements
Passive Elements
Description
Cxxx
node1 and
node2
value
modelname
TC1, TC2
Capacitor width.
Capacitor length.
DTEMP
SCALE
Scaling factor.
IC
SHRINK
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
In this example:
177
Chapter 9: Elements
Passive Elements
C1, which calls the CBX model, does not have a constant capacitance.
CP is a 0.1 PF capacitor.
Frequency-Dependent Capacitors
You can specify frequency-dependent capacitors by using the C=equation
with the HERTZ keyword. The HERTZ keyword represents the operating
frequency. In time domain analyses, an expression with the HERTZ keyword
behaves differently according to the value assigned to the CONVOLUTION
keyword.
Syntax
Cxxx n1 n2 C=equation [CONVOLUTION=[0|1|2]]
+ [FBASE=val] [FMAX=val]
Parameter
Description
n1 n2
equation
CONVOLUTION
FBASE
178
Chapter 9: Elements
Passive Elements
Parameter
Description
FMAX
Example
C1 1 2 C='1e-6 - HERTZ/1e16' CONVOLUTION=1 fbase=10
+ fmax=30meg
Description
CTYPE
You can specify the capacitor value as a function of any node voltage or branch
current, and any independent variables such as time, hertz, and temper.
Example
C1 1 0 C=1e-9*V(10) CTYPE=1
V10 10 0 PWL(0,1v t1,1v t2,4v)
DC Block Capacitors
Cxxx node1 node2 [C=] INFINITY [IC=val]
When the capacitance of a capacitor is infinity, this element takes the name of
DC block. In HSPICE, you specify an INFINITY value for such capacitors.
179
Chapter 9: Elements
Passive Elements
HPSICE does not support any other capacitor parameters for DC block
elements because HSPICE assumes that an infinite capacitor value is
independent of any scaling factors.
The DC block acts as an open circuit for all DC analyses. HSPICE calculates
the DC voltage across the nodes of the circuit. In all other (non-DC) analyses, a
DC voltage source of this value represents the DC blockHSPICE does not
allow dv/dt variations.
Charge-Conserved Capacitors
Cxxx node1 node2 q=expression
HSPICE supports AC, DC, TRAN, and PZ analyses for charge-conserved
capacitors.
The expression supports the following parameters and variables:
180
Chapter 9: Elements
Passive Elements
Parameters
node voltages
branch currents
Variables
time
temper
hertz
Note: Transient analyses do not support the hertz variable.
You must use parameters directly in an equation. HSPICE does not support
parameters that represent an equation containing variables.
Error Handling
If you use an unsupported parameter in an expression, HSPICE issues an error
message and aborts the simulation. HSPICE ignores unsupported analysis
types and then issues warning a message.
Limitations
The following syntax does not support charge-conserving capacitors:
Cxx node1 node2 C=expression
HSPICE does not implicitly convert capacitor equations to charge equations.
Example 1: Capacitance-based Capacitor
C1 a b C=Co*(1+alpha*V(a,b) ctype=0
181
Chapter 9: Elements
Passive Elements
Inductors
For demonstration examples of magnetics netlists, see Magnetics Examples
demo files for magnetic cores, L-elements and K-elements. This link provides
paths to several files available from the HSPICE installation directory.
General form:
Lxxx n1 n2 [L=]inductance [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...]
Magnetic winding form:
Lxxx n1 n2 NT=turns [above_options...]
Parameter
Description
Lxxx
n1
n2
TC1
First-order temperature coefficient for the inductor. See the Passive Device
Models chapter in the HSPICE Reference Manual: Elements and Device Models
for temperature-dependent relations.
TC2
182
Chapter 9: Elements
Passive Elements
Parameter
Description
SCALE
IC
The current forced through the inductor for the duration of the DC operating point
calculation, in amperes. HSPICE uses this value as the DC operating point
current. If the .TRAN statement uses UIC, then HSPICE does not calculate the DC
operating point. However this IC current still flows through the inductor at transient
simulation t=0. For transient simulation t > 0, the forced inductor current releases
and then allowed to vary with circuit operation. If you use an .IC statement to set
an initial current through this inductor, then the .IC statement overrides the IC
value set on this instance.
DTEMP
Temperature difference between the element and the circuit, in degrees Celsius.
Default=0.0.
L=equation
LTYPE
POLY
c0 c1...
NT=turns
183
Chapter 9: Elements
Passive Elements
In this syntax, the inductance can be either a value (in units of henries), an
equation, a polynomial of the current, or a magnetic winding. Required fields
are the two nodes, and the inductance or model name.
If you specify parameters, the nodes and model name must be first. Other
parameters can be in any order.
If you specify an inductor model (see the Passive Device Models chapter in
the HSPICE Reference Manual: Elements and Device Models), the
inductance value is optional.
For a listing of output templates for inductor (L-element) models, see Table 35
on page 441.
Example 1
In the following example, the L1 inductor connects from the coilin node to the
coilout node, with an inductance of 100 nanohenries.
L1 coilin coilout 100n
Example 2
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
Example 3
The Lcoil inductor connects from the input node to ground. The product of the
current through the inductor, and 1E-6, determines its inductance.
Lcoil input gnd L=1u*i(input) LTYPE=0
Example 4
The L99 inductor connects from the in node to the out node. The polynomial
L=c0 + c1*i + c2*i*i, where i is the current through the inductor, determines its
inductance. The inductor also has a specified DC resistance of 10 ohms.
L99 in out POLY 4.0 0.35 0.01 R=10
Example 5
The L inductor connects from node 1 to node, as a magnetic winding element,
with 10 turns of wire.
L 1 2 NT=10
Linear Inductors
Lxxx node1 node2 [L =] inductance [TC1=val] [TC2=val]
184
Chapter 9: Elements
Passive Elements
Description
Lxxx
Name of an inductor.
inductance
TC1, TC2
Temperature coefficient.
DTEMP
IC
The current forced through the inductor for the duration of the
DC operating point calculation, in amperes.
Example:
LX A B 1E-9
LR 1 0 1u IC=10mA
LX is a 1 nH inductor.
Frequency-Dependent Inductors
You can specify frequency-dependent inductors with the L=equation with
the HERTZ keyword. The HERTZ keyword represents the operating frequency.
In time domain analyses, an expression with the HERTZ keyword behaves
differently according to the value assigned to the CONVOLUTION keyword.
Syntax
Lxxx n1 n2 L=equation [CONVOLUTION=[0|1|2] [FBASE=value]
+ [FMAX=value]]
Parameter
Description
Lxxx
185
Chapter 9: Elements
Passive Elements
Parameter
Description
n1 n2
equation
FBASE
FMAX
Specifies the possible maximum frequency of interest. The default value is the
frequency point where the function reaches close enough to infinity value. This
assumes that the frequency reaches 10THz and that the monotonous function
is approaching the infinity value.
Example
L1 1 2 L='0.5n + 0.5n/(1 + HERTZ/1e8)' CONVOLUTION=1 fbase=10
+ fmax=30meg
AC Choke Inductors
Syntax
Lxxx node1 node2 [L=] INFINITY [IC=val]
When the inductance of an inductor is infinity, this element takes the name AC
choke. In HSPICE, you specify an INFINITY value for inductors.
HSPICE does not support any other inductor parameters because it assumes
that the infinite inductance value is independent of temperature and scaling
factors. The AC choke acts as a short circuit for all DC analyses and HSPICE
186
Chapter 9: Elements
Passive Elements
calculates the DC current through the inductor. In all other (non-DC) analyses,
a DC current source of this value represents the chokeHSPICE does not
allow di/dt variations.
Reluctors
Syntax
Reluctance Inline Form
Lxxx n1p n1n ... nNp nNn
+ RELUCTANCE=(r1, c1, val1, r2, c2, val2, ... , rm, cm, valm)
+ [SHORTALL=yes | no] [IGNORE_COUPLING=yes | no]
Reluctance External File Form
Lxxx n1p n1n ... nNp nNn RELUCTANCE
+ FILE=filename1 [FILE=filename2 [...]]
+ [SHORTALL=yes | no] [IGNORE_COUPLING=yes | no]
Parameter
Description
Lxxx
RELUCTANCE
187
Chapter 9: Elements
Passive Elements
Parameter
Description
FILE=filename1
For the external file format, the data files should contain three columns
of data. Each row should contain an (r,c,val) triplet separated by white
space. The r, c, and val values may be expressions surrounded by
single quotes. You can specify multiple files to spread the reluctance
data over several files, if necessary.
SHORTALL
IGNORE_COUPLING
Example
This example has 9 segments (or ports) with 12 nodes, and can potentially
generate a 9x9 reluctance matrix with 81 elements.
188
Chapter 9: Elements
Passive Elements
1
1
1
4
4
7
2
2
2
5
5
8
3
3
3
6
6
9
1
4
7
4
7
7
2
5
8
5
8
8
3
6
9
6
9
9
103e9
-34.7e9
-9.95e9
114e9
-34.7e9
103e9
103e9
-34.7e9
-9.95e9
114e9
-34.7e9
103e9
103e9
-34.7e9
-9.95e9
114e9
-34.7e9
103e9
The following shows the mapping between the port numbers and node pairs:
189
Chapter 9: Elements
Passive Elements
------------------------------------------------------------------------------------|Ports
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
|Node pairs | (a,1) | (1,2) |(2,a_1)| (b,4) | (4,5) |(5,b_1)| (c,7) | (7,8) |(8,c_1)|
-------------------------------------------------------------------------------------
Mutual Inductors
General form:
Kxxx Lyyy Lzzz [K=coupling | coupling]
Mutual core form:
Kaaa Lbbb [Lccc ... Lddd] mname [MAG=magnetization]
Parameter
Description
Kxxx
Lyyy
Lzzz
K=coupling
Kaaa
Lbbb, Lccc, Lddd Names of the windings about the Kaaa core. Requires one winding element,
and each winding element must use the magnetic winding syntax. Write all
winding elements with the same magnetic core model in one mutual inductor
statement in the netlist.
mname
Saturable core model name. (See the Passive Device Models chapter in the
HSPICE Elements and Device Models Manual for more information.)
MAG=
Initial magnetization of the saturable core. You can set this to +1, 0, or -1,
where +/- 1 refer to positive and negative values of the BS model parameter.
(See the Passive Device Models chapter in the HSPICE Elements and Device
Models Manual for more information.)
magnetization
190
Chapter 9: Elements
Passive Elements
In this syntax, coupling is a unitless value from zero upward, representing the
coupling strength. If you use parameter labels, the nodes and model name
must be first. Other arguments can be in any order. If you specify an inductor
model (see the Passive Device Models chapter in the HSPICE Reference
Manual: Elements and Device Models), the inductance value is optional.
You can determine the coupling coefficient, based on geometric and spatial
information. To determine the final coupling inductance, HSPICE divides the
coupling coefficient by the square-root of the product of the self-inductances.
When using the mutual inductor element to calculate the coupling between
more than two inductors, HSPICE can automatically calculate an approximate
second-order coupling. See the third example for a specific situation.
Note:
For a listing of output templates for mutual inductor (K-element) models, see
Table 36 on page 441.
Example 1
This example couples the Lin and Lout inductors, with a coefficient of 0.9.
K1 Lin Lout 0.9
Example 2
This example couples the Lhigh and Llow inductors, with a coefficient equal to
the value of the COUPLE parameter.
Kxfmr Lhigh Llow K=COUPLE
Example 3
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
191
Chapter 9: Elements
Passive Elements
Ideal Transformer
Kxxx Li Lj [k=IDEAL | IDEAL]
Ideal transformers use the IDEAL keyword with the K element to designate
ideal K transformer coupling.
Eq. 3 presents multiple coupled inductors. The IDEAL keyword activates the
equation set for non-DC values. Ij is the current into the first terminal of Lj.
Equation 3
v1
v2
v3
v4
---------= ---------- = ---------- = ---------- = ...
L1
L2
L3
L4
0 = ( il L1 ) + ( i2 L2 ) + ( i3 L3 ) + ( i4 L4 ) + ...
HSPICE can solve any I or V in terms of L ratios and treats DC as expected
while it treats inductors as short circuits. The simulation ignores mutual
coupling for DC.
Equation 4
You can couple inductors that use the INFINITY keyword with IDEAL K
elements. In this situation, all inductors involved must have the INFINITY
value, and for K=IDEAL, the ratio of all L values is unity. Then, for two L values:
v2= v1
i2 + i1=0
Example 1
This example is a standard 5-pin ideal balun transformer subcircuit. Two pins
are gnd for standard operation. With all K values being IDEAL, the absolute L
values are not crucialonly their ratios are important.
**
**
all K's ideal
**
**
o----in**
Lin=1
** 0 o------**
.subckt BALUN1 in
Lin
in
gnd
Lo1
out1 gnd
Lo2
gnd
out2
K12
Lin Lo1
K13
Lin Lo2
K23
Lo1 Lo2
.ends
192
-----o out1
Lo1=.25
-----o 0
Lo2=.25
-----o out2
out1 out2
L=1
L=0.25
L=0.25
IDEAL
IDEAL
IDEAL
Chapter 9: Elements
Passive Elements
Example 2
This example is a 2-pin ideal 4:1 step-up balun transformer subcircuit with
shared DC path (no DC isolation). Input and output have a common pin, and
both inductors have the same value. Note that Rload=4*Rin.
**
**
all K's ideal
**in o-------------------o out=in
**
L1=1
**
-----o 0
**
L2=1
**
-----o out2
**
** With all K's ideal, the actual L's values are
** not important -- only their ratio to each other.
.subckt BALUN2 in out2
L1
in
gnd
L=1
L2
gnd out2 L=1
K12
L1
L2
IDEAL
.ends
Example 3
This example is a 3-pin ideal balun transformer with shared DC path (no DC
isolation). All inductors have the same value (here set to unity).
**
**
all K's ideal -----o out1
**
Lo2=1
**
-----o 0
**
Lo1=1
**
-----o out2
**
in
Lin=1
**
o-------------------o in
**
.subckt BALUN3 in out1 out2
Lo2
gnd out1 L=1
Lo1
out2 gnd
L=1
Lin
in
out2 L=1
K12
Lin Lo1 IDEAL
K13
Lin Lo2 IDEAL
K23
Lo1 Lo2 IDEAL
.ends
For a description of the S-parameter (SP) model syntax, see the S-parameter
Modeling Using the S-element chapter in the HSPICE User Guide: Signal
Integrity Modeling and Analysis.
193
Chapter 9: Elements
Multi-Terminal Linear Elements
Description
Lxxx
The ideal transformer element obeys the standard ideal transformer equations:
194
Chapter 9: Elements
Multi-Terminal Linear Elements
the input signal through the transmission line, and the other conductor receives
the output signal from the transmission line. The signal is voltage between the
conductors that is transmitted from one end of the pair to the other end.
Examples of transmission lines include:
Telephone lines
Waveguides
On-chip interconnections
195
Chapter 9: Elements
Multi-Terminal Linear Elements
For scattering parameter element and model syntax, see S-element Syntax
and S Model Syntax in the HSPICE User Guide: Signal Integrity Modeling and
Analysis.
Example
The following netlist and data file (test.rfm) show how the S-element S1
uses the STAMP=YSTS configuration which invokes the state space
stamping to generate a frequency invariant modified nodal analysis (NMA)
matrix from frequency-dependent characteristics. This stamping method allows
the Shooting-Newton algorithm (.SN) to obtain the steady state. Note that
unless there is RFM file input, the S-element first applies the rational function
approximation (equivalent behavior to RATIONAL_FUNCTION=1) to the
original S-parameters to generate the state space stamping.
======= main netlist =======
*** .SN with s-element example
P1 n1 gnd port=1 dc=1v ac=1v pulse(1 0 1n 1n 1n 10n 20n)
P2 n2 gnd port=2 dc=1v ac=1v pulse(1 0 1n 1n 1n 10n 20n)
S1 n1 n2 0 mname=s_model
.model s_model S n=2
+ rfmfile='test.rfm'
+ STAMP=YSTS
.SN tone=0.05Ghz nharms=32
.option post accurate
.end
196
Chapter 9: Elements
Multi-Terminal Linear Elements
1.791888661818e+00
-5.313505935943e+01
2.840375731037e+06
-4.257158329976e+06
3.038955064913e+06
-8.058749095413e+06
3.846931398394e+06
1.702938150800e+05
-1.243885701867e+07
BEGIN_COMPLEX 5
5.53251427579e+05 1.28282249537e+06 -3.17377193705e-03 1.20935639131e-03
2.39642428296e+09 1.39710928734e+08 -1.99538130185e+07 6.93072640638e+07
2.41275272760e+09 4.88535891322e+09 2.92904966609e+04
4.08311621367e+04
9.49575839142e+08 -2.82753080087e+10 -1.69178467311e+05 1.42790736653e+04
3.74702282735e+10 2.26461714292e+1
6.18960971035e+06 2.73309486084e+05 END BEGIN 2 2 DC 2.10290261e02
BEGIN REAL 9
2.80562648113e+07
1.36806220992e+08
1.16867967247e+09
1.23552099406e+09
1.92568095149e+09
4.15005808751e+09
1.00149288271e+10
2.27536895845e+10
3.54118199282e+10
1.79188866181e+00
-5.31350593594e+01
2.84037573103e+06
-4.25715832997e+06
3.03895506491e+06
-8.05874909541e+06
3.84693139839e+06
1.70293815080e+05
-1.24388570186e+07
BEGIN_COMPLEX 5
5.53251427579e+05 1.28282249537e+06 -3.17377193705e-03 1.20935639131e-03
2.39642428296e+09 1.39710928734e+08 -1.99538130185e+07 6.93072640638e+07
2.41275272760e+09 4.88535891322e+09 2.92904966609e+04
4.08311621367e+04
9.49575839142e+08 -2.82753080087e+10 -1.69178467311e+05 1.42790736653e+04 3.74702282735e+10 2.26461714292e+10
197
Chapter 9: Elements
Multi-Terminal Linear Elements
6.18960971035e+06
END
2.73309486084e+05
Measured-parameter input
Skin effect
Tabular format
W-element Statement
The general syntax for a lossy (W-element) transmission line element is:
RLGC input form:
Wxxx in1 [in2 [...inx]] refin out1 [out2 [...outx]]
+ refout [RLGCfile=filename | RLGCMODEL=name] N=val L=val
U Model form:
Wxxx in1 [in2 [...inx]] refin out1 [out2 [...outx]]
+ refout Umodel=modelname N=val L=val
Field solver form:
Wxxx in1 [in2 [...inx]] refin out1 [out2 [...outx]]
+ refout FSmodel=modelname N=val L=val
198
Chapter 9: Elements
Multi-Terminal Linear Elements
Description
Wxxx
inx
refin
outx
Signal output node for the xth transmission line (each input port
must have a corresponding output port).
refout
RLGCfile=filename
RGLCMODEL=
modelname
199
Chapter 9: Elements
Multi-Terminal Linear Elements
Parameter
Description
FSmodel=
modelname
NODEMAP
Example 2
The Wcable element is a two-conductor lossy transmission line:
Wcable in1 in2 gnd out1 out2 gnd Umodel=umod_1 N=2
200
Chapter 9: Elements
Multi-Terminal Linear Elements
+ L=10
Where,
in1 and in2 input nodes connect to the out1 and out2 output node
Example 3
The Wnet1 element is a five-conductor lossy transmission line:
Wnet1 i1 i2 i3 i4 i5 gnd o1 gnd o3 gnd o5 gnd
+ FSmodel=board1 N=5 L=1m
Where,
The i1, i2, i3, i4 and i5 input nodes connect to the o1, o3, and o5 output
nodes.
The i5 input and three outputs (o1, o3, and o5) are all gnd.
Where,
in1 and in2 input nodes connect to the out1 and out2 output node.
You can specify parameters in the W-element card in any order. You can
specify the number of signal conductors, N, after the node list. You can also mix
nodes and parameters in the W-element card.
You can specify only one of the RLGCfile, FSmodel, Umodel, or Smodel
models, in a single W-element card.
Figure 22 on page 202 shows node numbers for the element syntax.
201
Chapter 9: Elements
Multi-Terminal Linear Elements
[i1]1
1.1 [i ]
12
1.2
[i1]N
1.N
1
[v1]1
[v1]2
Signal Conductors
.
.
.
.
.
.
Reference conductor
2.1
2.2
[i2]N
2.N
[v2]N
+
_
2
x
0
Figure 22
[i 2]2
[v2]2
.
.
.
[v1]N
+
_
[i2]1
[v2]1
202
Parameter
Description
Uxxx
inx
refin
outx
Signal output node for the xth transmission line (each input port must
have a corresponding output port).
Chapter 9: Elements
Multi-Terminal Linear Elements
Parameter
Description
refout
mname
LUMPS
Example 2
The Ucable transmission line connects the in1 and in2 input nodes to the out1
and out2 output nodes:
Ucable in1 in2 gnd out1 out2 gnd twistpr L=10
Example 3
The Unet1 element is a five-conductor lossy transmission line:
Unet1 i1 i2 i3 i4 i5 gnd o1 gnd o3 gnd o5 gnd Umodel1 L=1m
The i1, i2, i3, i4, and i5 input nodes connect to the o1, o3, and o5 output
nodes.
The i5 input, and the three outputs (o1, o3, and o5) are all gnd.
203
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
Y = Y rs ( I S ) ( I + S ) Y rs
Y r = Z r' Y rs Y rs = Y r' Z rs Z rs = Z r
S = ( I + Z rs YZ rs ) ( 1 ) ( I Z rs YZ rs )
S-element Syntax
S (scattering)
Y (admittance)
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
DC
AC
Transient
Small Signal
S-element Syntax
Use the following S-element syntax to show the connections within a circuit:
Sxxx nd1 nd2 ... ndN ndRef
+ [ENFORCE_PASSIVE=0|1]
+ [MNAME=Smodel_name] [FQMODEL=sp_model_name]
+ [TYPE=[s|y]] [Z0=[value | vector_value]]
+ [FBASE = base_frequency] [FMAX=maximum_frequency]
+ [PRECFAC=val] [DELAYHANDLE=[1|0|ON|OFF]]
+ [DELAYFREQ=val]
+ [INTERPOLATION=STEP|LINEAR|SPLINE|HYBRID]
+ [INTDATTYP=[RI|MA|DBA]] [HIGHPASS=[1|2|3|4]]
+ [LOWPASS=[0|1|2]3] [MIXEDMODE=[0|1]]
+ [DATATYPE=data_string]
+ [NOISE=[1|0]] [NoiPassiveChk=1|0] [DTEMP=val]
+ [PASSIVE=[0|1]]
+ [RATIONAL_FUNC=[0|1]] [RATIONAL_FUNC_REUSE=[0|1]]
+ [STAMP=[S|Y|YSTS|SSTS]] [M=int]
205
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
Parameter
Description
nd1 nd2...ndN
ndRef
Reference node
FQMODEL
TYPE
Parameter type:
Z0 (or Zo)
206
S: (scattering) (default)
Y: (admittance)
Characteristic impedance value for the reference line (frequencyindependent). For multiple terminals (N>1), HSPICE assumes that the
characteristic impedance matrix of the reference lines is diagonal, and
that you set diagonal values to Z0. Default=50 .
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
Parameter
Description
FBASE
Base frequency to use for transient analysis. This value becomes the
base frequency point for Inverse Fast Fourier Transformation (IFFT).
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.
FMAX
PRECFAC
In almost all cases, you do not need to specify a value for this parameter.
This parameter specifies the precondition factor keyword used for the
precondition process of the S-parameter. A precondition avoids an infinite
admittance matrix. The default is 0.75, which is good for most cases.
DELAYHANDLE
DELAYFREQ
INTERPOLATION
207
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
Parameter
Description
INTDATTYP
HIGHPASS
LOWPASS
0: cut off
1: use highest frequency point
2: perform linear extrapolation with the highest 2 points
3: apply the window function to gradually approach the cut-off level
(default)
4: Estimates average derivatives of the phase and magnitude from
highest 10% of sampling points. Extrapolation uses the highest
sampling point and these derivatives.
0: Cut off.
1: Make use of the S matrix at the magnitude of the lowest given
frequency point; Set the magnitude value of each entry as the element
of DC matrix. The real part of the extrapolated value at DC point
determines the sign of each value (default).
2: Perform linear extrapolation with the magnitude of the lowest two
points.
3: Perform rational function approximation based on low end frequency
extrapolation.
MIXEDMODE
DATATYPE
NOISE
208
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
Parameter
Description
NoiPassiveChk
DTEMP
PASSIVE
RATIONAL_FUNC
209
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
Parameter
Description
RATIONAL_FUNC_
REUSE
STAMP
The nodes of the S-element must come first. If you do not declare the MNAME,
you must specify the FQMODEL. You can specify all the optional parameters in
both the S-element and S model statements, except for the MNAME argument.
You can enter the optional arguments in any order, and the parameters
specified in the element statement have a higher priority.
210
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
.
.
.
.
.
.
.
.
.
[vinc]1
[vinc]N
[i]N
[vref]N
[vref]1
ndN
(+) [v]N
nd1
(+) [v]1
(-)
ndR
(reference node)
Figure 23
Node Example
The following example illustrates the nd1 nd2...ndNno reference, single
reference, and multi-reference parameters.
211
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
**S-parameter example
.opt post
.ac lin 500 1Hz 30MegHz
.tran 0.1ns 10ns
V1 n1 0 ac=1v PULSE 0v 5v 5n 0.5n 0.5n 25n
* no reference
S_no_ref n1 n2 mname=s_model
* single reference
S_one_ref n1 n3 gnd mname=s_model
*multi-reference
S_multi_ref n1 gnd n4 gnd mname=s_model
Rt1 n2 0 50
Rt2 n3 0 50
Rt3 n4 0 50
* 50 ohm resistor
.MODEL s_model S
+ N=2 FQMODEL=SFQMODEL TYPE=S Z0=50 50
.MODEL SFQMODEL SP N=2 SPACING=POI INTERPOLATION=LINEAR
+ MATRIX=NONSYMMETRIC
+ DATA=1
+ 1.0 0.333333333 0.0 0.666666667 0.0 0.666666667 0.0
0.333333333 0.0
.end
The S-element must have a call to one of the supported S-parameter file
formats (Touchstone, Citi or .SC#). HSPICE gets the number of ports from the
S-parameter file You can also explicitly specify N=n where n is the number of
ports.
212
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
The following is an excerpt from the .lis file for this netlist.
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
213
Chapter 9: Elements
Using the Scattering Parameter Element in HSPICE
214
Chapter 9: Elements
Port Element
Port Element
The port element (P-element) identifies the ports used in .LIN analysis and in
other all other analyses behaves as either a noiseless impedance or a voltage
source in series with the port impedance (DC, AC, or TRAN). Each port
element requires a unique port number. Each port has an associated system
impedance, Z0. If you do not explicitly specify the system impedance, the
default is 50 ohms.
You can use the RDC, RAC, RHB, RHBAC, and RTRAN values to override the
port impedance value for a particular analysis.
The port element accepts transient waveforms AM, EXP, PULSE, PWL, SFFM,
SIN, LFSR and, for signal integrity usage, the PAT source.
The mixed-mode port element has an additional reference pin that allows
further flexibility in creating, detecting, and separating common-mode and
differential-mode signals. It is useful for measuring mixed-mode S-parameters
(see Using the P-element for Mixed-Mode Measurement).
Syntax
Pxxx p n port=portnumber
+ [Z0=val]
$Port Impedance
+ [DC mag] [AC mag phase] [HBAC mag phase] $Voltage/Power Info
+ [HB mag phase harm tone modharm modtone]
+ [transient_waveform] [ENCODE=DW8B10B] [RD_INIT=0|1]
+ [TRANFORHB=[0|1]] [DCOPEN=[0|1]]
+ [power=[0|1|2|W|dbm]]
$Power Switch
+ [RDC=val] [RAC=val]
$ Source Impedance Overrides
+ [RHBAC=val] [RHB=val] [RTRAN=val]
+ [Emphasis_Level=val] [Emphasis_Time=val]
$ Emphasis
+ [DCD=val] [DCD_TYPE=0|1|2|3]
$ Duty Cycle Distortion
+ [PJ=val] [PJ_TYPE=0|1|2|3]
$ Period Jitter
+ [RJ=val1, [val2, ... valN]] [VN=val] $ Rand Jitter Stateye
+ [AMI_OBJ=filename] [AMI_PARAM=filename] [AMI_CDR=0|1]$AMI
Parameter
Description
port=portnumber
215
Chapter 9: Elements
Port Element
Parameter
Description
z0=val
(or Zo=val)
DC mag
AC mag phase
phase is in degrees
harm and tone are indices corresponding to the tones specified in
the .HB statement. Indexing starts at 1 (corresponding to the first
harmonic of a tone).
modtone and modharm specify sources for multi-tone simulation. A
source specifies a tone and a harmonic, and up to 1 offset tone and
harmonic (modtone for tones and modharm for harmonics). Then it
describes the signal as:
V(or I)=mag*cos(2*pi*
(harm*tone+modharm*modtone)*t + phase)
transient_waveform
ENCODE=DW8b10b
RD_INIT=0|1
216
Chapter 9: Elements
Port Element
Parameter
Description
TRANFORHB=[0|1]
DCOPEN
RDC=val
RAC=val
RHBAC=val
RHB=val
RTRAN=val
217
Chapter 9: Elements
Port Element
Parameter
Description
power=[0 | 1 | 2 | W |
dbm]
Emphasis_Level
Emphasis_Time
DCD
DCD_TYPE
Aids in .STATEYE analysis; specifies variation type. Default type for nonzero DCD is 1 (constant).
0: no DCD
1: constant DCD
2: uncorrelated triangular DCD variation
3: uncorrelated sinusoidal DCD variation
PJ
PJ_TYPE
Aids in .STATEYE analysis; specifies variation type. Default type for nonzero DCD is 1 (constant).
RJ
218
0: no periodic jitter
1: constant voltage shift
2: uncorrelated triangular jitter variation
3: uncorrelated sinusoidal jitter variation
Chapter 9: Elements
Port Element
Parameter
Description
VN
AMI_OBJ
AMI_PARAM
AMI_CDR
Example
For example, the following port element specifications identify a 2-port network
with 50-ohm reference impedances between the in and out nodes.
P1 in gnd port=1 z0=50
P2 out gnd port=2 z0=50
219
Chapter 9: Elements
Active Elements
P1 (Port element)
n1+
Z0
V+
Z0
Vn1-
n1_ref
Active Elements
Diode Element
MOSFETs
Diode Element
Geometric (LEVEL=1) or Non-Geometric (LEVEL=3) form:
Dxxx nplus nminus mname [AREA=area] [PJ=val]
+ [WP=val] [LP=val] [WM=val] [LM=val] [OFF]
+ [IC=vd] [M=val] [DTEMP=val]
Dxxx nplus nminus mname [W=width] [L=length] [WP=val]
+ [LP=val] [WM=val] [LM=val] [OFF] [IC=vd] [M=val]
+ [DTEMP=val]
Fowler-Nordheim (LEVEL=2) form:
220
Chapter 9: Elements
Active Elements
Description
Dxxx
nplus
Positive terminal (anode) node name. The series resistor for the
equivalent circuit attaches to this terminal.
nminus
mname
AREA
Area of the diode (unitless for LEVEL=1 diode, and square meters for
LEVEL=3 diode). This affects saturation currents, capacitances, and
resistances (diode model parameters are IK, IKR, JS, CJO, and RS).
The SCALE option does not affect the area factor for the LEVEL=1
diode. Default=1.0. Overrides AREA from the diode model. If you do not
specify the AREA, HSPICE calculates it from the width and length.
PJ
WP
LP
WM
LM
OFF
221
Chapter 9: Elements
Active Elements
Parameter
Description
IC=vd
Initial voltage, across the diode element. Use this value when you
specify the UIC option in the .TRAN statement. The .IC statement
overrides this value.
DTEMP
You must specify two nodes and a model name. If you specify other
parameters, the nodes and model name must be first and the other parameters
can appear in any order.
For a listing of output templates for diode (D-element) models, see Table 43 on
page 443.
Example 1
The D1 diode, with anode and cathode, connects to nodes 1 and 2. Diode1
specifies the diode model.
D1 1 2 diode1
Example 2
The Dprot diode, with anode and cathode, connects to both the output node
and ground, references the firstd diode model, and specifies an area of 10
(unitless for LEVEL=1 model). The initial condition has the diode OFF.
Dprot output gnd firstd 10 OFF
Example 3
The Ddrive diode, with anode and cathode, connects to the driver and output
nodes. The width and length are 500 microns. This diode references the
model_d diode model.
Ddrive driver output model_d W=5e-4 L=5e-4 IC=0.2
222
Chapter 9: Elements
Active Elements
Description
Qxxx
nc
nb
ne
ns
Name of substrate terminal node, which is optional. You can also use
the BULK parameter to set this name in the BJT model.
mname
area,
AREA=area
OFF
IC=vbeval,
Initial internal base-emitter voltage (vbeval) and collector-emitter
vceval, VBE, voltage (vceval). HSPICE uses this value when the .TRAN statement
VCE
includes UIC. The .IC statement overrides it.
M
DTEMP
223
Chapter 9: Elements
Active Elements
Parameter
Description
AREAB
AREAC
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.
For a listing of output templates for BJT (Q element) models, see Table 44 on
page 444.
Example 1
In the Q1 BJT element:
Q1 1 2 3 model_1
Example 2
In the following, Qopamp1 BJT element:
Qopamp1 c1 b3 e2 s Mod1stagepnp AREA=1.5 AREAB=2.5
AREAC=3.0
224
Chapter 9: Elements
Active Elements
Example 3
In the Qdrive BJT element:
Qdrive driver in output model_npn 0.1
Description
Jxxx
nd
ng
ns
nb
mname
area,
AREA=area
Area multiplying factor that affects the BETA, RD, RS, IS, CGS, and
CGD model parameters. Default=1.0, in units of square meters.
225
Chapter 9: Elements
Active Elements
Parameter
Description
OFF
IC=vdsval,
vgsval, VDS,
VGS
DTEMP
The syntax only requires drain, gate, and source nodes, and model name
fields. Node and model names must precede other fields.
For a listing of output templates for JFET (J-element) models, see Table 45 on
page 446.
Example 1
In the J1 JFET element:
J1 1 2 3 model_1
Example 2
In the following Jopamp1 JFET element:
Jopamp1 d1 g3 s2 b Mod1stage AREA=100u
226
Chapter 9: Elements
Active Elements
Example 3
In the Jdrive JFET element:
Jdrive driver in output model_jfet W=10u L=10u
MOSFETs
Mxxx nd ng ns [nb] mname [[L=]length] [[W=]width]
+ [AD=val] AS=val] [PD=val] [PS=val]
+ [NRD=val] [NRS=val] [RDC=val] [RSC=val] [OFF]
+ [IC=vds,vgs,vbs] [M=val] [DTEMP=val]
+ [GEO=val] [DELVTO=val]
.OPTION WL
Mxxx nd ng ns [nb] mname [width] [length] [other_options...]
Parameter
Description
Mxxx
nd
ng
ns
nb
mname
MOSFET model name reference or subckt name if you set .OPTION MACMOD.
227
Chapter 9: Elements
Active Elements
Parameter
Description
AD
Drain diffusion area. Overrides .OPTION DEFAD. Default=DEFAD, if you set the
ACM=0 model parameter.
AS
Source diffusion area. Overrides .OPTION DEFAS. Default=DEFAS, if you set the
ACM=0 model parameter.
PD
PS
NRD
NRS
RDC
Additional drain resistance due to contact resistance, in units of ohms. This value
overrides the RDC setting in the MOSFET model specification. Default=0.0.
RSC
Additional source resistance due to contact resistance, in units of ohms. This value
overrides the RSC setting in the MOSFET model specification. Default=0.0.
228
Chapter 9: Elements
Active Elements
Parameter
Description
OFF
Sets initial condition for this element to OFF, in DC analysis. Default=ON. This
command does not work for depletion devices.
IC=vds, vgs, Initial voltage across external drain and source (vds), gate and source (vgs), and
vbs
bulk and source terminals (vbs). Use these arguments with .TRAN UIC. .IC
statements override these values.
M
DTEMP
The difference between the element temperature and the circuit temperature, in
degrees Celsius. Default=0.0.
GEO
DELVTO
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.
For a full listing of output templates for MOSFET models, see MOSFET Output
Templates in the HSPICE Reference Manual: MOSFET Models.
Example
In the following M1 MOSFET element:
M1 1 2 3 model_1
229
Chapter 9: Elements
Active Elements
230
Chapter 9: Elements
Active Elements
2. This feature does not support a element if a string parameter defines the
mname.
3. The number of terminals for a HSPICE element must be within the range of
3-7; any number of terminals that is out of this range causes the simulation
to fail.
When macmod=2, HSPICE seeks a MOSFET/BJT/Diode model definition when
it cannot find matching subckt or Verilog-A definition for an X-element. The
targeted MODEL card could be either a HSPICE built-in model or CMI model. If
the model card that matched with the X-element reference name is not a type
of MOSFET/BJT/Diode model, the simulator errors out with message of
reference "not found."
The following limitations apply when macmod=2:
1. The feature of string parameter supported in model name does not apply
to X-elements that are mapped to the model cards; i.e., reference name of
the X-element must be constant string characters.
2. Subckt direct port probing command, isub() does not support X-elements
mapped to the model cards.
3. HSPICE MOSRA analysis does not work on the X-elements, even when
they directly map to compact model cards.
When macmod=3, HSPICE enables both of the above features; HSPICE seeks
a .subckt definition for an M/Q/D-element if there is no matching model
reference; HSPICE seeks a .model definition for an X-element if there is no
matching .subckt or Verilog-A definition. Usage considerations and
limitations remain the same for both features, respectively. When .OPTION
TMIFLAG 1, .OPTION MACMOD automatically equals 3.
The case of no .OPTION MACMOD in the input files or MACMOD=0 disables the
above two features; HSPICE ignores the MACMOD option if you set any value
other than 1|2|3|0.
The MACMOD option is a global option; if there are multiple MACMOD options in
one simulation, HSPICE uses the value of the last MACMOD option.
231
Chapter 9: Elements
Active Elements
Example 1
**
.option MACMOD=1
M1 net1 net2 net3 net4 nch l=0.2u w=0.2u p1=1
.model nch nmos level=49 .
.subckt nch d g s b w=1 l=1 p1=gp1
.if (p1 > 0)
Mnch d g s b model_1 w=w l=l
.else
Mnch d g s b model_2 w=w l=l
.endif
.ends
232
Chapter 9: Elements
Active Elements
Example 3
**
.option MACMOD
.param gp1=1 gp2=2 gp3=3
M1 net1 net2 net3 net4 nch l=0.2u w=0.2u p1=gp1 p2=gp2 p3=gp3
.subckt nch d g s b w=1 l=1 p1=gp1 p2=gp2 p3=gp3
.if (p1 > 0 && p2==1 && p3 ==1)
Mnch d g s b model_1 w=w l=l
.else if ( p1 == 0 && p2 ==1 && p3 ==1)
Mnch d g s b model_2 w=w l=l
.else
Mnch d g s b model_3 w=w l=l
.endif
C1 g 0 1p
.ends
Element template output does not support MOSFET elements which use
subckt definitions.
233
Chapter 9: Elements
Active Elements
The desired subckt name must match the mname field in the M*** instance
statement. The match of subckt name and the mname field is case
insensitive.
The .MODEL definition takes precedence over a subckt definition even when
.OPTION MACMOD is on.
234
Chapter 9: Elements
IBIS Buffers (HSPICE Only)
2. The Subckt direct port probing command, Isub() does not support Xelements mapped to MOSFET model cards.
Description
bxxx
List of I/O buffer external nodes. The number of nodes and their meaning
are specific to different buffer types.
file=filename
Example 1
The Input buffer name is B1. The four terminals names are nd_pc, nd_gc,
nd_in and nd_out_of_in. The IBIS model named IBIS_IN is in the file
named test.ibs. The values specified in IBIS_IN guide HSPICE to connect
nd_pc and nd_gc to the voltage sources. Do not manually connect voltage
sources to these nodes.
B1 nd_pc nd_gc nd_in nd_out_of_in
+ file='test.ibs'
+ model='IBIS_IN'
Example 2
The output buffer name is B2. The six terminals names are nd_pu, nd_pd,
nd_out, nd_in, and nd_pc, nd_gc. Here, nd_pc, nd_gc are optional
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
235
Chapter 9: Elements
IBIS Buffers (HSPICE Only)
terminals. If you do not set these names, the netlist uses the optional terminal
names instead. The IBIS model named IBIS_OUT in the file named
test.ibs. The values specified in IBIS_OUT guide HSPICE to connect
nd_pc and nd_gc to the voltage sources. Do not manually connect voltage
sources to these nodes.
B2 nd_pu nd_pd nd_out nd_in [nd_pc nd_gc]
+ file = 'test.ibs'
+ model = 'IBIS_OUT'
Example 3
The IO buffer name is B3. The eight terminals names are nd_pu, nd_pd,
nd_out, nd_in, nd_en, nd_out_of_in, and nd_pc, nd_gc. Here, nd_pc,
nd_gc are optional terminals. If you do not set these names, the netlist uses
the optional terminal names instead. The IBIS model named IBIS_IO is in the
IBIS file named test.ibs. The values specified in IBIS_IO guide HSPICE to
connect nd_pc and nd_gc to the voltage sources. Do not manually connect
voltage sources to these nodes.
B3 nd_pu nd_pd nd_out nd_in nd_en nd_out_of_in [nd_pc nd_gc]
+ file = 'test.ibs'
+ model = 'IBIS_IO'
For more examples, see the Modeling Input/Output Buffers Using IBIS Files
chapter in the HSPICE User Guide: Signal Integrity Modeling and Analysis.
236
10
Sources and Stimuli
10
This chapter also explains each type of element and model statement and
provides explicit formulas and examples to show how various combinations of
parameters affect the simulation.
HSPICE ships over a dozen sources examples for your use; see Listing of
Demonstration Input Files for paths to demo files and Sources Examples.
The following section discuss these topics:
Power Sources
237
DC Sources
AC Sources
Transient Sources
Mixed Sources
238
Parameter
Description
Vxxx
Ixxx
n+
Positive node.
n-
Negative node.
DC=dcval
DC source keyword and value in volts. Used for the operating point
calculation for all simulations except transient. Transient analysis
calculates an additional operating point with the tranfun value at time
zero. Default=0.0.
tranfun
Transient source function (one or more of: AM, DC, EXP, PAT, PE, PL,
PU, PULSE, PWL, SFFM, SIN). The functions specify the
characteristics of a time-varying source. See the individual functions
for syntax.
AC
acmag
acphase
239
Example 2
VB 2 0 DC=VCC
where:
The VCC parameter specifies the DC bias for the VB voltage source.
Example 3
VH 3 6 DC=2 AC=1,90
where:
The VH voltage source has a 2-volt DC bias, and a 1-volt RMS AC bias, with
90 degree phase offset.
Example 4
IG 8 7 PL(1MA 0S 5MA 25MS)
where:
240
Example 5
VCC in out DC=0 PWL 0 0 10NS VCC 15NS VCC 20NS 0
where:
The DC=0 keyword specifies the initial DC bias value for the VCC voltage
source.
HSPICE will determine the operating point using the specified DC bias
value. If no initial DC bias value is specified, HSPICE determines the
operating point using the inital transient source value and outputs the
following informational message: DC voltage reset to initial
transient source value.
Example 6
Vin1 in 0 DC=0 PULSE(-1 1 10n 1n 1n 20n 40n)
where:
The DC=0 specifies the DC bias for the Vin1 voltage source.
241
HSPICE will determine the operating point using the specified DC bias
value. If no initial DC bias value is specified, HSPICE determines the
operating point using the initial transient source value and output the
following informational message: DC voltage reset to initial
transient source value.
Example 7
VIN 13 2 0.001 AC 1 SIN (0 1 1MEG)
where:
The VIN voltage source has a 0.001-volt DC bias, and a 1-volt RMS AC
bias.
Example 8
ISRC 23 21 AC 0.333 45.0 SFFM (0 1 10K 5 1K)
where:
The ISRC current source has a 1/3-amp RMS AC response, with a 45degree phase offset.
Example 9
VMEAS 12 9
where:
242
DC Sources
For a DC source, you can specify the DC current or voltage in different ways:
V1
V1
I1
I1
1
1
1
1
0
0
0
0
DC=5V
5V
DC=5mA
5mA
AC Sources
AC analysis uses AC current and voltage sources as impulse functions. 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
Transient Sources
For transient analysis, you can specify the source as a function of time. The
following functions are available:
243
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. In a DC
analysis, if the mixed source DC value is missing, the simulation replaces it with
the zero-time value of its transient source by default. Otherwise, for DC
analysis, HSPICE uses the DC source value for operating point calculation for
all analyses except TRAN; TRAN analysis calculates an additional operating
point with the zero-time source transient value.
Example
VIN 13 2 0.5 AC 1 SIN (0 1 1MEG)
Where,
DC source of 0.5 V
AC source of 1 V
244
Single-Frequency FM Source
Single-Frequency AM Source
Pattern Source
245
current moves linearly along a recovery ramp back to its initial value. The entire
pulse repeats, with a period named per, from onset to onset.
Vxxx n+ n- PU[LSE] [(]v1 v2 [td [tr [tf [pw [per]]]]] [)]
+ [PERJITTER=val [SEED=val]]
Ixxx n+ n- PU[LSE] [(]v1 v2 [td [tr [tf [pw [per]]]]] [)]
+ [PERJITTER=val [SEED=val]]
Parameter Description
Vxxx, Ixxx Independent voltage/ current source, which exhibits the pulse response.
PULSE
v1
Initial value of voltage or current before the pulse onset (units: volts/amps).
v2
td
Delay (propagation) time in seconds from the beginning of the transient interval to the
first onset ramp. Default=0.0
tr
Duration of the onset ramp (in seconds) from the initial value to the pulse plateau
value (reverse transit time). default=TSTEP
tf
Duration of the recovery ramp (in seconds) from the pulse plateau back to the initial
value (forward transit time). default=TSTEP
pw
Pulse width (the width of the plateau portion of the pulse), in seconds.Default=TSTOP.
per
perjitter
RMS value for period jitter, adjusts the magnitude of the random time.
seed
Used to generate random number sequences with different seed value. The value is
a negative integer, defaults to -1.
Table 19
246
Time
Value
v1
td
v1
Table 19
Time
Value
td + tr
v2
td + tr + pw
v2
td + tr + pw + tf
v1
tstop
v1
Equation 8
Tj
Tj
1
pw j = pw ----- + --- ( t r + tf ) ----- 1
T 0 2
T0
247
Also, this sets the minimum period for a PULSE source with jitter to be tr + tf ,
resulting in the extreme case of a sawtooth waveform.
A Gaussian random number generator computes the random T ( t ) variations
after each leading edge of the clock sources. For flexibility, the SEED parameter
(integer) generates different random number sequences when you specify
different SEED integers for initialization.
Example 1
The following example shows the pulse source, connected between node 3 and
node 0. In the pulse:
VIN 3 0 PULSE (-1 1 2NS 2NS 2NS 50NS 100NS) perjitter=10ns seed=-1
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:
248
The delay time, rise time, and fall time are each 5 nanoseconds.
Example 25 on page 249 shows the result of simulating this netlist, in HSPICE.
Figure 25
249
Beginning phase
Parameter
Description
Vxxx, Ixxx
SIN
vo
va
freq
td
perjitter
RMS value for period jitter, used to adjust the magnitude of the random time.
seed
Used to generate random number sequences with different seed value. The value
is a negative integer, defaults to -1.
250
Time
Value
0 to td
2
vo + va SIN -------------------------
360
td to tstop
vo + va Exp [ ( T ime td ) q ]
SIN 2
j
freq ( time td + x ( t ) ) + ---------
360
Where q and j are the damping factor and phase delay in the syntax.
Peak value is 1 V.
Offset is 0 V.
251
Figure 26
252
Parameter
Value
initial voltage
0 volts
pulse voltage
1 volt
delay time
2 nanoseconds
Table 21
Parameter
Value
frequency
100 MHz
damping factor
50 MHz
Description
Vxxx, Ixxx
EXP
v1
v2
td1
td2
t1
t2
253
Time
Value
0 to td1
v1
td1 to td2
td2 to tstop
v1 + ( v2 v1 )
Time td1
1 exp ---------------------------
v1 + ( v2 v1 )
( Time td1 )
1 exp -------------------------------- +
( v1 v2 )
( Time td2 )
1 exp --------------------------------
Example
VIN 3 0 EXP (-4 -1 2NS 30NS 60NS 40NS)
The above example describes an exponential transient source, which connects
between nodes 3 and 0. In this source:
254
Final voltage is -1 V.
Figure 27
This example shows an entire netlist, which contains an EXP voltage source. In
this source:
Final voltage is -1 V.
255
or
exp (1 2 10n 30n 60n 20n R=val)
This SIN function repeats from the beginning of the SIN waveform to R=1.2n.
Note:
For controlled sources (E, F, G and H), the '(1)' or '(2)' after the
PWL syntax means that the transfer function described by the
piecewise-linear function is a 1-dimensional or 2-dimensional
PWL function.
256
Description
Vxxx, Ixxx
PWL
v1 v2 vn
t1 t2 tn
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.
If you do not specify a time-zero point, HSPICE uses the DC value of the
source, as the time-zero source value.
257
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 .OPTION SLOPETOL, which reduces
the slope change tolerance.
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.
Specify TD=val to cause a delay at the beginning of the function. You can use
TD with or without the repeat function.
Example
This example uses demonstration netlist pwl.sp, which is available in
directory $installdir/demo/hspice/sources:
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
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
This example shows an entire netlist, which contains two piecewise linear
voltage sources. The two sources have the same function:
First is in normal format. The repeat starts at the beginning of the function.
258
Figure 28
Description
TIME
PV
Use 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
259
260
Example
Vit n1 n2 PWL PWLFILE='Imod.dat'
.parameter pwl_data_file=str('pwl.dat')
V1 in out PWL PWLFILE=str(pwl_data_file)
Description
Vxxx
PWLZ
R=repeat
TD = delay
Example
In this example, node 5 connects to a 0V source at time 0, and rises from 0V to
0.75V in 2 ns. Between 2 ns and 10 ns, the voltage-source value rises from
0.75V to 1.5V. The voltage-source value stays at 1.5V between 10 ns and 50
261
ns. At 50 ns, node 5 disconnects from the voltage source until 60 ns. It reconnects to a 0.75V voltage source after 60 ns.
VXD 5 0 pwlz (0 0 2N 0.75 10N 1.5 50N z 60N 0.75)
Single-Frequency FM Source
HSPICE provides a single-frequency FM source function, in an independent
voltage or current source.
Vxxx n+ n- SFFM [(] vo va [fc [mdi [fs]] [)]
Ixxx n+ n- SFFM [(] vo va [fc [mdi [fs]] [)]
Parameter
Description
Vxxx, Ixxx
SFFM
vo
va
fc
mdi
fs
262
Figure 29
263
Single-Frequency AM Source
HSPICE provides a single-frequency AM source function in an independent
voltage or current source.
Vxxx n+ n- AM [(] sa oc fm fc [td] [)]
Ixxx n+ n- AM [(] sa oc fm fc [td] [)]
Parameter
Description
Vxxx, Ixxx
AM
sa
fc
fm
oc
td
Delay time (propagation delay) before the start of the signal, in seconds.
Default=0.0.
264
This example shows an entire netlist, which contains three amplitudemodulated voltage sources.
Amplitude is 10.
Offset constant is 1.
Delay is 1 millisecond.
In the second source, only the amplitude and offset constant differ from the
first source:
Amplitude is 2.5.
Offset constant is 4.
Delay is 1 millisecond.
Amplitude is 10.
Offset constant is 1.
265
Delay is 1 millisecond.
Figure 30
Pattern Source
HSPICE provides a pattern source function, in an independent voltage or
current source. The pattern source function uses four states, '1','0','m', and 'z',
which represent the high, low, middle voltage, or current and high impedance
state respectively. The series of these four states is a b-string. (HSPICE
supports eight-bit data byte conversion to a 10-bit transmission character8B/
10B encoding for the PAT keyword.)
Vxxx n+ n- PAT [(] vhi vlo td
+ [R=repeat] [ENCODE=DW8b10b]
Ixxx n+ n- PAT [(] vhi vlo td
+ [R=repeat] [ENCODE=DW8b10b]
Parameter
Description
Vxxx, Ixxx
266
Parameter
Description
PAT
vhi
High voltage or current value for pattern sources (units of volts or amps).
vlo
Low voltage or current value for pattern sources (units of volts or amps).
td
tr
Duration of the onset ramp (in seconds) from the low value to the high
value (reverse transit time).
tf
Duration of the recovery ramp (in seconds) from the high value back to
the low value (forward transit time).
tsample
Time spent at '0' or '1' or 'M' or 'Z' pattern value (in seconds).
data
RB
Keyword to specify the starting bit when repeating. The repeat data starts
from the bit indicated by RB. RB must be an integer. HSPICE reports an
error If the value is larger than the length of the b-string. If the value is less
than 1, HSPICE resets it to 1 automatically.
R=repeat
267
Parameter
Description
RD_INIT=0|1
Initial value of Running Disparity. The one bit memory that recalls the bias
of the last unbalanced code word is the Running Disparity.1: Specifies
that a Running Disparity value of zero is synonymous with negative
Running Disparity (?).
Example
The following example shows a pattern source with two b-strings:
*FILE: pattern source gereral form
v1 1 0 pat (5 0 0n 1n 1n 5n b1011 r=1 rb=2 b0m1z)
r1 1 0 1
In this pattern:
High voltage is 5 v
Low voltage is 0 v
Time delay is 0 n
Rise time is 1 n
Fall time is 1 n
Sample time is 5 n
The first b-string is 1011, which repeats once and then repeats from the
second bit, which is 0. The second b-string is 0m1z. Since the example
specifies neither R and RB here, HSPICE sets them to the default values, R=0,
RB=1.
268
Example
The following b-string and its repeat time R and repeating start bit RB cannot
use a parameter HSPICE considers it as a undivided unit which only the
.PAT command can define.
*FILE:pattern source using parameter
.param td=40ps tr=20ps tf=80ps tsample=400ps
VIN 1 0 PAT (2 0 td tr tf tsample b1010110 r=2)
r1 1 0 1
In this pattern:
High voltage is 2 V.
Low voltage is 0 V.
Data is 1010110.
269
Description
component Component is the element that makes up NS, which can be a b-string or a patname
defined in other PAT commands. You must use Brackets ( [ ] ).
RB=val
Keyword to specify the starting component when repeating. The repeat data starts
from the component indicated by RB. RB must be an integer. HSPICE reports an
error if RB is larger than the length of the NS. If RB is less than 1, HSPICE resents
it automatically to 1.
R=repeat
If the component is a b-string, you can follow it with R=repeat and RB=val to
specify the repeat time and repeating start bit.
Example
*FILE: Pattern source using nested structure
v1 1 0 pat (5 0 0n 1n 1n 5n [b1011 r=1 rb=2 b0m1z] r=2 rb=2)
r1 1 0 1
When expanding the nested structure, you generate the pattern source as:
'b1011 r=1 rb=2 b0m1z b0m1z b0m1z'
The whole NS repeats twice, and each time it repeats from the second b0m1z
component.
270
Next, define another pattern source that combines the previous ones
.pat p4=p1 p2 p3
271
Parameter
Description
LFSR
vlow
vhigh
tdelay
trise
Specifies the duration of the onset ramp (in seconds) from the initial value
to the pulse plateau value (reverse transit time).
tfall
Specifies the duration of the recovery ramp (in seconds) from the pulse
plateau back to the initial value (forward transit time).
rate
seed
The initial value (in integer form) of the LFSR loaded into the shift register.
Because the operation of the register is deterministic, its current (or
previous) state completely determines the stream of values produced by
the register.
taps
rout
272
Parameter
Description
Initial value of Running Disparity. The one bit memory that recalls the bias
of the last unbalanced code word is the Running Disparity.1: Specifies that
a Running Disparity value of zero is synonymous with negative Running
Disparity (?).
Example 1
The following example shows the pattern source that connects node in and
node gnd.
Example of LFSR, output is 1100011111001101:
vin out gnd LFSR (0 1 0 1n 1n 10meg 3 [2, 5] rout=10)
.option POST
.tran 10p 10u
.end
Where,
The taps are at the output of the 2nd and 5th shift registers and are xor'd
together as the input to the first shift register.
Example 2
The following example shows the pattern source connected between node 1
and node 0:
.PARAM td1=2.5m tr1=2n
vin 1 0 LFSR (2 4 td1 tr1 1n 6meg 2 [10, 5, 3, 2])
Where,
273
The seed is 2.
Example 3
This example uses demonstration netlist prbs.sp, which is available in
directory $installdir/demo/hspice/sources:
* prbs.sp
.OPTION POST
.TRAN 0.5n 50u
V1 1 0 LFSR (0 1 1u 1n 1n 10meg 1 [5, 2] rout=10)
R1 1 0 1
.END
Example 4
To generate a PRBS source that includes jitter, use the following steps:
1. Construct your usual linear feedback shift register (LFSR) generator.
2. Construct a matching (T,tr,tf) PULSE source as a clock, but add jitter to it
with the PERJITTER keyword.
3. Use the PULSE source to gate (buffer) the LFSR output (through an ideal
AND gate, VCCS, or similar function).
The following sections discuss these topics:
274
g(0)
g(1)
g(2)
g(m-1)
g(m)
D(n)
input
D(n-1)
Figure 31
D(n-2)
D(2)
D(1)
output
LFSR Diagram
275
Example
The following line shows that the number of registers is 7 and the total number
of feedback taps is 4:
[7, 3, 2, 1]
MOS transistors
Bipolar transistors
Tunnel diodes
SCRs
operational amplifiers
summers
comparators
voltage-controlled oscillators
modulators
277
An ideal op-amp.
An ideal transformer.
A voltage-controlled resistor.
The next section describes polynomial and piecewise linear functions. Later
sections describe element statements for linear or nonlinear functions. For full
PWL examples, see PWL/DATA/VEC Converter on page 461.
278
Polynomial Functions
Polynomial Functions
You can use the controlled element statement to define the controlled output
variable (current, resistance, or voltage), as a polynomial function of one or
more voltages or branch currents. You can select several polynomial equations,
by using the POLY(NDIM) parameter in the E, F, G, or H-element statement.
Syntax can be either POLY=INTEGER_NUMBER or POLY(INTEGER_NUMBER)
For example, either of the following are legitimate statements for an E-element
instance with the POLY function:
E1 e1 0 POLY=2 e11 0 e12 0
1 2 3
or
E1 e1 0 POLY(2) e11 0 e12 0
1 2 3
Description
POLY(1)
POLY(2)
POLY(3)
POLY(n)
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:
279
Equation 11
FV = P0 + ( P1 FA ) + ( P2 FA 2 ) + ( P3 FA 3 ) + ( P4 FA 4 ) + ( P5 FA 5 ) +
Parameter
Description
FV
P0. . .PN
FA
Note:
Equation 13
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:
Equation 14
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 ) + ...
280
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:
Equation 16
E1 1 0 POLY(2) 3 2 7 6 0 3 0 0 0 4
This example specifies a controlled voltage source, which connects between
nodes 1 and 0. Two differential voltages control this voltage source:
P0=0
P1=3
P2=0
P3=0
P4=0
P5=4
Three-Dimensional Function
For a three-dimensional polynomial function, with FA, FB, and FC as its
arguments, the following expression determines the FV function value:
281
Equation 17
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 ) +
For example, generate a voltage-controlled source that specifies the voltage
as:
Equation 18
or
E1 = 3 V (3,2) + 4 V (7,6) 2 + 5 V (9,8) 3
The resulting three-dimensional polynomial equation is:
Equation 19
FA = V (3,2)
FB = V (7,6)
FC = V (9,8)
P1 = 3
P7 = 4
P19 = 5
Substitute these values into the voltage controlled voltage source statement:
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
The preceding example specifies a controlled voltage source, which connects
between nodes 1 and 0. Three differential voltages control this voltage source:
That is:
282
FA=V(3,2)
FB=V(7,6)
FC=V(9,8)
P1=3
P7=4
P19=5
N-Dimensional Function
Express an N-dimensional polynomial function as:
k
Equation 20
FV = p 0 +
j1
Tunnel diodes
Silicon-controlled rectifiers
283
DELTA limits to half of the smallest breakpoint distance. If the breakpoints have
sufficient separation, specify the DELTA to a proper value.
You must specify at least two point pairs (each point consists of an x and a
y coefficient).
In AND and NAND gates, the input with the smallest value determines the
corresponding output of the gates.
In OR and NOR gates, the input with the largest value determines the
corresponding output of the gates.
Power Sources
These sections describe independent power sources and controlled power
sources.
The following sections discuss these topics:
Independent Sources
Controlled Sources
Independent Sources
A power source is a special kind of voltage or current source that supplies the
network with a pre-defined power which varies by time or frequency. The
source produces a specific input impedance.
To apply a power source to a network, you can use either:
284
A Norton-equivalent circuit (if you specify this circuit and a current source)
the I (current source) element, or
DC
Calculation for Total Dissipated Power and for Voltage Source Power
Description
DC=dcval
DC source keyword and value in volts. Used for the operating point
calculation for all simulations except transient. Transient analysis
calculates an additional operating point with the tranfun value at time
zero. Default=0.0.
tranfun
285
Parameter
Description
AC
acmag
acphase
Example 1
This example applies a 5 W power source to node 10 and node 20, in a
Thevenin-equivalent manner. The impedance of this power source is 50 ohms.
V11 10 20 power=1 dc=5
Example 2
This example applies a 20 dbm power source to node 1 and to ground, in a
Norton-equivalent manner. The source impedance is 50 ohms.
Iname 1 0 power=2 dc=20
Example 3
This example applies a 1 dbm (available) AC power source to node 1 and
ground, in a Thevenin-equivalent manner. The impedance of this power source
is 50 ohms.
V11 1 0 power=dbm ac=1
286
Example 4
This example applies a 1w (available) sinusoidal power source to node 1 and 0,
in a Norton-equivalent manner. The source impedance is 50 ohms
Iname 1 0 power=w sin(0 1 1k)
The POWER keyword calculates the total dissipated power of the circuit.
The SRC_PWR keyword calculates the total power from the voltage source of
the circuit.
...you can use .MEAS TRAN POWER to calculate the total dissipated power in
resistors. The total dissipated power is p(r0) + p(r1).
You can use .MEAS TRAN SRC_PWR to calculate the total power from the
voltage source. The total power from the voltage source is
p(r0) + p(r1) + p(c0). HSPICVE can verify this with the following
statement:
.print tran tot_pwr=par('p(r0) + p(r1) + p(c0)')
Note that HSPICE does not add the power of each independent source (V & I).
For power measurements, HSPICE and HSPICE RF compute the 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 and HSPICE RF multiply the voltage
across an element and the corresponding branch current. However, for
semiconductor devices, HSPICE and HSPICERF measure only the dissipated
power, excluding the power stored in the device junction or parasitic
capacitances from the device power computation. The avg(P(Vdd)) function
measures both the dissipated power and the stored power while avg(P(X))
measures only the dissipated power for semiconductor devices. If the circuit
287
288
Controlled Sources
In addition to independent power sources, you can also create four types of
controlled sources:
LEVEL=1 is an OpAmp.
LEVEL=2 is a Transformer.
2 Hz
289
The noise source can be bias and/or frequency dependent. For a white noise
source, use a constant value for 'expression'.
For noise sources using expressions, the E-element takes the form:
ename n1 n2 noise='expression'
See also:
290
E-element Parameters
Linear
Polynomial (POLY)
Multi-Input Gates
Delay Element
Laplace Transform
Pole-Zero Function
Ideal Op-Amp
Ideal Transformer
E-element Parameters
The following list describes the E-element parameters.
Parameter
Description
ABS
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
Exxx
gain
Voltage gain.
gatetype(k)
Can be AND, NAND, OR, or NOR. k represents the number of inputs of the
gate. x and y represent the piecewise linear variation of output, as a function
of input. In multi-input gates, only one input determines the state of the
output.
IC
in +/-
Positive or negative controlling nodes. Specify one pair for each dimension.
MAX
MIN
n+/-
291
Parameter
Description
NDIM
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. That is,
OPAMP
or Level=1
P0, P1
POLY
PWL()
Keyword for the piecewise linear function; must include parenthetical ().
SCALE
TC1,TC2
292
Parameter
Description
TRANSFORMER
or LEVEL=2
VOL
Voltage output that flows from n+ to n-. The expression that you define can
be a function of:
node voltages
branch currents
time (time variable)
temperature (temper variable)
frequency (hertz variable)
VCVS
x1,...
Controlling voltage across the in+ and in- nodes. The x values must be in
increasing order.
y1,...
LAPLACE
FREQ
FOSTER
For a listing of output templates for current-controlled current source Eelements models (HSPICE only), see Table 38 on page 442.
Linear
Exxx n+ n- [VCVS] in+ in- gain [MAX=val] [MIN=val]
+ [SCALE=val] [TC1=val] [TC2=val] [ABS=1] [IC=val]
For a description of these parameters, see E-element Parameters on page 291.
Polynomial (POLY)
Exxx n+ n- [VCVS] POLY(NDIM) in1+ in1- ...
+ inndim+ inndim-TC1=val [TC2=val] [SCALE=val]
+ [MAX=val] [MIN=val] [ABS=1] p0 p1 [IC=val]
293
...
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]
In this syntax, gatetype(k) can be AND, NAND, OR, or NOR gates. For a
description of these parameters, see E-element Parameters on page 291.
Delay Element
Exxx n+ n- [VCVS] DELAY in+ in- TD=val [SCALE=val]
+ [TC1=val] [TC2=val] [NPDELAY=val]
For a description of these parameters, see E-element Parameters on page 291.
Laplace Transform
Voltage Gain H(s):
Exxx n+ n- LAPLACE in+ in- k0, k1, ..., kn / d0, d1, ..., dm
+ [SCALE=val] [TC1=val] [TC2=val]
For a description of these parameters, see E-element Parameters on page 291.
Transconductance H(s):
Gxxx n+ n- LAPLACE in+ in- k0, k1, ..., kn / d0, d1, ..., dm
+ [SCALE=val] [TC1=val] [TC2=val] [M=val]
H(s) is a rational function, in the following form:
294
Equation 21
k 0 + k 1 s + + k n s n
-----------------------------------------------H(s) =
d 0 + d 1 s + + d m s m
You can use parameters to define the values of all coefficients (k0, k1, ..., d0,
d1, ...).
For a description of the G-element parameters, see G-element Parameters on
page 314.
Example
Glowpass 0 out LAPLACE in 0
1.0 / 1.0 2.0 2.0 1.0
Ehipass out 0 LAPLACE in 0 0.0,0.0,0.0,1.0 / 1.0,2.0,2.0,1.0
s3
H ( s ) = ---------------------------------------1 + 2s + 2s 2 + s 3
For full demonstration netlists using E-elements for Laplace transforms use the
paths shown as follows in Filters Examples on page 993:
Equation 23
Pole-Zero Function
Voltage Gain H(s):
Exxx n+ n- POLE in+ in- a az1, fz1, ..., azn, fzn / b,
+ ap1, fp1, ..., apm, fpm [SCALE=val] [TC1=val]
+ [TC2=val]
For a description of these parameters, see E-element Parameters on page 291.
295
Transconductance H(s):
Gxxx n+ n- POLE in+ in- a az1, fz1, ..., azn, fzn / b,
+ ap1, fp1, ..., apm, fpm [SCALE=val] [TC1=val]
+ [TC2=val] [M=val]
The following equation defines H(s) in terms of poles and zeros:
Equation 24
a ( s + z1 j2f z1 )s
( + zn j2f zn ) ( s + zn + j2f zn )
H ( s ) = ----------------------------------------------------------------------------------------------------------------------------------------------------b ( s + p1 j2f p1 )s
( + pm j2f pm ) ( s + pm + j2f pm )
The complex poles or zeros are in conjugate pairs. The element description
specifies only one of them, and the program includes the conjugate. You can
use parameters to specify the a, b, , and f values.
For a description of the G-element parameters, see G-element Parameters on
page 314.
Example
Ghigh_pass 0 out POLE in 0 1.0 0.0,0.0 / 1.0 0.001,0.0
Elow_pass out 0 POLE in 0 1.0 / 1.0, 1.0,0.0 0.5,0.1379
1.0
H ( s ) = -----------------------------------------------------------------------------------------------------------------------------------------------------------1.0 ( s + 1 ) ( s + 0.5 + j2 0.1379 ) ( s + 0.5 ( j2 0.1379 ) )
For a full demonstration netlist of the G- and E-elements used in a behavioral
model use the path shown for low_pass.sp in Filters Examples on page 993.
Equation 26
296
Equation 27
ai ak
H ( j2f ) = ----------------------------- ( log f log f i ) + a i
log f i log f k
Equation 28
i k
H ( j2f ) = -------------- ( f f i ) + i
fi fk
0 FREQ input
293.7
211.0
82.45
-1125.5
297
You can use parameters to set the frequency, magnitude, and phase, in the
table.
For a full demonstration file showing a behavioral model using a G- table
element see the path to the demo file phaseshift.sp in Filters Examples on
page 993.
k1
Im{p1})
Im{p2})
Im{p3})
k1
Im{p1})
Im{p2})
Im{p3})
298
Equation 29
G ( s ) = 0.001 + 1 10
12
( 0.001 j0.006 )
0.0008 - --------------------------------------------------------------------+
s + ---------------------------+
10
8
10
s ( 1 10 + j1.8 10 )
s + 1 10
( 0.001 + j0.006 )
-------------------------------------------------------------------8
10
s ( 1 10 j1.8 10 )
You would input:
Note:
For real poles, enter half the residue value because the netlist
applies it twice. In the above example, the first pole-residue pair
is real, you write it as A1/(s-p1)+A1/(s-p1); therefore, enter
0.0004 rather than 0.0008.
299
also, Using Noise Analysis Results as Input Noise Sources on page 342.
HSPICE supports the following syntaxes:
Exxx n1 n2 noisefile='filename'
Exxx n1 n2 noise='expression'
Exxx n1 n2 noise='Table(arg1,f1,v1,f2,v2...)'
Ideal Op-Amp
Exxx n+ n- OPAMP in+ inYou can also substitute LEVEL=1 in place of OPAMP:
Exxx n+ n- in+ in- level=1
For a description of these parameters, see E-element Parameters.
Ideal Transformer
Exxx n+ n- TRANSFORMER in+ in- k
You can also substitute LEVEL=2 in place of TRANSFORMER:
Exxx n+ n- in+ in- level=2 k
For a description of these parameters, see E-element Parameters.
300
V1
+
-
V1
<=>
V2
V2=g*V2
k:1
..
I2
I1
I2
V2
V1
Figure 32
<=>
V1
I1=k*I2
+
-
V2
V1=k*V2
E-element Examples
For full demonstration examples of circuits using E-elements see the paths to
the following netlist files in the section Behavioral Application Examples:
Ideal OpAmp
Voltage Summer
301
Polynomial Function
Ideal Transformer
Ideal OpAmp
You can use the voltage-controlled voltage source to build a voltage amplifier,
with supply limits.
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
To specify a value for polynomial coefficient parameters, use the following
format:
.PARAM CU=2.0
E1 2 3 14 1 MAX=+5 MIN=-5 CU
For a full demonstration netlist of the E-element used for an active low pass
filter using behavioral opamp models, use the path shown for low_pass9a.sp
in Filters Examples on page 993.
Voltage Summer
An ideal voltage summer specifies the source voltage, as a function of three
controlling voltage(s):
302
V(13,0)
V(15,0)
V(17,0)
Polynomial Function
A voltage-controlled source can also output a non-linear function, using a onedimensional polynomial. This example does not specify the POLY parameter,
so HSPICE assumes it is a one-dimensional polynomialthat 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
E2 3 4 VOLT=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
303
For a full demonstration example of AND/NAND gates and use of the Eelement see the path to the behave.sp netlist noted in the section Behavioral
Application Examples.
For a full netlist differential block analysis example, see also:
$installdir/demo/hspice/behave/diff.sp.
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:
Etrans out 0 in 0 level=2 10
304
is the amplitude. The freq control portion of the equation specifies the
frequency of the output, which is a sinusoidal voltage.
Evco out 0 VOL=v0+gain*SIN(6.28 freq*v(control)*TIME)
Note:
Example 2
In this example, a Verilog-A module controls VCO output by tracking phase to
ensure continuity.
`include "disciplines.vams"
module vco(vin, vout);
inout vin, vout;
electrical vin, vout;
parameter real amp = 1.0;
parameter real offset = 1.0;
parameter real center_freq = 1G;
parameter real vco_gain = 1G;
real phase;
analog begin
phase = idt(center_freq + vco_gain*V(vin), 0.0);
V(vout) <+ offset+amp*sin(6.2831853*phase);
end
endmodule
Example 3
This example is a controlled-source equivalent of the Verilog-A module shown
in the previous example. Like the previous example, it establishes a continuous
phase and therefore, a continuous output voltage.
.subckt vco in out amp=1 offset=1 center_freq=1 vco_gain=1
.ic v(phase)=0
cphase phase 0 1e-10
g1 0 phase cur='1e-10*(center_freq+vco_gain*v(in))'
eout out 0 vol='offset+amp*sin(6.2831853*v(phase))'
.ends
Example 4
In this example, controlled-sources control VCO output.
.param pi=3.1415926
.param twopi='2*pi'
.subckt vco in inb out outb f0=100k kf=50k out_off=0.0 out_amp=1.0
305
306
Example
This example uses demonstration netlist eelm.sp, which is available in
directory $installdir/demo/hspice/sources:
*****************************************************
****** E element for AC analysis
.option post
.op
*CASE1-Mixed and zero time unit has zero value(tran)
v_n1 n1 gnd dc=6.0 pwl 0.0 6.0 1.0n 6.0 ac 5.0
v_n2 n2 gnd dc=4.0 pwl 0.0 4.0 1.0n 6.0 ac 2.0
e1 n3 gnd vol='v(n1)+v(n2)'
e2 n4 gnd vol='v(n1)*v(n2)'
r1 n1 gnd 1
r2 n2 gnd 1
r3 n3 gnd 1
r4 n4 gnd 1
.tran 10p 3n
.ac dec 1 1 100meg
.print ac v(n?)
.end
*****************************************************
+ 1.0 * v(n2)(ac)
1.0 * 2.0
307
Linear
Polynomial (POLY)
Multi-Input Gates
Delay Element
F-element Parameters
F-element Examples
Linear
Fxxx n+ n- [CCCS] vn1 gain [MAX=val] [MIN=val] [SCALE=val]
+ [TC1=val] [TC2=val] [M=val] [ABS=1] [IC=val]
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]
In this syntax, dim (dimensions) 3.
Multi-Input Gates
Fxxx n+ n- [CCCS] f(k) vn1, ... vnk [DELTA=val]
308
Delay Element
Note:
F-element Parameters
The following list describes The F-element parameters.
Parameter
Description
ABS
CCCS
DELAY
DELTA
Fxxx
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.
309
Parameter
Description
IC
MAX
MIN
n+/-
NDIM
NPDELAY
POLY
PWL
SCALE
TC1,TC2
310
Parameter
Description
TD
vn1
x1,...
y1,...
F-element Examples
Example 1
This example describes a current-controlled current source, connected
between nodes 13 and 5. The current, which controls the value of the
controlled source, flows through the voltage source named VSENS.
F1 13 5 VSENS MAX=+3 MIN=-3 5
Note:
Equation 30
If I(VSENS)=2 A, then this examples sets I(F1) to 3 amps, not 10 amps (as
the equation suggests). You can define a parameter for the polynomial
coefficient(s):
.PARAM VU=5
F1 13 5 VSENS MAX=+3 MIN=-3 VU
311
Example 2
This example 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).
F2 12 10 POLY VCC 1MA 1.3M
Example 3
This example is a delayed, current-controlled current source.
Fd 1 0 DELAY vin TD=7ns SCALE=5
Example 4
This example is a piecewise-linear, current-controlled current source.
Filim 0 out PWL(1) vsrc -1a,-1a 1a,1a
For full demonstration files for voltage-dependent current sources using Gelement parameters for NPWL/PPWL/NAND circuits, see the paths to these
example netlists in the section Behavioral Application Examples.
312
Refer to other demonstration files in the following sections for specific circuits
that use the G-element.
Gxxx n+ n- [VCCS|LEVEL=0] in+ in- ...
See also:
G-element Examples
G-element Parameters
Linear
Polynomial (POLY)
Multi-Input Gate
Delay Element
313
Laplace Transform
Pole-Zero Function
G-element Parameters
The following list describes the G-element parameters.
Parameter
Description
ABS
Current output that flows from n+ to n-. The expression that you define
can be a function of:
node voltages
branch currents
time (time variable)
temperature (temper variable)
frequency (hertz variable)
DELAY
DELTA
Gxxx
gatetype(k)
314
Parameter
Description
LEVEL=0|1|2|3
IC
in +/-
MAX
MIN
n+/-
NDIM
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.
315
Parameter
Description
P0, P1
POLY
PWL()
Keyword for the piecewise linear function; must include parenthetical ().
PPWL
SCALE
SMOOTH
TC1,TC2
TD
transconductance
transfactor
VCCAP
316
Parameter
Description
VCCS
VCR
x1,...
Controlling voltage, across the in+ and in- nodes. Specify the x values
in increasing order.
y1,...
LAPLACE
FREQ
FOSTER
Linear
Gxxx n+ n- [VCCS] in+ in- transconductance [MAX=val]
+ [MIN=val] [SCALE=val] [M=val] [TC1=val] [TC2=val]
+ [ABS=1] [IC=val]
For a description of the G-element parameters, see G-element Parameters on
page 314.
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=val]
For a description of the G-element parameters, see G-element Parameters on
page 314. For a description of possible POLY syntaxes, see Polynomial
Functions on page 279.
For a full demonstration file for voltage-dependent current sources using Gelement parameters for a polynomial example, see the path to the example
netlist pll_bvp.sp (PLL build with behavioral source) in the section
Behavioral Application Examples.
317
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]
In this syntax, gatetype(k) can be AND, NAND, OR, or NOR gates. For a
description of the G-element parameters, see G-element Parameters on
page 314.
For a full demonstration example of AND/NAND gates that uses the G-element
see also the path to the behave.sp netlist noted in the section Behavioral
Application Examples.
Delay Element
Gxxx n+ n- [VCCS] DELAY in+ in- TD=val [SCALE=val]
+ [TC1=val] [TC2=val] NPDELAY=val
318
Laplace Transform
For details, see Laplace Transform on page 294.
Pole-Zero Function
For details, see Pole-Zero Function on page 295.
319
This syntax produces a noise source correlation between the terminal pairs
(node1 node2) and (node3 node4). Compute the resulting output noise as:
noise_expression*sqrt(H1*H2*)
The noise expression can involve node voltages and currents through voltage
sources.
Data form
Gxxx node1 node2 noise data=dataname
.DATA dataname
+ pname1 pname2
+ freq1 noise1
+ freq2 noise2
+ ...
.enddata
The data form defines a basic frequency-noise table. The .DATA statement
contains two parameters: frequency and noise to specify the noise value at
each frequency point. The unit for frequency is hertz, and the unit for noise is
A2/Hz.
The G-element with noise sources supports the following syntaxes:
Gxxx n1 n2 noisefile='filename'
Gxxx n1 n2 noise='expression'
Gxxx n1 n2 noise='Table(arg1,f1,v1,f2,v2...)'
Linear
Polynomial (POLY)
Multi-Input Gates
Linear
Gxxx n+ n- VCR in+ in- transfactor [MAX=val] [MIN=val]
+ [SCALE=val] [M=val] [TC1=val] [TC2=val] [IC=val]
For a description of the G-element parameters, see G-element Parameters on
page 314.
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]
For a description of the G-element parameters, see G-element Parameters on
page 314.
321
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]
For a description of the G-element parameters, see G-element Parameters on
page 314.
NPWL Function
PPWL Function
NPWL Function
For the in- node connected to n+:
322
PPWL Function
For the in- node, connected to n+:
If the in- node does not connect to either n+ or n-, then HSPICE changes NPWL
and PPWL to PWL.
G-element Examples
The following section provide illustrative examples for the G-element:
Modeling Switches
Switch-Level MOSFET
Voltage-Controlled Capacitor
Zero-Delay Gate
Delay Element
Diode Equation
Diode Breakdown
Triodes
323
Modeling Switches
You can model a switch to be open or closed based on simulation time or a pair
of controlling nodes.
Switch Example 1: Time-varying switchuse the built-in function TIME to
change the value of R from 0 (closed) to 100g ohm (open) when the simulator
reaches time value T1:
R1 n1 n2 '100g*(TIME <= T1)'
As long as TIME T1, the expression evaluates to zero and so does the
resistor (switch) value. You could easily rewrite the resistor to switch from
closed to open:
R1 n1 n2 '100g*(TIME >= T1)'
where: n1 and n2 are the poles of the switch, and c1 and c2 are the control
nodes. In the following sample netlist, the switch is controlled by the PWL
voltage source to switch at 1us:
* g-element switch
.option post
V_ctrl c1 0 PWL (0 0v .99u 0v 1u 1v)
G_Switch n1 n2 VCR PWL(1) c1 0 0v,100g 1v,1p
V_ref n1 0 10v
R_load n2 0 100
.tran .1u 2u
.end
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.
Gnmos d s VCR NPWL(1) g s LEVEL=1 0.4v,150g
+ 1v,10meg 2v,50k 3v,4k 5v,2k
324
For a full demonstration example see the path to the acl.sp netlist noted in
the section Behavioral Application Examples.
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.
325
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.
Gdel out 0 DELAY in 0 TD=5ns SCALE=2 NPDELAY=25
For a full demonstration example of delay parameter (five-stage ring oscillator
macromodel CMOS inverter) see the path to the ring5bm.sp netlist.
Diode Equation
To model forward-bias diode characteristics from node 5 to ground use a
runtime expression. The saturation current is 1e-14 amp and the thermal
voltage is 0.025 v.
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).
Gdiode 1 0 PWL(1) 1 0 -2.2v,-1a -2v,-1pa .3v,.15pa
+.6v,10ua 1v,1a 2v,1.2a
326
The only limitation is that the maximum number of I-V value pairs for a PWL Gelement is 100.
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.
You can also set DELTA to a small value to get some smoothing which can help
convergence but reduce the difference from the ideal PWL.
327
Note:
For a listing of output templates for current-controlled voltage source (Helement) models(HSPICE only), see Table 40 on page 443.
The following section introduces the topics for the CCVS source.
Linear
Polynomial (POLY)
Multi-Input Gate
Delay Element
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]
329
Multi-Input Gate
Hxxx n+ n- gatetype(k) vn1, ...vnk [DELTA=val] [SCALE=val]
+ [TC1=val] [TC2=val] x1,y1 ...
x100,y100 [IC=val]
In this syntax, gatetype(k) can be AND, NAND, OR, or NOR gates.
Delay Element
Note:
Parameter
Description
ABS
CCVS
DELAY
DELTA
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.
Hxxx
IC
330
Parameter
Description
MAX
MIN
n+/-
NDIM
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
Polynomial coefficients.
If you specify one polynomial coefficient, the source is linear, and HSPICE
assumes that the polynomial is P1 (P0=0.0).
If you specify more than one polynomial coefficient, the source is nonlinear. HSPICE assumes the polynomials are P0, P1, P2 See Polynomial
Functions on page 279.
POLY
PWL
SCALE
TC1,TC2
TD
transresistance
vn1
Names of voltage sources, through which controlling current flows. You must
specify one name for each dimension.
331
Parameter
Description
x1,...
Controlling current, through the vn1 source. Specify the x values in increasing
order.
y1,...
Example 1
HX 20 10 VCUR MAX=+10 MIN=-10 1000
The example above selects a linear current-controlled voltage source. The
controlling current flows through the dependent voltage source, called VCUR.
Example 2
The defining equation of the CCVS is:
HX = 1000 I ( VCUR )
The defining equation specifies that the voltage output of HX is 1000 times the
value of the current flowing through VCUR.
Equation 31
If the equation produces a value of HX greater than +10 V, then the MAX
parameter sets HX to 10 V.
If the equation produces a value of HX less than -10 V, then the MIN
parameter sets HX to -10 V.
VCUR is the name of the independent voltage source, through which the
controlling current flows. If the controlling current does not flow through an
independent voltage source, you must insert a dummy independent voltage
source.
Example 3
.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
The example above describes a dependent voltage source, with the value:
V = I ( VIN1 ) I ( VIN2 )
This two-dimensional polynomial equation specifies:
Equation 32
332
FA1=VIN1
FA2=VIN2
P0=0
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
P1=0
P2=0
P3=0
P4=1
The initial controlling current is .5 mA through VIN1, and 1.3 mA for VIN2.
Positive controlling current flows from the positive node, through the source, to
the negative node of vnam (linear). The (non-linear) polynomial specifies the
source voltage, as a function of the controlling current(s).
Steady-State HB Sources
333
Parameter
Description
[[dc] mag]
334
Parameter
Description
phase is in degrees
harm and tone are indices corresponding to the tones specified in
the .HB statement. Indexing starts at 1 (corresponding to the first
harmonic of a tone).
modtone and modharm specify sources for multi-tone simulation.
A source specifies a tone and a harmonic, and up to 1 offset tone
and harmonic (modtone for tones and modharm for harmonics).
The following then describes the signal as:
V(or I) = mag*cos(2*pi*
(harm*tone+modharm*modtone)*t + phase)
[transient waveform]
[power=[0 | 1 | W | dbm]]
You can use this parameter for Transient analysis if the power source
is either DC or SIN.
[z0=val]
[rac=val]
335
Parameter
Description
[RHBAC=val]
[rhb=val]
[rtran=val]
[TRANFORHB=[0|1]]
Example 1
This example shows an HB source for a single tone analysis:
.hb tones=100MHz harms=7
I1 1 2 dc=1mA hb 3mA 0. 1 1
I1 is a current source with a the following time-domain description:
I1=1mA + 3mA*cos(2*pi*1.e8*t)
Example 2
This example shows HB sources used for a two-tone analysis:
.hb tones=1.e9 1.1e9 intmodmax=5
Vin lo 0 dc=0. hb 1.5 90 1 1
336
Vin=1.5*cos(2*pi*1.e9*t - 90*pi/180) V
Vrf = 0.2*cos(2*pi*1.1e9*t) V
Example 3
The following HB source uses a modtone and modharms:
.hb tones=2.e9 1.9e9 harms=5 5
Example 5
This example shows a power source (the units are Watts).
.hb tones=1.1e9 harms=9
Steady-State HB Sources
Use the .HB TONES command to specify the fundamental frequencies used
with harmonic balance analysis. You can then reference these frequencies by
their integer indices when specifying steady-state signal sources. For example:
.HB TONES=1900MEG,1910MEG INTMODMAX=5
337
= --------- phase
180
Values for tone and modtone (an optional modulating tone) must be nonnegative integers that specify index values for the frequencies specified with
the .HB TONES command. Values for harm (harmonic) and modharm
(modulating tone harmonic) must be integers (negative values are OK) that
specify harmonic indices.
Example 1
The following example is a 1.0 Volt (peak) steady-state cosine voltage source,
which is at the fundamental HB frequency with zero phase and with a zero volt
DC value:
Vsrc
in
gnd
DC
HB
1.0
Example 2
The following example is a steady-state cosine power source with 1.0mW
available power, which is implemented with a Norton equivalent circuit and a 50
ohm input impedance:
Isrc
in
gnd
HB
1.0e-3
power=1 z0=50
Example 3
Five series voltage sources sum to produce a stimulus of five equally spaced
frequencies at and above 2.44 GHz using modharm and modtone parameters.
These are commensurate tones (an integer relation exists); therefore, you only
need to specify two tones when invoking the HB analysis.
338
.param Vin=1.0
.param f0=2440MEG
.param deltaf=312.5K
.param fcenter='f0 + 2.0*deltaf'
Vrfa
in
ina
HB
'Vin'
0
1
GHz
Vrfb
ina
inb
HB
'Vin'
0
1
2.4403125
GHz
Vrfc
inb
inc
HB
'Vin'
0
1
2.440
GHz
Vrfd
inc
ind
HB
'Vin'
0
1
2.4409375
GHz
Vrfe
ind
gnd
HB
'Vin'
0
1
GHz
.HB tones=fcenter,deltaf intmodmax=5
$ 2.440625
-1
-2
+1
+2
$ 2.44125
A cos ( t + )
In order for the two sources to yield identical results it is necessary to align
them by setting their phase values accordingly using:
Equation 34
Equation 35
A cos ( t + ) = A sin ( t + + 90 )
A sin ( t + ) = A cos ( t + 90 )
To specify sources with matching phase for HB and TRAN analysis, use a
convention similar to:
Equation 36
339
The first line creates a simple two-terminal current noise source, whose value
is described in A2/(Hz). The output noise generated from this noise source is:
noise_equation*H
Where H is the transfer function from the terminal pair (node1,node2) to the
circuit output, where HSPICE RF measures the output noise.
The second line produces a noise source correlation between the
(node1,node2) and (node3,node4) terminal pairs. The resulting output noise is
calculated as noise_equation*sqrt(H1*H2*); where,
340
The noise_equation expression can involve node voltages and currents through
voltage sources.
For the PAC phasenoise simulation to evaluate the frequency-dependent noise,
the frequency-dependent noise factor in the phasenoise must be expressed in
between the parentheses. For example:
gname node1 node2 noise = '(frequency_dependent_noise)*
bias_dependent_noise'
This is only true when the total noise can be expressed in this form and when
the frequency-dependent noise can be evaluated in the PAC phasenoise
simulation. You can also input the behavioral noise source as a noise table with
the help of predefined Table() function. The Table() function takes two formats:
Noise table can be input directly through the Table() function. For example:
gname node1 node2 noise = 'Table(arg1,f1,v1,f2,v2,......)'
The f1,v1,f2,v2,..... parameters describe the noise table. When arg1 == f1,
the function returns v1. The arg1 can be an expression of either HERTZ,
bias, or both. For example, arg1 = 'HERTZ * 1.0E+3'.
The x, y parameters in the DATA structure are two placeholder strings that can
be set to whatever you prefer even if they are in conflict with other parameters
in the netlist. The arg1 parameter can be an expression of HERTZ and bias.
When arg1 == f2, the function will return v2.
The following sections discuss these topics:
341
342
Exxx n1 n2 noisefile='filename'
Exxx n1 n2 noise='expression'
Exxx n1 n2 noise='Table(arg1,f1,v1,f2,v2...)'
A noise file always needs a header (do not include frequency or noise points
in the header line, as they will be ignored)
The items in the header must be consistent with the number of data columns
The noise value units depend on your use of the MNAME keyword
You can use noise keywords like ONOISE, and the phase noise keywords,
PAC_L(f), BPN_L(f), and, NLP_L(f). This is useful for *.printac#,
*.printpn#, or *.printsnpn# files and use of the MNAME keyword to
specify the noise data column to be used. For example, if you do a phase noise
analysis and specify broadband phase noise (method=2 in the .PHASENOISE
command), the *.printpn# file contains three columns of phase noise data:
PAC_L(f), BPN_L(f), and, NLP_L(f).
If MNAME is not specified with the behavioral noise source, then HSPICE
assumes that the 2nd column in the noisefile represents the desired noise
values, and the MNAME string is read from the noisefile header. The first column
is always assumed to contain frequency values.
The MNAME keyword is used to differentiate units. If you use MNAME=ONOISE
and the file contains ONOISE in the header, then the noise units are interpreted
as V/sqrt(Hz). The same is true with MNAME=ONOISE(M) and
MNAME=ONOISE(MAG). If MNAME is set to PAC_L(f), BPN_L(f), NLP_L(f),
or PHNOISE, then units are interpreted as dBc/Hz. With MNAME=ONOISE(DB),
units are taken as dB/Hz (20*Log(onoise)), as are other MNAME keywords that
end in DB or (DB). Most other MNAME keywords are generally interpreted in
V^2/Hz units, unless the name ends in(M) or (MAG), which are taken to be
V/sqrt(Hz). Depending on the noise units, different interpolation schemes are
used for frequencies needed between noise data points. Noise in dB/Hz or
dBc/Hz units use logarithmic interpolation (in x and y), while non-dB units use
linear interpolation in V^2/Hz.
Noise File Examples
The following examples provide sample noise results noting the various noise
value units:
343
-130.2612492663
-132.2612484153
-134.2612470666
-136.2612449295
-138.2612415429
-140.2612361768
-142.2612276743
-144.2612142034
-146.2611928626
-148.2611590575
-150.2611055150
-152.2610207237
-154.2608864692
-156.2606739394
-158.2603375701
-160.2598053187
-162.2589632779
-164.2576312765
-166.2555240055
-168.2521885144
-170.2469020563
344
10.0000x
43.7067n
345
Example
The following netlist shows a 1000 ohm resistor (g1) using a G-element. The
g1noise element, placed in parallel with the g1 resistor, delivers the thermal
noise expected from a resistor. The r1 resistor is included for comparison: The
noise due to r1 should be the same as the noise due to g1noise.
* Resistor implemented using g-element
v1 1 0 1
r1 1 2 1k
g1 1 2 cur='v(1,2)*0.001'
g1noise 1 2
+ noise='4*1.3806266e-23*(TEMPER+273.15)*0.001'
rout 2 0 1meg
.ac lin 1 100 100
.noise v(2) v1 1
.end
s pi s p -
i
N
Equation 37
G ( s ) = k0 + k1 s +
i=1
Where,
346
residues Ai and poles pi are complex numbers (or real as a special case of
complex
k1
Im{p1})
Im{p2})
Im{p3})
k1
Im{p1})
Im{p2})
Im{p3})
347
0.0008
( 0.001 j0.006 )
- + --------------------------------------------------------------------+
s + ---------------------------10
8
10
s + 1 10
s ( 1 10 + j1.8 10 )
( 0.001 + j0.006 )
------------------------------------------------------------------8
10
s ( 1 10 j1.8 10 )
G ( s ) = 0.001 + 1 10
Note:
12
348
When used with independent sources, a baseband data stream can be input
in binary or hexadecimal format, and the scheme used to divide the data into
I and Q signals can be specified.
VMRF Implementation
The VMRF source is a mathematical implementation of the following block
diagram:
l(t)
cos(wt)
Data in
Serial to
Parallel
S(t)
sin(wt)
Q(t)
The following equation calculates the time and frequency domain stimuli from
the quadrature modulated signal sources:
Equation 39
I + Q = 1:
Data In
I Data
Q Data
1
------2
1
------2
1
------2
1
------2
349
For QPSK (quadrature phase shift keying) modulation, the data stream is
broken into bit pairs to form the correct I and Q values. This function is
represented as the serial to parallel converter:
Data In
I Data
Q Data
00
1
------2
1
------2
01
1
------2
1
------2
10
1
------2
1
------2
11
1
------2
1
------2
350
Parameter
Description
Vxxx
Ixxx
Parameter
Description
n+ n-
VMRF
AMP
FREQ
PHASE
MOD
FILTER
One of the following keywords identifies the method used to filter the
I and Q signals before modulating the RF carrier signal:
FILCOEF
RATE
For BPSK modulation, the data rate and the symbol rate are the
same.
For QPSK modulation, the symbol rate is half the data rate.
351
Parameter
Description
BITSTREAM A binary (b) or hexadecimal (h) string that represents an input data
stream.
Valid data string characters are:
For example:
01010011b (binary)
0F647A30E9h (hexadecimal)
You can also use the standard V source and I source options for non-transient
simulations (such as DC=val and AC=mag,ph) a with the VMRF source.
Example
BITSTREAM=01010010011100b
data
1/dr
.707
1/dr
352
QPSK I Signal
.707
1/dr
QPSK Q Signal
.707
1/dr
The Rb parameter represents the data rate. The associated symbol rate
represents how fast the I and Q data streams change. The period for each bit of
data is:
Equation 40
1
T b = -----Rb
The symbol rate depends on whether you select BPSK or QPSK modulation:
For BPSK, the symbol rate is the same as the data rate:
S
BPSK
= Rb
For QPSK modulation, two bits are used to create each symbol so the
symbol rate is half the data rate.
R
S
QPSK
Rb
= -----2
1
T s = ----Rs
353
The following equation calculates the raised cosine (COS) filter response:
1
f -----------2T s
Equation 42
H rc ( f ) =
Ts
0
1
2 T s
T s cos -------- f ------------
2
2T s
1
1+
------------ f -----------2T s
2T s
1+a
f > -----------2T s
The VMRF signal source is designed primarily for TRAN and HB analyses, and
can generate baseband signals. You can also specify DC and AC values as
with any other HSPICE signal source:
The VMRF quadrature signal source typically involves an HF carrier signal that
is modulated with a baseband signal on a much different time scale. You must
set source and simulation control parameters appropriately to avoid timeconsuming simulations in both the time and frequency domains.
E, F, G, and H Element Statements
For E, F, G, and H elements, you can use the VMRF function to modulate I(t)
and Q(t) signals with a RF carrier signal. The I and Q signal are driven by PWL
sources that might be generated by an external tool, such as MATLAB. The
PWL source accepts a text file containing time and voltage (or current) pairs.
When the VMRF function is used with controlled sources, it is anticipated that
the in-phase (I) and quadrature (Q) signals are not digital, but continuous-time
analog signals. The VMRF function therefore includes no filtering, and merely
serves to create the complex modulation on the RF carrier.
Exxx n+ n- [VCVS] VMRF [(] Iin+ Iin- Qin+ Qin- FREQ=fc
+ PHASE=ph [SCALE=A] [)]
Fxxx n+ n- [CCCS] VMRF [(] VI VQ FREQ=fc PHASE=ph
+ [SCALE=A] [)]
354
Description
Exxx
Fxxx
Gxxx
Hxxx
VCVS
CCCS
VCCS
CCVS
n+ n-
VMRF
Iin+ Iin-
Qin+ Qin-
VI VQ
FREQ
PHASE
SCALE
355
Example
Emod1 inp1 inn1 VMRF It_plus It_neg Qt_plus Qt_neg
+ freq=1g phase=0 scale=1.5
DC sweep analysis
Point sweeps: a variable takes on specific values that you specify as a list.
The syntax is:
Data sweeps: a .DATA statement identifies the swept variables and their
values. The syntax is:
data=dataname
You can use the SWEEPBLOCK feature to combine linear, logarithmic, and point
sweeps, which creates more complicated sets of values over which a variable is
swept.
The .TRAN, .AC, .DC, and .HB commands can specify
SWEEPBLOCK=blockname as a sweep instead of LIN, DEC, OCT, and so forth.
Also, you can use SWEEPBLOCK for frequency sweeps with
the .AC, .HBAC, .PHASENOISE, and .HBNOISE commands.
356
All commands that can use SWEEPBLOCK must refer to the SWEEPBLOCK
sweep type. In addition, you must specify SWEEPBLOCK as one of the syntax
types allowed for frequency sweeps with the .HBAC, .PHASENOISE,
and .HBNOISE commands.
The following sections discuss these topics:
Input Syntax
Limitations
Input Syntax
The SWEEPBLOCK feature creates a sweep whose set of values is the union of
a set of linear, logarithmic, and point sweeps. To specify the set of values in the
SWEEPBLOCK, use the .SWEEPBLOCK command. This command also assigns
a name to the SWEEPBLOCK. For example,
.SWEEPBLOCK swblockname sweepspec [sweepspec
+ [sweepspec []]]]
You can use SWEEPBLOCK to specify DC sweeps, parameter sweeps, AC and
HBAC frequency sweeps, or wherever HSPICE accepts sweeps.
You can specify an unlimited number of sweepspec parameters. Each
sweepspec can specify a linear, logarithmic, or point sweep by using one of
the following forms:
start stop increment
lin npoints start stop
dec npoints start stop
oct npoints start stop
poi npoints p1 p2
Example
The following example specifies a logarithmic sweep from 1 to 1e9 with more
resolution from 1e6 to 1e7:
.sweepblock freqsweep dec 10 1 1g dec 1000 1meg 10meg
357
Limitations
358
A source with jitter is useful for representing non-ideal clock sources during
time-domain transient simulation.
The PERJITTER option allows you to add periodic jitter to SIN, COS and
PULSE time domain sources.
Description
Vxxx
Ixxx
PERJITTER
Period jitter
PWL
PWLFILE
Text file containing the PWL data consisting of time and voltage (or
current) pairs. This file should not contain a header row, unless it is a
comment. The PWL source data is obtained by extracting col1 and
col2 from the file.
col1, [col2]
Time values are in col1 and voltage (or current) values are in col2. By
default, col1=1 and col2=2.
TD
options
The sine wave behavior following the td time delay now becomes
359
Equation 43
V(t) + e
( t td )
= V0 + Va
sin 2f 0 ( t t d ) + --------- + t d d
180
V(t) + e
( t td )
= V0 + Va
cos 2 f 0 ( t t d + x ( t ) ) + ---------
180
360
Example
As an alternative to using a Verilog-A module, you can generate a pseudorandom binary sequence (PRBS) using the following steps:
1. Construct your usual linear feedback shift register (LFSR) generator.
2. Construct a matching (T,tr,tf) PULSE source as a clock, but add jitter to it
with the PERJITTER keyword.
3. Use the PULSE source to gate (buffer) the LFSR output (through an ideal
AND gate, VCCS, and so forth).
To incorporate this information into your simulation, include the .VEC command
in your netlist.
For paths to full demonstration files (digstim.vec2 bit adder with PWL
input, m2bit.sp, and m2bit_v.spsame as m2bit.sp, except uses vector
stimulus file, see Benchmark Examples in this user guide.
The following sections discuss these topics:
Vector Patterns
361
Waveform Characteristics
Parameter Usage
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. A
RADIX line must occur first and the other lines can appear in any order in this
section. All keywords are case-insensitive.
Here is an example Vector Pattern Definition section:
; start of Vector Pattern Definition section
RADIX 1111 1111
VNAME A B C D E F G H
IO IIII IIII
TUNIT ns
These four lines are required and appear in the first lines of a VEC file:
TUNIT indicates that the time unit for the tabular data to follow is in units of
nanoseconds.
For additional information about these keywords, see Defining Tabular Data on
page 363.
362
Where timex is the specified time, and signaln_valuen is the values of specific
signals at specific points in time. The set of values for a particular signal (over
all times) is a vector, which appears as a vertical column in the tabular data and
vector table. The set of all signal1_valuen constitutes one vector.
For 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.
Input Stimuli
Expected Output
363
Input Stimuli
HSPICE converts each input signal into a PWL (piecewise linear) voltage
source, and a series resistance. Table 23 shows the legal states for an input
signal. Signal values can have any of these legal states.
Table 23
State
Description
Z, z
X, x
U, u
Expected Output
HSPICE converts each output signal into a .DOUT statement in the netlist.
During simulation, HSPICE compares the actual results with the expected
output vector(s). If the states are different, an error message appears. The
legal states for expected outputs include the values listed in Table 24.
364
Table 24
State
Description
Expect ZERO.
Expect ONE.
X, x
Dont care.
Table 24
U, u
Dont care.
Z, z
For example,
...
IO OOOO
; start of tabular section data
11.0 1001
20.0 1100
30.0 1000
35.0 xx00
Where,
The second 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
dont care; it expects vectors 3 and 4 to be low.
binary (b or B)
octal (o or O)
365
hexadecimal (h or H).
366
IO IIII IIII
TUNIT ns
PERIOD 10
; start of vector data section
1000 1000
1100 1100
1010 1001
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. For
example,
TRISE 0.3 137F 0000
TFALL 0.5 137F 0000
VIH 5.0 137F 0000
VIL 0.0 137F 0000
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.
The fourth vector is four bits because F is hexadecimal for binary 1111.
All bits of the fourth vector have a rise time of 0.3ns for the constant you
defined in TUNIT. This also applies to TFALL (fall time), VIH (voltage for
logic-high inputs), and VIL (voltage for logic-low inputs).
TDELAY applies to the input and output delay time of input, output, and
bidirectional signals.
IDELAY applies to the input delay time of input and bidirectional signals.
ODELAY applies to the output delay time of output and bidirectional signals.
The SLOPE statement specifies the rise and fall times for the input signal. To
specify the signals to which the slope applies, use a mask.
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
367
The TFALL statement sets an input fall time for specific vectors.
The TRISE statement sets an input rise time for specific vectors.
The TUNIT statement defines the time unit.
The OUT and OUTZ keywords are equivalent, and specify output resistance for
each signal (for which the mask applies); OUT (or OUTZ) applies only to input
signals.
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.
The VIH statement specifies the logic-high voltage for each input signal to
which the mask applies.
The VIL statement specifies the logic-low voltage for each input signal to which
the mask applies.
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.
Similar to the TDELAY statement, the VTH statement specifies the logic
threshold voltage for each output signal to which the mask applies. The
threshold voltage determines the logic state of output signals for comparison
with the expected output signals.
The VOH statement specifies the logic-high voltage for each output signal to
which the mask applies.
The VOL statement specifies the logic-low voltage for each output signal to
which the mask applies.
368
30.0 1 0 Z
As in netlists, any line in a VEC file that starts with a plus sign (+) is a
continuation from the previous line.
Parameter Usage
You can use .PARAM statements with some VEC statements when you run
HSPICE. These VEC statements fall into the three groups, which are described
in the following sections. No other VEC statements but those identified here
support .PARAM statements.
First Group
PERIOD
TDELAY
IDELAY
ODELAY
SLOPE
369
TRISE
TFALL
For these statements, the TUNIT statement defines the time unit. If you do not
include a TUNIT statement, the default time unit value is ns.
Do not specify absolute unit values in a .PARAM statement. For example, if in
your netlist:
.param myperiod=10ns
What you wanted for the time period is 10ns; however, because you specified
absolute units, 1e-8ns is the value used. In this example, the correct form is:
.param myperiod=10
Second Group
OUT or OUTZ
TRIZ
The .PARAM definition for this group follows the HSPICE syntax.
For example, if in your netlist:
.param myout=10
$ means 10 ohm
.param mytriz= 10Meg
$ means 10,000,000 ohm, don't
$ confuse Meg with M, M means 0.001
Then, HSPICE returns 10 ohm for OUT and 10,000,000 ohm for TRIZ.
370
Third Group
VIH
VIL
VOH
VOL
VTH
371
;********************************************************
; specify input rise/fall times (if you want different
; rise/fall times, use the trise/tfall statement.)
; Note: do not put the unit (such as ns) here again.
; HSPICE multiplies this value by the specified tunit.
slope 1.2
;********************************************************
; specify the logic high voltage for input signals
vih 3.3 1 0 000
vih 5.0 0 0 FFF
; to specify logic low, use vil
;********************************************************
; va & vb switch from lo to hi at 1.75 volts
vth 1.75 0 1 FFF
;****************************************************
; tabular data section
10.0 1 3 FFF
20.0 0 2 AFF
30.0 1 0 888
372
11
11
373
Note:
Table 25
Parameter
Description
Simple assignment
.PARAM SimpleParam=1e-12
Algebraic definition
.PARAM AlgebraicParam=SimpleParam*8.2
SimpleParam excludes the output variable.
You can also use algebraic parameters in .PRINT and .PROBE
statements. For example:
.PRINT AlgebraicParam=par(algebraic expression)
You can use the same syntax for .PROBE statements. See Using
Algebraic Expressions on page 381.
User-defined function
Character string
definition
.PARAM paramname=str(string)
Subcircuit default
.PARAM mcVar=AGAUSS(1.0,0.1)
.MEASURE statement
.PRINT | .PROBE
.PRINT | .PROBE
+ outParam=Par_Expression
A parameter definition in HSPICE always uses the last value found in the input
netlist (subject to local versus global parameter rules). These definitions assign
a value of 3 to the DupParam parameter.
374
.PARAM DupParam=1
...
.PARAM DupParam=3
.OPTION PARHIER=GLOBAL
.OPTION PARHIER=LOCAL
Assigning Parameters
You can assign the following types of values to parameters:
Predefined function
Circuit value
Model value
375
Note:
If blown=0, then the fuse is intact (2 ohms). If blown=1 then the fuse is blown
and you get the much higher resistance of 100 meg. To use the eFUSE,
instantiate it with a subcircuit call:
xefuse1 in out efuse blown=0
Parameters in Output
To use an algebraic expression as an output variable in a .PRINT, .PROBE
or .MEASURE statement, use the PAR keyword. In addition to using quotations,
you must define the parameter inside the PAR(...) statement for output.
HSPICE issues an error message if the parentheses do not surround the
376
You can use the signal either as the input to another element in the same
simulation (see Example 1), or you can save the signal and use it as input in
another simulation (see Examples 2 and 3). You can use the definitions in print
or probe output statements only in output statements. They cannot be referred
by any other definitions. For example, you can use the E-element:
Example 1
e1 in 0 vol='5*cos(6.28*v(10)*v(5)*k/360)'
Example 2: Then, you can uses the node 'in' as the input to the other element
in the same netlist, as shown in this example.
M1 dr in src subr pch w=2u l=1u
.subckt inv vdd 0 A B
M1 A B vdd vdd pch w=6u
M2 A B 0
0
nch w=3u
.ends inv
x1 vdd 0 in out inv
l=1u
l=1u
Example 3: You can use .STIM statements to save the signal from the first
simulation in order to create a PWL source.
.stim tran pwl filename=test1 vsrc[0]=v(in) node1=A node2=B
from=0.0ns to=10ns
+ npoints=100
.stim tran pwl filename=test2 vsrc[1]=v(in) node1=C node2=D
from=0.0ns to=10ns
+ npoints=50
In this example, the .STIM command creates two stimulus files named
test1.pwl0_tr0 and test2.pwl2_tr0. Each has a voltage source: one
namedvsrc[0], applied between nodes A and B, and one named vsrc[1],
applied between nodes C and D. The stimulus files have a PWL source function
377
based on the voltage of node 'in' during the time 0.0ns to 10ns with 50
points (for vsrc[0]) and 100 points (for vsrc[1]).
Contents of the test1.pwl0_tr0 file:
vsrc[0] A B PWL
+ 0.
5.0000
+ 200.00000p
2.2114
+ 400.00000p
2.4666
+ 600.00000p
-362.1421m
.........................
You can use the PWL files generated from the .STIM commands as inputs to
another simulation.
Load the signal in WaveView and then export the (x,y) data of the signal in text
format by selecting File > Save > Plotfiles. You need to edit the data so it looks
like a PWL source by adding a source definition and line continuation
characters.
A function must have at least one argument, and can have up to 20 (and in
many cases, more than 20) arguments.
378
funcname1(arg1[,arg2...])=expression1
+ [funcname2(arg1[,arg2...])=expression2] off
Parameter
Description
funcname
arg1, arg2
off
Example
.PARAM f(a,b)=POW(a,2)+a*b g(d)=SQRT(d)
+ h(e)=e*f(1,2)-g(3)
379
parameter at each time point during the simulation to give you the expected
results.
* Test Case
VIN D 0 pwl 0 1 10n 5
.param aaa(x)='x'
.tran 0.1n 20n
vdd vdd 0 5
R1 vdd 0 'V(D) - V(0)'
R2 vdd 0 'aaa(V(D,0))'
.options post
.probe i(*)
.end
Measurement Parameters
.MEASURE statements produce a measurement parameter. The rules for
measurement parameters are the same as for standard parameters, except
that a .MEASURE statement defines measurement parameters, but a .PARAM
statement does not define them. For a description of the .MEASURE statement,
see Specifying User-Defined Analysis (.MEASURE) on page 426.
380
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 111.
Parameters:
.PARAM x=y+3
Functions:
.PARAM rho(leff,weff)=2+*leff*weff-2u
Algebra in elements:
R1 1 0 r=ABS(v(1)/i(m1))+10
.PRINT conductance=PAR(i(m1)/v(22))
Output requires uses the following basic syntax for algebraic expressions:
PAR(algebraic expression)
In addition to using quotations, you must define the expression inside the
PAR(...) statement for output. HSPICE issues an error message if the
381
parentheses do not surround the quotes. The continuation character for quoted
parameter strings is a double backslash (\\).
HSPICE Form
Function
Class
Description
sin(x)
sine
trig
cos(x)
cosine
trig
tan(x)
tangent
trig
asin(x)
arc sine
trig
acos(x)
arc cosine
trig
atan(x)
arc tangent
trig
sinh(x)
hyperbolic
sine
trig
cosh(x)
hyperbolic
cosine
trig
tanh(x)
hyperbolic
tangent
trig
abs(x)
absolute
value
math
sqrt(x)
square root
math
pow(x,y)
absolute
power
math
382
Table 27
HSPICE Form
Function
Class
Description
pwr(x,y)
signed
power
math
x**y
power
log(x)
natural
logarithm
math
log10(x)
base 10
logarithm
math
exp(x)
exponential
math
db(x)
decibels
math
int(x)
integer
math
nint(x)
integer
math
sgn(x)
return sign
math
sign(x,y)
def(x)
parameter
defined
control
smaller of
two args
control
min(x,y)
383
Table 27
HSPICE Form
Function
Class
Description
max(x,y)
val(element)
get value
various
val(element.
parameter)
get value
various
val(model_type:
model_name.
model_param)
get value
various
valm
(elem_name.
model_param)
get value
valp(parameter)
get value
lv(Element)
or
lx(Element)
element
templates
various
384
Table 27
HSPICE Form
Function
Class
Description
v(Node),
i(Element)...
circuit
output
variables
various
cond ?x : y
ternary
operator
<
relational
operator
(less than)
<=
relational
operator
(less than or
equal)
>
relational
operator
(greater
than)
>=
relational
operator
(greater
than or
equal)
==
equality
!=
inequality
&&
Logical
AND
385
Table 27
HSPICE Form
Function
||
Logical OR
Class
Description
Example
.parameters p1=4 p2=5 p3=6
r1 1 0 value='p1 ? p2+1 : p3'
HSPICE reserves the variable names listed in Table 28 on page 386 for use in
elements, such as E, G, R, C, and L. You can use them in expressions, but you
cannot redefine them; for example, this statement would be illegal:
.param temper=100
Table 28
HSPICE Form
Function
Class
Description
time
current
simulation
time
control
temper
current circuit
temperature
control
hertz
current
simulation
frequency
control
386
To centralize the control at the top of the design hierarchy, set global
parameters.
This section describes the scope of parameter names, and how HSPICE
resolves naming conflicts between levels of hierarchy.
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 vendors do not standardize names of circuit
parameters, 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.
387
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.
If the scope of a higher-level parameter is global to all subcircuits at lower levels
of the design hierarchy, higher-level definitions override lower-level parameter
values with the same names. The scope of a lower-level parameter is local to
the subcircuit where you define the parameter (but global to all subcircuits that
are even lower in the design hierarchy). Local scoping rules in HSPICE prevent
higher-level parameters from overriding lower-level parameters of the same
name.
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 learn 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.
388
Example 1
* Subcircuit default definition
.SUBCKT Inv A Y Wid=0 $ Inherit illegal values 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
$ Bad! No widths specified
x2 A Y2 Inv Wid=1u $ Overrides illegal value for Width
This simulation aborts on the x1 subcircuit instance because you never set the
required Wid parameter on the subcircuit instance line. The x2 subcircuit
simulates correctly. Additionally, the instances of the Inv cell are subject to
accidental interference because of exposure of the Wid global parameter is
expose outside the domain of the library. Anyone can specify an alternative
value for the parameter, in another section of the library or the circuit design.
This might prevent the simulation from catching the condition on x1.
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.
389
Note:
Parameter
Location
Pros
Cons
Local
On a .SUBCKT
definition line
Global
Special
.OPTION DEFW
statement
Simple to do.
390
HSPICE supports these kinds of definitions and instances with the following
netlist components:
.PARAM statements
.SUBCKT statements
B-elements
391
For active elements, define the model name by using the original syntax, or
string parameter model-name syntax. (See the HSPICE Reference Manual:
MOSMOD Models for full listing of transistor parameters that can be overridden
in transistor definitions.)
Dxxx nplus nminus str(mname) [[AREA = ]area] [[PJ = ]val]
+ [WP = val] [LP = val] [WM = val] [LM = val] [OFF]
+ [IC = vd] [M = val] [DTEMP = val]
Qxxx nc nb ne [ns] str(mname) [area] [OFF]
+ [IC = vbeval,vceval] [M = val] [DTEMP = val]
Jxxx nd ng ns [nb] str(mname) [[[[AREA] = area | [W = val]
+ [L = val]] [OFF] [IC = vdsval,vgsval] [M = val]
+ [DTEMP = val]
Mxxx nd ng ns [nb] str(mname) [[L = ]length] [[W = ]width]
+ [AD = val] AS = val] [PD = val] [PS = val]
+ [NRD = val] [NRS = val] [RDC = val] [RSC = val] [OFF]
+ [IC = vds,vgs,vbs] [M = val] [DTEMP = val]
+ [GEO = val] [DELVTO = val]
392
Example
.param mypmos=str('p')
.param mynmos=str('n')
.lib 'ltst.lib' TT
.subckt circuit vout vin vdd nmod=str('nch')pmod=str('pch')
m1 vout vin vdd vdd str(pmod) w=4u l=5u
m2 vout vin 0 0 str(nmod) w=2u l=5u
.ends circuit
x1 vout vin vdd circuit dtemp=11 nmod=str(mynmos)pmod=str(mypmos)
393
xInv0 a y0 Inv
$ override DefPwid default,
$ xInv0.Mp1 width=1u
xInv1 a y1 Inv DefPwid=5u $ override DefPwid=5u,
$ xInv1.Mp1 width=1u
.measure tran Wid0 param=lv2(xInv0.Mp1) $ lv2 is the
$ template for
.measure tran Wid1 param=lv2(xInv1.Mp1) $ the channel
$ width
$ lv2(xInv1.Mp1)
.ENDS
Simulating this netlist produces the following results in the listing file:
wid0=1.0000E-06
wid1=1.0000E-06
Parameter Passing
Figure 33 on page 395 shows a flat representation of a hierarchical circuit,
which contains three resistors.
Each of the three resistors obtains its simulation time resistance from the Val
parameter. The netlist defines the Val parameter in four places, with three
different values.
394
Sub1
Sub2
Sub3
r1
r2
r3
1V
-
Figure 33
TEST OF PARHIER
.OPTION list node post=2
+ ingold=2
+ parhier=[Local|Global]
.PARAM Val=1
x1 n0 0 Sub1
.SubCkt Sub1 n1 n2 Val=1
r1 n1 n2 Val
x2 n1 n2 Sub2
.Ends Sub1
.SubCkt Sub2 n1 n2 Val=2
r2 n1 n2 Val
x3 n1 n2 Sub3
.Ends Sub2
.SubCkt Sub3 n1 n2 Val=3
r3 n1 n2 Val
.Ends Sub3
.OP
.END
The total resistance of the chain has two possible solutions: 0.3333 and
0.5455.
You can use .OPTION PARHIER 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).
The example in Figure 33 produces the results in Table 30, based on how you
set .OPTION PARHIER to local/global:
Table 30
Element
PARHIER=Local
PARHIER=Global
r1
1.0
1.0
r2
2.0
1.0
395
Table 30
Element
PARHIER=Local
PARHIER=Global
r3
3.0
1.0
396
To check your circuits for global parameter definitions, use the .PARAM
statement.
If any of the names from the first three checks are identical, set up two
HSPICE simulation jobs: one with .OPTION PARHIER=GLOBAL, and one
with .OPTION PARHIER=LOCAL. Then look for differences in the output.
12
Simulation Output
12
Describes how to use output format statements and variables to display steady
state, frequency, and time domain simulation results.
You can also use output variables in behavioral circuit analysis, modeling, and
simulation techniques. To display electrical specifications such as rise time,
slew rate, amplifier gain, and current density, use the output format features.
HSPICE ships hundreds of examples for your use; see Listing of
Demonstration Input Files for paths to demo files.
For descriptions of individual HSPICE commands referenced in this chapter,
see the HSPICE Reference Manual: Commands and Control Options.
Note:
Vdmargin Output
397
Troubleshooting Issues
Output Commands
Output Variables
Output Commands
The input netlist file contains output statements, including .PRINT,
PROBE, .MEASURE, .DOUT, and .STIM. Each statement specifies the output
variables, and the type of simulation result, to displaysuch as .DC, .AC,
or .TRAN. When you specify .OPTION POST, HSPICE puts all output
variables referenced in .PRINT, .PROBE, .MEASURE, .DOUT, and .STIM
statements into HSPICE output files.
Use the .STIM command if you want to reuse the simulation results in another
simulation. For example:
.stim tran pwl filename=new v(2)
398
Commands and Control Options for information on all listed statements. See
Table 32 on page 421 for output table variable types.
Table 31
Output Statements
Output
Statement
Description
Prints numeric analysis results in the output listing file (and postprocessor data, if you specify .OPTION POST). See .PRINT.
.PROBE
.MEASURE
Prints the results of specific user-defined analyses (and postprocessor data, if you specify .OPTION POST), to the output
listing file. See .MEASURE (or) .MEAS.
.DOUT
(HSPICE only)
.STIM
(HSPICE only)
Output Variables
The output format statements require special output variables, to print or plot
analysis results for nodal voltages and branch currents. HSPICE uses the
following output variables:
AC analysis
.MEASURE statement
parametric analysis
399
400
.PRINT Statement
.PROBE Statement
.PRINT Statement
The .PRINT statement specifies output variables for which HSPICE prints
values.
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.
Standalone HSPICE RF prints the .PRINT output data to a separate file.
You can include wildcards in .PRINT statements.
You can also use the iall keyword in a .PRINT statement, to print all branch
currents of all diode, BJT, JFET, or MOSFET elements in your circuit design.
HSPICE outputs complex data for i(*), i1(*), i2(*), i3(*), i4(*) of an AC analysis
into *.ac# files when specifying the POST, PSF, CSDF or WDF formats for
both the .PRINT and .PROBE commands.
Example
If your circuit contains four MOSFET elements (named m1, m2, m3, m4),
then .PRINT iall (m*)is equivalent to .PRINT i(m1) i(m2) i(m3) i(m4). It
prints the output currents of all four MOSFET elements. A resultant PSF file has
only one signal, i(c0), that contains two real and imaginary points (Re, Im) for
each AC frequency point. In other words, if you open the PSF file in a waveform
viewer, you see one signal name that contains both the real and Imaginary
data, per frequency point.
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.
.PROBE Statement
HSPICE usually saves all voltages, supply currents, and output variables.
Set .OPTION PROBE, to save output variables only. Use the .PROBE
statement to specify the quantities to print in the output listing.
401
If your interest is only in the output data file, and you do not want tabular or plot
data in your listing file, set .OPTION PROBE and use .PROBE to select the
values to save in the output listing.
You can include wildcards in .PROBE statements.
402
In the preceding test case (named test wildcard), if you use an .AC
statement instead of a .DC statement, you can use any valid AC outputvariable types with the wildcards v(n2?) and v(n2*,1). For example:
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)
To output the branch current at all terminals of a diode, BJT, JFET or MOSFET,
use the output template iall. For example, iall(m*) is equivalent to:
i1(m*)
i2(m*)
i3(m*)
i4(m*)
403
This syntax example prints the voltages of all nodes in subckt x1.x2 that do
not start with n or a, and the current of all elements in subckt x1.x2 that do not
start with either n or a.
When you set val2 to 1, the wildcard match applies to the same depth level
where the .print statement is.
When the val2 is 2, it applies to the same level and to one level below the
current level where .print is.
When val2 is -1, the wildcard match applies to all the depth levels below
and including the current level of .print statement.
By default HSPICE prints only the instance node names and not the subcircuit
ports. If you include .print v(*) in the netlist, HSPICE outputs the top level
instance nodes 1 and 2. However, if you want to print the subcircuit ports in
and out then you need to use .OPTION PROBE along with an explicit .PROBE
command. In this case:.PROBE tran v(x1.in) v(x1.out)
404
HSPICE supports the following plot file formats: *.tr#, *.ac#, and *.sw#. If
a plot fails to open, it is due to one of the following reasons:
To prevent this error on a Sun workstation, enter the following operating system
command, before you start the simulation:
limit descriptors 128
For platforms other than Sun workstations, ask your system administrator to
help you increase the number of files that you can open concurrently.
405
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
Print statement 1 prints out the voltage on the B input node, and on the N1
internal node for every instance of the nor2 subcircuit.
.PRINT v(1) v(X1.A) $ Print statement 2
The preceding .PRINT statement specifies two ways to print the voltage on the
A input of the X1 instance.
.PRINT v(3) v(X1.Y)
The preceding .PRINT statement specifies three different ways to print the
voltage at the Y output of the X1 instance (or the A input of the X2 instance).
.PRINT v(X2.N1) $ Print statement 4
The preceding .PRINT statement prints the voltage on the N1 internal node of
the X2 instance.
.PRINT i(X1.M1) $ Print statement 5
406
Example 2
X1 5 6 YYY
.SUBCKT YYY 15 16
X2 16 36 ZZZ
R1 15 25 1
R2 25 16 1
.ENDS
.SUBCKT ZZZ 16 36
C1 16 0 10P
R3 36 56 10K
C2 56 0 1P
.ENDS
.PRINT V(X1.25) V(X1.X2.56) V(6)
Value
Description
V(X1.25)
V(X1.X2.56)
Local node to the ZZZ subcircuit. The X2 subcircuit calls this node; X1
calls X2.
V(6)
This example prints voltage analysis results at node 56, within the X2 and X1
subcircuits. The full path, X1.X2.56, specifies that node 56 is within the X2
subcircuit, which in turn is within the X1 subcircuit.
407
model parameters of each unique model card. Each instance and .model
statement is in one line. For example:
Output file: *. model_info#
<sweep param =>
*** mosfets ***
Element Name
Model Name
Instance_name1
model_name
Instance_name2
model_name
Model_name1
.model
Model_name2
408
completion and ett is the estimated total time. See the sample below.
99.6% time = 199.200374 ns ( etc = 1:05, ett = 4:26:22 )
( wall = 4:25:16 cpu = 1:11:06:58 s=7.9424 )
99.7% time = 199.404835 ns ( etc = 49.4 sec, ett = 4:26:20
( wall = 4:25:30 cpu = 1:11:08:49 s=7.94239 )
99.8% time = 199.600000 ns ( etc = 32.9 sec, ett = 4:26:20
( wall = 4:25:47 cpu = 1:11:11:04 s=7.94241 )
99.9% time = 199.800806 ns ( etc = 16.5 sec, ett = 4:26:22
( wall = 4:26:05 cpu = 1:11:13:28 s=7.9424 )
100.0% time = 200.000000 ns ( etc = 0.0 sec, ett = 4:26:19
( wall = 4:26:19 cpu = 1:11:15:12 s=7.94241 )
100.0% time = 200.000000 ns ( etc = 0.0 sec, ett = 4:26:19
( wall = 4:26:19 cpu = 1:11:15:12 s=7.94241 )
)
)
)
)
)
Element templates (HSPICE only). For each device type, the templates
contain:
409
state variables
element charges
capacitance currents
capacitances
derivatives
Print Control Options on page 405 summarizes the codes that you can use, to
specify the element templates for output in HSPICE.
The following sections discuss these topics.
Nodal Voltage
Wildcard Support
Print Power
410
Nodal Voltage
Syntax
V(n1[,n2])
Parameter
Description
n1, n2
Description
Vxxx
Example
.PRINT TRAN I(VIN)
.PRINT DC I(X1.VSRC)
.PRINT DC I(XSUB.XSUBSUB.VY)
Description
411
Example
The following example outputs the gate node voltage for the MOSFET.
.probe tran v2(XINST1.MN0)
With the F-2011.09 release, the direction of the current can follow
the HSPICE-specific mode or the generic current polarity mode,
based on use of the .OPTION GEN_CUR_POL=ON|OFF. The
default is OFF. See .OPTION GEN_CUR_POL in the HSPICE
Reference Manual: Commands and Control Options.
Syntax
In(Wwww)
Iall(Wwww)
Parameter
Description
Wwww
Iall (Wwww)
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.
412
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, by default, it inserts a zero-volt power supply, in
series with branch elements to enable the HSPICE current direction rule to be
more device-aware. The .OPTION GEN_CUR_POL=ON|OFF is available to
allow use of Custom Designer + HSPICE. When .OPTION GEN_CUR_POL=ON,
the i2() ... in() direction uses a generic direction rule, that is: the current in
is positive, and the current out is negative (see Figure 34 on page 414 through
Figure 39 on page 415).
If HSPICE cannot interpret a .PRINT statement that contains a branch current,
it generates a warning.
Branch current direction for the elements in s defined in terms of arrow-notation
(current direction) and node-position number (terminal type). (See Figure 34
though Figure 39.)
node1
.OPTION GEN_CUR_POL=ON
I1 (R1)
R1
R1
I2 (R1)
Figure 34
node2
node1
I2 (R1)
node2
.OPTION GEN_CUR_POL=ON
node1
node1
I1(L1)
I1(C1)
I1(L1)
I1(C1)
I2(L1)
I2(C1)
I2(L1)
I2(C1)
node2
Figure 35
node2
413
.OPTION GEN_CUR_POL=ON
I1 (D1)
I1 (D1)
I2 (D1)
I2 (D1)
Figure 36
.OPTION GEN_CUR_POL=ON
node2
(gate node)
I2 (J1)
Figure 37
.OPTION GEN_CUR_POL=ON
node1 (drain node)
I1 (M1)
I1 (M1)
node4 (substrate node)
I4 (M1)
I2 (M1)
I4 (M1)
I2 (M1)
Figure 38
414
.OPTION GEN_CUR_POL=ON
Figure 39
415
Note:
Wildcard Support
Wildcard support is available for current subcircuit pins in single and multiple
hierarchies using asterisk (*) and question mark (?) characters. (Exception: (?)
is disallowed.) For example:
Single Hierarchy
.print isub(x1.*) isub(x1.a?)
Multi-level Hierarchy
.print isub(x1.x2.*) isub(x1.x?.a?)
Print Power
.PRINT [DC | TRAN] P(element_or_subcircuit_name)POWER
HSPICE calculates power only for transient and DC sweep analyses. Use
the .MEASURE statement to compute the average, RMS, minimum, maximum,
and peak-to-peak value of the power. The POWER keyword invokes the total
power dissipation output.
HSPICE RF supports p(instance) but not the POWER variable in DC/transient
analysis.
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
.PRINT DC POWER
P(IIN)
P(RLOAD)
P(R1)
.PRINT DC POWER
P(V1)
P(RLOAD)
P(VS)
.PRINT TRAN P(Xf1) P(Xf1.Xh1)
416
Parameter
Description
Pd
Parameter
Description
Ido
Icap
Vp'n
Vpp'
Vertical
d = Vc' e' Ico + Vb' e' Ibo + Vcc' Ictot + Vee' Ietot + Vsc' Iso Vcc' Ist
Lateral
Pd = Vc' e' Ico + Vb' e' Ibo + Vcc' Ictot + Vbb' Ibtot + Vee' Ietot
Vsb' Iso Vbb' Istot
Parameter
Description
Ibo
Ico
Iso
Pd
Ibtot
Ictot
Ietot
Istot
Vb'e'
Vbb'
Vc'e'
417
Parameter
Description
Vcc'
Vee'
Vsb'
Vsc'
418
Parameter
Description
Icgd
Icgs
Ido
Igdo
Igso
Pd
Vd's'
Vdd'
Vgd'
Vgs'
Vs's
Description
Ibdo
Ibso
Icbd
Icbs
Icgd
Icgs
Ido
Pd
Vbd'
Vbs'
Vd's'
Vdd'
Vs's
419
Example 2: This example only outputs the operating point information of the
variables I(VIN) and I(X1.VSRC).
.PRINT OP I(VIN) I(X1.VSRC)
Impedance (Z), admittance (Y), hybrid (H), and scattering (S) parameters.
Table 32 lists AC output-variable types. In this table, the type symbol appends
the variable symbol, to form the output variable name. For example, VI is the
imaginary part of the voltage, or IM is the magnitude of the current.
Table 32
420
Type Symbol
Variable Type
DB
decibel
imaginary part
magnitude
phase
Table 32
Type Symbol
Variable Type
real part
group delay
Specify real or imaginary parts, magnitude, phase, decibels, and group delay
for voltages and currents.
The following sections topics discuss these topics:
Nodal Voltage
Network
421
Nodal Voltage
Syntax
Vz(n1<,n2>)
Parameter
Description
n1, n2
Specifies node names. If you omit n2, HSPICE assumes ground (node 0).
Example
This example applies to HSPICE, but not HSPICE RF. It prints the magnitude of
the AC voltage of node 5, using the VM output variable. HSPICE uses the VDB
output variable to print the voltage at node 5, and uses the VP output variable
to print the phase of the nodal voltage at node 5.
.PRINT AC VM(5) VDB(5) VP(5)
Description
Vxxx
Example
.PRINT AC IR(V1) IM(VN2B) IP(X1.X2.VSRC)
422
Description
Wwww
423
Note:
Example
INTEG.SP ACTIVE INTEGRATOR
****** INPUT LISTING
******
V1
1
0
.5
AC
1
R1
1
2
2K
C1
2
3
5NF
E3
3
0
2 0 -1000.0
.AC DEC
15
1K
100K
.PRINT AC
VT(3)
(0,4U)
.END
VP(3)
Network
Syntax
Xij (z), ZIN(z), ZOUT(z), YIN(z), YOUT(z)
Parameter
Description
ij
Output type (see Table 32 on page 421). If you omit z, HSPICE prints
the magnitude of the output variable.
ZIN
Input impedance. For a one-port network, ZIN, Z11, and H11 are the
same.
ZOUT
Output impedance.
YIN
Input admittance. For a one-port network, YIN and Y11 are the same.
YOUT
Output admittance.
Example
.PRINT
.PRINT
.PRINT
424
AC
AC
AC
Z11(R)
ZIN(R)
S22(M)
Z12(R)
ZIN(I)
S22(P)
Y21(I)
YOUT(M)
S21(R)
Y22
S11
S11(DB)
YOUT(P)
H11(M)
H21(P)
H12(R)
Description
ovar
Output type (only for distortion). If you omit z, HSPICE outputs the
magnitude of the output variable.
Example
.PRINT DISTO HD2(M) HD2(DB)
Prints the magnitude and decibel values of the second harmonic distortion
component, through the load resistor that you specified in the .DISTO
statement (not shown). You cannot use the .DISTO statement in HSPICE RF.
.PRINT NOISE INOISE ONOISE
Note:
You can specify the noise and distortion output variable, and
other AC output variables, in the .PRINT AC statements.
Elname
425
Parameter Description
Property
LV
LX
nn
Code number for the desired parameter (See Element Template Listings
(HSPICE Only) on page 440 and MOSFET Output Templates, Table 4,
Parameters in MOSFET Output Templates).
Elname
Example
.PRINT TRAN V(1,12) I(X2.VSIN) I2(Q3) DI01:GD
.PRINT TRAN X2.M1:CGGBO M1:CGDBO X2.M1:CGSBO
426
This section describes the fundamental measurement modes and includes the
following topics:
Continuous Measurement
Equation Evaluation
INTEGRAL Function
DERIVATIVE Function
ERROR Function
Generating a Measure File (*.mt0, *.ac0, etc.) with All Values in a Single
Row
In this example, .meas matches the second .tran statement and generates
only one measure output file.
Users need to be aware that there are certain differences on how HSPICE
handles .measures are handle in the case of complex measurements.
Complex .MEASURE statements are measure statements dependent on other
measure statements.
Undefined variables is a common reported issue in .measure cases for
HSPICE that lead to failed measurements. You may not find the same case in
the FASTSPICE tools due to the differences in how other tools process
427
.measures.
Note:
statement at the same hierarchical level, the simulation terminates and reports
an error.
No error occurs if parameter assignments are at different hierarchical
levels. .PRINT statements that occur at different levels do not print hierarchical
information for parameter name headings.
Example
In HSPICE RF simulation output, you cannot apply .MEASURE to waveforms
generated from another .MEASURE statement in a parameter sweep.
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
429
You can use these measure statements in unity gain frequency or phase
measurements. You can also use these statements to measure the time,
frequency, or any parameter value:
The measurement starts after a specified time delay, TD. To find a specific
event, set RISE, FALL, or CROSS to a value (or parameter), or specify LAST for
the last event.
LAST is a reserved word; you cannot use it as a parameter name in the above
measure statements. For definitions of parameters of the measure statement,
see Displaying Simulation Results on page 400.
For a full demonstration file for FIND and WHEN functions follow the path to
ampgain.sp, which sets unity gain frequency of a BJT diff pair, in Circuit
Optimization Examples on page 991 in this user guide.
Continuous Measurement
The continuous measurement feature allows you to specify the continuous
measurement of a result derived from a DC, AC, or transient analysis. This
feature only applies to TRIG-TARG and Find-When functions. For example:
.measure tran_cont vout1 find v(out1) when v(a1)=2.5 fall=1
The .measure statements continuously finds the voltage out1 when the
voltage value of node a1 reaches to 2.5 starting from the first falling edge.
See .MEASURE (Continuous Results) in the HSPICE Reference Manual:
Commands and Control Options.
430
The additional output file name is t1_vout1_cont.mt, if the output file prefix
is t1.
Note:
Equation Evaluation
Use the Equation Evaluation form of the .MEASURE statement to evaluate an
equation that is a function of the results of previous .MEASURE statements. The
equation must not be a function of node voltages or branch currents.
The expression option is an arithmetic expression that uses results from
other prior .MEASURE statements. If equation or expression includes node
voltages or branch currents, Unexpected results may incur.
AVG calculates the area under an output variable divided by the periods of
interest.
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.
431
MAX reports the maximum value of the output function over the specified
interval.
INTEGRAL Function
The INTEGRAL function reports the integral of an output variable, over a
specified period.
DERIVATIVE Function
The DERIVATIVE function provides the derivative of:
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. The following discusses the ERR equations:
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.
433
NPTS
1
ERR = ---------------
NPTS
2
Mi Ci
--------------------------------------------
max (MINVAL,Mi)
i=1
ERR1
ERR1 computes the relative error at each point. For NPTS points, HSPICE
calculates NPTS ERR1 error functions. For device characterization, the ERR1
approach is more efficient than the other error functions (ERR, ERR2, ERR3).
Mi Ci
ERR1 i = ---------------------------------------------- , i=1,NPTS
max (MINVAL,M i)
HSPICE does not print out each calculated ERR1 value. When you set the
ERR1 option, HSPICE calculates an ERR value, as follows:
NPTS
1
ERR = ---------------
NPTS
1/2
ERR1i2
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 = --------------------------------------------- , i=1,NPTS
max (MINVAL,M i)
The returned value printed for ERR2 is:
NPTS
1
ERR = ---------------
NPTS
ERR2i
i=1
ERR3
M
log ------i
Ci
ERR3 i = ----------------------------------------------------------------- , i=1,NPTS
log [ max (MINVAL, M i ) ]
The + and - signs correspond to a positive and negative M/C ratio.
434
Note:
vmax
temper
5.0072
3.386e-09
25.0000
vmin
alter#
-4.504e-03
trise
4.778e-09
vmin
-4.504e-03
trise
tfall
temper alter#
4.778e-09 3.386e-09 25.0000 1
435
mt0 file. For example, in the following netlist, four measures fail:
.param t_step=600u
.tran 0.1u '2*t_step'
vBGR BGR 0 pulse ( 0 3 0ns 10us 10us 50u 100u)
.meas tran vbgr_out find V(BGR) at 't_step/20'
.meas tran trise1 when V(BGR)='0.9*vbgr_out'
rise=last
.mosra reltotaltime=3.15e+8 relstep=7.88e+7
.option post=1 probe
.end
1.0000
1.0000
3. Run the post process measure utility as follows to successfully generate all
measurement files:
hspice
hspice
hspice
hspice
436
-meas
-meas
-meas
-meas
measure_file
measure_file
measure_file
measure_file
-i
-i
-i
-i
*.tr1
*.tr2
*.tr3
*.tr4
-o
-o
-o
-o
tr1.lis
tr2.lis
tr3.lis
tr4.lis
The first syntax specifies a single threshold voltage, VTH. Any voltage level
above VTH is high; any level below VTH is low.
.DOUT nd VTH (time state time_state)
where:
nd is the node name
VTH is the single voltage threshold
time is an absolute time-point (max 60)
state is one of the following expected conditions of the nd node, at the
specified time:
0: expect
ZERO, LOW
1: expect
ONE, HIGH
The second syntax defines a threshold for both a logic high (VHI) and low
(VLO).
.DOUT nd VLO VHI (time state time_state)
where:
nd is the node name
VLO is the voltage of the logic low state
VHI is the voltage of the logic high state
time is an absolute time-point (max 60)
state is one of the following expected conditions of the nd node, at the
specified time:
0: expect ZERO, LOW
1: expect ONE, HIGH
437
If you specify both syntaxes (VTH, plus VHI and VLO), then
HSPICE processes only VTH, and ignores VHI and VLO.
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.
The legal values for state are:
0: Expect ZERO
1: Expect ONE
X, x: Do not care.
Example
The .PARAM statement in the following example sets the value of the VTH
variable to 3. The .DOUT statement operates on the node1 node and uses
VTH as its threshold voltage.
.PARAM VTH = 3.0
.DOUT node1 VTH(0.0n 0 1.0n 1
+ 2.0n X 3.0n U 4.0n Z 5.0n 0)
HSPICE supports multiple nodes in the .DOUT statement. This enables you to
verify signals at the same time point in a single.DOUT statement.
For example:.DOUT
438
B C D (0n 1 1 0 5n 0 0 0)
Signals to transform.
Independent variables.
One .STIM statement produces one corresponding output file. To control the
precision and data format, you can use the same options as you would in a
normal simulation. For example:
.option numdgt=6
$ sets precision, range is 0 to 10, numdgt=4
is the default
.option ingold=0
$ sets format, 0=eng 1=combined 2=exponential
These settings affect how data prints out for your entire testcase. There is no
way to only affect the .STIM command because the simulation data is the
source of the output of the .STIM command.
For the syntax and description of the .STIM statement, see the .STIM
command in the HSPICE Reference Manual: Commands and Control Options.
Output Files
The .STIM statement generates the following output files:
Output File Type
Extension
PWL Source
439
Extension
Data Card
Symbol
Description
tr | ac | sw
tr=transient analysis.
ac=AC analysis.
sw=DC sweep analysis.
440
Resistor (R-element)
Name
Alias
Description
LV1
LV2
Table 33
Name
Alias
Description
TC1
LV3
TC2
LV4
Table 34
Capacitor (C-element)
Name
Alias
Description
CEFF
LV1
IC
LV2
Initial condition.
LX0
CURR
LX1
VOLT
LX2
Table 35
Inductor (L-element)
Name
Alias
Description
LEFF
LV1
IC
LV2
Initial condition.
FLUX
LX0
VOLT
LX1
CURR
LX2
Table 36
Name
Alias
Description
LV1
Mutual inductance.
441
Table 37
Name
Alias
Description
CURR
LX0
LX0
LX0
CV
LX1
Controlling voltage.
CQ
LX1
DI
LX2
ICAP
LX2
VCAP
LX3
Table 38
Name
Alias
Description
VOLT
LX0
Source voltage.
CURR
LX1
CV
LX2
Controlling voltage.
DV
LX3
Table 39
442
Name
Alias
Description
CURR
LX0
CI
LX1
Controlling current.
DI
LX2
Table 40
Name
Alias
Description
VOLT
LX0
Source voltage.
CURR
LX1
Source current.
CI
LX2
Controlling current.
DV
LX3
Table 41
Name
Alias
Description
VOLT
LV1
DC/transient voltage.
VOLTM
LV2
AC voltage magnitude.
VOLTP
LV3
AC voltage phase.
Table 42
Name
Alias
Description
CURR
LV1
DC/transient current.
CURRM
LV2
AC current magnitude.
CURRP
LV3
AC current phase.
Table 43
Diode (D-element)
Name
Alias
Description
AREA
LV1
AREAX
LV23
IC
LV2
443
Table 43
Name
Alias
Description
VD
LX0
IDC
LX1
GD
LX2
QD
LX3
ICAP
LX4
LX5
PID
LX7
Table 44
444
BJT (Q-element)
Name
Alias
Description
AREA
LV1
Area factor.
ICVBE
LV2
ICVCE
LV3
MULT
LV4
FT
LV5
FT (Unity-gain bandwidth).
ISUB
LV6
GSUB
LV7
Substrate conductance.
LOGIC
LV8
LOG 10 (IC).
LOGIB
LV9
LOG 10 (IB).
Table 44
Name
Alias
Description
BETA
LV10
BETA.
LOGBETAI
LV11
ICTOL
LV12
IBTOL
LV13
RB
LV14
Base resistance.
GRE
LV15
GRC
LV16
PIBC
LV18
PIBE
LV19
VBE
LX0
VBE.
VBC
LX1
CCO
LX2
CBO
LX3
Base current (CBO) (DC only, not accounted for chargeinduced current).
GPI
LX4
GU
LX5
GM
LX6
G0
LX7
QBE
LX8
CQBE
LX9
QBC
LX10
445
Table 44
Name
Alias
Description
CQBC
LX11
QCS
LX12
CQCS
LX13
QBX
LX14
CQBX
LX15
GXO
LX16
CEXBC
LX17
CAP_BE
LX19
CAP_IBC
LX20
CAP_SCB
LX21
CAP_XBC
LX22
CMCMO
LX23
(TF*IBE) /vbc.
VSUB
LX24
Substrate voltage.
Table 45
446
JFET (J-element)
Name
Alias
Description
AREA
LV1
VDS
LV2
VGS
LV3
PIGD
LV16
PIGS
LV17
Table 45
Name
Alias
Description
VGS
LX0
VGS.
VGD
LX1
CGSO
LX2
Gate-to-source (CGSO).
CDO
LX3
CGDO
LX4
GMO
LX5
Transconductance (GMO).
GDSO
LX6
GGSO
LX7
GGDO
LX8
QGS
LX9
CQGS
LX10
QGD
LX11
CQGD
LX12
CAP_GS
LX13
Gate-source capacitance.
CAP_GD
LX14
Gate-drain capacitance.
QDS
LX16
CQDS
LX17
GMBS
LX18
Table 46
Name
Alias
Description
MU
LX0
447
Table 46
Name
Alias
Description
LX1
LX2
Table 47
Name
Alias
Description
LEFF
LV1
IC
LV2
Initial condition.
FLUX
LX0
VOLT
LX1
Vdmargin Output
Output template Vdmargin(m*) (alias: LX286(m*)) is provided to probe the
Vdmargin simulation result of selected or all MOSFET elements. The template
prints in the *.lis file and as .sw0/.tr0 files.
For example:
.print dc Vdmargin(m1) Vdmargin(m2)
448
449
Simulation
mins
Simulation
mins
Simulation
mins
Simulation
mins
Simulation completed :
elapsed time: 50 mins
Simulation completed :
elapsed time: 1 hr 1 mins
Simulation completed :
elapsed time: 1hr 10 mins
Simulation completed :
elapsed time: 1hr 21 mins
Simulation completed :
elapsed time: 1hr 40 mins
Simulation completed : 100% transient
1hr 60 mins
*****************(Print info)**<e.g.,
LIST,OPTS,NODES,etc.>
trig= 1.4465E-06
***************************************************************
****** Circuit Statistics ******
Resistors
: 480
Capacitors
: 282
Current Sources
: 1
MOSFETs
: 22
Voltage Sources
: 24
**********************************
Total Elements
: 65
Total Nodes
: 47
**********************************
****************Resource Summary*******************************
****** HSPICE Multi-Threading Info ****** < To be printed only
if multi-threading is used >
Command Line Threads Count:
1
Available CPU Count:
2
Actual Model Evaluation(Load) Threads Count:
1
Actual Solver Threads Count:
1
450
*******************************************
****** HSPICE Multi-Processing Info ****** < To be printed only
if multi-processing is used >
Command Line Core Count:
1
Available CPU core Count:
2
Actual Model Evaluation(Load) Core Count:
1
Actual Solver Core Count:
1
*******************************************
******* Runtime Summary (seconds) *******
Analysis
Time
# Points
tot. iter conv.iter
op point
1.01
1
455
transient
36.73
3000001
88865
31379 rev=0
readin
0.24
errchk
0.03
setup
0.04
output
0.00
peak memory used
1253 kbytes
total cpu time
12338.31 seconds
total elapsed time
11241 seconds
job started at
09:00:05 05/09/2008
job ended
at
09:00:46 05/09/2008
***************************************************************
# Points: TSTOP/TSTEP+1
conv.iter: Count of only the iterations that converge. This number equals
the number of time points which HSPICE evaluates to form the waveforms.
rev (on the transient row): Number of times that the simulator had to
reject timestep (reversals). This measures how difficult the design is to
simulate; if rev is very high, it means the circuit is difficult to converge. Each
rejected timestep equals eight iterations and no solution.
451
1:mn3
1:164
1:214
1:159
0:vss
0:nch
288.0000n
90.0000n
1:mn4
1:160
1:106
1:165
0:vss
0:nch
288.0000n
90.0000n
You can see w eff and l eff (scaled) for each MOS instance in the
circuit name directory section. The "1" in 1:mn1 refers to the subckt
instance number:
****** circuit name directory
circuit number to circuit name directory
number circuitname
definition
0 main circuit
1 xmn1.
nch_mac
multiplier
1.00
For MOS models inside subckts, preface the MOS instance name with the
subckt name:
.print tran LX62(xmn1.mn1) $ using the subckt name
.print tran LX62(1:mn1)
$ using the subckt number
You can also wildcard the subckt name and/or the MOS instance name:
452
.print
.print
.print
.print
tran LX63(*.mn1)
$ all MN1 lengths one level down
tran LX63(XMN1.*)
$ all MOS instance lengths below XMN1
tran LX63(*.*)
$ all MOS instance lengths two levels down
tran LX63(*)
$ all MOS instance lengths in the design
The following is a complete example, naming the outputs width and length:
.print tran width=par('lx62(1:mn1)') length=par('lx63(1:mn1)')
width
288.0000n
288.0000n
288.0000n
288.0000n
length
90.0000n
90.0000n
90.0000n
90.0000n
453
The *.valog file, Verilog-A log file, which contains Verilog-A specific
message from compiling and simulating phase. The contents of *.valog
file also echoes to the *.lis file.
Contains
pvaRTL.log
454
For example:
Command-line statement
output.pvadir
hspice test.sp
test.pvadir
test.pvadir
For further information, see Using Verilog-A in the HSPICE User Guide:
Advanced Analog Simulation and Analysis.
455
Figure 40
While you can use the wish command to view your layerstack, you cannot
zoom, edit, or netlist out a new stack. You can edit the *.str file. However, any
changes you make are not reflected in your field solver model.
For detailed information, see Visualizing Cross-Sectional Geometric
Information in the HSPICE User Guide: Signal Integrity Modeling and Analysis.
456
Where, HSPICE redirects the simulation results to the specified folder with
respect to the current working directory. However, you should create the
destination folder before you start the simulation. Otherwise, HSPICE returns
an error message and aborts.
457
Likely, the best option is to use File > Export Waveform Data in Custom
WaveView (or CTRL-E).
1. You name the output file, set a step size, and the result looks like this:
#format table ## [Custom WaveView] 14:00:27 Mon Aug 24 2009
FREQ
im(v1)
1.000E+002 9.632E-003
1.010E+002 9.418E-003
1.020E+002 9.204E-003
1.030E+002 8.990E-003
1.040E+002 8.776E-003
1.050E+002 8.562E-003
...
1
1
1
1
9.63231e-003
8.50584e-003
7.45516e-003
6.46993e-003
/0.0
/0.0
/0.0
/0.0
3. Use the stim data card. In the example above, you create an ASCII file
foo.dat0_ac0. However, the file does not preserve the frequency values,
only the magnitudes. In the .stim card, data is a keyword that creates a
file which HSPICE can read in with the .data statement but is also userreadable. The output file is takes the name foo, and the data set name is
my_current.
.data my_current
imv1
9.632e-03
8.506e-03
7.455e-03
6.470e-03
5.542e-03
4.663e-03
...
458
4. When you use .print statements, the listing file saves the data in column
form. You have to cut and paste it from the listing file, but the process is
effective.
freq
i mag
100.00000
105.26316
110.52632
115.78947
121.05263
...
v1
9.632e-03
8.506e-03
7.455e-03
6.470e-03
5.542e-03
To understand how to control the time point intervals when using .print to
output data to the listing file, see .OPTION INTERP in the HSPICE
Reference Manual: Commands and Control Options.
5.
A final important point is when dealing with AC voltages and currents: be sure
to specify which of the complex parts you want in your output. The default is
real + imaginary but you can select which components you get by adding a
modifier after the v for voltage:
For a discussion of how to control the time point intervals of data in a plot file,
refer to How TSTEP Affects a Transient Simulation.
-gz
459
PSF Converter
PWL/DATA/VEC Converter
PSF Converter
Table 48
Supported Platforms
Linux RHEL
Linux SUSE
Solaris
Windows
IBM AIX5.1
Yes
Yes
Yes
Yes
Yes
Syntax
converter -t PSF -i input_file [-o output_file] [-a |-b]
Table 49
460
Argument
Description
-t
Table 49
Argument
Description
-i
Specifies input file name. The input file must be the output file that
HSPICE generates with the POST output control option.
-o
-a
-b
Specifies the binary format for the output file. By default, the output file
is in binary format. The content included in angled brackets (< >) is
optional.
Example
converter -t PSF -i testpost.tr0 -o testpsf
The input file is testpost.tr0, which HSPICE generates with the POST
option. The output file name is testpsf. After running, HSPICE generates two
new files: testpsf.psf and logFile. The testpsf.psf file is a PSF file
that you can view with the Analog Waveform Display (AWD). The logFile is
necessary for the AWD to load the waveform.
PWL/DATA/VEC Converter
Linux SUSE
Linux RHEL
Solaris
Windows
IBM
Yes
Yes
Yes
Yes
Yes
461
Syntax
converter -t PWL/DATA/VEC -i input_file <-o output_file>
Table 50
Argument
Description
-t
-i
Specifies the input file name. Input files are the output files which
HSPICE generates with the POST=x or CSDF=x output control options.
-o
Specifies the output file name. If you do not specify the output file name,
the converter automatically assigns the following file names:
input_filename.tr#_PWL#
input_filename.ac#_DAT#
input_filename.tr#_DAT#
input_filename.sw#_DAT#
input_filename.tr#_VEC#
Note:
Transient analysis must generate the input file for PWL and VEC.
The following input prompts appear one at a time and require your specified
entries on the command line.
1. Enter the number of output variables(>0):
Specify the number of output variables from the waveform file to convert.
2. Enter output variables reused:
Specify the name of the node(s) in the design to convert. The node names
must match a node name in the waveform file that you are converting.
3. Enter name of the source (optional):
462
463
Dispersed time points must be increasing in value when the stimulus type is
PWL or VEC.
For the optional items, you can enter the Return Key directly to adopt the
default value.
//
//
//
464
0 0
1 1
0 0
100n 100n
100 100
Troubleshooting Issues
The following sections discuss these topics:
Two or more inductors connect in a loop and there is no limit to the current.
465
Figure 41
When you set .option POST=2, HSPICE prints the waveform file as ASCII
data.
When used with the default post-processing output version,
POST_VERSION=9601, limits the number of significant digits. This can cause a
loss of resolution in the waveforms.
If you set .option POST_VERSION=2001 in addition to .option POST=2,
then the ASCII waveform data contains more significant digits and the
resolution increases and the rising and falling edges are present (Figure 42).
466
Figure 42
To generate only three *.tr# files, you need to change the .TRAN tstop
value in an .ALTER, then make tstop a parameter and change the parameter
in the .ALTER blocks, as follows:
467
.param ts = 20n
.tran 1n 'ts'
.alter
.param ts = 15n
.alter
.param ts = 10n
.end
468
469
470
13
13
HSPICE ships numerous examples for your use; see Listing of Demonstration
Input Files for paths to demo files.
For descriptions of individual HSPICE commands referenced in this chapter,
see the HSPICE Reference Manual: Commands and Control Options. For
discussion of use of the .DC command in a subckt block see Using Isomorphic
Analyses in Subckt Blocks on page 36.
The following sections cover these topics:
Reducing DC Errors
471
The .OPTION OFF statement, and the OFF and IC=val element parameters,
also control initialization.
Initialization is fundamental to simulation. HSPICE starts any analysis with
known-nodal voltages (or initial estimates for unknown voltages) and some
branch currents. It then iteratively finds the exact solution. Initial estimates that
are close to the exact solution increase the likelihood of a convergent solution
and a lower simulation time.
A transient analysis first calculates a DC operating point using the DC
equivalent model of the circuit (unless you specify the UIC parameter in
the .TRAN statement). HSPICE then uses the resulting DC operating point as
an initial estimate to solve the next timepoint in the transient analysis.
The following describes the process:
1. If you do not provide an initial guess or if you provide only partial information,
HSPICE provides a default estimate for each node in the circuit.
2. HSPICE then uses this estimate to iteratively find the exact solution.
The .NODESET and .IC statements supply an initial guess for the exact DC
solution of nodes within a circuit.
3. To set the seed value for the iterative dc algorithm for any circuit node to any
value, use the .NODESET statement.
4. HSPICE then connects a voltage source equivalent, to each initialized node
(a current source, with a GMAX parallel conductance, set with a .OPTION
statement).
5. HSPICE next calculates a DC operating point, with the .NODESET voltage
source equivalent connected.
6. HSPICE disconnects the equivalent voltage sources, which you set in
the .NODESET statement, and recalculates the DC operating point.
This is the DC operating point solution.
472
I=GMAX*V
Figure 43
GMAX
To Initialization
Node
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.
Use .IC and .NODESET statements in a .DC analysis, in addition to .TRAN
statements, unless you set .OPTION DCIC=0. 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, HSPICE sets values to zero for the terminal
voltages of all active devices (BJTs, diodes, MOSFETs, JFETs, MESFETs)
that you do not set in .IC or .NODESET statements, or by sources.
3. If element statements specify any IC parameters, HSPICE sets those initial
conditions.
4. HSPICE uses the resulting voltage settings, as the initial guess at the
operating point.
Use OFF to find an exact solution, during an operating point analysis, in a
large circuit. The majority of device terminals are at zero volts for the
operating point solution. To initialize the terminal voltages to zero for
selected active devices, set the OFF parameter in the element statements
for those devices.
After HSPICE finds a DC operating point, use .SAVE to store operatingpoint node voltages in a design.ic file. Then use the .LOAD statement to
restore operating-point values from the *.ic file for later analyses.
When you set initial conditions for Transient Analysis:
473
An internal timestep too small error message indicates that the circuit failed
to converge. The cause of the failure can be that HSPICE cannot use stated
initial conditions to calculate the actual DC operating point.
Simulation Experiment
Transient
DC
Operating point
Sweep analysis
simulation
AC
DC-related AC
small-signal analysis
.DCMATCH
.PZ
.OPTION: Tolerance
ABSI (ABSTOL)
ABSMOS
ABSV
ABSVDC
KCLTEST
RELI
RELMOS
RELV
RELVDC
Figure 44
474
Matrix
ITL1
NOPIV
PIVOT
PIVTOL
SPARSE
NOTOP
Monte Carlo
analysis
.SENS
.TF
Convergence
CONVERGE
CSHDC
DCFOR
DCHOLD
DCON
DCSTEP
DCTRAN
DV
GMAX
GMINDC
GRAMP
GSHUNT
ICSWEEP
NEWTOL
OFF
PHD
Limit
RESMIN
475
Output
***** OPERATING POINT INFORMATION TNOM=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
* Note: HSPICE RF does not support qn(element)
* charge output.
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
VS 0. 0. 0. 0.
POWER 5.39908N 875.09107N 2.27712U 4.78896U
BETAD -987.65432M -987.65432M -987.65432M -987.65432M
GM 0. 0. 0. 0.
RPI 2.0810E+06 1.0405E+06 416.20796K 208.10396K
RX 250.00000M
250.00000M 250.00000M 250.00000M
RO 2.0810E+06 1.0405E+06 416.20796K 208.10396K
CPI 1.43092N 1.44033N 1.45279N 1.46225N
CMU 954.16927P 960.66843P 969.64689P 977.06866P
CCS 800.00000P 800.00000P 800.00000P 800.00000P
BETAAC 0. 0. 0. 0.
FT
0. 0. 0. 0.
476
Example
This example describes an H-element dependent-voltage source:
HXCC 13 20 VIN1 VIN2 IC=0.5, 1.3
The current, through VIN1, initializes to 0.5 mA. The current, through VIN2,
initializes to 1.3 mA.
477
478
The .DC statement format depends on the application that uses it. For syntax
details, refer to the .DC command in the HSPICE Reference Manual:
Commands and Control Options.
Description
.DCMATCH
.PZ
.SENS
.TF
479
Current tolerances
Matrix options
See .OPTION PHD for the PHD flow that can show performance improvement
in simulations that require large DC OP convergence iterations. Use .OPTION
statements to specify the following options, which control DC analysis:
ABSTOL
DCFOR
DV
ICSWEEP
MAXAMP
PIVOT
CAPTAB
DCHOLD
GDCPATH
ITLPTRAN
NEWTOL
PIVTOL
CONVERGE
DCIC
GRAMP
ITL1
NOPIV
RESMIN
CSHDC
DCON
GSHDC
ITL2
OFF
SPARSE
DCCAP
DCSTEP
GSHUNT
KCLTEST
PHD
SYMB
DC and AC analysis also use some of these options. Many of these options
also affect the transient analysis because DC convergence is an integral part of
transient convergence. For a description of transient analysis, see Chapter 15,
Transient Analysis.
480
Accuracy Tolerances
Autoconverge Process
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.
If the difference between two consecutive iterations is within the specified
accuracy tolerances, the circuit simulation has converged.
| Vnk - Vnk-1 | <=accuracy tolerance
Type
.OPTION
Default
ABSVDC
50 v
RELVDC
.001
ABSI
1 nA
RELI
.01
ABSMOS
1 uA
RELMOS
.05
481
HSPICE compares nodal voltages and element currents to the values from the
previous iteration.
If the absolute value of the difference is less than ABSVDC or ABSI, then the
node or element has converged.
ABSV and ABSI set the floor value, below which HSPICE ignores values.
Values above the floor use RELVDC and RELI as relative tolerances. If the
iteration-to-iteration absolute difference is less than these tolerances, then
it is convergent.
Note: ABSMOS and RELMOS are the tolerances for MOSFET drain
currents.
If accuracy tolerances are tight, the circuit requires more time to converge.
If the accuracy setting is too loose, the resulting solution can be inaccurate
and unstable.
Table 52 shows an example of the relationship between the RELVDC value, and
the number of iterations.
Table 52
482
RELVDC
Iteration
Delay (ns)
Period (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 autoconvergence process. This process manipulates
DCON, GRAMP, and GMINDC, and even CONVERGE in some cases. Figure 45 on
page 485 shows the autoconverge process.
Note:
If you set the DV option to a value other than the default, Step 2 uses the
value you set for DV, but Step 3 changes DV to 1e6.
If you set .OPTION GMINDC, then GMINDC ramps to the value you set,
instead of to 1e-12, in Steps 2 and 3.
Effects of GMINDC
The GMINDC option helps stabilize the circuit, during DC operating-point
analysis. For MOSFETs, GMINDC helps stabilize the device in the vicinity of the
threshold region. HSPICE inserts GMINDC between:
483
484
Start
STEP 1 [Newton-Raphson method]
Iterates up to the ITL1 limit.
Iterate
Y
Results
Converged?
N
Try DCON=1
Converged?
Results
N
STEP 3 [GMINDC ramping method]
Relaxes DV to 1e6.
Try DCON=2
Converged?
N
Try CONVERGE=1
Converged?
N
Try CONVERGE=5
Results
STEP 4 [Pseudo tran method]
Resets GMINDC through .OPTION GMINDC=xx
Adds CSHDC and GSHUNT from each node to ground.
Ramps supplies from zero to the set values.
Removes CSHDC and GSHUNT, after DC convergence.
Also iterates to a stable DC-bias point.
Results
STEP 5 [GSHUNT ramping algorithm]
Ramping the GSHUNT parameter from 1e-4 to 0 obtains the
solution at every GSHUNT point by invoking Newton-Raphson,
GMINDC ramping algorithms.
Y
Converged?
Results
N
Try CONVERGE=4
Converged?
N
Non-convergence report
Figure 45
485
GMINDC
Diode element
GMINDC
BJT element
GMINDC
GMINDC
MOSFET element
GMINDC
GMINDC
JFET or MESFET
element
GMINDC
Figure 46
486
GMINDC Insertion
Reducing DC Errors
To reduce DC errors, perform the following steps:
1. To check topology, set .OPTION NODE, to list nodal cross-references.
Check all model parameter units. Use model printouts to verify actual
values and units because HSPICE multiplies some model parameters
by scaling options.
Are JS and JSW set in the MOS model for the DC portion of a diode
model? A typical JS value is 1e-4A/M2.
Make sure that DIODE models have non-zero values for saturation
current, junction capacitance, and series resistance.
3. General remarks:
487
Circuits that converge individually, but fail when combined, usually have
a modeling problem.
Floating-Point Overflow
488
**warning**
all nodes of element x:<name> are connected together
Cg
original circuit
Cg
after conductance
insertion
G
G
Figure 47
G = Cg/DCSTEP
Conductance Insertion
489
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.
490
Nodal voltage printout: Prints the names of all no-convergent node voltages,
and the associated voltage error tolerances (tol).
3. Check the element printout for the subcircuit, model, and element name for
all parts of the circuit where node voltages or currents do not converge.
For example, Table 53 on page 492 identifies the xinv21, xinv22, xinv23, and
xinv24 inverters, as problem subcircuits in a ring oscillator. It also indicates that
the p-channel transistors, in the xinv21, xinv22, xinv24 subcircuits, 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
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
491
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 53, the tol values
that are around 100, indicate that the currents were far from convergence. The
table displays the element current and voltage values (id, ibs, ibd, vgs, vds, and
vbs). Examine whether these values are realistic, and determine the transistor
regions of operation.
Table 53
subckt
element
model
xinv21
21:mphc1
0:p1
xinv22
22:mphc1
0:p1
xinv23
23:mphc1
0:p1
xinv23
23:mnch1
0:n1
xinv24
24: mphc1
0:p1
id
27.5809f
140.5646u
1.8123p
1.7017m
5.5132u
ibs
205.9804f
3.1881f
31.2989f
0.
200.0000f
ibd
0.
0.
0.
-168.7011f
0.
vgs
4.9994
-4.9992
69.9223
4.9998
-67.8955
vds
4.9994
206.6633u
69.9225
-64.9225
2.0269
vbs
4.9994
206.6633u
69.9225
0.
2.0269
vth
-653.8030m
-745.5860m
-732.8632m
549.4114m
-656.5097m
tolds
114.8609
82.5624
155.9508
104.5004
5.3653
tolbd
0.
0.
0.
0.
0.
tolbs
3.534e-19
107.1528m
0.
0.
0.
492
Troubleshooting: Nodes set to initial conditions with .IC may not always
begin at those voltage values
493
.IC V(1)=5V
Figure 48
Ring Oscillator
The best way to set up the flip-flop is to use an .IC statement in the subcircuit
definition.
Example
The following example sets the local Qset parameter to 0, and uses this value
for the .IC statement, to initialize the Q latch output node. As a result, all
latches have a default state of Q low. Set Qset to vdd to call a latch, which
overrides this state.
.subckt latch in Q Q/ d Qset=0
.ic Q=Qset
...
.ends
Xff data_in[1] out[1] out[1]/ strobe LATCH Qset=vdd
494
Ids
Vds
Ids
Vds
Ids
Vds
Figure 49
495
2. Find the devices at the beginning of the combined-logic string of gates that
seem to start the non-convergent string.
3. Check the operating point of these devices very closely, to see what region
they operate in.
Model parameters associated with this region are probably inappropriate.
Circuit simulation uses single-transistor characterization, to simulate a large
collection of devices. If a circuit fails to converge, the cause can be a single
transistor, anywhere in the circuit.
496
3. Use the symbolic (.OPTION SYMB) operating point algorithm which finds
initial guesses before calculating the operating point.
.option SYMB=1
Explanation: When you use the SYMB option, HSPICE assumes the circuit
is digital and assigns a low/high state to all nodes as a reasonable initial
voltage guess. This option improves DC convergence for oscillators, logic,
and mixed-signal circuits.
4. Increase ITL1 from default value of 200 up to 500 in steps of 100. To further
help DC sweep analysis, you may increase ITL2 in the same manor which
increases the number of iterations HSPICE takes at each DC sweep point.
.option ITL1=300 ITL2=300
497
Create a saved operating point and tell HSPICE to use those initial
conditions in the transient analysis.
Run HSPICE without all the current probes, but include a .OP statement to
create an initial conditions (.ic0) file.
Add uic for Use Initial Conditions on the .TRAN line. Example:
.tran 1n 100n uic
Then, it is possible that the design runs to completion even with the large
number of current probes.
For more information on non-convergence, refer to Autoconverge Process and
Reducing DC Errors in this chapter.
498
reduce this effect. For instance, setting GMAX to 1e6 creates a very low
internal resistance. Here is a simple case that illustrates the effect of changing
GMAX from its default value.
*** initial condition test ***
.option ingold=1
v01 n1 0 1v
r01 n1 n2 1m
r02 n2 n3 1m
r03 n3 0 1m
*.option gmax=1e6
.ic v(n2)=.25v v(n3)=.25v
.print tran v(n2) v(n3)
.tran 1n 5n
.end
******************************
voltage
n2
0.6386
0.6667
0.6667
0.6667
0.6667
0.6667
voltage
n3
0.3160
0.3333
0.3333
0.3333
0.3333
0.3333
voltage
n2
0.2507
0.6667
0.6667
0.6667
0.6667
0.6667
voltage
n3
0.2498
0.3333
0.3333
0.3333
0.3333
0.3333
Note that the initial conditions are much closer to the desired values.
499
500
14
AC Small-Signal and Noise Analysis
14
AC Analysis of an RC Network
501
Single/double sweeps
For .AC command syntax, see the .AC command in the HSPICE Reference
Manual: Commands and Control Options.
ACOUT
DI
MAXAMP
RELH
UNWRAP
For syntax descriptions for these options, see Chapter 3, HSPICE Netlist
Simulation Control Options in the HSPICE Reference Manual: Commands and
Control Options.
This example performs a frequency sweep by 10 points per decade from 1kHz
to 100MHz.
Example 2
.AC LIN 100 1 100HZ
502
This example performs an AC analysis for each value of cload. This results
from a linear sweep of cload between 1- and 10-pF (20 points), sweeping the
frequency by 10 points per decade from 1- to 10-kHz.
Example 4
.AC DEC 10 1 10K SWEEP rx POI 2 5k 15k
This example performs an AC analysis for each value of rx, 5k and 15k,
sweeping the frequency by 10 points per decade from 1- to 10-kHz.
Example 5
.AC DEC 10 1 10K SWEEP DATA=datanm
This example illustrates a frequency sweep and a Monte Carlo analysis with 30
trials.
Example 7
AC DEC 10 1 10K SWEEP MONTE=10 firstrun=15
This example illustrates a frequency sweep and a Monte Carlo analysis from
the 15th to the 24th trials.
Example 8
.AC DEC 10 1 10K SWEEP MONTE=list(10 20:30 35:40 50)
This example illustrates a frequency sweep and a Monte Carlo analysis at 10th
trial and then from the 20th to 30th trial, followed by the 35th to 40th trial and
finally at 50th trial.
503
Simulation Experiment
DC
Transient
AC
AC Small-Signal Simulations
.AC
.NOISE
.DISTO
.SAMPLE
.LIN
.LSTB
AC options:
ABSH
ACOUT
DI
MAXAMP
RELH
UNWRAP
Figure 50
DC options, to solve
operating-point
for capacitors
1
y L = -------- for inductors
jL
Resistors can have different DC and AC values. If you specify AC=<value> in
a resistor statement, HSPICE uses the DC value of resistance to calculate the
operating point, but uses the AC resistance value in the AC analysis. When you
analyze operational amplifiers, HSPICE uses a low value for the feedback
resistance to compute the operating point for the unity gain configuration. You
can then use a very large value for the AC resistance in AC analysis of the
open loop configuration.
504
Frequency.
Element.
Temperature.
Model parameter.
Noise analysis.
Distortion analysis.
Network analysis.
Sampling noise.
You can use the .AC statement in several different formats, depending on the
application. You can also use the .AC statement to perform data-driven
analysis in HSPICE.
AC Analysis of an RC Network
Figure 51 on page 506 shows a simple RC network with a DC and AC source
applied. The circuit consists of:
Capacitor C1.
Node 1 is the connection between the source positive terminal and R1.
505
1
R1
1k
V1
10 VDC
1VAC
2
+
_
R2
1k
C1
0.001uF
Figure 51
RC Network Circuit
This is followed by a line that shows the amount of real time, user time, and
system time needed for the analysis.
Your run directory includes the following new files:
506
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 WaveView.
5. From the File menu, select File > Import > Waveform File.
6. Select the quickAC.ac0 file from the Open: Waveform Files window.
7. Display the voltage at node 2 by using a log scale on the x-axis.
Figure 52 on page 507 shows the waveform that HSPICE produces if you
sweep the response of node 2, as you vary the frequency of the input from 1
kHz to 1 MHz.
Figure 52
As you sweep the input from 1 kHz to 1 MHz, the quickAC.lis file displays:
Input netlist.
507
Equation 45
onoise =
Zk
i nk
k=0
Where,
onoise is the output noise spectral density ( V Hz ) at the AC analysis
frequency.
2
508
This analysis will be performed for every frequency specified with the .AC
command. The output for noise analysis is specified in the .NOISE syntax:
Basic Syntax:
.NOISE v(out <,ref>) src <interval>
The output noise (onoise) voltage is computed at the out node specified; if the
(optional) ref node is also given, the output is taken as the differential output
noise voltage v(out,ref). Noise analysis requires the specification of an
independent input source (src). This allows the calculation of the equivalent
input noise given by
Equation 46
onoise
inoise = ----------------G
Where,
inoise is the equivalent input noise spectral density at the input source. G is the
gain between the input source (src) and the output.
The .NOISE analysis can also generate a summary for how each noise
generator within the circuit will contribute to output noise. Specify an integer
value for interval to include a device noise summary for every interval
frequency points in the HSPICE output listing. No summary is included unless
interval is specified. The .NOISE analysis will also compute the total
integrated noise over the AC frequency range, which will also be included in the
output listing. The output summary will include values for the device noise
sources given in Table 54 on page 510 Table 56 on page 511.
To request .NOISE analysis results (magnitude and decibel) with .print/
.probe use:
.probe noise onoise onoise(m) onoise(db)
.probe noise inoise inoise(m) inoise(db)
Results will be included in the *.ac0 file. Output noise voltage or current units
are either V Hz or A Hz , respectively. Device-level noise source
contributions will also be included in the *.ac0 file (unless you have set
.option probe=1). The naming convention and units for device level noise
contributions is also shown in the following tables.
To ensure that device noise models will be included in the analysis, verify that
noise parameters are being set in your transistor models. Include values for AF
and KF, for example, if you wish to activate flicker noise models for your
devices.
509
See also, Using Noise Analysis Results as Input Noise Sources in the HSPICE
User Guide: RF Analysis.
For a complete description of the .NOISE command syntax and examples, see
the .NOISE command in the HSPICE Reference Manual: Commands and
Control Options. Note that the .NOISE analysis requires an .AC statement, and
that if more than one .NOISE statement is included, HSPICE will run only the
last statement.
Table 54
.ac
.lis
Unit
Description
nd
rd
2
V
------Hz
ns
rs
2
V
------Hz
ni
id
2
V
------Hz
nf
fn
2
V
------Hz
ntg
total
2
V
------Hz
Table 55
510
TOT=RD + RS + ID + FN
.ac
.lis
Unit
Description
rb
rb
2
V
------Hz
rc
rc
2
V
------Hz
Table 55
.ac
.lis
Unit
Description
re
re
2
V
------Hz
nb
ib
2
V
------Hz
nc
ic
2
V
------Hz
nf
fn
2
V
------Hz
nt
total
2
V
------Hz
Table 56
TOT=RB + RC + RE + IB + IC + FN
.ac
.lis
Unit
Description
nr
rs
2
V
------Hz
ni
id
2
V
------Hz
nf
fn
2
V
------Hz
nt
total
2
V
------Hz
511
$ Transient analysis
$ Request operating point analysis
20e9 $ AC analysis
V1 $ NOISE analysis
HSPICE performs separate .AC analyses for all time values specified as well
as one .AC run at time zero. This happens during the .TRAN analysis as it
does the .OP and .AC evaluations, and results in separate *.AC0 files with
unique labels for each time value specified. An *[email protected] file is also
created when you run .AC/.NOISE with .TRAN analysis.
In addition, the .OP used at the time values specified is fully dynamic, meaning
it uses all sources and nonlinearities involved at that time value during
the .TRAN. The charges and currents of the .TRAN are used and preserved for
the .AC. It does this by using the derivatives (C=dQ/dv, G=dI/dv) at that point in
the .TRAN for computing the .AC small-signal analysis.
The .AC and .NOISE analysis is then performed at this operating point.
For additional information, see .OP analysis in the HSPICE Reference Manual:
Commands and Control Options.
51.8809m
volts
You can get the total noise output as reported in the *.lis or the *.noise#
file by using the following two .MEASURE commands:
.meas ac int_noise_sq integ par('onoise(m)*onoise(m)')
+ from='fstart' to='fstop'
.meas ac total_noise_v param='sqrt(int_noise_sq)'
512
Use the .NOISE and .AC statements to control the noise analysis of the circuit.
513
Note:
The gain margin (GM), phase margin (PM), unity gain frequency (FU) and
gain at minimum frequency (ADC) are reported in the *.lis file.
The Loop Gain is reported to the *.cx# file, which is always produced for
.LSTB analysis. The *.cx# file is a general file for all the complex outputs.
It contains the data for waveforms as complex vectors.
If an *.ac# file is produced with .probe ac lstb, then both *.ac# and
*.cx# file could be used to view magnitude, phase, real, and imaginary
versus frequency as complex vectors.
514
Figure 53
515
This example netlist simulates single mode loop stability for a single-pole ideal
inverter amplifier.
.GLOBAL gnd!
v1
v0
e3
r0
r1
r2
c0
516
Figure 54
Differential mode output can be viewed in both X-Y and Polar plots:
517
551dB
551
Figure 55
7. 'The v-source for single mode is',' missing in LSTB statement.',' Analysis is
omitted.'
8.
9.
519
520
15
Transient Analysis
15
Simulation Flow
521
Simulation Flow
Figure 56 on page 522 illustrates the simulation flow for transient analysis in
HSPICE.
Simulation Experiment
DC
Transient
AC
Time-sweep
simulation
.BIASCHK
Options
Method
BYPASS
MAXORD
METHOD
PURETP
TRCON
Figure 56
ACCURATE GMIN
AUTOSTOP GSHUNT
ITL4=x
BKPSIZ
MBYPASS
BYTOL
MU
CSHUNT
RUNLVL
DELMAX
Output
POST
INTERP
522
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:
For setting initial conditions, see Initial Conditions and UIC Parameters.
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.
.TRAN 1ns 100ns UIC
.OP 20ns
In a transient analysis, the internal timestep too small error message indicates
that the circuit failed to converge. The cause of this convergence failure might
be that stated initial conditions are not close enough to the actual DC operating
point values. Use the commands in this chapter to help achieve convergence in
a transient analysis. See also: Troubleshooting: Internal Timestep,
Measurement Errors at the end of this chapter.
The following sections discuss these topics.
523
Parameter Sweep
When you express the values of a parameter by using decade, octave, linear, or
point-of-interest variation, you can use the sweep keyword to control the
parameter. This method does not allow for the sweeping of multiple
parameters. Similar to the data-driven sweep, HSPICE creates only one output
file with the signals having multiple traces. Be sure to sequence the var
(param) before the type (DEC, LIN).
Examples
In this example, param varies 10 times for each decade from 1u to 10u and a
transient analysis runs for each value.
.tran 1n 100n sweep param DEC 10 1u 10u
In this example, param varies 5 equal times from 1u to 10u with a transient
analysis for each value.
.tran 1n 100n sweep param LIN 5 1u 10u
524
Note that temp is a special parameter that sweeps the simulation temperature.
This example produces a .DATA table with 9 rows (3*1*3) containing all
combinations of the listed parameter values, or 1 base sim + 8 .ALTERs if you
use the -alter option.
Here is the output produced by the sample input.
.DATA sweeper_params temp vddr vssr
0 1.1 0.0
55 1.1 0.0
100 1.1 0.0
0 1.0 0.0
55 1.0 0.0
100 1.0 0.0
0 0.9 0.0
55 0.9 0.0
100 0.9 0.0
.ENDDATA
After you download the script named hspice_param_sweeper.gz (rightclick and select Save Target As...), be sure to modify the first line of the script
to point to your local installation of perl. The default path should work on most
systems.
Specifying Data Driven Timesteps
Instead of using a constant timestep in a .TRAN statement, you can specify the
timesteps using an inline data statement for the transient simulation.
The data defined in the .DATA statement should define the time point and
current value for a PWL current source. In the following example, the .DATA
statement tstep_val defines the time step, step_val and the current value, ival.
HSPICE uses the timesteps defined in the .DATA statement during the
transient simulation.
Ipwl nd1 0 PWL (step_val ival)
.tran DATA = tstep_val
.DATA tstep_val step_val ival
+ 10p 1m
+ 30p 10m
+ 70P 10m
+ 100p 100m
.ENDDATA
525
The timestep value specified in the data table (DATA=tstep_val) controls the
print intervals.
The ov1, ... ovN output variables can include the following:
You can use wildcards to specify multiple output variables in a single command.
Output content depends on .OPTION POST or .OPTION PROBE.
Parameter
Description
Writes the output from the .PRINT statement to a *.print file. HSPICE
does not generate a *.print# file.
*.tr#
526
3. To examine the simulation results and status, use an editor and view
the .lis and .st0 files.
4. Run WaveView and open the .sp file.
5. From the File menu, select File > Import Waveform > File.
6. Select the quickTRAN.tr0 file from the Open: Waveform Files window.
7. Display the voltage at nodes 1 and 2 on the x-axis.
Figure 57 shows the waveforms.
527
Figure 57
+
_
M1
IN
VIN
OUT
CLOAD
0.75 pF
+
_
M2
Figure 58
528
You can find the complete netlist for this example in directory
$installdir/demo/hspice/apps/quickINV.sp.
2. To run HSPICE, type the following:
hspice quickINV.sp > quickINV.lis
529
Figure 59
530
Method
Output
BYPASS
MAXORD
METHOD=
Backward-Euler (BE)
GEAR
TRAP
BDF
PURETP
TRCON
ACCURATE
AUTOSTOP
BKPSIZ
BYTOL
CSHUNT
DELMAX
POST
GMIN
GSHUNT
ITL4
MBYPASS
MAXAMP
MU
RUNLVL
INTERP
531
RUNLVL Features
RUNLVL Features
The RUNLVL algorithm provides the following characteristics:
532
However, you can set it to a higher value if the circuit type is pure analog and/or
the simulation needs high accuracy.
Table 58
Circuit type
RUNLVL Setting
Digital
RUNLVL=1-3
RUNLVL=3-5
Cell characterization
RUNLVL=5-6
A *.lis file reports the RUNLVL flag and its effective value. HSPICE sets the
RUNLVL option automatically in the $install_dir/hspice/hspice.ini
file, when it generates the file during the installation process.
All HSPICE simulations first try to find ONE implicit hspice.ini file and take it as
the first include file; the search order for hspice.ini is:
1. Current working directory
2. User's home directory
3. $install_dir/hspice directory
Option
ABSV/VNTOL
50u
50u
User
definition
ignored
533
Table 59
Option
ABSVAR
534
User
definition
ignored
500m
500m
ACCURATE* 1 0
BYPASS* a
CHGTOL
1.0f
1.0f
DI
100
100
DVDT
DVTR
1.0k
1.0k
FAST** 2
FS
250m
250m
FT
250m
250m
IMIN/ITL3
LVLTIM
METHOD*** 3
TRAP
TRAP
RELQ
10m
10m
RELTOL
1.0m
1.0m
RELV
1.0m
1.0m
RELVAR
300.0m
300.0m
RMAX
RMIN
1.0n
1.0n
x
x
Option
BYPASS
BYTOL
50u
100u
LVLTIM
Disabled by runlvl
MAXORD
3 for RUNLVL=6
2 for RUNLVL=1-5
MBYPASS
RMAX
Disabled by runlvl
Backward-Euler
Gear
535
Trapezoidal
Table 61
Integration Method
Comments
Backward-Euler only
GEAR
METHOD=GEAR
METHOD=GEAR MAXORD=2|3
TRAP
METHOD=TRAP
METHOD=TRAP PURETP
BDF
METHOD=BDF
METHOD=GEAR
The advanced multicore algorithm (-mn) which you can use in multithread
simulation (-mt) supports 2nd order GEAR, TRAP, and BDF methods. TRAP is
the default method. Each integration algorithm has advantages and
disadvantages.
The following sections discuss these topics:
TRAP
BDF
TRAP
The trapezoidal is often the preferred algorithm because of its high accuracy
level and low simulation time. Recommendation: use the pure trapezoidal
(PURETP) for oscillators to avoid numerical damping which can cause
536
oscillator simulations to die out when you view output in a waveform plot. Unlike
GEAR, using the TRAP method (.OPTION METHOD = TRAP) is not subject to
automatic selection after the circuit fails to converge using GEAR method.
BDF
The BDF method is a high-order integration method that uses the backward
differentiation formulae. Since BDF is for high accuracy applications, HSPICE
recommends a RUNLVL setting of 3 or above. The you can use the BDF
method with multithreading.
Two tolerance options are available to the user for the BDF method: .OPTIONS
BDFRTOL (relative) and BDFATOL (absolute); each has a default of 1e-3. BDF
can provide a speed enhancement to mixed-signal circuit simulation, especially
for circuits with a large number of devices. The BDF method provides no
performance advantage for use with small circuits in standard cell
characterization. BDF could be an alternative to GEAR when TRAP fails to
converge.
METHOD=BDF supports the following models/devices/elements:
537
BJT, levels 1, 2, 3
Diodes, all
Resistors, all
L (excludes AC choke)
Note:
1e-4
1e-2
1e-2
1e-3
1e-4
1e-4
1e-5
Element name
Time
Terminals
For the syntax and description of this statement, see the .BIASCHK command
in the HSPICE Reference Manual: Commands and Control Options.
HSPICE saves the information as both a warning and a BIASCHK summary in
the *.lis file. You can use this command only for active elements, resistors,
capacitors, and subcircuits.
You can also use .OPTION BIASFILE and .OPTION BIAWARN with
a .BIASCHK statement.
The following limitations apply to the .BIASCHK statement:
Only these models support .BIASCHK: diode, jfet, nmos, pmos, bjt, and r/c
models, as well as subcircuits.
There is support for wildcards in element and model names and except
definitions but not in expressions.
Four methods are available to check the data with the .BIASCHK command:
Maximum method
Minimum method
Region method
Note: Only MOSFET models support the region method of data
checking.
539
local_min: The minimum bias after the time last local max occurs.
A transient analysis records the local_max if it is greater than the limit. In the
summary HSPICE reports after transient analysis, the
local_max(next)replaces the local_max(current)when the following
comparison is true:
local_max(current) - local_min < noise && local_max(next) - local_min < noise
&& local_max(current) < local_max(next)
At the end of the simulation, the listing file reports all local_max values as
BIASCHK warnings. During other analyses, HSPICE issues warnings when the
value you want to check is greater than the limit_value you specify.
Maximum Method
Use this syntax for a transient simulation that specifies the maximum method:
For local_max:
v(tn-1) > max_value
The bias corresponds any one of the following two conditions:
Region Method
This method is only for MOSFET models. Three regions exist:
cutoff
linear
saturation
When the specified transistor enters and exits during transient analysis, the
specified region is reported.
The biaschk.sp demo example is a netlist that uses the .BIASCHK
command for a transient simulation. You can find the sample netlist for this
example in: $installdir/demo/hspice/apps/biaschk.sp
541
Supported Platforms
Linux RHEL
Linux SUSE
Sun/Solaris
Windows
Yes
Yes
No
No
Note:
Restore Operation
Usage Requirements
542
If both time=0 and repeat=0 are set, checkpoint data is saved at transient
time=0 only.
If the netlist contains more than one .store statement, only the last
statement takes effect.
Example 2: After transient analysis starts, the store operation occurs at 7,200
wall-clock seconds, 14,400 wall-clock seconds, 21,600 wall-clock seconds, and
so on. Each new time interval overwrites previous interval checkpoint files.
.store repeat=7200
Example 3: After transient analysis starts, the store operation occurs at 300
wall-clock seconds, 7,500 wall-clock seconds, 14,700 wall-clock seconds, and
so on. Each new time interval overwrites previous interval check-point files.
.store time=300 repeat=7200
543
After the checkpoint files are generated, use kill -9 process_id to stop
the simulation, if needed.
Example
If system command kill -USR2 process_id is submitted, HSPICE
generates checkpoint files, then continues the current simulation. If the
simulation is terminated later on, the checkpoint files can be used to continue
the simulation when you enter the command-line restore command.
Restore Operation
The restore operation takes place at the command line:
hspice -restore checkpoint_file.store.gz
The checkpoint_file specifies from which simulation the checkpoint data is
to be restored.
Note:
Any output files generated by the previous simulation should not be removed.
After the restore simulation is done, the output files will be updated.
Example
The simulation continues from the time point that data was at which the
checkpoint files are previously saved. The data files are named
test_1000.store.gz, and test_1000.tar.
hspice -restore test_1000.store.gz
544
Usage Requirements
Store and restore can be performed on 32-bit Linux operation systems with
exec_shield_randomize turned off. Check with your system
administrator for details.
Restore must be performed on the same platform that the store operation
used.
Example netlist: Simulating the netlist below results in three waveform files,
netlist.tr0, netlist.tr1, and netlist.tr2 with each displaying the
results of the Monte Carlo sweep at each temperature value.
.options post
.temp -30 40 125
.tran 1n 5n sweep monte=10
.param resval=aunif(1000,400)
vsrc_one 1 0 5v
r_one 1 2 resval tc1=0.02 tc2=0.01
c_one 2 0 1u
.end
545
546
gshunt=1e-13
gshunt=1e-12
gshunt=1e-11
gshunt=1e-10
gshunt=1e-9
cshunt=1e-17
cshunt=1e-16
cshunt=5e-15
cshunt=1e-15
cshunt=1e-14
In the case of BJT device, be sure to have the following model parameters
set (again, examples, not defaults).
.model mname npn rb=50 r c=.4 re=1e-3
547
Note:
The maximum timestep has a soft limit of (Tstop - Tstart) / 20. The
RUNLVL algorithm allows the timestep to exceed RMAX*TSTEP.
548
You are not comparing the same point. Make sure that the proper nodes and
sweep points are being used for each comparison.
If .option INTERP is in your netlist, remove it. HSPICE only saves data
points at the interval defined by the tstep parameter in the .TRAN statement.
For example, for the .TRAN statement:
.tran 1n 100n
HSPICE saves 100 points at 1ns intervals to the .tr0 file. The lack of
precision can cause issues with your measurements.
549
550
16
16
Spectrum Analysis
.FFT Analysis
AM Modulation
551
.FOUR Statement
Transient
Time-sweep
simulation
.FFT
.FOUR
Output Variables
Display Options
.FFT Statement
Transient
Output Variable
Figure 60
Time-sweep
simulation
.FFT
.FOUR
Display Option
Other
Window
Format
552
.FFT is a much more flexible Fourier analysis tool. Use it for analysis tasks
that require more detail and precision.
.FFT
.FOUR
.MEASURE FFT
.OPTION FFT_ACCURATE
.OPTION ACCURATE
.OPTION FFTOUT
Fourier Accuracy
Fourier Accuracy is dependent on transient simulation accuracy. For best
accuracy, set small values for .OPTION RMAX or .OPTION DELMAX. For
maximum accuracy, set .OPTION DELMAX to 1/(500*frequency). For
circuits with very high resonance factors (high-Q circuits, such as crystal
oscillators, tank circuits, and active filters), set DELMAX to less than
1/(500*frequency)
where, frequency refers to fundamental frequency.
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:
Equation 47
2
-----THD =
R
R1 m
m = 2
1/2
100%
553
Equation 48
g( t) =
Cm
cos ( mt ) +
m=0
Dm
sin ( mt )
m=0
Equation 49
Cm
1
= ---
g ( t ) cos ( mt ) dt
Equation 50
1
D m = ---
g ( t ) sin ( mt ) dt
Equation 51
g( t) =
Cm
cos ( m t ) +
m=0
Dm
sin ( m t )
m=0
Equation 52
Cm =
g(n
2 m n
t ) cos -----------------------------------
501
n=0
500
Equation 53
Dm =
g(n
2 m n
t ) sin -----------------------------------
501
n=0
R m = ( C m2 + D m2 ) 1 / 2
Equation 55
Cm
m = arctan -------
D m
Example 1
The following is input-content for an .OP, .TRAN, or .FOUR analysis. This
example uses demonstration netlist four.sp, which is available in the
directory $installdir/demo/hspice/apps.
554
CMOS INVERTER
*
M1 2 1 0 0 NMOS W=20U L=5U
M2 2 1 3 3 PMOS W=40U L=5U
VDD 3 0 5
VIN 1 0 SIN 2.5 2.5 20MEG
*
.MODEL NMOS NMOS LEVEL=3 CGDO=0.2N CGSO=0.2N CGB0=2N
.MODEL PMOS PMOS LEVEL=3 CGDO=0.2N CGSO=0.2N CGB0=2N
.OP
.TRAN 1N 500N
.FOUR 20MEG V(2)
.PRINT TRAN V(2) V(1)
.END
Example 2
******
cmos inverter
**** fourier analysis
tnom = 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
.FFT Analysis
The .FFT statement uses the internal time point values. By default, .FFT uses
a second-order interpolation to obtain waveform samples, based on the
number of points that you specify.
You can use windowing functions to reduce the effects of waveform truncation
on the spectral content. You can also use the .FFT command to specify:
Output format
555
Fundamental frequency
Window type
Figure 61
556
FFT Windows
Highest side-lobe level (to reduce bias, the lower the better).
Worst-case processing loss (to increase detectability, the lower the better).
Table 63
SideLobe
Roll-Off
(dB/
octave)
3.0-dB
WorstBandwidth Case
(1.0/T)
Process
Loss (dB)
Window
Equation
Rectangular
W(n)=1,
0 n < NP1
-13
-6
0.89
3.92
Bartlett
W(n)=2n/(NP-1),
0 n (NP/2)-1
W(n)=2-2n/(NP-1),
NP/2 n < NP
-27
-12
1.28
3.07
Hanning
W(n)=0.5-0.5[cos(2n/(NP-1))],
0 n < NP
-32
-18
1.44
3.18
Hamming
W(n)=0.54-0.46[cos(2n/(NP-1))],
0 < NP
-43
-6
1.30
3.10
Blackman
W(n)=0.42323
-0.49755[cos(2n/(NP-1))]
+0.07922cos[cos(4n/(NP-1))],
0 n < NP
-58
-18
1.68
3.47
BlackmanHarris
W(n)=0.35875
-0.48829[cos(2n/(NP-1))]
+0.14128[cos(4n/(NP-1))]
-0.01168[cos(6n/(NP-1))],
0 n < NP
-92
-6
1.90
3.85
Gaussian
a=2.5
a=3.0
a=3.5
W(n)=exp[-0.5a2(NP/2-1-n)2/(NP)2],
-42
0 n (NP/2)-1
-55
W(n)=exp[-0.5a2(n-NP/2)2/(NP)2],
-69
NP/2 n < NP
-6
-6
-6
1.33
1.55
1.79
3.14
3.40
3.73
557
Table 63
Window
Equation
KaiserBessel
a=2.0
a=2.5
a=3.0
a=3.5
W(n)=I0(x2)/I0(x1)
x1=pa
x2=x1*sqrt[1-(2(NP/2-1-n)/NP)2],
0 n (NP/2)-1
x2=x1*sqrt[1-(2(n-NP/2)/NP)2],
NP/2 n < NP
I0 is the zero-order modified
Bessel function
Highest
SideLobe
(dB)
SideLobe
Roll-Off
(dB/
octave)
3.0-dB
WorstBandwidth Case
(1.0/T)
Process
Loss (dB)
-46
-57
-69
-82
-6
-6
-6
-6
1.43
1.57
1.71
0.89
3.20
3.38
3.56
3.74
The Kaiser window has an ALFA parameter, which adjusts the compromise
between different figures of merit for the window.
The Bartlett or triangular window has good processing loss, and good sidelobe roll-off, but lacks sufficient bias reduction.
The last two windows in the table, Kaiser-Besser, are parameterizedwindows. Use these windows to adjust the side-lobe level, the 3 dB
bandwidth, and the processing loss.
558
Figure 62
Figure 63
559
HSPICE generates a .ft# file and the listing file for each FFT output variable
that contains data to display in FFT analysis waveforms (such as in Custom
WaveView). You can view the magnitude in dB, and the phase in degrees.
In the following sample FFT analysis .lis file output, the header defines
parameters in the FFT analysis.
****** Sample FFT output extracted from the .lis file
fft test ... sine
****** fft analysis
tnom= 25.000
temp= 25.000
****** fft components of transient response v(1)
Window:
Rectangular
First Harmonic:
1.0000k
Start Freq:
1.0000k
Stop Freq:
10.0000k
dc component: mag(db)= -1.132D+02 mag= 2.191D-06 phase= 1.800D+02
frequency
frequency
fft_mag
fft_mag
fft_phase
index
(hz)
(db)
(deg)
2
1.0000k
0.
1.0000
-3.8093m
4
2.0000k
-125.5914
525.3264n
-5.2406
6
3.0000k
-106.3740
4.8007u
-98.5448
8
4.0000k
-113.5753
2.0952u
-5.5966
10
5.0000k
-112.6689
2.3257u
-103.4041
12
6.0000k
-118.3365
1.2111u
167.2651
14
7.0000k
-109.8888
3.2030u
-100.7151
16
8.0000k
-117.4413
1.3426u
161.1255
18
9.0000k
-97.5293
13.2903u
70.0515
20
10.0000k
-114.3693
1.9122u
-12.5492
total harmonic distortion =
1.5065m percent
560
Column Heading
Description
Frequency Index
Frequency
fft_mag (dB),
fft_mag
fft_phase
Notes:
FMIN and FMAX have no effect on the .ft0, .ft1, ..., .ftn files.
Equation 56
561
SNR is the ratio of signal to noise, which following formula computes as:
( mag ( f 0 ) mag ( f 0 ) )
SNR = 10 log --------------------------------------------------------sum(mag ( f ) mag ( f ))
The f loop over the whole spectrum except f0 and its harmonics. If you
specify FMIN/FMAX, f loops over the spectrum between FMIN and
FMAX except fo and its harmonics, as well as all the frequency
components above FMAX.
SFDR is the spurious-free dynamic range and is the distance from the
fundamental input signal to the highest spur (in dB). SFDR involves both
magnitude distance and frequency separation.
SNDR is the signal to noise and distortion ratio, which is the level of the
fundamental divided by the square root of the sum of squares of all
frequency components other than the fundamental frequency. The
following formula computes SNDR:
Equation 57
mag ( f 0 ) mag ( f 0 )
SNDR = 10 log --------------------------------------------------------sum(mag ( f ) mag ( f ))
The f loops over the whole spectrum except f0. If you specify FMIN/FMAX, f
loops over the spectrum between FMIN and FMAX except fo; f also loops all
the frequency components above FMAX.
562
Default: MINFREQ=0.
MAXFREQ=Maximum frequency in FFT result.
Syntax to perform FFT measurements from previous simulation results:
hspice -i *.tr0 -meas measure_file
For more information, see .MEASURE FFT in the HSPICE Reference Manual:
Commands and Control Options.
AM Modulation
This example uses demonstration netlist exam1.sp, which is available in
directory $installdir/demo/hspice/fft. The example shows a 1 kHz
carrier (FC), which a 100 Hz signal (FM) modulates.
563
AM Modulation
.OPTION post
.PARAM sa=10 offset=1 fm=100 fc=1k td=1m
VX 1 0 AM(sa offset fm fc td)
Rx 1 0 1
.TRAN 2u 50m
.FFT V(1) START=10m STOP=40m FMIN=833 FMAX=1.16K
.END
where
Equation 61
c = 2f c
f = 2f m
The preceding equations indicate that v(1) is a summation of three signals, with
the following frequency:
f c , ( f c f m ) , and ( f c + f m )
This is the carrier frequency and the two sidebands.
See also Behavioral Amplitude Modulator in the HSPICE User Guide:
Advanced Analog Simulation and Analysis.
Graphical Output
Figure 64 and Figure 65 on page 565 display the results.
564
The carrier frequency is 1 kHz, with two sideband frequencies 100 Hz apart.
The third, fifth, and seventh harmonics are more than 100 dB below the
fundamental, indicating excellent numerical accuracy. The time-domain data
contains an integer multiple of the period, so you do not need to use
windowing.
19.8775
exam1.tr0
v(1
Volt [Lin]
10.0
-10.0
-19.877
0
10.0m
20.0m
30.0m
40.0m
50.0m
Time [Lin]
Figure 64
AM Modulation
0
exam1.ft0
vdb(1
-25.0
Volt [Lin]
-50.0
-75.0
-100.0
-125.0
-150.0
0
2.0k
4.0k
6.0k
8.0k
10.0k
Hertz [Lin]
Figure 65
AM Modulation Spectrum
565
566
Volt [Lin]
4.0
exam2.ft0
v(mod1
2.0
v(mod2
-2.0
-4.0
0
1.0m
2.0m
3.0m
4.0m
Time [Lin]
Figure 66
exam2.ft0
v(modout
2.0
Volt [Lin]
1.0
-1.0
-2.0
0
1.0m
2.0m
3.0m
4.0m
Time [Lin]
Figure 67
Modulated Signal
567
exam2.tr0
v(demod
1.0
Volt [Lin]
500.0m
-500.0
-1.0
0
1.0m
2.0m
3.0m
4.0m
Time [Lin]
Figure 68
Demodulated Signal
1.0
exam2.tr0
v(lpout
Volt [Lin]
500.0m
-500.0
-1.0
0
1.0m
2.0m
3.0m
4.0m
Time [Lin]
Figure 69
568
0
exam2.ft0
vdb(mod1
Volt [Lin]
-50.0
exam2.ft1
vdb(mod2
-100.0
-150.0
-200.0
0
10.0k
20.0k
30.0k
40.0k
50.0k
Hertz [Lin]
Figure 70
0
exam2.ft2
vdb(modout
Volt [Lin]
-50.0
-100.0
-150.0
-187.82
10.0k
20.0k
30.0k
40.0k
50.0k
Hertz [Lin]
Figure 71
569
0
exam2.ft3
vdb(demod
Volt [Lin]
-50.0
-100.0
-150.0
-200.0
10.0k
20.0k
30.0k
40.0k
50.0k
Hertz [Lin]
Figure 72
0
exam2.ft4
vdb(1pout
-10.0
Volt [Lin]
-20.0
-30.0
-40.0
-50.0
-60.0
0
10.0k
20.0k
30.0k
40.0k
50.0k
Hertz [Lin]
Figure 73
570
0
exam2.ft5
vdb(1pout
-25.0
Volt [Lin]
-50.0
-75.0
-100.0
-125.0
-150.0
0
10.0k
20.0k
30.0k
40.0k
50.0k
Hertz [Lin]
Figure 74
Output
Figure 75 shows the rectangular window. Compare this with the spectra of the
output for all FFT window types, as shown in Figure 76 through Figure 82.
Without windowing, HSPICE does not detect the weak signal because of
spectral leakage.
571
0
exam3.ft0
vdb(3
-10.0
Volt [Lin]
-20.0
-30.0
-40.0
-50.0
-60.0
1.0g
2.0g
3.0g
4.0g
5.0g
Hertz [Lin]
Figure 75
In the Bartlett window (Figure 76), the noise floor increases dramatically,
compared to the rectangular window (from -55, to more than -90 dB).
The final two windows (Figure 81 and Figure 82) use the ALFA=3.0
parameter, which is the default value in HSPICE. These two windows also
produce acceptable results, especially the Kaiser-Bessel window, which
sharply separates the two tones, and has a noise floor of almost -100-dB.
572
0
exam3.ft1
vdb(3
-20.0
Volt [Lin]
-40.0
-60.0
-80.0
-100.0
-120.0
0
1.0g
2.0g
3.0g
4.0g
5.0g
Hertz [Lin]
Figure 76
0
exam3.ft2
vdb(3
-20.0
Volt [Lin]
-40.0
-60.0
-80.0
-100.0
-120.0
0
1.0g
2.0g
3.0g
4.0g
5.0g
Hertz [Lin]
Figure 77
573
exam3.ft3
vdb(3
Volt [Lin]
-20.0
-40.0
-60.0
-80.0
0
1.0g
2.0g
3.0g
4.0g
5.0g
Hertz [Lin]
Figure 78
exam3.ft4
vdb(3
-20.0
Volt [Lin]
-40.0
-60.0
-80.0
-100.0
-120.0
0
1.0g
2.0g
3.0g
4.0g
5.0g
Hertz [Lin]
Figure 79
574
0
exam3.ft5
vdb(3
-20.0
Volt [Lin]
-40.0
-60.0
-80.0
-100.0
-120.0
0
1.0g
2.0g
3.0g
4.0g
5.0g
Hertz [Lin]
Figure 80
0
exam3.ft6
vdb(3
-20.0
Volt [Lin]
-40.0
-60.0
-80.0
-100.0
0
1.0g
2.0g
3.0g
4.0g
5.0g
Hertz [Lin]
Figure 81
575
0
exam3.ft7
vdb(3
-20.0
Volt [Lin]
-40.0
-60.0
-80.0
-100.0
-120.0
1.0g
2.0g
3.0g
4.0g
5.0g
Hertz [Lin]
Figure 82
576
17
17
Pole-Zero Analysis
HSPICE ships numerous examples for your use; see Listing of Demonstration
Input Files for paths to demo files and Filters Examples.
You can use pole/zero analysis in HSPICE to study the behavior of linear, timeinvariant networks. You can apply the results to the design of analog circuits,
such as amplifiers and filters. Use pole/zero analysis to determine the stability
of a design, or to calculate the poles and zeroes to specify in a POLE function
(see Using Pole-Zero Analysis on page 578).
Pole/zero analysis uses the .PZ (Pole/Zero) statement, instead of pole/zero
(POLE function) and Laplace (LAPLACE function) transfer function modeling.
See Using Pole-Zero Analysis on page 578 for discussion of this technology.
Equation 62
a 0 s m + a 1 s ( m 1 ) + + a m
N(s)
H ( s ) = ----------- = --------------------------------------------------------------------D(s)
b 0 s n + b 1 s ( n 1 ) + + b n
Equation 63
( + z i )s
( + zm )
a 0 ( s + z 1 ) ( s + z 2 )s
H ( s ) = ----- ------------------------------------------------------------------------------------b 0 ( s + p 1 ) ( s + p 2 )s
( + p j )s
( + pm )
577
The roots of the numerator N(s) (that is, zi) are the zeros of the network
function.
The roots of the denominator D(s) (that is, pj) are the poles of the network
function.
S is a complex frequency.
The dynamic behavior of the network depends on the location of the poles and
zeros, on the network function curve (complex plane). The (real) poles are the
natural frequencies of the network. You can graphically deduce the magnitude
and phase curve of most network functions from the location of its poles and
zeros (reference 2).
References on page 596 lists a variety of source materials that address:
Matrix Approach
The matrix approach uses the singular-value matrix decomposition algorithm. It
applies primarily to a network that has no frequency-dependent elements. In
this case, HSPICE RF writes the D(s) function as the determinant of the
network matrices, D(s) = det(G + sC), where G is the frequencyindependent conductance matrix and C is the capacitance matrix. The poles
can be the eigen values of the matrix equation (G + sC) X = 0, where X is
the eigen vector.
Similarly, following Cramers rule, the roots of the N(s) function can also be the
eigen values of a matrix. HSPICE RF supports two different kinds of singular
values deposition (svd):
578
The later SVD requires twice as much memory as the first one, and is
approximately three times slower.
Muller Method
You can apply the Muller method if the network contains frequency-dependent
elements (such as S- or W-elements).
The Muller method approximates the polynomial, using a quadratic equation
that fits through three points in the vicinity of a root. To obtain successive
iterations toward a particular root, HSPICE finds the nearer root of a quadratic,
whose curve passes through the last three points.
Selection of the three initial points affects both the convergence of the process,
and the accuracy of the roots obtained:
1. If the poles or zeros occupy a wide frequency range, then choose (X0R, X0I)
close to the origin, to find poles or zeros at the zero frequency first.
2. Find the remaining poles or zeros, in increasing order.
The (X1R, X1I) and (X2R, X2I) values can be orders of magnitude larger
than (X0R, X0I). If any poles or zeros occur at high frequencies, adjust X1I
and X2I accordingly.
Pole/zero analysis results use the circuits DC operating point, so the operating
point solution must be accurate. Use the .NODESET statement (not .IC) for
initialization, to avoid DC convergence problems.
For the syntax, see .PZ in the HSPICE Reference Manual: Commands and
Control Options.
579
For example, if you use the netlist fkerwin.sp from the demo folder, from the
transfer function there should be two poles and zeros:
*
*
*
The transfer function cancels the common pole and zero at -1.4142 0. Since
HSPICE solves the denominator and numerator separately, the results reports
these separately.
581
C1=0.93
R1=1
Figure 83
C3=1.52
C2=3.8
L1=0.65
C4=1.5
L2=1
C5=0.83
R2=1
Table 65 shows the magnitude and phase variation of the current output,
resulting from AC analysis. These results are consistent with pole/zero
analysis. The pole/zero unit is radians per second, or hertz. The X-axis unit, in
the plot, is in hertz.
Table 65
Poles (rad/sec)
Poles (Hertz)
Real
Imaginary
Real
Imaginary
-6.948473e-02
-4.671778e-01
-1.105884e-02
-7.435365e-02
-6.948473e-02
4.671778e-01
-1.105884e-02
7.435365e-02
-1.182742e-01
-8.914907e-01
-1.882392e-02
-1.418852e-01
-1.182742e-01
8.914907e-01
-1.882392e-02
1.418852e-01
-5.450890e-01
0.000000e+00
-8.675361e-02
0.000000e+00
0.000000e+00
-1.286180e+00
0.000000e+00
-2.047019e-01
0.000000e+00
-5.129892e-01
0.000000e+00
-8.164476e-02
0.000000e+00
5.129892e-01
0.000000e+00
8.164476e-02
0.000000e+00
1.286180e+00
0.000000e+00
2.047019e-01
582
Figure 84
C2=0.7071
2.4293
+
Vin
-
Figure 85
R1=1
R2=1
C3=1.4142
Vs
C4=0.3536
583
Table 66
Poles (rad/sec)
Poles (Hz)
Real
Imaginary
Real
Imaginary
-5.003939e-02
9.987214e-01
-7.964016e-03
1.589515e-01
-5.003939e-02
-9.987214e-01
-7.964016e-03
-1.589515e-01
-1.414227e+00
0.000000e+00
-2.250812e-01
0.000000e+00
0.000000e+00
-1.414227e+00
0.000000e+00
-2.250812e-01
0.000000e+00
1.414227e+00
0.000000e+00
2.250812e-01
-1.414227e+00
0.000000e+00
-2.250812e-01
0.000000e+00
584
R2=0.3826
C
Vin
Figure 86
Table 67
C2
+
-
R1=2.613
R4=0.9238
C3
C4
R3=1.0825
+
RL
V(10)
Poles (rad/sec)
Poles (Hz)
Real
Imaginary
Real
Imaginary
-3.827019e-01
-9.240160e-01
-6.090889e-02
1.470617e-01
-3.827019e-01
9.240160e-01
-6.090890e-02
-1.470617e-01
-9.237875e-01
3.828878e-01
-1.470254e-01
6.093849e-02
-9.237875e-01
-3.828878e-01
-1.470254e-01
-6.093849e-02
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
585
586
* HSPICE RF example
CMOS DIFFERENTIAL AMPLIFIER
.OPTION PIVOT SCALE=1.e-6 SCALM=1.e-6 HQR
.PZ V(5) VIN
VIN 7 0 0 AC 1
.AC DEC 10 20K 500MEG
M1 4 0 6 6 MN 100 10 2 2
M2 5 7 6 6 MN 100 10 2 2
M3 4 4 1 1 MP 60 10 1.5 1.5
M4 5 4 1 1 MP 60 10 1.5 1.5
M5 6 3 2 2 MN 50 10 1.0 1.0
VDD 1 0 5
VSS 2 0 -5
VGG 3 0 -3
RIN 7 0 1
.MODEL MN NMOS LEVEL=5 VT=1 UB=700 FRC=0.05 DNB=1.6E16
+ XJ=1.2 LATD=0.7 CJ=0.13 PHI=1.2 TCV=0.003 TOX=800
.MODEL MP PMOS LEVEL=5 VT=-1 UB=245 FRC=0.25 TOX=800
+ DNB=1.3E15 XJ=1.2 LATD=0.9 CJ=0.09 PHI=0.5 TCV=0.002
.END
Table 68
Poles (rad/sec)
Poles (Hz)
Real
Imaginary
Real
Imaginary
-1.798766e+06
0.000000e+00
-2.862825e+05
0.000000e+00
-1.126313e+08
-6.822910e+07
-1.792583e+07
-1.085900e+07
-1.126313e+08
6.822910e+07
-1.792583e+07
1.085900e+07
-1.315386e+08
7.679633e+07
-2.093502e+07
1.222251e+07
-1.315386e+08
-7.679633e+07
-2.093502e+07
-1.222251e+07
7.999613e+08
0.000000e+00
1.273178e+08
0.000000e+00
587
+5v
1
M3
M4
V(5)
M2
Vin
6
3
Rin
M5
2
-5v
Figure 87
RS=RPI=RL=1000 ohms
gm=0.04 mho
CMU=1.0e-11 farad
CPI=1.0e-9 farad
588
Rs
Vin
Rn
Cn
+
V
-
gV
Figure 88
Simple Amplifier
Table 69
Poles (rad/sec)
RL
+
V3
-
Poles (Hz)
Real
Imaginary
Real
Imaginary
-1.412555+06
0.000000e+00
-2.248151e+05
0.000000e+00
-1.415874+08
0.000000e+00
-2.253434e+07
0.000000e+00
4.000000e+09
0.000000e+00
6.366198e+08
0.000000e+00
589
590
* HSPICE RF example
VIN IN 0 AC 1
.PZ V(OUT) VIN
.AC DEC 50 .1K 100K
.OPTION PLST DCSTEP=1E3 XOR=-1.23456E+3 X1R=-1.23456E+2
+ X2R=1.23456E+3 FSCAL=1E-6 GSCAL=1E3 CSCAL=1E9 LSCAL=1E3
.PRINT AC VDB(OUT)
.SUBCKT OPAMP IN+ IN- OUT GM1=1 RI=1K CI=26.6U GM2=1.33333 RL=75
RII IN+ IN- 2MEG
RI1 IN+ 0 500MEG
RI2 IN- 0 500MEG
G1 1 0 IN+ IN- GM1
C1 1 0 CI
R1 1 0 RI
G2 OUT 0 1 0 GM2
RLD OUT 0 RL
.ENDS
.SUBCKT FDNR 1 R1=2K C1=12N R4=4.5K RLX=75
R1 1 2 R1
C1 2 3 C1
R2 3 4 3.3K
R3 4 5 3.3K
R4 5 6 R4
C2 6 0 10N
XOP1 2 4 5 OPAMP
XOP2 6 4 3 OPAMP
.ENDS
$
$
RS IN 1 5.4779K
R12 1 2 4.44K
R23 2 3 3.2201K
R34 3 4 3.63678K
R45 4 OUT 1.2201K
C5 OUT 0 10N
X1 1
X2 2
X3 3
X4 4
.END
FDNR
FDNR
FDNR
FDNR
591
500 M
Out
In+
2V1
1k
26.6f
4 V 75
2
3
V2
2M
In500
Figure 89
+
1
R1
3
2
R3
R2
R4
C2
C1
+
Figure 90
592
FDNR Subcircuit
RS
R12
R23
R34
R45
In
Out
X1
Figure 91
Table 70
X2
X3
X4
C5
Poles (rad/sec)
Poles (Hz)
Real
Imaginary
Real
Imaginary
-4.505616e+02
-2.210451e+04
-7.170911e+01
-3.518042e+03
-4.505616e+02
2.210451e+04
-7.170911e+01
3.518042e+03
-1.835284e+03
2.148369e+04
-2.920944e+02
3.419236e+03
-1.835284e+03
-2.148369e+04
-2.920944e+02
-3.419236e+03
-4.580172e+03
1.944579e+04
-7.289571e+02
3.094894e+03
-4.580172e+03
-1.944579e+04
-7.289571e+02
-3.094894e+03
-9.701962e+03
1.304893e+04
-1.544115e+03
2.076802e+03
-9.701962e+03
-1.304893e+04
-1.544115e+03
-2.076802e+03
-1.353908e+04
0.000000e+00
-2.154811e+03
0.000000e+00
-3.668995e+06
-3.669793e+06
-5.839386e+05
-5.840657e+05
-3.668995e+06
3.669793e+06
-5.839386e+05
5.840657e+05
-3.676439e+06
-3.676184e+06
-5.851234e+05
-5.850828e+05
593
Table 70
Poles (rad/sec)
594
Poles (Hz)
Real
Imaginary
Real
Imaginary
-3.676439e+06
3.676184e+06
-5.851234e+05
5.850828e+05
-3.687870e+06
3.687391e+06
-5.869428e+05
5.868665e+05
-3.687870e+06
-3.687391e+06
-5.869428e+05
-5.868665e+05
-3.695817e+06
-3.695434e+06
-5.882075e+05
-5.881466e+05
-3.695817e+06
+3.695434e+06
-5.882075e+05
5.881466e+05
-3.220467e-02
-2.516970e+04
-5.125532e-03
-4.005882e+03
-3.220467e-02
2.516970e+04
-5.125533e-03
4.005882e+03
2.524420e-01
-2.383956e+04
4.017739e-02
-3.794184e+03
2.524420e-01
2.383956e+04
4.017739e-02
3.794184e+03
1.637164e+00
2.981593e+04
2.605627e-01
4.745353e+03
1.637164e+00
-2.981593e+04
2.605627e-01
-4.745353e+03
4.888484e+00
4.852376e+04
7.780265e-01
7.722796e+03
4.888484e+00
-4.852376e+04
7.780265e-01
-7.722796e+03
-3.641366e+06
-3.642634e+06
-5.795413e+05
-5.797432e+05
-3.641366e+06
3.642634e+06
-5.795413e+05
5.797432e+05
-3.649508e+06
-3.649610e+06
-5.808372e+05
-5.808535e+05
-3.649508e+06
3.649610e+06
-5.808372e+05
5.808535e+05
-3.683700e+06
3.683412e+06
-5.862790e+05
5.862333e+05
-3.683700e+06
-3.683412e+06
-5.862790e+05
-5.862333e+05
-3.693882e+06
3.693739e+06
5.878995e+05
5.878768e+05
Table 70
Poles (rad/sec)
Poles (Hz)
Real
Imaginary
Real
Imaginary
-3.693882e+06
-3.693739e+06
-5.878995e+05
-5.878768e+05
Figure 92
595
References
[1] Desoer, Charles A. and Kuh, Ernest S. Basic Circuit Theory. New York:
McGraw-Hill.1969. Chapter 15.
[2] Van Valkenburg, M. E. Network Analysis. Englewood Cliffs, New Jersey:
Prentice Hall, Inc., 1974, Chapters 10 & 13.
[3] R.H. Canon, Jr. Dynamics of Physical Systems. New York: McGraw-Hill,
1967. This text describes electrical, mechanical, pneumatic, hydraulic, and
mixed systems.
[4] B.C. Kuo. Automatic Control Systems. Englewood Cliffs, New Jersey:
Prentice-Hall, 1975. This source discusses control system design, and
provides background material about physical modeling.
[5] L.T. Pillage, and R.A. Rohrer. Asymptotic Waveform Evaluation for Timing
Analysis, IEEE Trans CAD. Apr. 1990, pp. 352 - 366. This paper is a good
references about interconnect transfer function modeling, and discusses
extracting transfer functions for timing analysis.
[6] S. Lin, and E.S. Kuh. Transient Simulation of Lossy Interconnects Based on
the Recursive Convolution Formulation, IEEE Trans CASNov. 1992, pp.
879 - 892. This paper is another source for how to model interconnect
transfer functions.
[7] Muller, D. E., A Method for Solving Algebraic Equations Using a Computer,
Mathematical Tables, and Other Aids to Computation (MTAC). 1956, Vol.
10,. pp. 208-215.
[8] Temes, Gabor C. and Mitra, Sanjit K. Modern Filter Theory And Design.J.
Wiley, 1973, page 74.
[9] Temes, Gabor C. and Lapatra, Jack W. Circuit Synthesis And
DesignMcGraw-Hill. 1977, page 301, example 7-6.
[10] Temes, Gabor C. and Mitra, Sanjit K., Modern Filter Theory And Design.J.
Wiley, 1973, page 348, example 8-3.
[11] Desoer, Charles A. and Kuh, Ernest S. Basic Circuit Theory.McGraw-Hill,
1969, page 613, example 3.
[12] Vlach, Jiri and Singhal, Kishore. Computer Methods For Circuit Analysis and
Design. Van Nostrand Reinhold Co., 1983, pages 142, 494-496.
596
18
Performing Digital Cell Characterization
18
HSPICE ships numerous examples for your use; see Cell Characterization
Examples for paths to demo files.
Most ASIC vendors use the basic capabilities of the .MEASURE statement in
Synopsys HSPICE to characterize standard cell libraries, and to prepare data
sheets.
HSPICE stores input sweep parameters and measure output parameter, in
measure output data files (design.mt0, design.sw0, and design.ac0).
These files store multiple sweep data. You can use Custom WaveView to plot
this data; for example, to generate fanout plots of delay versus load. You can
also use the slope and intercept of the loading curves to calibrate VHDL,
Verilog, Lsim, and Synopsys models.The following sections discuss these
topics:
Cell Examples
This chapter shows you some typical data sheet parameters. A series of typical
data sheet examples, demonstrates the flexibility of the .MEASURE statement.
This chapter also shows you how to characterize cells in data-driven analysis.
Data-driven analysis automates cell characterization, including calculating the
delay coefficient for the timing-simulator polynomial. You can simultaneously
vary an unlimited number of parameters, or the number of analyses to perform.
Cell characterization uses an ASCII file format for automated parameter input
to HSPICE.
597
Uses the MAX function to calculate vmax, over the time region of interest.
Uses a fixed value for the measure threshold, to calculate the Tdelay delay.
volts
Trise
5v
V(in)
Tfall
V(out)
Tdelay
Tstop
TDval
time
Figure 93
598
Defines a bounded region by finding the pedestal voltage (Vmid) and then
finding the first time that the signal crossed this value, Tfrom
Measures the ripple in the defined region using the peak-to-peak (PP)
measure function from Tfrom to Tmid
TRAN
TRAN
TRAN
TRAN
TRAN
TRAN
V(out)
5v
Vmid
vcc
2.5 v
0v
Th1Tfrom
Figure 94
Tmid
Th2
time
This file sweeps the sigma of the model parameter distribution, while it
examines the delay. It shows you the delay derating curve, for the worst cases
in the model. This example uses demonstration netlist sigma.sp, which is
available in directory $installdir/demo/hspice/cchar.
599
Figure 95
600
mean
variance
sigma
average deviance
Figure 96
601
The peak capacitance (at the switch point) occurs when the voltage at the
output side changes, in the direction opposite the input side of the Miller
capacitor. This adds the Miller capacitance, times the inverter gain, to the
effective capacitance.
mp out in 1 1 mp w=10u l=3u
mn out in 0 0 mn w=5u l=3u
vin in 0 DC= pdcin AC 1 0
.ac lin 2 10k 100k sweep pdcin 0 5 .1
.measure ac incap find par( -1 * ii(vin)/
+ (hertz*twopi) ) AT=10000hertz
Figure 97
602
Four .MEASURE statements, to reference the out0 output node of an opamp circuit. These statements use output variable operators for parameters:
decibels vdb(out0)
phase vp(out0)
Figure 98
603
.MEASURE statement
.DATA statement
AUTOSTOP option
SUBCKT definition
SUBCKT call
Models
5.50
CELLCHAR.TRO
V (2
5.0
V (3
4.50
4.0
Volt [Lin]
3.50
3.0
2.50
2.0
1.50
1.0
500.0M
0
0
Figure 99
604
10.0N
Time [Lin]
20.0N
30.0N
35.255N
5.50
CELLCHAR.TRO
V (2
5.0
V (3
4.50
4.0
Volt [Lin]
3.50
3.0
2.50
2.0
1.50
1.0
500.0M
0
0
10.0N
Time [Lin]
20.0N
30.0N
35.255N
Cell Examples
Figure 101 and Figure 102 are identical, except that their input signals are
complementary.
The circuit in Figure 101 calculates the rise time and the low-to-high
propagation delay time.
The circuit in Figure 102 calculates the fall time and the high-to-low
propagation delay time.
605
If you use only one circuit, CPU time increases because analysis time
increases when HSPICE calculates both rise and fall times.
The XOUTL or XOUTH subcircuit represents the fanout of the cell (inverter). To
modify fanout, specify different multipliers (m) in the subcircuit calls.
You can also specify local and global temperatures. This example characterizes
the cell at a global temperature of 27, but the temperature of the M1 and M2
devices is (27+DTEMP). The .DATA statement specifies the DTEMP value.
The example uses a transient parameterized sweep, with .DATA
and .MEASURE statements, to determine the inverter timing, for best, typical,
and worst cases.
XOUTL
VINH
XINVH
606
XOUTH
VINL
XINVL
20
30
power supply
fanout
MOSFET temperature
Rise time starts when the voltage at node 3 (the output of the inverter) is equal
to 0.1 VDD (that is, V(3) = 0.1VDD).Rise time ends when the voltage at node
3 is equal to 0.9 VDD (that is, V(3) = 0.9VDD).
For more accurate results, start the .MEASURE calculation after either:
607
A time delay, or
608
.DATA statement.
19
19
MOSRA Overview
MOSRA Overview
As the industry scales down CMOS technology, reliability requirements to
maintain the long-term device become both more challenging and more
important. Two of the most critical reliability issues, the hot carrier injection
(HCI) and the bias temperature instability (BTI) can change the characteristics
of MOS devices. HSPICE reliability analysis allows circuit designers to predict
the reliability of their design to allow enough margin for their circuits to function
correctly over their lifetime.
A unified custom reliability-modeling API is available or custom reliability model
development. Contact your Synopsys technical support team for more
information about the MOSRA API.
HSPICE MOSRA analysis currently supports Level 49, Level 53, Level 54,
Level 57, Level 66, Level 69, Level 70, Level 71, and Level 73, and external
CMI MOSFET models.
The following sections discuss these topics:
Example Setup
609
Pre-stress
(fresh_device)
Simulation
Phase
Original
Model
Card
Netlist
MOSRA
Model
Card
Pre-stress
Simulation results
Stress
Integration
and
Projection
Conversion of stress
into device
parameter
degradation
Post-Stress
(aged_device)
Simulation
Phase
Post-stress
Simulation results
610
Example Setup
The following example file demonstrates how to set up a HSPICE reliability
reliability analysis.
* MOSRA TEST
vdd 1 0 2
mp1 3 2 1 1 p1
mn1 3 2 0 0 n1
mp2 4 3 1 1 p1
mn2 4 3 0 0 n1
mp3 2 4 1 1 p1
mn3 2 4 0 0 n1
c1 2 0 .1p
l=0.1u
l=0.1u
l=0.1u
l=0.1u
l=0.1u
l=0.1u
tittd = 1.45e-20
.MOSRA
.MOSRAPRINT
.MOSRA_SUBCKT_PIN_VOLT
.MODEL
.APPENDMODEL
611
.MOSRA
Starts HSPICE HCI and/or BTI reliability analysis.
Syntax
.MOSRA RelTotalTime=time_value
+ [RelStartTime=time_value] [DEC=value] [LIN=value]
+ [RelStep=time_value] [RelMode=1|2|3] SimMode=[0|1|2|3]
+ [AgingStart=time_value] [AgingStop=time_value]
+ [AgingPeriod=time_value] [AgingWidth=time_value]
+ [AgingInst="inst_name"]
+ [Integmod=0|1|2] [Xpolatemod=0|1|2]
+ [Tsample1=value] [Tsample2=value]
+ [Agethreshold=value] [DegradationTime=value]
+ [MosraLlife=degradation_type_keyword] [DegF=value]
+ [DegFN=value] [DegFP=value]
+ [Frequency=value]
Argument
Description
RelTotalTime
RelStartTime
DEC
LIN
RelStep
612
Argument
Description
RelMode
HSPICE reliability model mode selects whether a simulation accounts for both
HCI and BTI effects or either one of them. If you define the RelMode in
the .MOSRA command as 1 or 2, it takes higher priority and applies to all
MOSRA models. If you do not set its value or enter 0, RelMode in the .MOSRA
command, then the RelMode inside individual MOSRA models takes
precedence for that MOSRA model only; the rest of the MOSRA models take
the RelMode value from the .MOSRA command. If you set any other value,
except 0, 1, or 2, HSPICE issues a warning, and RelMode automatically resets
to the default value 0.
SimMode
When SimMode=1:
HSPICE reads in the *.radeg0 file, updates the device model for reliability
analysis; then generates a new transient-output in a *.tr1 waveform file.
The *.radeg file and input netlist must be in the same directory.
The netlist stimuli could be different from the SimMode=0 netlist that
generated the *.radeg file.
When SimMode=3:
If you do not specify .option radegfile in the top level netlist, simulation
starts from fresh device.
If you specify .option radegfile in the top level netlist, HSPICE reads
in the last suite degradation in the radeg file, and continues the degradation
integration and extrapolation from the corresponding circuit time in the
radeg file.
613
Argument
Description
AgingStart
Optionally defines time when HSPICE starts stress effect calculation during
transient simulation. Default is 0.0.
AgingStop
Optionally defines time when HSPICE stops stress effect calculation during
transient simulation. Default is tstop in .TRAN command.
AgingPeriod
AgingWidth
The AgingWidth (circuit time on) argument works with the AgingPeriod
argument. For example: if you specify AgingPeriod=1.0s and AgingWidth=0.5s,
then the circuit turns on for 0.5s, and turns off for 0.5s. (The period is 1.0s.)
AgingInst
Selects MOSFET devices to which HSPICE applies HCI and/or BTI analysis.
The default is all MOSFET devices with reliability model appended. You must
enclose the name in quotes. HSPICE allows Multiple names /and supports
wildcards.
Integmod
Xpolatemod
Tsample1
Tsample2
Agethreshold
Only when the degradation value >= Agethreshold, the MOSFET information is
printed in the MOSRA output file *.radeg or *.cvs file. Default is 0.
DegradationTime If you specify this argument, the MOSRA API calculates the degradation at the
degradation time, and generates a .degradation output file.
MosraLife
Argument to compute device lifetime for the degradation type specified. This
argument has the same function as .option mosralife.
DegF
Sets the MOSFETs failure criteria for lifetime computation. This argument has
the same function as .option degf. If you specify .option degf, it takes
precedence over .mosra degf.
DegFN
Sets the NMOS's failure criteria for lifetime computation. This argument has the
same function as .option degfn. If you specify .option degfn, it takes
precedence over .mosra degfn.
614
Argument
Description
DegFP
Sets the PMOS's failure criteria for lifetime computation. This argument has the
same function as .option degfp. If you specify.option degfp, it takes
precedence over .mosra degfp.
Frequency
Description
Use the .MOSRA command to initiate HCI and BTI analysis. This is a two-phase
simulation, the fresh simulation phase and the post stress simulation phase.
During the fresh simulation phase, HSPICE computes the electron age/stress
of selected MOS transistors in the circuit based on circuit behavior and the
HSPICE MOSFET reliability model. During the post stress simulation phase,
HSPICE simulates the degradation effect on circuit performance, based on the
stress information produced during the fresh simulation phase.
If you specify either DEC or LIN the API ignores the RelStep value. See
Figure 104 on page 616 for an illustration of the .MOSRA command/syntax.
Example
.mosra reltotaltime=6.3e+8 relstep=6.3e+7
+ agingstart=5n agingstop=100n
+ aginginst="x1.*"
615
Stress
evaluation & integral
2*RelStep
100ns
100ns * 2
100ns * 3
...
RelStep
3*RelStep
RelTotalTime
Stress
evaluation & integral
2*RelStep
10ns
AgingStart
Default: 0
100ns
AgingStop
Default:
tstop in .tran
1s
2s
3s
RelStep
3*RelStep
RelTotalTime
Simulation
Transient time
Stress
evaluation & integral
2*RelStep
0ns
100ns 200ns
300ns
0.5s
1s
RelStep
3*RelStep
RelTotalTime
616
Examples
The following example netlist does a DC and AC simulation in MOSRA poststress.
* MOSRA DC/AC TEST
.option radegfile = 'simmode2.radeg0'
vdd 1 0 -2 ac=1
mp1 1 2 0 0 p1 l=0.1u w=10u ad=5p pd=6u as=5p ps=6u
vgs 2 0 -2
.model p1 pmos level=54 version=4.5
.model p1_ra mosra level=1
.appendmodel p1_ra mosra p1 pmos
.mosra reltotaltime='10*365*24*60*60' lin=11 simmode=1
.dc vdd 0 -1.2 -0.1
.ac dec 1 1e5 1e9
.options post
.print dc i(vdd)
.print ac i(vdd) ii(vdd)
.end
617
HSPICE parses the specified radeg file and do the post-stress simulation in the
specified relstep, then generate the corresponding DC/AC output files:
dcac.sw0@ra=3.1536e+07
dcac.sw0@ra=6.3072e+07
dcac.sw0@ra=9.4608e+07
dcac.sw0@ra=1.26144e+08
dcac.sw0@ra=1.5768e+08
dcac.sw0@ra=1.89216e+08
dcac.sw0@ra=2.20752e+08
dcac.sw0@ra=2.52288e+08
dcac.sw0@ra=2.83824e+08
dcac.sw0@ra=3.1536e+08
dcac.ac0@ra=1.89216e+08
dcac.ac0@ra=2.20752e+08
dcac.ac0@ra=2.52288e+08
dcac.ac0@ra=2.83824e+08
dcac.ac0@ra=3.1536e+08
618
619
.MOSRAPRINT
Provides .PRINT/.PROBE capability to access the electrical degradation of
the specified element.
Syntax
.MOSRAPRINT output_name output_type(element_name, vds=exp1,
+ vgs=exp2, vbs=exp3)
Argument
Description
output_name
output_type
One of the following output variable types: vth, gm, gds, ids, dids
or dvth.
Definition
The .MOSRAPRINT command supports the following models: B3SOI, B4SOI,
PSP, BSIM3, BSIM4, HVMOS, HiSIM-HV, and Custom CMI MOSFETS.
This command provides access to device degradation information. The API
uses the user-specified bias conditions, vds, vgs and vbs to characterize the
device electrical property as specified by the output type. There is no order
requirement for vds, vgs, and vbs. You can use wildcards '?' and '*' in
element_name. The output variable dids reports the change of ids between
post-stress simulation and fresh-simulation. dvth reports the percentage
change of vth between post-stress simulation and fresh-simulation. The output
file format is the same as the measurement file format with file extension *.ra.
You can use .OPTION MEASFORM with this command to produce *.cvs files
suitable for Microsoft Excel output.
Example
The following syntax prints the ids value of the MOSFET m1, when vds = 5
vgs=5, vbs=0, at each reltime point.
.MOSRA reltotaltime=5e+7 relstep=1e+7
.MOSRAPRINT ids(m1, vds=5, vgs=5, vbs=0)
620
.MOSRA_SUBCKT_PIN_VOLT
When a MOSFET is wrapped by a subckt-based macro model, this command
specifies the subckt terminal voltages used by MOSRA model evaluation.
Syntax
.MOSRA_SUBCKT_PIN_VOLT subckt_name1, subckt_name2,...
Description
Use this command to specify subckt-based macro terminal voltages HSPICE
uses for MOSRA model evaluation.
subckt_name: The subcircuit name whose terminal voltages the API uses for
MOSRA model evaluation.
Note:
Example
In this example, HSPICE uses subckt sub1's terminal voltages v(d)/v(g)/
v(s)/v(b(), instead of the MOSFET M1's terminal voltages, v(d1)/v(g1)/
v(s1)/v(b1), for MOSRA model evaluation.
.subckt sub1 d g s b ...
M1 d1 g1 s1 b ...
Rd d d1 1k
Rs s s1 1k
Rg g g1 1k
.model ...
.ends
.mosra_subckt_pin_volt subckt=sub1
...
.end
.MODEL
Syntax
.model mname mosra
+ level=value
+ [relmodelparam]
621
Argument
Description
mname
mosra
level (alias:
mosralevel)
relmodelparam
Reliability model parameter for HCI and BTI. See the HSPICE
Application Note: Unified Custom Reliability Modeling API (MOSRA
API) for sections on HCI and BTI parameters. Contact Synopsys
Technical Support for access.
.APPENDMODEL
This command appends the parameter values from the source model card
(SrcModel) to the destination model card (DestModel). The command requires
all arguments. The .APPENDMODEL command supports wildcards. In addition,
the .OPTION APPENDALL enables the top hierarchical level to use the
.APPENDMODEL command even if the MOSFET model is embedded in a
subcircuit. See .OPTION APPENDALL in the HSPICE Reference Manual:
Commands and Control Options.
Syntax
.appendmodel SrcModel ModelKeyword1 DestModel ModelKeyword2
622
Argument
Description
SrcModel
Argument
Description
ModelKeyword1 Model type for SrcModel. For example, the keyword mosra.
DestModel
Destination model name, e.g., the original model in the model library.
Example
This example appends the content of the model card hci_1 to the b3_nch
BSIM3 model card.
.appendmodel hci_1 mosra b3_nch nmos
Wildcard Examples
In this example, the mosra model p1_ra appends to all of the pmos models.
Note that you need quotation marks if only a wildcard defines model name.
.appendmodel p1_ra mosra
pmos
In the following example, the mosra model p1_ra appends to all of the pmos
models with name pch* (pch1, pch2, pch_tt, etc.).
.appendmodel p1_ra mosra
pch*
pmos
.OPTION APPENDALL
.OPTION DEGF
.OPTION DEGFN
.OPTION DEGFP
.OPTION MOSRALIFE
.OPTION MOSRASORT
.OPTION MRAAPI
.OPTION MRAEXT
.OPTION MRAPAGED
.OPTION RADEGFILE
.OPTION RADEGOUTPUT
623
.OPTION APPENDALL
With this option, you can use .APPENDMODEL at the main (uppermost) circuit
level hierarchy even if the MOSFET model is embedded in a subcircuit. If there
are .APPENDMODEL commands both in the main circuit and in a subcircuit, the
.APPENDMODEL in the subcircuit has higher priority. For example:
.option appendall
.appendmodel n_ra mosra nch nmos
.SUBCKT mosra_test 1 2 3 4
M1 1 2 3 4 nch L=PL W=PW
.model nch nmos level= ...
.ENDS
.OPTION DEGF
Sets the MOSFET's failure criteria for lifetime computation.
Syntax
.OPTION DEGF=val
Description
In conjunction with .OPTION MOSRALIFE, this option sets the MOSFET's
degradation value at lifetime. The options apply to all MOSFETs. The RADEG
file prints the lifetime values.
.OPTION DEGFN
Sets the NMOS's failure criteria for lifetime computation.
Syntax
.option DEGFN=val
624
Description
In conjunction with .OPTION MOSRALIFE, this option sets the NMOS's
degradation value at lifetime. If you do not specify the option or the
MRAlifetimeDeg function cannot identify the keyword, HSPICE does not do the
lifetime computation.The options apply to all MOSFETs. The RADEG file prints
the lifetime values.
.OPTION DEGFP
Sets the PMOS's failure criteria for lifetime computation.
Syntax
.option DEGFP= val
Description
In conjunction with .OPTION MOSRALIFE, this option sets the PMOS's
degradation value at lifetime. If you do not specify the option or the
MRAlifetimeDeg function cannot identify the keyword, HSPICE does not do the
lifetime computation.The options apply to all MOSFETs. The RADEG file prints
the lifetime values.
.OPTION MOSRALIFE
Invokes the MOSRA lifetime computation.
Syntax
.OPTION MOSRALIFE=degradation_type_keyword [degF=val]
[degFN=val] [degFP=val]
Description
Use this option to compute device lifetime calculation for the degradation type
specified.
This option works with three others:
The options apply to all MOSFETs. he RADEG file prints the lifetime values. The
Synopsys built-in MOSRA Model Level 1 and the MOSRA API models support
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
625
lifetime calculus. (For the implementation of the lifetime function in the API
models see the HSPICE User Guide: Implementing the MOSRA API, available
by contacting the HSPICE technical support team.)
.OPTION MOSRASORT
Enables the descending sort for reliability degradation (RADEG) output.
Syntax
.OPTION MOSRASORT=degradation_type_keyword
Default delvth0
Description
Use this option mosrasort to enable the descending sort for reliability
degradation (RADEG) output.
If you do not specify the mosrasort option, or HSPICE does not recognize the
degradation type keyword, HSPICE the simulation omits the sort. (For a listing
of Degradation type keywords see the HSPICE User Guide: Implementing the
MOSRA API, available only by contacting the HSPICE technical support team.)
If you only specify the option mosrasort, and do not specify the degradation
type keyword, HSPICE sorts RADEG by the delvth0 keyword.
HSPICE sorts the output in two separate lists, one for NMOS, another for
PMOS. HSPICE prints the NMOS device list first, and then the PMOS device
list.
Example
In the following usage, the option does a descending sort for RADEG output on
delvth0s value.
.option mosrasort=delvth0
.OPTION MRAAPI
Enables and links the dynamically linked MOSRA API library.
Syntax
.OPTION MRAAPI=0|1
Default 0
626
Description
Use this option to enable and link the compiled MOSRA API .so library file to
HSPICE during simulation. If you set this option parameter with no value or to
1, then the MOSRA API .so file loads as a dynamically linked object file.
If this option parameter does not exist in the netlist, or you explicitly set it to 0,
the MOSRA API ignores the .so library.
.OPTION MRAEXT
Enables access to enhanced MOSRA API functions.
.OPTION MRAEXT=0|1
Default 0
Description
Use this option to enable access to enhanced MOSRA API functions. When
MRAEXT = 1, HSPICE can access the extension functions.
.OPTION MRAPAGED
This option enables two modes of model parameter degradation.
Syntax
.OPTION MRAPAGED=0|1
Default 0
Description
If this option parameter is not in the netlist, or you explicitly set it to 0,
degradation from the MOSRAAPI model is the parameter value shift with
regard to the fresh model, delta_P. If you set this option parameter to 1, then
the degradation from the MOSRAAPI model is the degraded model parameter,
P+delta_P.
0: delta_P mode
627
.OPTION RADEGFILE
Use to specify a MOSRA degradation file name for use with SIMMODE=1.
Syntax
.OPTION RADEGFILE=file_name
Description
Use this option to specify a MOSRA degradation file name for use with
SIMMODE=1 (post-stress simulation only). HSPICE reads in the degradation
information in the specified file and does the MOSRA post-stress simulation.
Example
.option radegfile = '1.radeg0'
.OPTION RADEGOUTPUT
Outputs the MOSRA degradation information in Word Excel CSV format.
Syntax
.OPTION RADEGOUTPUT=CSV
Default off (generates no CSV file)
Description
Use this option to output the MOSRA degradation information in Microsoft
Excel CSV format. Does not generate a CSV file if you do not specify the CSV
value.
628
*.sw#@ra=circuit_time_point for DC
*.ac#@ra=circuit_time_point for AC
*.ms#@ra=circuit_time_point DC measure
HSPICE combines reliability data for all post-stress points in the following
output *.radeg file.
delvth0
mulu0
= 0.154229E-03
= 99.9985%
629
mulu0
=
100.0000%
mulua
=
100.0000%
mulub
=
100.0000%
muluc
=
100.0000%
delnfactor= 0.000000E+00
mn2
Device Type: NMOS
L= 0.100000E-06
W= 0.500000E-05
M= 0.100000E+01
Bias Direction: forward
delvth0
= 0.000000E+00
mulu0
=
100.0000%
mulua
=
100.0000%
mulub
=
100.0000%
muluc
=
100.0000%
delnfactor= 0.000000E+00
mp2
Device Type: PMOS
L= 0.100000E-06
W= 0.100000E-04
M= 0.100000E+01
Bias Direction: forward
delvth0
= 0.169531E-01
mulu0
=
100.0000%
mulua
=
100.0000%
mulub
=
100.0000%
muluc
=
100.0000%
delnfactor= 0.000000E+00
mp1
Device Type: PMOS
L= 0.100000E-06
W= 0.100000E-04
M= 0.100000E+01
Bias Direction: forward
delvth0
= 0.167418E-01
mulu0
=
100.0000%
mulua
=
100.0000%
mulub
=
100.0000%
muluc
=
100.0000%
delnfactor= 0.000000E+00
630
631
Notes
Consider these factors:
1. When SimMode=3, if you do not specify .option radegfile in the top
level netlist, the simulation starts from fresh device; if you specify the option
radegfile in the top level netlist, HSPICE reads in the last suite
degradation in the radeg file and continues the stress calculation. In
consecutive .alters, HSPICE reads in the radeg generated from the
previous alter run.
2. The degradation output-format changes when SimMode=3. In a case where
the MOSRA model has two degradations of the same type, the two
degradations of the same type print out separately to facilitate the continual
stress integration and extrapolation feature.
For example, assume a MOSRA model has two degradations of delvth0:
a 10 mV one due to BTI, and a 20mV one due to HCI. In the original radeg
file, the two degradations will be summed and output as:
632
delvth0 = 3.0000000e-2
In the new radeg file the two degradations are output separately:
Delvth0 = 1.000000e-2
Delvth0 = 2.000000e-2
633
For details on the Synopsys LEVEL 1 MOSRA model, contact your Synopsys
technical support team.
634
Name
Default
L term
available
Description
TIT0
Yes
TITCE
Yes
TITGA
Yes
TITFD
Yes
TITTD
TITWC
TITWE
TITLC
TITLE
TN
0.25
TOT0
TOTFD
TOTTD
Notes
635
Table 71
Name
Default
L term
available
Description
TOTDD
Yes
TOTWC
TOTWE
TOTLC
TOTLE
TK
0.5
TTD0
TTD0=0
disables
the Vth
recovery
effect
TDCD
TDCD is
expected
to be 0 or
negative
TFC
TFE
TOTDE
EOXMOD 0
(disabled)
636
Yes
Notes
Table 71
Name
Default
L term
available
DLBTI
DWBTI
LNOMRA 0
Description
Notes
Name
Default
L term
Description
available
UIT0
Yes
UITCE
Yes
UITGA
Yes
UITFD
Yes
UITTD
UITWC
UITWE
UITLC
UITLE
Notes
637
Table 72
Name
Default
UN
0.25
UOT0
UOTFD
UOTTD
UOTWC
UOTWE
UOTLC
UOTLE
UK
0.5
UTD0
UTD0=0
disables the
mobility
recovery effect
UDCD
UDCD is
expected to be
0 or negative
UFC
638
L term
Description
available
Notes
Table 72
Name
Default
L term
Description
available
Notes
UFE
UOTDD
TOTDD Yes
Used if
EOXMOD=1
UOTDE
TOTDE Yes
Used if
EOXMOD=1
Name
Default
L term
available
Description
THCI0
Yes
THCI1
UHCI0
UHCI1
TDII
TDLE
TDCE
TEA
Notes
Yes
Yes
639
Table 73
Name
Default
TDLT
THCVD
Yes
TDVD
Yes
TDID
Yes
THCVB
TDVB
HN
0.5
Yes
UDCE
Yes
UDII
Yes
UDLE
UEA
UDLT
UHCVD
Yes
UDVD
Yes
640
L term
available
Description
Notes
Table 73
Name
Default
L term
available
UDID
Yes
UHCVB
UDVB
0.5
HK
HIII
HIIVD0
HIIVD1
HIIVD2
Yes
Description
Notes
Channel
current
exponent
for Vdsdependent
term of
mobility HCI
degradation
VDSAT0
HIIT
HIIL
HIIE
641
Table 73
Name
Default
HIIVG0
HIIVG1
HIIVG2
HIIVGD
HIIVOFF
-1000
disabled
ISUBMODE
DLHCI
DWHCI
VBSMAX
1e6
642
L term
available
Description
Notes
20
20
Linear Acceleration
643
Post-Layout Back-Annotation
Linear Acceleration
By use of the SIM_LA option, you can accelerate the simulation of circuits that
include large linear RC networks. To achieve this acceleration, HSPICE linearly
reduces all matrices that represent RC networks. The result is a smaller matrix
that maintains the original port behavior, yet achieves significant savings in
memory and computation. Thus, the SIM_LA option is ideal for circuits with
large numbers of resistors and capacitors, such as clock trees, power lines, or
substrate networks.
In general, the RC elements separate into their own network. The shared
nodes of both main circuit elements (including .PRINT, .PROBE, and
.MEASURE statements) and RC elements are the port nodes of the RC
network. All other RC nodes are internal nodes. The currents that flow into the
port nodes are a frequency-dependent function of the voltages at those nodes.
The multi-port admittance of a network represents this relationship.
644
admittance
nce
itta
m
d
a
ual
approx
act
f0
frequency
The SIM_LA option is very effective for post-layout simulation because of the
volume of parasitics. For frequencies below f0, the approx signal matches that
of the original admittance. Above f0, the two waveforms diverge, but the higher
frequencies are not of interest. The lower the f0 frequency, the greater the
amount of reduction.
For the syntax and description of this control option, see .OPTION SIM_LA in
the HSPICE Reference Manual: Commands and Control Options.
You can also choose one of three algorithms, explained in the following
sections:
PACT Algorithm
PI Algorithm
LNE Algorithm
PACT Algorithm
The PACT (Pole Analysis via Congruence Transforms) algorithm reduces the
RC networks in a well-conditioned manner, while preserving network stability.
645
This approach is more accurate between these two algorithms, and is the
default.
admittance
ed
erv
s
pre
et
s
f
of
nd
ce
a
e
ttan
i
p
m
o
sl
ad
ual
t
c
a
f0
frequency
PI Algorithm
This algorithm creates a pi model of the RC network.
LNE Algorithm
The Linear Node Elimination (LNE) algorithm first checks the order of the
nodes for low-to-high R-degree. If the R-degree is less than MAXDEG and the
time constant (=sum(C)/sum(G)) of this node is small enough, the removal of
the node takes place. Currently, the MAXDEG value is 7.
646
PACT Options
Syntax
Description
.OPTION SIM_LA=PACT | PI
| LNE
.OPTION LA_FREQ=value
.OPTION LA_MAXR=value
.OPTION LA_MINC=value
647
Table 74
Syntax
Description
.OPTION LA_TIME=value
.OPTION LA_TOL=value
Error tolerance for the PACT and LNE algorithms. value is the
error tolerance for the PACT and LNE algorithms, between 0.0
and 1.0. The default is 0.05.
Example
In this example, the circuit has a typical risetime of 1ns. Set the maximum
frequency to 1 GHz, or set the minimum switching time to 1ns.
.OPTION LA_FREQ = 1GHz
-or.OPTION LA_TIME = 1ns
However, if spikes occur in 0.1ns, HSPICE does not accurately simulate them.
To capture the behavior of the spikes, use:
.OPTION LA_FREQ = 10GHz
-or.OPTION LA_TIME = 0.1ns
Note:
649
650
input.spf
Two nodes
IN
Subnode
Active
OUT
C9 connected
to active net IN,
is kept, and
node OUT
is connected
to INV1:OUT
Input.rcxt
Active net: IN
Inactive net: OUT
Figure 108 Converting a flat post-layout *.spf file to an active-net *.rcxt file.
Limitation
The active net name cannot contain a wildcard (*) character. For example,
net*33 is illegal.
651
Post-Layout Back-Annotation
The traditional and straightforward way for post-layout analysis by HSPICE is to
include the parasitic netlist containing parasitic RCs and devices as an ordinary
netlist for simulation.
The problem with this approach is that the parasitic netlist is flat; hence you do
not gain many advantages of hierarchical netlist, such as answers to these
questions:
How can different options apply to different blocks for better trade-off
between accuracy and performance?
How do you perform power analysis on a flat netlist to check the power
consumption?
The traditional flow flattens all nodes after extraction so it is more difficult to
compare the delay before and after extraction.
The traditional flow can also stress the limits of an extraction tool so
reliability also becomes an issue.
Needs a hierarchical (or flat) Layout Versus Schematic (LVS) ideal netlist for
use by tools such as Star-RC or Star-RCXT, and a flat parasitic netlist in
DSPF or SPEF format.
You can perform power analysis based on the hierarchical ideal netlist to
determine the power consumption of each block. Besides, you can reuse all
post-processing statements for the pre-layout simulation for post-layout
back-annotation simulation.
652
The parasitic netlist describes the interconnect delay and load due to parasitic
resistance and capacitance. You can represent parasitics on a net-by-net basis
from a simple lumped capacitance to a fully distributed resistance capacitance
tree.
For a useful application note see
The following sections cover these topics:
Full Back-Annotation
Warnings/Error Messages
Full Back-Annotation
The Full Back-Annotation flow annotates all nets from the parasitic netlist, and
thus can produce the most accurate simulation result. For a large case with
enormous number of parasitic RCs the full back-annotation flow could take
much time and memory for the simulation, in which case Selective Net BackAnnotation might be a better choice. To invoke full back-annotation, you must
supply two types of input files: an ideal netlist and a parasitic netlist in the
format of DSPF/SPEF.
653
./option_ba_file/dspf
/.option_ba_file/spef
You need not specify which format (DSPF/SPEF) the parasitic netlist uses.
HSPICE determines it automatically by analyzing the header of the parasitic
netlist, so the file header must be clean to avoid adding confusing comments.
You can specify multiple parasitic netlists, each delimited by a semicolon.
These parasitic netlists must be independent and cannot cross-reference each
other.
The G-2012.06 release supports encryption of DSPF (only) files.
For descriptions and usage examples, see .OPTION BA_FILE in the HSPICE
Reference Manual: Commands and Control Options.
Example
Sample case for Full Back-Annotation Flow
*$ Full Back Annotation example for Inverter Circuit for DSPF
post layout netlist $*
Vsupply Vdd33 0 3.3
Vground Vss33 0 0.0
.temp 25
*******HSPICE BA implementation********
.option ba_file='rc.spi' $$ DSPF post layout netlist
***************************************
.inc 'sch.spi' $$ schematic netlist
vin in 0 pulse (0 3.3 0 100p 100p 2n 4n)
.lib 'model.l' TT_3V
.option nomod post
.tran 1p 300n
.probe tran v(out)
**measurement to check period of the clock
.measure tran t_PERIOD TRIG v(out) val=0.5 RISE=15 TARG v(out)
+ val=0.5 RISE=16
.end
654
An ideal netlist
An active net file, which can be in either of two formats: StarRC or HSIMBA.
655
$installdir/demo/hspice/back_annotation/....
The following case illustrates the flow for selective net back-annotation:
You do not need to specify the format of the active net file. HSPICE determines
it automatically by analyzing its header. You can specify multiple active net files,
each delimited by a semicolon.
Note:
Example
The following case illustrates a Selective Net Back-Annotation Flow.
*$ Selective Net Back Annotation example for Inverter Circuit for
DSPF post layout netlist $*
Vsupply Vdd33 0 3.3
Vground Vss33 0 0.0
.temp 25
*******HSPICE BA implementation********
.option ba_file='rc.spi' $$ DSPF post layout netlist
.option BA_ACTIVE='selective.rcxt' $$active net file
***************************************
.inc 'sch.spi' $$ schematic netlist
.lib 'model.l' TT_3V
cload out 0 10f
.option nomod converge=100
.tran 1p 300n
.probe tran v(out)
**measurement to check period of the clock
.measure tran t_PERIOD TRIG v(out) val=0.5 RISE=15
+ TARG v(out) val=0.5 RISE=16
.end
656
The default format for the active net file is HSIM format; the file name is
design.hsimba0. Another available format available is the StarRC format;
the file name is design.rcxt0. To generate the StarRC format, use the
HSPICE control option .OPTION BA_NETFMT=1.
For descriptions and usage examples, see .BA_ACHECK and .OPTION
BA_NETFMT in the HSPICE Reference Manual: Commands and Control
Options.
657
Example
The following case illustrates an Active Net Generation Flow:
*$ Selective Back Annotation example for TG BASED XOR Circuit for
DSPF post layout netlist $*
Vsupply vdd 0 1.2
Vground vss 0 0.0
.option runlvl
.temp 25
*******HSPICE BA Active Net implimentation********
.ba_acheck dv=1 tstart=1u tstop=20u exclude='x*'
.option ba_netfmt=1 $ 0: HSIM 1: StarRC
**************************************************
.inc 'sch.spi' $$ schematic netlist
*xadder sum vss carry vdd in2 in1 adder
vin1 a 0 pulse (0 1.2 100p 100p 100p 2u 4u)
vin2 b 0 pulse (0 1.2 100p 100p 100p 3.5u 7u)
vclk clk 0 pwl (0 1.2 23u 1.2 23.1u 0)
vclkb clkb 0 pwl (0 0 23u 0 23.1u 1.2)
.option ba_activehier=1
.lib 'model.l' TT
.option nomod post
.tran 1p 30u
.probe tran v(out) v(a) v(b) v(clk) v(clkb)
.end
Warnings/Error Messages
HSPICE my issue warnings when doing back-annotation. The following are
workarounds and solutions when appropriate.
658
Warning for undefined PIN nodeYou must declare all pin nodes in a
parasitic netlist. If you violate this rule, HSPICE warns undefined node,
and all cuts off all connected element terminals to that node.
.OPTION BA_ACTIVE: Specifies the active net file name(s) for selective net
back-annotation.
659
660
.OPTION BA_SCALE: Sets the element scaling factor for instances in the
DPF file separately.
Full Back-Annotation
Selective Back-Annotation
Full Back-Annotation
For back-annotation in HSPICE, you need the following files:
Schematic netlist
Post-layout netlist
661
662
By default, the value is 1 which shorts the ports. To incorporate stems, set
.option ba_mergeport=0.
Output Control for Back-Annotation
During back-annotation, HSPICE creates its own node names for parasitics.
Because of the large number of parasitics, your search for a particular node or
operating point in the waveform may become tedious. For ease of use, HSPICE
supports storing only pre-layout nodes names by using:
.option ba_print = ideal
The default value for this option is all which includes parasitic nodes.
Scaling During Back-Annotation
HSPICE provides scaling for back-annotation using two options for backannotated post layout netlists:
.option ba_scale
.option ba_geoshrink
In back-annotation (for a post layout netlist):
For example:
663
Terminal 1
Terminal 2
Terminal 3
Terminal 4
M(MOSFET)
Q(BJT)
C [O] [L]
[L] [E] [C] [T] [O] [R]
S [U] [B]
[S] [T] [R] [A] [T] [E]
S [U] [B]
[S] [T] [R] [A] [T] [E]
N/A
C(Capacitor)
S [U] [B]
[S] [T] [R] [A] [T] [E]
N/A
D(Diode)
S [U] [B]
[S] [T] [R] [A] [T] [E]
N/A
R(Resistor)
When a terminal name may be different from those listed above for elements,
HSPICE provides an option to map different user terminal names to what the
simulator recognizes.
.option ba_terminal = "terminal_index1 alias1
+ [; terminal_index2 alias2; terminal_index3 alias3; ]"
664
665
The HSPICE back annotation engine, by default, recognizes '@'. However, for
other delimiters, you must explicitly include the same using:
.option ba_fingerdelim = "delimiter_string"
For example, for the colon (:) hierarchy separator (DIVIDER), specify:
.option ba_hierdelim = ":"
Selective Back-Annotation
Selective back-annotation allows you to selectively back-annotate the postlayout netlist per active net criteria. HSPICE uses active net, a set of nets / pins
specified in *.rcxt or *.rc format for back-annotating an RC netlist.
For selective back-annotation in HSPICE, you need the following files:
Schematic netlist
Post-layout netlist
666
When you define tolerance change in voltage value of nets, you create the
active net files by using the following syntax:
.BA_ACHECK [include=node_pattern] [exclude=node_pattern]
+ [dv=val] [level=val2] [tstart=start_time] [tstop=stop_time]
where:
include and exclude are useful options for specifying nets with
wildcards.
level causes the simulator to pick nets from the TOP level to the hierarchy
level specified. For level=2, HSPICE considers active nets from the TOP
level and immediate hierarchy level. By default, level=0, which means that
HISPICE considers the full hierarchy.
tstart and tstop define start and stop times, for which you want to
perform an active net check. By default, these are the same as transient
start and stop times.
667
Active net files include embedded subckt instance names. By default, HSPICE
creates an active net file in .hsimba# format, which is the HSIM active net
format.
To write the active net file in .rcxt# format, use:
.option ba_netfmt = 1
By default, HSPICE does not recognize module names and results in incorrect
back-annotation. To correct such a situation, use:
.option ba_activehier = [0|1]
where:
668
EXTRACTION: RC
REDUCTION: NO
COUPLE_TO_GROUND: YES
XREF: YES
POWER_EXTRACT: YES
NETLIST_FORMAT: SPF
NETLIST_FILE: output_filename
NETLIST_INSTANCE_SECTION: YES
NETLIST_CONNECT_SECTION: YES
SHORT_PINS: NO
NETLIST_GROUND_NODE_NAME: 0
NETLIST_SUBCKT: YES
669
670
name_id|bit|path|name|physical_ref]
[*POWER_NETS logical_power_net physical_power_net ...]
[*GROUND_NETS ground_net ...]
[*PORTS logical_port I|B|O
*C coordinate ...
*L par_value
*S rising_slew falling_slew [low_threshold high_threshold]
*D cell_type]
[*PHYSICAL_PORTS [physical_instance delimiter]
physical_port I|B|O
*C coordinate ...
*L par_value
*S rising_slew falling_slew [low_threshold high_threshold]
*D cell_type]
[*DEFINE logical_instance design_name |
*PDEFINE physical_instance design_name]
*D_NET net_path total_capacitance
[*V routing_confidence]
[*CONN
*P [logical_instance delimiter]
logical_port|physical_port
I|B|O
*C coordinate ...
*L par_value
*S rising_slew falling_slew
[low_threshold high_threshold]
*D cell_type
|
*I [physical_instance delimiter]
logical_pin|physical_node
I|B|O
*C coordinate ...
*L par_value
*S rising_slew falling_slew
[low_threshold high_threshold]
*D cell_type
*N net_name delimiter net_number coordinate
[*CAP cap_id node1 [node2] capacitance]
[*RES res_id node1 node2 resistance]
[*INDUC induc_id node1 node2 inductance]
*END
671
672
21
21
You must define all analysis statements and simulation control statements
with the full 3D-IC instance hierarchy reference.
673
See Full Circuit Example on page 692 for an example that references include
and library files.
The HSPICE simulates a 3D-IC with existing methodology to simulate the
modularized IC chip inside the full 3D-IC (single die) and uses enhanced
commands and simulation controls specific to the process.
HSPICE keeps the single IC module netlist intact. It also allows customizing of
the circuit properties for different instantiations of the same IC module such as
.TEMP, .OPTION TNOM, .OPTION SCALE, .OPTION GEOSHRINK, and netlist
parameters. This approach enables netlist interpretation and model
interpretation controlling statements, such as .IVTH. This methodology
maintains the instance full hierarchy to match the layout hierarchy for backannotation.
The following sections discuss these topics:
IC Module Usage
A device model that you can define by either the .MODEL command or
.SUBCKT (macro-model) constructs.
Device model referencing depends on the netlist static scope (the netlist
definition inside the .SUBCKT construct).
You reference netlist parameters based on dynamic scope (the full instance
hierarchical path).
IC Module Usage
The HSPICE simulation allows you to define unique circuit properties as the
default for each IC module in the following items:
674
Circuit property definitions using commands and control options such as:
.OPTION SCALE, .OPTION GEOSHRINK, .TEMP and so forth.
Model card definitions for both model card and macro-model forms.
.PARAM commands.
.MODEL commands.
675
.GLOBAL command: Defines the global node for each IC module. Thus, all
nodes that reside below the subckts carry this node definition connect to this
node within the IC module. For example, if .GLOBAL defines a node within
the .MODULE construct, only the instances inside the subckts (defined within
the same .MODULE construct) and subsequent nodes below the subckts
can connect to the defined node without connecting through subckt ports.
Note: Even though HSPICE defines the .GLOBAL nodes for each
IC module, the simulator only limits its reference by the IC
module base. HSPICE still considers these nodes able to be
globally referenced through the syntax as:
module_label::global_node_label.
.IVTH: If you declare this command inside the .MODULE block, it applies to
the model card defined within the same .MODULE construct only.
Simulation controlling options other than those explicitly stated in the Syntax
section above.
676
Example 2: Legal netlist with device references to the models defined within the
same .module construct. The xtop1.m1 references the model card with
vth0=0.38 while the xtop2.m1 references the one with the vth0=0.41.
.model nmod nmos level=54 vth0=0.41
xtop1 top::top1
xtop2 top2
.module top
.model nmod nmos level=54 vth0=0.38
.subckt top1
m1 nmod l=3.6e-008 w=2.7e-006
.ends top1
.endmodule top
677
.subckt top2
m1 nmod l=3.6e-008 w=2.7e-006
.ends top2
Example 3: This illegal netlist shows how you must not reference undefined
model cards, either in the same .module construct or at the top-level, even
though the referenced model name is uniquely defined inside another
.module construct.
xtop1 tmod1::top1
xtop2 tmod2::top2
.module tmod1
.model nmod1 nmos level=54 vth0=0.45
.subckt top1
m1 nmod2 l=3.6e-008 w=2.7e-006
.ends top1
.endmodule tmod1
.module tmod2
.model nmod2 nmos level=54 vth0=0.41
.subckt top2
m1 nmod1 l=3.6e-008 w=2.7e-006
.ends top2
.endmodule tmod2
Example 4: This legal netlist shows the device reference to the models defined
without the .module construct only because there is not a model defined
inside the .module construct with the same name label. The xtop1.m1
references the model card with vth0=0.45 at the top level static scope. The
xtop1.m2 references the model card with the vth0=0.41. The xtop2.m1
references the model card with the vth0=0.45 (same as the xtop1.m1).
.model nmod1 nmos level=54 vth0=0.45
xtop1 top::top1
xtop2 top2
.module top
.model nmod2 nmos level=54 vth0=0.41
.subckt top1
m1 nmod1 l=3.6e-008 w=2.7e-006
.ends top1
.endmodule top
.subckt top2
m1 nmod1 l=3.6e-008 w=2.7e-006
.ends top2
678
The interposer level (top level) instance can reference the VA modules
defined without the IC-module scope (top level) and VA modules defined
inside any IC module with additional IC-module label references.
679
680
.endmodule
.module mod2
.hdl './res_cap.va'
.endmodule
vsource 1 0 pwl 0n 0 10n 3
r1 1 2 10K
xr2 2 3 mod1::resistor R=1OK
xr3 3 0 mod2::resistor R=1OK C=1p
c1 2 0 1uF
.tran 1n 1u
.end
681
.PARAM
.OPTION
.TEMP
.LIB and .INCLUDE to include files containing legal statements inside the
.MODULEVAR construct
Parameters - .PARAM
683
Nominal Temperature
Device Length
xtop1.m1
25
5e-008
xtop2.m1
40
3e-008
xtop3.m1
25
5e-008
xtop4.m1
10
1e-008
684
Nominal Temperature
Device Length
xtop1.m1
25
3e-008
xtop2.m1
25
5e-008
xtop3.m1
40
5e-008
xtop4.m1
40
1e-008
xtop5.m1
25
1e-008
xtop6.m1
25
8e-008
xtop7.m1
10
4e-008
xtop8.m1
10
8e-008
Nominal Temperature
Device Length
xtop1.m1
25
8e-008
xtop2.m1
25
4e-008
xtop3.m1
40
8e-008
685
Instance
Nominal Temperature
Device Length
xtop4.m1
40
6e-008
xtop5.m1
25
7e-008
xtop6.m1
25
2e-008
xtop7.m1
10
7e-008
xtop8.m1
10
9e-008
686
* p1 = 5
* p2 = 8
.ALTER Features
687
688
.ALTER Features
The 3D-IC usage for the HSPICE .ALTER instance-statement replacement
scheme is the same as the existing replacement scheme for a standard device
simulation. Two HSPICE commands aid in this process: .DEL MODULE and
.DEL MODELEVAR.
You modify or add to existing .module or .modulevar constructs by
redefining the .module or .modulevar constructs with previously-defined
label names.
689
The content defined with the new constructs for the existing label constructs
only modifies the content to the same label construct content.
If the statements exist in the original construct, the new contents replace the
contents of the original construct.
.ends
690
.subckt pch
.ends
.endmodule
.end
.alter s2
.del modulevar ic1
.modulevar ic1
.param p=0.07u * "xtop.m1" will have "0.07u" as width.
.endmodulevar
.end
691
This 3D-IC consists of multiple single dies with the same design and
technology node.
The example shows how you can use a single IC module netlist for a single IC
set of memory simulation properties from the file memory.lib.
.lib TT
.param * parameters for the simulation corner TT.
.endlib TT
.lib FF
.param * parameters for the simulation corner FF
.endlib FF
.lib SS
.param * parameters for the simulation corner SS
.endlib SS
.lib models
.models
* model cards for the memory IC.
.subckt nch_mac * macro-models for the memory IC.
.ends nch_mac
.endlib models
The netlist then draws on single IC memory circuit definitions from the file
memory.sp:
* Top level circuit from single memory IC module
.subckt 1G_mem_top
.temp 100
xbank1 bank
.ends 1G_mem_top
* Other subcircuit definitions.
.subckt bank
.ends bank
692
.temp
* 1st
xmem1
* 2nd
xmem2
* 3rd
xmem3
* 4th
xmem4
-40
IC memory module (fast corner)
.. 1GMem::1G_mem_top
IC memory module (slow corner)
.. 1GMem::1G_mem_top
IC memory module (typical - default)
.. 1GMem::1G_mem_top
IC memory module
.. 1G_mem_top
.ends memory_control
* Netlist definitions from the original single IC circuit.
.include "memory.sp"
.module 1GMem
* Default control and parameters
.lib "memory.lib" TT
* Default single IC memory properties
.temp 25
693
694
695
696
22
Monte CarloTraditional Flow Statistical
Analysis
22
The D-2010.03 release enabled advanced sampling capabilities for use with
the traditional Monte Carlo format. Earlier releases did not support advanced
sampling capabilities. The advanced sampling capabilities are described in this
chapter. See Using Traditional Variation Format with Advanced Sampling
Methods in Monte Carlo on page 819 for more information. The features
described in this chapter differ from, and are generally a subset of, the
enhanced statistical analysis features described in Chapter 23, Variability
Analysis Using the Variation Block, and Chapter 24, Monte Carlo Analysis
Variation Block Flow.
HSPICE ships hundreds of examples for your use. See Listing of
Demonstration Input Files for paths to demo files. See Variability Examples to
find traditional Monte Carlo demonstration files.
For information on bisection in conjunction with Monte Carlo, see Chapter 30,
Timing Analysis Using Bisection.
This chapter discusses the following topics:
Worst-Case Analysis
697
698
Monte Carlo analysis when you know the statistical standard deviations of
component values to center a design. This provides maximum process
yield, and determines component tolerances.
Worst-case corner analysis when you know the component value limit to
automate quality assurance for:
Process extremes
Parameter corners
Library files
DC operating points
DC sweeps
AC sweeps
Transient analysis
699
Use Custom WaveView to generate scatter plots from the operating point
analysis or a family of curve plots for DC, AC, and transient analysis.
Use .MEASURE statements to save results for delay times, power, or any
other characteristic extracted in a .MEASURE statement. HSPICE generates
a table of results in an .mt# file in ASCII format. You can analyze the
numbers directly or read this file into WaveView to view the distributions.
Also, if you use .MEASURE statements in a Monte Carlo or data-driven
analysis, then the HSPICE output file includes the following statistical
results in the listing:
x 1 + x 2 + "" + x n
Mean ------------------------------------------N
Sigma
Variance
700
Part temperature At the system level each part has its own temperature.
Ambient Temperature
System Temperature
source
drain
gate
Part Temperature
source
drain
gate
Temperature Analysis
You can specify three temperatures:
701
Circuit temperature that you specify using a .TEMP statement or the TEMP
parameter. This is the temperature, in C, at which HSPICE simulates all
elements. To modify the temperature for a particular element, use the
DTEMP parameter. The default circuit temperature is the value of TNOM.
To specify the temperature of a circuit in a simulation run, use either the .TEMP
statement, or the TEMP parameter in the .DC, .AC, or .TRAN statements.
HSPICE compares the circuit simulation temperature that one of these
statements sets against the reference temperature that the TNOM option
sets. .TNOM defaults to 25 C, unless you use the SPICE option, which defaults
to 27 C. To calculate the derating of component values and model parameters,
HSPICE uses the difference between the circuit simulation temperature, and
the TNOM reference temperature.
Elements and models within a circuit can operate at different temperatures. For
example, a high-speed input/output buffer that switches at 50 MHz is much
hotter than a low-drive NAND gate that switches at 1 MHz. To simulate this
temperature difference, specify both an element temperature parameter
(DTEMP), and a model reference parameter (TREF). If you specify DTEMP in an
element statement, the element temperature for the simulation is:
element temperature=circuit temperature + DTEMP
Specify the DTEMP value in the element statement (resistor, capacitor, inductor,
diode, BJT, JFET, or MOSFET statement), or in a subcircuit element. Assign a
parameter to DTEMP, then use the .DC statement to sweep the parameter. The
DTEMP value defaults to zero.
If you specify TREF in the model statement, the model reference temperature
changes (TREF overrides TNOM). Derating the model parameters is based on
the difference between circuit simulator temperature and TREF (instead of
TNOM).
.TEMP Statement
To specify the temperature of a circuit for a simulation, use the .TEMP
statement.
702
Worst-Case Analysis
Circuit designers often use worst-case analysis when designing and analyzing
MOS and BJT IC circuits. To simulate the worst case, set all variables to their 2or 3-sigma worst-case values. Because several independent variables rarely
attain their worst-case values simultaneously, this technique can lead to overdesigning the circuit. However, this analysis is useful as a fast check.
XWn, XWp Active CD (critical dimension of the active layer, representing the
difference between drawn and actual size).
You can use these parameters in any level of MOS model, within the 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 75 shows whether HSPICE adds or subtracts
703
Sigma Deviations
Type
Parameter
Slow
Fast
NMOS
XL
RSH
DELVTO
TOX
XW
XL
RSH
DELVTO
TOX
XW
PMOS
HSPICE selects skew parameters based on the available historical data that it
collects either during fabrication or electrical test. For example, HSPICE
collects the XL skew parameter for poly CD during fabrication. This parameter n
is usually the most important skew parameter for a MOS process.
Figure 110 on page 705 is an example of data that historical records produce.
704
3 sigma
2 sigma
Fab Database
1 sigma
Run# PolyCD
Mean
101 +0.04u
102 -0.06u
pop.#
103 +0.03u
...
XL value
SS
EE
TT
FF
pop.
IDS
Figure 111 Worst-Case Corners Library File for a CMOS Process Model
705
The .LIB (library) statement, and the .INCLUDE or .INC (include file)
statement, access the models and skew. The library contains parameters that
modify .MODEL statements. The following example of .LIB features both
worst-case and statistical-distribution data by using model skew parameters. In
statistical distribution, the median value is the default for all non-Monte Carlo
analysis.
Example
.LIB TT
$TYPICAL P-CHANNEL AND N-CHANNEL CMOS LIBRARY DATE:3/4/91
$ PROCESS: 1.0U CMOS, FAB22, STATISTICS COLLECTED 3/90-2/91
$ following distributions are 3 sigma ABSOLUTE GAUSSIAN
.PARAM
$ polysilicon Critical Dimensions
+ polycd=AGAUSS(0,0.06u,1) xl=polycd-sigma*0.06u
$ Active layer Critical Dimensions
+ nactcd=AGAUSS(0,0.3u,1) xwn=nactcd+sigma*0.3u
+ pactcd=AGAUSS(0,0.3u,1) xwp=pactcd+sigma*0.3u
$ Gate Oxide Critical Dimensions (200 angstrom +/- 10a at 1
$ sigma)
+ toxcd=AGAUSS(200,10,1) tox=toxcd-sigma*10
$ Threshold voltage variation
+ vtoncd=AGAUSS(0,0.05v,1) delvton=vtoncd-sigma*0.05
+ vtopcd=AGAUSS(0,0.05v,1) delvtop=vtopcd+sigma*0.05
.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=230 XL=-0.18u DELVTON=-.15V DELVTOP= 0.15V
.INC /usr/meta/lib/cmos1_mod.dat $ model include file
.ENDL FF
Note:
706
MOSFET models for all device sizes by using an automatic model selector.
RC wire models for polysilicon, metal1, and metal2 layers in the drawn
dimension. Models include temperature coefficients and fringe capacitance.
Single-diode and distributed-diode models for N+, P+, and well (includes
temperature, leakage, and capacitance based on the drawn dimension).
BJT models for parasitic bipolar transistors. You can also use these for any
special BJTs, such as a BiCMOS for ECL BJT process (includes current and
capacitance as a function of temperature).
Metal1 and metal2 transmission line models for long metal lines.
Drawn size
Shrunken size
Physical size
Electrical size
Most simulator models scale directly from drawn to electrical size. HSPICE
MOS models support all four size levels (Figure 112).
Drawn Size
Shrunken Size
2m
1m
LMLT
WMLT
XL
XW
Electrical Size
source
Physical Size
source
drain
drain
gate
gate
LD
WD
0.8 m
0.9 m
707
Basic Syntax
Basic Syntax
The basic syntax of a Monte Carlo analysis includes three elements:
1. Defining a parameter with one of the distribution keywords
708
2. Using the parameter in your netlist as the value for an element or model
parameter
3. Including the SWEEP and MONTE keywords in the analysis statement
Syntax used for a Monte Carlo analysis
.MODEL mname ModelType ([level=val]
+ [keyword1=val1][keyword2=val2]
+ [keyword3=val3][LOT distribution value]
+ [DEV distribution value]...)
Consider the following example. In this simple RC charging circuit, the value of
r_one has a nominal value of 1K and is varied by 400 ohms for 10 iterations.
RC charging circuit:
.option post probe
*define a parameter called "resval" with an absolute, uniform
distribution
.param resval=aunif(1000,400)
vsrc_one 1 0 5v
r_one 1 2 resval
c_one 2 0 1u
.ic 2=0
*specify 10 Monte Carlo iterations
.tran 1e-5 5e-3 sweep monte=10
*measure to find when 1 time constant (.632*vdd) occurs
.meas tran tc when v(2)='.632*5'
*create plots of the charging curve and resistor values
.probe v(2) par(resval)
.end
The resulting waveforms are called multi-member. Plotting one signal displays
the curves from all the runs.
Local and Global Parameter Variation
A common source of confusion is local and global parameter variation. The key
is that each time you use a parameter, it gets assigned a new random value.In
this case the resistors are said to be under local variation. Take the following
examples:
.param resval=aunif(1000,400)
r_one 1 2 resval
r_two 2 3 resval
r_three 3 4 resval
In this case, all three resistors will get unique, random values. (However, as
discussed in the next section, there is an exception to this rule.) If you want to
709
In the second example, the assignment of a random value is only done once,
then used three times. In this case, the resistors are said to be under global
variation.
Exception for Model Parameters
Because a model definition is only done once, the behavior described in the
previous section would assign the same parameter value to all devices
referencing that model. To overcome this, .OPTION MODMONTE lets the user
decide if all instances of a device should get the same or unique model
parameters.
Starting Values and Seeds
Another source of confusion is the starting value. If you run the same Monte
Carlo simulation twice, the results will be identical because HSPICE/HSPICE
RF always uses the same seed value for the first run. If it randomized the
seed by default, it would be difficult to determine whether changes you made to
the circuit and topology were the result of your changes or the new random
values. You can specify a seed or have HSPICE pick a random seed with
.OPTION SEED if that behavior is desired.
Other Monte Carlo Control Options
.OPTION MONTECON - Some random parameter assignments can cause
HSPICE not to converge. This parameter is used to decide whether to
terminate a simulation or move to the next run if convergence fails.
.OPTION RANDGEN - Use this option to specify the type of random number
generator used.
710
between HSPICE without HPP and HSPICE with HPP Monte Carlo analysis,
you need to keep in mind the differences explained in this chapter. See
Differences between Traditional SRS and VB SRS on page 726. (For details on
HPP, see HSPICE Precision Parallel (-hpp) on page 64.)
The value of the MONTE analysis keyword determines how many times to
perform operating point, DC sweep, AC sweep, or transient analysis.
711
Gaussian Distribution
Uniform Distribution
Population
Population
Abs
variation
Abs
variation
3 Sigma
Nom_value
Nom_value
Rel_variation=Abs_variation/Nom_value
712
DC Sweep
.DC vin 1 5 0.25 sweep MONTE=val[firstrun=num1]
-or.DC vin 1 5 0.25 sweep MONTE=list[(] [num1:num2] [num3]
+ [num5:num6] [num7] [)]
AC Sweep
.AC dec 10 100 1meg sweep MONTE=val [firstrun=num1]
-or.AC vin 1 5 0.25 sweep MONTE=list[(] [num1:num2] [num3]
+ [num5:num6] [num7] [)]
TRAN Sweep
.TRAN 1n 10n sweep MONTE=val [firstrun=num1]
-or.TRAN vin 1 5 0.25 sweep MONTE=list[(] [num1:num2] [num3]
+ [num5:num6] [num7] [)]
The val value specifies the number of Monte Carlo iterations to perform. A
reasonable number is 30. The statistical significance of 30 iterations is quite
high. If the circuit operates correctly for all 30 iterations, there is a 99 percent
probability that over 80 percent of all possible component values operate
correctly. The relative error of a quantity, determined through Monte Carlo
analysis, is proportional to val-1/2.
The firstrun values specify the desired number of iterations. HSPICE runs
from num1 to num1+val-1. The number after firstrun can be a parameter.
You can write only one number after list. The colon represents from ... to ...".
Specifying only one number makes HSPICE run only at the one specified point.
713
Examples
Example 1: HSPICE runs from the 90th to 99th Monte Carlo iteration:
.tran 1n 10 sweep monte=10 firstrun=90
You can write more than one number after list. The colon represents from ...
to ...". Specifying only one number makes HSPICE run only at that single point.
Example 2: HSPICE begins running at the 10th iteration, then continues from
the 20th to the 30th, then jumps to the 40th, and finally, runs from the 46th to
72nd Monte Carlo iteration.
.tran 1n 10n sweep monte=list(10 20:30 40 46:72)
714
.PRINT statements generate tabular results, and print the values of all
Monte Carlo parameters.
If one iteration is out of specification, you can obtain the component values
from the tabular listing. A detailed re-simulation of that iteration might help
identify the problem.
Description
xx
UNIF
AUNIF
GAUSS
AGAUSS
LIMIT
Random-limit distribution function by using absolute variation. Adds +/abs_variation to nominal_val based on whether the random outcome of a 1 to 1 distribution is greater than or less than 0.
nominal_val
715
Argument
Description
abs_variation
Specifies the absolute variation about the nominal value for the distribution
function.
rel_variation
Specifies the relative variation about the nominal value for the UNIF and
GAUSS distribution functions.
num_sigmas
716
Example 1
In this example, each resistor has a unique variation.
.param mc_var=AGAUSS(0,1,3)
.param val='1000*(1+mc_var)'
v_vin vin 0 dc=1 ac=.1
r1 vin 0 '1000*(1+mc_var)'
r2 vin 0 '1000*(1+mc_var)'
Example 2
In this example, each rersistor has an identical variation.
.param mc_var=AGAUSS(0,1,3)
.param val='1+mc_var'
v_vin vin 0 dc=1 ac=.1
r1 vin 0 '1000*val'
r2 vin 0 '1000*val'
Example 3
In this example, local variations are applied to an instance parameter by
assigning randomly generated variations directly to each instance parameter.
Each resistor r1 through r3 receives randomly different resistance values
during each Monte Carlo run.
.param
r1 1 2
r2 3 4
r3 5 6
r_local=AGAUSS(...)
r=r_local
r=r_local
r=r_local
Example 4
In this example, global variations are applied to an instance parameter by
assigning the variation to an intermediate parameter before assigning it to each
instance parameter. Each resistor r1 through r3 receives the same random
resistance value during each Monte Carlo run.
.param
.param
r1 1 2
r2 3 4
r3 5 6
r_random=AGAUSS(...)
r_global=r_random
r=r_global
r=r_global
r=r_global
717
If you do not specify a Monte Carlo distribution, then HSPICE assumes the
nominal value.
If you specify a Monte Carlo distribution for only one analysis, HSPICE uses
the nominal value for all other analyses.
You can assign a Monte Carlo distribution to all elements that share a common
model. The actual element value varies according to the element distribution. If
you assign a Monte Carlo distribution to a model keyword, then all elements
that share the model use the same keyword value. You can use this feature to
create double element and model distributions.
For example, the MOSFET channel length varies from transistor to transistor by
a small amount that corresponds to the die distribution. The die distribution is
responsible for offset voltages in operational amplifiers, and for the tendency of
flip-flops to settle into random states. However, all transistors on a die site vary
according to the wafer or fabrication run distribution. This value is much larger
than the die distribution, but affects all transistors the same way. You can
specify the wafer distribution in the MOSFET model to set the speed and power
dissipation characteristics.
Limit distribution
718
Case 1:
Case 2:
Case 3:
Map u to the y-axis on the right side of the figures in Figure 114. Project the
value onto the curve horizontally, and then down. This gives a value, say x.
Then x is a random sample from the desired distribution. Mathematically, it
works as x = F-1(u). For instance:
719
Case 1: x = a + ( b a ) u
Case 2: x = a + ( b a )
Case 3:
(u)
x = a + (b a)
( u ) if u 0.5
x = d + (b d)
( u ) if u 0.5
Here, c and d are the locations of the two additional coordinates between a and
b that define the gap in the distribution.
720
721
major distribution
minor distribution
pop.#
XL
(polysilicon linewidth variation)
The nominal value of the LENGTH parameter sets the channel lengths for the
MOSFETs, which are set to 1 in this example.
All transistors are on the same integrated circuit die. The LEFF parameter
specifies the distributionfor example, a 5 percent distribution in channel
length variation at the 3-sigma level.
The PHOTO parameter controls the difference between the physical gate length
and the drawn gate length. Because both n-channel and p-channel transistors
use the same layer for the gates, Monte Carlo analysis sets XPHOTO
distribution to the PHOTO local parameter. XPHOTO controls photolithography for
both NMOS and PMOS devices, consistent with manufacturing physics.
722
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.
You can find the sample netlist for this example in the following directory:
$installdir/demo/hspice/apps/rc_monte.sp
723
cap-to-cap
(element)
C1a
C1b
C1a
C1b
C1c
C1d
C1c
C1d
run-to-run
(model)
Physical Approach:
Use the following steps for the physical approach:
1. Use a local variation in polysilicon to control the variation in capacitance for
adjacent cells, because oxide thickness control is excellent for small areas
on a single wafer.
2. Define a local polysilicon line-width variation and a global (model-level) poly
line-width variation. In this example:
The cap element is square with local poly variation in both directions.
724
Electrical Approach:
The electrical approach assumes no physical interpretation, but requires a local
(element) distribution and a global (model) distribution. In this example:
You can match the capacitors to 1 percent for the 2-sigma population.
The process can maintain a 10 percent variation from run to run for a 2sigma 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
725
Simple Random Sampling (SRS). The output of Monte Carlo analysis with VB
style definitions is far more comprehensive than with the AGAUSS style Monte
Carlo. Later it was decided to support the features associated with the VB style
within the AGAUSS style. As a result, beginning with HSPICE 2010.03, the
AGAUSS style is supported both in the traditional Monte Carlo flow and the VB
flow. The user must invoke the latter by entering the following: option
sampling_method=SRS. The other sampling algorithms are also supported
with the AGAUSS style.
HSPICE supports statistical modeling of variability parameters for Gaussian,
Uniform, and Limit distribution. The keywords GAUSS, AGAUSS, UNIF, AUNIF,
and LIMIT can be used in a SPICE netlist to represent these distributions. By
using these keywords and following certain rules, the user can code Global and
Local variations, which together, constitute parametric variations. This method
is commonly known as AGAUSS style variation definition. Until recently,
HSPICE supported only the Simple Random Sampling (SRS) algorithm for
Monte Carlo simulation with this type of variation definition.
Differences between Traditional SRS and VB SRS
If the user does not specify .option sampling_method=SRS in the netlist,
HSPICE invokes the traditional SRS algorithm along with the AGAUSS style
statistical models. Before making any comparison, users should note that a few
differences exist between traditional SRS and the SRS invoked with the
option sampling_method (hereafter called enhanced SRS). (Note that
HPP requires enhanced SRS.) These differences are explained in the following
sections:
Datamining
726
Independent random variable values for each sample in the *.mc0 file.
Partial *.mpp0 file for traditional SRS (without variable screening report).
See Chapter 26, Monte Carlo Data Mining for more information.
The methods and their brief descriptions are listed below. For detailed
discussion of these methods, see Sampling Options and Comparison of
Sampling Methods in Chapter 24, Monte Carlo AnalysisVariation Block Flow.
Method
Brief Description
SRS
727
Method
Brief Description
LHS
Factorial
Factorial sampling:
OFAT
Sobol
728
.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 4 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
.param mult1=1
+ polycd=AGAUSS(0,0.06u,1)
xl='polycd-sigma*0.06u'
+ nactcd=AGAUSS(0,0.3u,1) xwn='nactcd+sigma*0.3u'
+ pactcd=AGAUSS(0,0.3u,1) xwp='pactcd+sigma*0.3u'
+ toxcd=AGAUSS(200,10,1)
tox='toxcd-sigma*10'
+ vtoncd=AGAUSS(0,0.05v,1) delvton='vtoncd-sigma*0.05'
+ vtopcd=AGAUSS(0,0.05v,1) delvtop='vtoncd+sigma*0.05'
+ rshncd=AGAUSS(50,8,1)
rshn='rshncd-sigma*8'
+ rshpcd=AGAUSS(150,20,1)
rshp='rshpcd-sigma*20'
* level=28 example model
.model nch nmos
+ level=28 lmlt=mult1 wmlt=mult1 wref=22u lref=4.4u
+ xl=xl xw=xwn tox=tox delvto=delvton rsh=rshn
...
.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
...
* transient with sweep
.tran 20p 1.0n
sweep sigma -3 3 .5
.meas s_delay trig v(2) val=vref fall=1
+
targ v(out) val=vref fall=1
.meas s_power rms power
* transient with Monte Carlo
.tran 20p 1.0n
sweep monte=100
.meas m_delay trig v(2) val=vref fall=1
+
targ v(out) val=vref fall=1
.meas m_power rms power
.probe tran v(in) v(1) v(2) v(3) v(4)
.end
729
To view the measured results, plot the inv.mt0 output file. The plot in
Figure 122 on page 731 shows the measured pair delay and the total
dissipative power, as a function of the parameter sigma. To get the specific
operating point information of each Monte Carlo run, use opfile=1.
730
Figure 122 Sweep MOS Inverter, Pair Delay, and Power: -3 Sigma to 3 Sigma
731
Figure 124 is a standard scatter plot showing the measured delay for the
inverter pair against the Monte Carlo index number.
732
trig=
to=
1.6610E-10
1.0000E-09
In the preceding listing, the m_delay value of 1.79e-10 seconds is the fastest
pair delay. You can also examine the Monte Carlo parameters that produced
this result.
The information on shortest delay and so forth is also available from the
statistics section at the end of the output listing. While this information is useful
to determine whether the circuit meets specification, it is often desirable to
understand the relationship of the parameters to circuit performance. Plotting
the results against the Monte Carlo index number does not help this purpose.
You need to generate plots that display a Monte Carlo result as a function of a
parameter. For example, Figure 125 on page 734 shows the inverter pair delay
to channel as a function of poly width, which relates directly to device length.
733
Figure 126 shows the pair delay against the TOX parameter. The scatter plot
shows no obvious dependence, which means that the effect of TOX is much
smaller than XL. To explore this in more detail, set the XL skew parameter to a
constant and run a simulation.
734
The plot in Figure 127 overlays the skew result with the ones from Monte Carlo.
The skew simulation traverses the design space with all parameters changing
in parallel and then produces a relationship between power and delay, which
appears as a single line. Monte Carlo exercises a variety of independent
parameter combinations, and shows that there is no simple relationship
between the two results. Because the distributions were defined as Gaussian in
the netlist, parameter values close to the nominal are more often exercised
than the ones far away. With the relatively small number of samples, the chance
of hitting a combination at the extremes is very small. In other words, designing
for 3-sigma extreme for every parameter is probably not a good solution from
an economic point of view.
Figure 128 on page 736 superimposes the required part grades for product
sales onto the Monte Carlo plot. This example uses a 250 ps delay and 6.5 mW
power dissipation to determine the four binning grades.
735
Bin1 - 9 percent
Bin2 - 38 percent
Bin3 - 29 percent
Bin4 - 24 percent
If this circuit is representative of the entire chip, then the present yield should
be 9 percent for the premium Bin 1 parts, assuming variations in process
parameters as specified in the netlist. This example only shows the principle on
how to analyze the Monte Carlo results..
736
737
738
test7.sp has two resistors in the subcircuit. Each device in each subcircuit
has a separate reference to the variation, therefore each device gets its own
value.
In test8.sp, the variation definition for locwidth has been moved from
the top level into the subcircuit. Each resistor has a common global variation
and its own local variation.
test9.sp assigns the top level variation to a local parameter, which in turn
is applied to the width definition of the resistor. This happens independently
within each subcircuit, thus we end up with the same values for the resistor
pair in each subcircuit, but different values for the different pairs. This
technique can be applied to long resistors when a middle terminal is
required for connecting capacitance to the substrate. The resulting two
resistor pieces will have the same resistance, but it will be different from
other resistor pairs.
739
740
test10.sp shows a simple case where the model parameter for sheet
resistivity is assigned a distribution defined on the parameter rsheet. The
results show that all resistors have the same value for each Monte Carlo
sample, but a different one for different samples. This setup is useful for
studying global variations.
Note that .option modmonte has no effect on any other approach presented
here.
In summary, assigning parameters with specified distributions to model
parameters allows for investigating the effects of global or local variations, but
not both. The possibility of selecting one or the other with a simple option is
misleading in the sense that the underlying definitions for global and local
variations are not the same for a realistic semiconductor technology.
741
LotDist and DevDist are the characteristic numbers for the distribution:
3-sigma is the fixed value for Gaussian distributions.
test12.sp has large global and small local variation, similar to the setup in
the file test3.sp. The result shows four different curves, with a large common
part and small separate parts. The amount of variation defined in the two files
is the same. The curves look different from the test3.sp results because
different random sequences are used. However, the statistical results (sigma)
converge for a large number of samples.
There is no option available to select only local or only global variations. This
can be an obstacle if the file is read-only or encrypted.
742
test13.sp has DEV/LOT specified for model res1, and the parameter
width for model res2. The values for the resistors with model res1 are
different, and the values for resistors with model res2 are the same.
743
inserts the appropriate values for the parameters as a function of device size.
(Synopsys does not provide such a tool).
The DEV/LOT approach has no mechanism to describe variation as a function
of an element parameter.
744
=
=
3.9274E-08
3.8590E-08
2:mn
4:mn
=
=
3.9461E-08
3.9071E-08
------------------
In the above case, HSPICE prints out variation in global variation parameter
temp_global_lt_x directly. However, the local variation parameter
local_lt_n is actually the expression value,
L='4e-08+subc_global_lt_n+local_lt_n'.
Therefore, you have to find the local_lt_n value from[3.9574E-08 (4e-8 + subc_global_lt_n)].
This can be overcome by a small modification in the subckt definition by
reassigning the local parameters inside the subcircuit as shown next:
.subckt inv in out subc_global_lt_n=0 subc_global_lt_p=0
local_lt_n=0
+ local_lt_p=0 local_wt_n=0 local_wt_p=0
*Assign the local parameters inside the subckt again
.param subc_local_lt_n=local_lt_n
subc_local_lt_p=local_lt_p
+ subc_local_wt_n=local_wt_n
+ subc_local_wt_p=local_wt_p
mn out in 0 0 nch W='3e-07+subc_global_lt_n+subc_local_wt_n'
+
L='4e-08+subc_global_lt_n+subc_local_lt_n'
mp out in 1 1 pch W='3e-07+subc_global_lt_p+subc_local_wt_p'
+
L='4e-08+subc_global_lt_p+subc_local_lt_p'
.ends
745
746
23
23
HSPICE ships numerous examples for your use. See Variability Examples for
path to demo files.
These topics are covered in the following sections:
Variability in HSPICE
747
Across-wafer variations due to materials, gas flow, thermal, optical, and spin
processes.
specified through process corner files, and the other types of variations
mentioned above were either guessed or ignored. In recent years, statistics
blocks were added to the model files. They describe variations in terms of
distributions on device model parameters. An even newer approach for defining
variations is the Variation Block, described later in this chapter.
The following analyses are available in HSPICE to simulate the effects of
variations on circuit response:
Monte Carlo analysis is the traditional method for finding the variation in
circuit response resulting from parameter variations.
Variability in HSPICE
Three approaches are available for defining variability in HSPICE:
Defining variations on models using lot and dev parameters in the model
file; for example:
vth0=0.6 lot/0.1 dev/0.02
749
The Variation Block approach replaces the older methods of defining variations
on parameters and models in HSPICE because it best fulfills the requirements
for simulating nanometer technology devices.
The advantages of the Variation Block over previous solutions are:
The syntax allows for defining Local and Global Variation as a function of
device geometry, and Spatial Variation as a function of device location.
Monte Carlo results derived from the Variation Block are consistent with
those from DCMatch or ACMatch analyses.
750
On PMOS devices with model snps20p: the global variations are defined
similarly
On NMOS devices with model snps20n and PMOS devices with model
snps20p, respectively
Global Variations are variations in device characteristics from lot to lot, wafer
to wafer, and chip to chip; they are caused by variations in starting material
and differences between equipment and manufacturing procedures. Global
Variations affect all devices with the same model name in the same way.
751
All three classes can be described in the Variation Block in a flexible way by
user-defined expressions. Because there are currently no industry-wide
standards for specifying process variability, this feature allows each company to
implement their own proprietary model for variability. The Variation Block is
generally provided by a modeling group, very similar to device models (for
example, BSIM) because it must be created specifically for each technology
from test circuits.
Like a model, the Variation Block can be part of a library which is encrypted;
therefore, the content is not accessible to the designers. They can introduce
additional Variation Blocks in their netlist to define options and variations on
generic elements. See Control Options and Syntax and Variations of Element
Parameters.
The structure of the Variation Block allows for building expressions to model
interdependence and hierarchy of the variations. For example, one random
variable can control the variation in oxide thickness of both PMOS and NMOS
devices, as it is generally the same for both types of devices.
Note that the earlier methods for specifying variation are not compatible with
the Variation Block. For controlling the behavior of Variation Blocks, see Control
Options and Syntax on page 783. The Variation Block is currently used for
Monte Carlo, and DC/AC mismatch analyses; for a description of these
analyses, see Chapter 24, Monte Carlo AnalysisVariation Block Flow and
Chapter 25, Mismatch Analyses, respectively.
For the functions available to build expressions as presented in the next
sections, see Using Algebraic Expressions on page 381.
752
General section
General Section
In the general section, options can be defined that control the variability
analyses that use the content of the Variation Block. Options can be specified,
one per logical record.
753
Note:
A special section within the subblock for Local Variations allows for defining
Local Variations on elements. Use this section either for specifying local
temperature variations or variations on generic elements that do not have a
model, as used early in the pre-layout design phase, or for off-chip
components; for example, resistors and capacitors. Local and Global variation
support the block operator brackets described in Group Operator {...} and
Subexpressions on page 773.
754
Variations on Temperature
Spatial Variation
Uniform distribution: defined over the range from -0.5 to 0.5: U()
Normal distribution: with mean=0 and variance=1, default range +/-4: N()
755
x f ( x ) dx = 0
756
The histogram generated by taking 1000 samples is shown in Figure 130 (3).
c=CDF(x1,y1,...,xn,yn)
757
Y='A + B * var'
Example 2
This example creates a random variable with a uniform distribution from D to E,
where D and E are arbitrary constants.
Parameter var=U()
Example 3
A variable x has a log-normal distribution if log(x) is normally distributed. The
probability density function for the log-normal distribution is:
( ln ( x ) ) 2
1
-
f ( x ) = ---------------- exp ---------------------------2
x 2
2
where is the mean and the standard deviation of associated normal
distribution. Samples from such a distribution can be generated as
Parameter
Parameter
Parameter
var=N()
nor=mu+sigma*var
lognor=exp(nor)
Example 4
If the components of the random vector x = ( x 1 ,x 2 ...,x n ) are all independently
distributed as standard normal and the vector
758
y = ( y 1 ,x 2 ...,y n ) is defined as y = a + Bx
then y is distributed as multivariate normal with mean a and covariance matrix
BB where the prime indicates transpose.
Now consider the inverse problem of generating samples from a multivariate
normal distribution with given mean vector and covariance matrix .
The covariance matrix has the following properties:
The matrix is positive semi-definite where all eigenvalues are real and nonnegative.
0.5
2
0.3
1
L = .5
.5
0
1.323
0.0378
0.5
0.3
1.5
0
0
1.1174
1.0003
0.4990
0.5005
0.4990
1.9977
0.2994
0.5005
0.2994
1.4990
The correlation matrix is closely related to through diagonal scaling and has
these properties:
759
Note that the first three properties are not sufficient when describing
multivariate normal distributions. For example, in the matrix:
1
0.7
0.0
0.7
1
0.8
0.0
0.8
1.0
All pair-wise correlations seem correct, but the eigenvalues of the matrix are
(2.06, 1, -0.06) and the matrix is indefinite.
760
The expression for sigma should be enclosed in quotes, see the general
HSPICE rules for Using Algebraic Expressions on page 381.
The following lines define a global Variation, with implicit normal distribution,
with zero mean and sigma of 10, on the parameter rsh of resistors with model
Rpoly.
.Global_Variation
R Rpoly rsh=10
.End_Global_Variation
In the next example, the independent variable Toxvar is used to model global
Variations on oxide thickness. Toxvar is an independent random variable with
a normal distribution, with mean=0 and sigma=1. In the device models nch and
pch, Toxvar is applied to the parameters tox with a different multiplier. The
oxide thicknesses in the two models vary in parallel; they are correlated.
.Global_Variation
Parameter Toxvar=N()
Nmos nch tox=Perturb('7e-10*Toxvar')
Pmos pch tox=Perturb('8e-10*Toxvar')
.End_Global_Variation
761
The subckt parameters variation feature addresses the following three needs:
762
The values of model parameters vth0 and u0 are defined through userdefined equations (function1 and function2), with dependency on device
size and temperature. This necessitates a local model (nch25). The
parameters with variations are declared on the subcircuit definition line. In this
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
763
example, global and local variations are processed differently through the
subcircuit, therefore the respective variations have to be specified on separate
parameters. Global variations (dvth0_glob and du0_glob) are applied to the
model parameters vth0 and u0 directly. Local variation definitions
(dvth0_loc and du0_loc) are adjusted for device size using function3
and function4, and result then in the variations dvth0_geo and du0_geo
applied to the model parameters vth0 and u0.
While this use model is supported, it is not desirable because it leads to one
model per device, which is inefficient in terms of memory and performance.
Note:
Variations on Temperature
You can define Variation on temperature for global variations to support the
whole space of Process-Voltage-Temperature. The temperature variations
affect all devices in the netlist.
The keyword Temp (or Temper) specifies temperature variation.
Temp temp='expression'
Temp temp=Perturb('expression')
764
Note:
765
where OPERATOR can be && (AND), || (OR). The operator ~= stands for
matches.
All pattern matching operations are case-insensitive. HSPICE ignores a leading
subcircuit prefix when matching the element name.
Example
In this example, only resistor ra1 varies.
766
ra1 1 0 1k
rb1 2 0 1k
.Variation
.Local_Variation
.Element_Variation
R(element_name~='ra*') R=20
.End_Element_Variation
.End_Local_Variation
.End_Variation
Element Parameters
DTEMP, L, W, AD, AS, PD, PS, NRD, NRS, RDC, RSC, VDS, VGS, VBS,
DELVTO
Cval* DTEMP, L, W
L, W, DTEMP
DTEMP, L, W
The asterisk * denotes implicit value parameter. The DTEMP parameter is implicit; it
needs specification on the element instantiation line.
V1 1 0 0.1 AC
Variation definition:
767
Example
In this example, ra1 and rb1 varies with global variation. So in each Monte
Carlo trial, ra1 and rb1 are of the same resistor value.
ra1 1 0 1k
rb1 2 0 1k
.Variation
.Global_Variation
.Element_Variation
Parameter a=N()
R(element_name~='r*') R=Perturb('20*a')
.End_Element_Variation
.End_Global_Variation
.End_Variation
Note:
If there are only two resistors of ra1 and rb1 in netlist, then an
equivalent definition of Global Element Variation is:
.Variation
.Global_Variation
.Element_Variation
R R=20
.End_Element_Variation
.End_Global_Variation
.End_Variation
768
Get_E()
Certain variations depend on element geometry, as defined with parameters at
instantiation. The Get_E()access function (only supported by the Variation
Block) allows accessing these parameters in expressions by using the following
syntax:
Get_E(Element_Parameter)
where Element_Parameter is the name of an element parameter, which you
must define on the instantiation line (except for the DTEMP parameter and the
multiplier M which have implicit values). Use this access function for specifying
variations as a function of device geometry. The Get_E() access function
reports the effective device geometry, after resolving parameters, scales and
adjustments by process parameters, such as, xw, xl, wint, lint. Refer to the
HSPICE Reference Manual: MOSFET Models for equations which depend on
the model LEVEL and Geometric Scaling for Diode Models in the HSPICE
Reference Manual: Device and Element Models for scaling equations.
For example, you often specify that the local variation on the threshold is as
inversely proportional to the square root of the total area of the device, as
calculated from the product of the element parameters W, L, and M.
Nmos nch vth0='1.234e-9/sqrt(Get_E(W)*Get_E(L)*Get_E(M))'
In addition, Variation Block can handle cases of calling NF and M for elemental
variation with the Get_E() function. For example:
.Variation
.Global_Variation
parameter var = N()
.Element_Variation
M(model_name ~= 'NCH') W = Perturb('var*100n*Get_E(NF)')
.End_Element_Variation
.End_Global_Variation
.End_Variation
Get_P()
Another function allows for accessing the values of global parameters by using
the following syntax:
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
769
Get_P(Global_Parameter)
The circuit context provides the parameter value, for example, from the
subcircuit, if defined inside, otherwise from the top level. In the following
example, sweep parameter tol determines the resistor variation:
.param tol=1
ra1 1 0 1k
i1 0 1 1m
.Variation
.Local_Variation
.Element_Variation
R R='Get_P(tol)' %
.End_Element_Variation
.End_Local_Variation
.End_Variation
.dc tol 1 5 1 monte=100
Get_M()
The Variation Block format also allows the access of model parameters.
HSPICE provides the function Get_M() for this purpose.
Get_M(Model_Parameter_Name)
The Get_M() function normally has a single argument.
.Variation
.Global_Variation
nmos snps20N u0 ='2.345e-6*GET_M(u0)'
.End_Global_Variation
.End_Variation
770
Spatial Variation
To make the Spatial Variation useful, HSPICE needs the coordinate of a
particular device. The element instantiation must extend to include placement
information. For example, for a MOS device:
Mid Dn Gn Sn Bn ModelName w=width l=length x=xcoor y=ycoor
In the Spatial Variation definition, you access the element coordinates by using
the Get_E() function.
For the current release, HSPICE supports only netlists with a single subcircuit,
with devices on the top level or in the subcircuit. All devices of the model that
has Spatial Variation defined, must have coordinates. These coordinates are
numbers specified by you (no parameters allowed).
The name-space of the Variation Block is separate from the netlist contents.
771
.Variation
.Global_Variation
Nmos snps20N vth0=0.07 u0=10 %
Pmos snps20P vth0=0.08 u0=8 %
.End_Global_Variation
.Local_Variation
Nmos snps20N vth0='1.234e-9/
sqrt(Get_E(W)*Get_E(L)*Get_E(M))'
+ u0='2.345e-6/sqrt(Get_E(W)*Get_E(L)*Get_E(M))' %
Pmos snps20P vth0='1.234e-9/
sqrt(Get_E(W)*Get_E(L)*Get_E(M))'
+ u0='2.345e-6/sqrt(Get_E(W)*Get_E(L)*Get_E(M))' %
.Element_Variation
R r=10 %
.End_Element_Variation
.End_Local_Variation
.End_Variation
772
.Local_Variation
Nmos nch
+ tox ='3.1e-07/sqrt(Get_E(L)*Get_E(W)*Get_E(M))' %
+ wint ='6.2e-12/sqrt(Get_E(L)*Get_E(M))'
+ lint ='2.0e-12/sqrt(Get_E(W)*Get_E(M))'
+ nch ='1.9e-06/sqrt(Get_E(L)*Get_E(W)*Get_E(M))' %
.End_Local_Variation
Syntax
ModelType ModelName {Parameter ...ModelParameter= ...}
The group operator {...} separates variation definitions group by group. Each
group uses one model, which means all parameters defined inside a group
operator are specific to this model. A group definition starts after the Model
Name, and must end after the last model parameter specification of the same
Model Name.Parameter definitions support expressions with Get_E(),
Get_P(), and Get_M().
ModelParameter definitions have no leading Parameter key.
773
Model parameter definitions within a group before the first bin name
(ModelName.1 in the example) apply to all bins; whereas the following
definition is bin specific:ModelName.1 ModelParameter= ...
Example
In this example, note that the expressions before NMOS apply to all bins,
whereas those for mn.12 are bin specific.
.Global_Variation
Parameter PG1=N() PG2=N() PG3=N()
+ dxl=' 4.3e-9 * PG1 '
+ dvth0='0.02 * (-0.29 * PG1 + 0.95 * PG2)'
+ dtoxe='1.3e-10 * (0.39 * PG1 -0.87 * PG2 + 0.28 * PG3)'
+ F1='1.0/(2*SQRT(dvth0*dvth0))'
+ F_FF='(-dvth0+SQRT(dvth0*dvth0))*F1'
+ F_SS='(dvth0+SQRT(dvth0*dvth0))*F1'
NMOS mn.12 {
Parameter u0varg='-dvth0*(F_FF*2.1+F_SS*0.6)'
xl=Perturb(dxl)
vth0=Perturb(dvth0)
lvth0=Perturb(dvth0*(F_FF*0.097+F_SS*0.054))
u0=Perturb('u0varg') %
wu0=Perturb('u0varg')%
lu0=Perturb('u0varg')%
pu0=Perturb('u0varg')%
toxe=Perturb(dtoxe) toxp=Perturb(dtoxe)
}
.End_Global_Variation
.Local_Variation
NMOS mn.12 {
Parameter sqrtarea='SQRT(Get_E(W)*Get_E(L)*Get_E(M)'
vth0='1.2e-9/sqrtarea'
u0='2.3e-6/sqrtarea'
}
.End_Local_Variation
774
Any specifications that appear at the same line and after the opening '{' are
ignored; a parameter definition should begin at a new line after the bracket.
You can define the same ModelType and ModelName only once in a group;
HSPICE aborts the simulation if it finds duplicate group definitions.
Parameter Scope
Parameters defined inside and outside a group have the following scope:
parameters defined inside a group cannot conflict with those defined outside it.
However, the same parameter can be redefined inside another group, and
these are invisible to each other.
775
.Global_Variation
Parameter b='a*Get_P(a)'
NMOS nch {
Parameter c=0.4*b
....
}
PMOS pch {
Parameter c='-0.3*b'
....
}
.End_Global_Variation
.Local_Variation
Parameter b='2*a*Get_P(a)'
.Element_Variation
R r='0.1*b' %
.End_Element_Variation
.End_Local_Variation
.End_Variation
776
777
In addition to random variation, the wires also have height variation due to
CMP, as shown in Figure 132. This variation is mostly systematic and depends
on wire widths and local metal density. StarRC accounts for the corresponding
change in resistance and capacitance.
Refer to the StarRC User Guide, Chapter 11: Variation-Aware Extraction for
more information.
778
Metal(n+1)
h2
w
Metal(n)
h1
Metal(n-1)
Interconnect Process Variables:
t
h1, h2
w, s
Metal thickness
Dielectric thickness
Line width and spacing
Dielectric constant
Resistivity
Typical 16-layer process has over 150
779
3: Parasitic Section
Description
param_id
Variation blocks have global scope and the above definition should appear
outside any subcircuit definitions. R_Sensitivity_Type,
L_Sensitivity_Type, and K_Sensitivity_Type help to define the form
of the sensitivity expression. This is a generalization of the Taylor series-based
780
variation form, 1 +
i I
1+
si pi
i I
approximation: ---------------------------- .
1 + s j p j
j J
The index sets I and J are disjoint, for example, a parameter can influence
either the numerator or the denominator, but not both.
In the current StarRC-VX and HSPICE releases, only resistors have the more
general Pade form, capacitors have the Taylor series form, and inductors
(normal and K-Matrix style) have no variation.
Example of the extended NETNAME-style information
.Variation
.Interconnect_Variation
.Global_Variation
ID=0 Name=ME1_T
R_Sensitvity_Type=D C_Sensitvity_Type=N
CV=0.06
ID=1 Name=ME1_W
R_Sensitvity_Type=D C_Sensitvity_Type=N
CV=0.04
ID=2 Name=ME1_R
R_Sensitvity_Type=N C_Sensitvity_Type=X
CV=0.05
ID=3 Name=ME12_T R_Sensitvity_Type=D C_Sensitvity_Type=N
CV=0.06
ID=4 Name=ME12_ER R_Sensitvity_Type=X C_Sensitvity_Type=N
CV=0.02
ID=5 Name=ME2_T
R_Sensitvity_Type=D C_Sensitvity_Type=N
CV=0.08
ID=6 Name=ME2_W
R_Sensitvity_Type=D C_Sensitvity_Type=N
CV=0.07
ID=7 Name=ME2_R
R_Sensitvity_Type=N C_Sensitvity_Type=X
CV=0.04
ID=8 Name=ME23_T R_Sensitvity_Type=D C_Sensitvity_Type=N
CV=0.054
ID=9 Name=ME23_ER R_Sensitvity_Type=X C_Sensitvity_Type=N
CV=0.02
ID=10 Name=ME3_T
R_Sensitvity_Type=D C_Sensitvity_Type=N
CV=0.08
ID=11 Name=ME3_W
R_Sensitvity_Type=D C_Sensitvity_Type=N
CV=0.07
ID=12 Name=ME3_R
R_Sensitvity_Type=N C_Sensitvity_Type=X
CV=0.04
.End_Global_Variation
781
.End_Interconnect_Variation
.End_Variation
The ID field must be a non-negative integer. HSPICE uses the ID field to link
variation information to the sensitivity in the C and R records.
The Name field is alphanumeric and should not contain any white space or
meta characters. Use the Name field only for output annotation.
3: Parasitic Section
The resistance and capacitance records take the form:
Cxxx node1 node2 val SENS [param_id, param_id, ]=
[sens_coeff, sens_coeff, ]
Rxxx node1 node2 model_name R=val TC1=val TC2=val
SENS [param_id, param_id, ] = [sens_coeff, sens_coeff, ]
........
Examples
A C record in NETNAME format is as follows:
C1 G2[21]:F12 Y2:897 0.699 Sens [0,1,5,6] =
[0.009,0.001,0.006,0.010]
C2 X3:962 RX[12]:F74 0.324 Sens [0,1,5,8] =
[0.010,0.006,0.017,-0.003]
The Sens keyword defines the start of sensitivity information and the two
vectors are the sparse sensitivity indices and the corresponding values. The
first vector may contain only ordered non-negative integers that map to the
Interconnect_Variation section, while the second vector of real numbers
is interpreted as the sensitivities. The lengths of the two vectors must match.
There must be one blank space between the Sens keyword and the sensitivity
indices.
Note:
783
784
References
[1] K. Singhal and V. Visvanathan: Statistical device models from worst-case
files and electrical test data. IEEE Trans. Semiconductor Manufacturing,
November 1999. (Global variation modeling by principal components)
[2] P.G. Drennan and C.C. McAndrew: Understanding MOSFET mismatch for
analog design. IEEE J. Solid-State Circuits, March 2003. (Modeling
mismatch in nanometer technologies)
785
786
24
24
For information on bisection in conjunction with Monte Carlo, see Chapter 30,
Timing Analysis Using Bisection.
HSPICE ships numerous examples for your use. See Variability Examples for
paths to demo files.
The following sections discuss these topics:
Sampling Options
Application Considerations
References
787
788
An application note, Pairs Plots from HSPICE Monte Carlo, describes the
basic ideas and includes a MATLAB script to create such a plot. Contact the
Synopsys Support Center for a copy of the application note.
Monte Carlo analysis is computationally expensive, so other types of analysis
may produce certain results more efficiently. For cases where only the effects
of variations on the DC or AC response of a circuit is of interest, you can use
DCMatch/ACMatch analyses (see Chapter 25, Mismatch Analyses).
789
790
For global variations, the same random value for all elements that share a
common model changes a specified parameter.
For local variation, a different random value for each element changes the
specified parameter.
The changes due to global and local variations are additive and saved in a
file for post-processing.
After an update of the elements, HSPICE executes the simulation and saves
the measurement results. When HSPICE simulates all the requested
samples, it calculates the statistics of the measurement results and includes
them in the run listing.
Start
Index 1:
Simulate with nominal parameters
Global variation:
Add some random value to particular
parameter for all devices
Local variation:
Add different random value to
specified parameters for each device
Index n:
Simulate with variations applied
More
Done
Calculate statistics
End
Input Syntax
791
Input Syntax
You always execute Monte Carlo analysis in conjunction with another analysis
(see Traditional Monte Carlo Analysis Characteristics in Chapter 20 for full
discussion):
.DC sweepVar start stop step [SWEEP MONTE=MCCommand]
.AC type step start stop [SWEEP MONTE=MCcommand]
.TRAN step start stop [SWEEP MONTE=MCCommand]
Description
val
Firstrun=num
list (num)
The parameter values and results are always the same for a particular sample,
whether generated in one pass or using Firstrun or the list syntax (see
Monte Carlo Setup on page 712). Therefore, you can split Monte Carlo
analyses or distribute them across multiple machines. See Running Distributed
Processing (DP) on a Network Grid on page 50 in Chapter 4, Multiple
Simulations, DP, and HPP.
DC Sweep Examples
These examples apply a DC sweep to a parameter k. The first case produces
10 samples. The second case produces five samples, starting with sample
number 6. The last two examples simulate samples 5, 6, 7, and 10.
.dc k start=2 stop=4 step=0.5 monte=10
.dc k start=2 stop=4 step=0.5 monte=5 firstrun=6
.dc k start=2 stop=4 step=0.5 monte=list (5:7 10)
792
Option Normal_Limit=Value
Limits the range for the numbers generated by the random number
generator for normal distributions. The default value is 4, that is, numbers in
the range +/- 4 are generated. The range allowed is 0.1 to 20. (When set to
inf, inf=20.)
793
Option Output_Sigma_Value=Value
This option helps in reporting results in terms of sigma values which are
typically 1, 3, or 6 sigma-based on the standards used in different
companies. Default is 1, range is 1 to 10. This does not affect the input
sigma.
Option MC_File_Only=yes|no
Use this option to generate a random number sample file (*.mc0) without
invoking any analysis (applicable to AGAUSS style also). The feature is
useful for an external block sampling simulation when you want to modify the
samples before running the Monte Carlo simulation. If the netlist has a
Monte Carlo command, then the MC command provides the number of
samples; if the netlist has no MC command, then the number of samples is
zero.
Option External_File=filename
Use this command to enable read-in of an external block line-by-line-during
the simulation stage. This command distributes memory consumption and
avoids overtaxing the front end with a data block containing large samples.
This option is also available for DP + DC Monte Carlo. For an example, see
Controlling the Read-in of an External File on page 808:
Option Add_Variation=yes
Use this option to amplify local variation of the model parameters, especially
when variation is provided by a foundry. Usually, the base variation is set by
the foundry, but with this option you can add variation on model parameters
based on a multiplier you supply when using a combined Variation Block
and AGAUSS-style simulation. For example:
In this example, the first four lines are variations provided by the foundry.
Option Add_Variation=yes and .Option Sampling_Method are user-
794
Option Other_Percentile=data_block_name
Use this option to specify quantiles lower than 1 percent. This option allows
you to help to see how much impact there is from trailing data points, or to
count samples near the absolute minimum for a sample set. Refer to Using
the Other_Percentiles Option on page 863 in Chapter 26, Monte Carlo Data
Mining for more information.
795
Simulation Listing
Parameter File
Simulation Listing
The output listing file contains a summary of the names of all input parameters
that are subject to global or local variations. The measured results print for
each sample. Then HSPICE reports the statistics for the measured data.
Partial printout of an output listing:
MONTE CARLO DEFINITIONS
Random number generator is default, and stream = 1
Global variations:
model
parameter
snps20n
vth0
snps20n
u0
Local variations:
model
snps20n
snps20n
parameter
vth0
u0
Element variations:
element
r1
parameter
r
1 ***
2 ***
=
1.2391u
= 893.3815u
= -1.4532m
=
1.4184m
More detailed statistics are given in the *.mpp file (see Summary Statistics on
page 858 and Variable Screening on page 866 in Chapter 26, Monte Carlo
Data Mining).
796
Parameter File
A file with an extension of *.mc# saves the changes in all parameter values
subject to variation. The structure of this file is similar to regular measure files.
The header section presents the names of the parameters and independent
variables as follows:
797
First character
Second character
Third character
Global
Normal distribution
Local
Uniform distribution
Spatial
Custom distribution
G or L
Limit
Limit distribution
Interconnect
Independent variable
Table 78 lists the Independent Random Variable Types and Keywords for
Variation and AGAUSS in *.mc# files. N, U, and C are normal, unified, and
custom distributions, respectively.
Table 78
IRV Type
Keyword
IGN
U(), Global
IGU
C(), Global
IGC
IGL
N(), Local
ILN
U(), Local
ILU
C(), Local
ILC
ILL
N(), Spatial
ISN
U(), Spatial
ISU
C(), Spatial
ISC
N(), Interconnect
ITN
U(), Interconnect
ITU
C(), Interconnect
ITC
798
IGNC
Table 78
IRV Type
Keyword
UNIF()/AUNIF()
IGUC
IGLC
GAUSS()/AGAUSS(), Local
ILNC
GAUSS()/AGAUSS(), Local
ILUC
ILLC
First character
Second character
Third character
Model
Global
Relative
Element
Local
Absolute
Subcircuit Variables
Spatial
Interconnect
799
such information is not required for data mining and unnecessarily increases
the file size.
The values in the AGAUSS style *.mc file are the values from the standard
normal or uniform distribution and not the derived values after accounting for
mean and sigma.
The *.mc file incorporates data that had been displayed in *.mcs#, *.mca#,
and *.mct# files, which HSPICE no longer generates.
If there are multiple Monte Carlo commands in the netlist, only one *.mc file is
generated in each .ALTER simulation.
In an *.mc# file, the sampling number is selected from the largest of all
simulations. If Monte Carlo commands are specified with complex options,
such as,
.dc step start stop sweep Monte = list(xx, xxx, xxx)
snps20n:@:vth0@IGN
snps20n:@:u0:@:IGN
snps20n:@:vth0:@:MGA
snps20n:@:u0:@:MGR
xi82.mn6:@:snps20n:@:vth0:@:MLA
xi82.mn6:@:snps20n:@:u0:@:MLR
xi82.mn1:@:vth0@ILN
xi82.mn1:@:u0@ILN
xi82.mn1:@:snps20n:@:vth0:@:MLA
xi82.mn1:@:snps20n:@:u0@MLR
xi82.mn2:@:vth0:@:ILN
xi82.mn2:@:u0:@:ILN
xi82.mn2:@:snps20n:@:vth0:@:MLA
xi82.mn2:@:snps20n:@:u0:@:MLR
xi82.rcomp:@:r:@:ILN
xi82.rcomp:@:r:@:ELR
status
alter#
1.0000
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
1.0
1.0000
2.0000
0.6141
0.6284
4.299e-02
6.284e-02
2.1837
0.2184
1.7554
0.1755
1.6017
0.1602
0.4769
4.769e-02
-1.0088
0.5350
800
In this example, HSPICE first reports the changes due to the global variations
on parameters vth0 (absolute) and u0 (relative). Then HSPICE reports the
changes on each device due to local variations on the same parameters.
Finally, HSPICE reports the local variation on the parameter r of the element
rcomp. Note that the parameter value applied to the device for a particular
sample is the nominal value, plus the reported change due to global variations,
plus the reported change due to local variations, and so on.
The contents of this parameter file are useful for data mining (see Chapter 26,
Monte Carlo Data Mining). You can investigate the relationship of circuit
response variation to parameter variation in combination with the measured
data in the regular output file, by using, for example, a Pairs Plot as shown in
Figure 134 on page 789.
Note:
0.6141
5.198e-02
-1.031e-02
6.133e-05
2.464e-04
0.6284
1.2452
-3.537e-04
2.464e-03
3.037e-04
0.8866
-1.5600
-5.191e-02
2.964e-03
5.073e-04
801
5.796e-04
1.0
3.0000
-0.1087
1.6842
3.551e-03
-2.440e-04
-7.813e-05
1.055e-04
1.0000
-0.6694
-1.0088
9.223e-05
-7.813e-04
-2.212e-04
3.363e-02
0.5350
1.782e-02
1.220e-03
5.374e-05
Sampling Options
HSPICE provides simple random sampling (SRS) as well as advanced
sampling schemes for related applications. OFAT and Factorial sampling use
statistical design-of-experiment techniques while LHS and LDS reduce the
sampling error in the results. External sampling provides a generic interface
that permits users to overload the internal random number generators and pass
HSPICE sample values generated from other statistical tools. See also
Comparison of Sampling Methods. The sampling options are as follows:
Factorial Sampling
External Sampling
Figure 136 One-Factor-at-a-Time sampling with one, two, and three independent
variables
9
8
2
7
6
Factorial Sampling
Option Sampling_Method=Factorial
803
Factorial sampling evaluates the circuit at the center of the hypercube (nominal)
and at all its corners (see Figure 138). There are 1+2m samples for a circuit
with m independent variables; this method ignores the number of samples that
the Monte Carlo command specifies. To prevent large runaway jobs, HSPICE
restricts the problem dimension to m 12 , which results in ~4K simulations. If
you violate the size constraint, HSPICE ignores the command and generates
an error message.
6
5
7
4
8
2
Figure 138 Factorial Hypercube Evaluation at Center and Corners for 1, 2, and 3
independent random variables
804
The estimation error is smaller on most real world problems and you can use
a smaller sample size to get the same precision in the results.
The sample points are evenly spread over the entire range of variation of
each parameter.
The circuit is exercised over a wide range of parameter values. The circuit
often detects weak spots in the design.
Note:
805
If you use Sobol with a sampling dimension of more than 40, then HSPICE
switches to use Niederreiter.
If you use Niederreiter with a sampling dimension of more than 318, then
HSPICE switches to the default SRS sampling method.
Figure 140 shows the locations of 1024 samples in two dimensions for
simple random sampling and the Sobol Sequence. The Sobol points are
better spaced while those from SRS are lumpy. This is the general property
of LDS.
Sobol Sequence
0.0
0.0
1.0
0.2
0.2
0.8
0.4
0.4
0.6
x
0.4
0.6
0.6
0.2
0.8
0.8
0.0
1.0
1.0
0.2
0.4
0.6
0.8
1.0
External Sampling
You can also execute a data set of externally created perturbations instead of
relying on one of the built-in sampling methods. External sampling allows
design and process exploration tools to run statistical experiments with the
variables for each sample under their full control. In this way, for example, you
can exclude certain transistors from the analysis (that is, have the parameters
remain fixed instead of being randomly varied).
Note:
806
Syntax
Syntax
The external sampling feature is defined in two parts in the Variation Block, a
data block and an option.
The data block syntax is the same as for the regular HSPICE data block from
.Data to.EndData. The first variable is always the index. All identifiers for the
variables start with I because this is the only variable type which can be set
externally. You invoke the feature itself by specifying the external sampling
method, with the appropriate block name. For example:
807
To run a particular sample from the data block, use the following:
monte = list(num) or
monte = list(<num1:num2> <num3> <num4:num5>)
monte=list(n1:n2) can exceed a limit in the data block.
If the netlist or the model, or both, are encrypted, the hash codes printed in the
parameter file are recognized by HSPICE when reading in the external
sampling data block.
Additional rules:
1. HSPICE does not check the range of values in the supplied data block
against option value Normal_Limit.
2. Independent random variables which are not specified in the data block are
assigned new random values generated by a new seed.
808
You can use this option in multiple applications during an external sampling
flow. Consider a scenario where you expect that a few elements under local
variation simulation must have the same variations on them. In a normal Monte
Carlo simulation, every element gets a unique random value when local
variations are defined on them. Thus you need to manually modify the assigned
sample value to the selected elements before running the Monte Carlo
simulation. Do this in HSPICE by using the External Sampling method.
The steps are:
1. Run the regular HSPICE simulation with .Option
Sampling_Method=SRS and MC_File_Only=Yes. (Even though this is a
Variation Block option, it is applicable to the AGAUSS style too.)
Result: This run generates an MC sampling file (*.mc0).
2. Manipulate the data in this file such that each random parameter
corresponding to one element has the same value for each sample
matching with that of other elements of interest.
Explanation: This step is simplified by printing out the *.mc0 file in *.csv
format which can be directly read in an Excel sheet. You can manipulate
columns in the Excel sheet easily. Set .option MEASFORM=3 in the netlist
to generate the file in CSV format.
3. Convert this sample file into a DATA block by adding .DATA blockname
.ENDDATA statements.
4. Run the MC simulation again with .Option
Sampling_Method=External Block_Name=blockname and include
the modified sample file.
809
810
Figure 141 Sampling: SRS Distribution: uniform n; 1024 maxCor; 7.2 percent
The diagonal subplots show the sample histogram together with the ideal
uniform density as a shaded area for each of the random variables. The offdiagonal subplots give the two-dimensional projections of the sample points.
Note that the 1-D projections depart from their ideal behavior. The correlation
coefficients are also computed for the sample and the maximum absolute value
is found to be 7 percent. As the samples are independent, the ideal value is
zero. Such qualitative behavior is typical of small samples in traditional Monte
Carlo.
1024 Points, Latin Hypercube Sample
Figure 142 shows 1024 LHS points, again in four dimensions and with uniform
distributions. The 1-D histograms match the ideal shaded densitythis is a
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
811
consequence of the way in which LHS are constructed. The 2-D projections
have a somewhat better distribution with the maximum correlation being 4.5
percent for the particular sample. The correlation value changes with the
random generator seed and small correlations are not currently enforced in
constructing LHS in HSPICE. The correlation could be more or less than SRS
in a particular experiment.
Figure 142 Sampling: LHS Distribution: uniform n; 1024 maxCor; 4.5 percent
Two-dimensional uniformity is one of the criteria used in generating lowdiscrepancy sequences. Notice that the Sobol sequence has a well-defined
pattern that does not look random, for example, between variables one and
two. The reason is that low-discrepancy points are selected by special
algorithms that try to fill the space as uniformly as possible.
Figure 143 Sampling: Sobol Distribution: uniform n; 1024 maxCor; 0.5 percent
813
generated with the red points representing the previous samples and the blue
points representing the new ones. The Sobol samples are generated in a
structured manner with the new points filling the holes left behind by the prior
samples.
814
density and the ideal plot is the one shown in the bottom right subplot. The
traditional Monte Carlo, SRS, is shown in the top left subplot and departs from
the ideal behavior for small sample sizes. The behavior of the LHS density
depends on the specific random number generator seeds. The density for the
Sobol sequence is close to the ideal and the property generally holds true for
low-discrepancy sequences.
815
Figure 146 Sampling: SRS Distribution: normal n; 1024 maxCor; 3.8 percent
816
Figure 147 Sampling: LHS Distribution: normal n; 1024 maxCor; 7.2 percent
817
Figure 148 Sampling: Sobol Distribution: normal n; 1024 maxCor; 0.9 percent
A better view of the 2-D projections can be seen in the smoothed density plots
shown in Figure 149 on page 819 for 64 samples. As with uniform densities, we
see that LHS looks better than SRS and that the Sobol sample is much closer
to the ideal density.
818
819
.Variation
Option Use_AGAUSS_Format = Yes
.End_Variation
The following options work for variations defined inside a Variation Block only:
Option Vary_Only|Do_Not_Vary|Print_Only|Do_Not_Print
+ Subckts = SubCkt1, SubCkt2,
820
If both AGAUSS and VB variations are set on the same model parameters,
HSPICE issues this warning message:
**warning** model parameter 'Model_Parameter_Name' is already
defined in Variation Block; the duplicate is ignored.
Here, the default for sigma is 3, and the equivalent mathematical description is:
randpar1=N(nominal_val, nominal_val*rel_variation/sigma)
randpar2=N(nominal_val, abs_variation/sigma)
randpar3=U(nominal_val*(1-rel_variation),
nominal_val*(1+rel_variation))
randpar4=U(nominal_val-abs_variation,
nominal_val+abs_variation)
where N ( a, b ) = a + b N ( 0, 1 ) ; U ( a, b ) = a + ( b a ) U ( 0, 1 ) , N ( 0, 1 ) and
U ( 0, 1 ) are the standard, normal, and uniform distributions, respectively.
Before each Monte Carlo trial, each IRV is assigned a different random number
according to the corresponding probability density.
821
Example 1
.param randpar1=AGAUSS(0, 1, 1) par2='0.1*randpar1' par3=par2
.model SYNOP_NMOS nmos vth0='0.1 + randpar1'
+ M1 d g s b SYNOP_NMOS
w='randpar1'
l='randpar1'
+ M2 d g s b SYNOP_NMOS
w='par2'
l='par3'
In Example 1, before each Monte Carlo trial, the IRV randpar1 gets four
different numbers from the random number stream and uses them to create
par2, vth0, and M1's width and M1's length, respectively. As par3 is equal to
par2, M1's vth0 is equal to M2's vth0, M2's w is equal to M2's l, but M1's w
is different from M1's l. Thus direct use of randpar1 represents a different
random number while indirect use through par2 and par3 leads to common
random numbers. This was an early attempt to model local and global
variations in instance parameters. However, only global variation was possible
on model parameters.
Example 2
For traditional Monte Carlo, the modmonte=1 option enables local variation on
model parameters, so that different instances with the same model can get
different random numbers in a single Monte Carlo trial. In the following
example, before each Monte Carlo trial, the IRV randpar1 will get five different
random numbers from the random number stream and allocate them to par2,
M1's vth0 and M2's vth0, M1's w and M1's l. The only difference from
Example 1 is that M1's vth0 is different from M2's vth0.
.option modmonte=1
.param randpar1=Gauss(0, 1, 1) par2='0.1*randpar1' par3=par2
.model SYNOP_NMOS nmos
vth0='0.1+ randpar1'
+ M1 d g s b SYNOP_NMOS
w='randpar1' l='randpar1'
+ M2 d g s b SYNOP_NMOS
w='par2' l='par3'
822
Syntax
For normal parameters that use random variables directly, the syntax is:
RandomVariable:@:SubcircuitName.InstanceName:@:IRV
For example:
globw:@:globwidth:@:IRV , locwidth:@:x1.width:@:IRV
For example:
res_dev:@:[email protected]:@:IRV,
res_dev@resistor:@:r2:@:IRV
For example:
parl4@nch_mac.7:@:xmdut4:@:IRV
823
index =
3 ***
824
1.6030E+00
5.8869E-01
8.1399E-01
Beginning with the 2011.09 release, the *.mc0 file includes the following
characteristics using the $ sign:
The header section records lead with a $ sign (which are read by HSPICE
as comments).
The external sampling option (as in a corner file) is recorded with a leading
$, such as: $.Option Sampling_Method = External Block_Name
= extern_data
Block definitions (as in a corner file) are recorded with a leading $ such as,
$.Data Extern_Data
Column names, random variable data (if requested), and the enddata record
(as in the corner file) are also represented with a leading $.
The *.mc file is written only in .OPTION MEASFORM = 1|3| format for ease
in exporting to Microsoft Excel. The default is 1. (See .OPTION
MEASFORM in the HSPICE Reference Manual: Commands and Control
Options.)
The *.mc0 file output for Example 1 shows the following results. Note that the
independent random variable vth0_nch is missing due to the duplicated
variation definition on vth0.nch.
$$SOURCE='HSPICE' VERSION='F-2011.09-BETA 32-BIT'
$ This file format is subject to change
$option ignore_global_variation = no
$option ignore_local_variation = no
$option ignore_interconnect_variation = no
$option ignore_spatial_variation = no
$option ignore_variation = no
$option sampling_method = lhs
$option normal_limit
= 4.0000
$option replicates
=
1
$option random_generator = MOA
$option stream
=
1
$option output_sigma_val = 1.00
.TITLE '.options acct opts list nopage ingold=2 alt999 probe
post=1 tnom=25'
index
tox_nch:@:nch:@:m11:@:IRV tox_nch:@:nch:@:m12:@:IRV
tox_nch:@:nch:@:@m13:@:IRV m11:@:vth0:@:ILN
m11:@:nch:@:vth0:@:MLA
m12:@:vth0:@:ILN
m12:@:nch:@:vth0:@:MLA
m13:@:vth0:@:ILN
m13:@:nch:@:vth0:@:MLA
status
alter#
825
1.0000
0.
0.
0.
1.0
0.
0.
0.
1.0000
2.0000
-1.1333
1.3500
-0.2212
1.0
0.2145
0.6750
-0.5529
1.0000
3.0000
1.8038
-1.4199
0.6458
1.0
-1.0394
-0.7100
0.6412
1.0000
0.
0.
0.
-0.6805
-0.4423
-0.2764
1.1542
1.2916
0.3206
1
2
3
4
0
0
0
0
res1 width='globwidth+locwidth'
res1 width='globwidth+locwidth'
res1 width='globwidth+locwidth'
res1 width='globwidth+locwidth'
5 0 resistor w='3u+locwidth'
6 0 resistor w='3u+locwidth'
.subckt res1 a b
rab a b res_sub w=width
.model res_sub R w=3u l='3u+res_dev*0.1u'
rsh='100+res_dev'
.ends res1
826
The following sample is returned in the *.lis file for this statement:
*** monte carlo index =
2 ***
MODEL PARAMETER MONTE CARLO DEFINITIONS
0:r1
res_dev
resistor
= 3.3475E-06
res_dev
resistor
=
100.5
0:r2
res_dev
resistor
= 3.9904E-06
res_dev
resistor
=
133.9
1:rab
res_dev
1:res_sub
= 4.9269E-06
res_dev
1:res_sub
=
114.1
2:rab
res_dev
2:res_sub
= 4.2027E-06
res_dev
2:res_sub
=
124.7
3:rab
res_dev
3:res_sub
= 3.4716E-06
res_dev
3:res_sub
=
116.8
4:rab
res_dev
4:res_sub
= 3.2135E-06
res_dev
827
4:res_sub
99.87
1.0285E-06
=
=
=
3.0996E-06
1.1251E-06
1.1295E-06
r2
2:width
4:width
=
=
=
3.0984E-06
1.1337E-06
1.1364E-06
x
bias
voltage
voltage
voltage
voltage
1
2
3
4
1.00000000e-03 5.1094738e-01 4.7630593e-01 3.6860296e-01
8.7529637e-01
y
v1= 5.109474e-01
v2= 4.763059e-01
v3= 3.686030e-01
v4= 8.752964e-01
The following sample output is returned for the subcircuit/macro file example:
*.ms0 file output
$ This file format is subject to change
$option ignore_global_variation = no
$option ignore_local_variation = no
$option ignore_interconnect_variation = no
$option ignore_spatial_variation = no
$option ignore_variation = no
$option sampling_method = srs
$option normal_limit
=
4.0000000e+00
$option replicates
=
1
$option random_generator = MOA
$option stream
=
1
$option output_sigma_val =
1.00
.TITLE 'four resistors'
index
res_dev:@:resistor:@:r1:@:IRV
res_dev:@:resistor:@:r1:@:IRV
res_dev:@:resistor:@:r2:@:IRV
res_dev:@:resistor:@:r2:@:IRV
res_dev:@:x1.res_sub:@:x1.rab:@:IRV
res_dev:@:x1.res_sub:@:x1.rab:@:IRV
res_dev:@:x2.res_sub:@:x2.rab:@:IRV
res_dev:@:x2.res_sub:@:x2.rab:@:IRV
res_dev:@:x3.res_sub:@:x3.rab:@:@IRV
res_dev:@:x3.res_sub:@:x3.rab:@:IRV
828
res_dev:@:x4.res_sub:@:x4.rab:@:IRV
res_dev:@:x4.res_sub:@:x4.rab:@:IRV
globw:@:globwidth:@:IRV
locwidth:@:r1:@:IRV
locwidth:@:r2:@:IRV
locwidth:@:x1.width:@:IRV
locwidth:@:x2.width:@:IRV
locwidth:@:x3.width:@:IRV
locwidth:@:x4.width:@:IRV
1.00000e+00
2.00000e+00
3.00000e+00
4.00000e+00
status
alter#
1.00000e+01
1.00000e+01
1.00000e+01
1.00000e+01
1.00000e-06
1.00000e-07
1.00000e-07
1.0
1.00000e+01
1.00000e+01
1.00000e+01
1.00000e+01
1.00000e-07
1.00000e-07
1.0000000e+00
3.47526e+00
3.38531e+01
1.20268e+01
1.67953e+01
1.02848e-06
9.65996e-08
1.07936e-07
1.0
4.54263e-01
1.92688e+01
2.46670e+01
2.13505e+00
9.96426e-08
1.05238e-07
2.04627e+01
8.74212e+00
-2.05886e+01
2.74557e+01
1.03292e-06
1.06247e-07
1.08387e-07
1.0
1.45870e+01
7.04076e+00
2.42788e+00
1.93586e+01
1.08333e-07
1.04484e-07
6.12805e+00
4.93741e+00
3.89823e+00
-9.45094e-01
9.93244e-07
1.05275e-07
1.09258e-07
1.0
1.00000e+01
1.00000e+01
1.00000e+01
1.00000e+01
1.00000e-07
1.00000e-07
9.90365e+00
1.40765e+01
4.71569e+00
-1.27138e-01
9.84000e-08
1.01065e-07
1.0000000e+00
1.16248e+01
1.77743e+01
2.22087e+01
1.76029e+01
1.01669e-07
9.72494e-08
1.0000000e+00
1.20906e+01
1.60211e+01
1.69714e+01
1.06839e+01
1.02410e-07
1.07705e-07
8.52608e+00
1.09779e+01
4.64658e+00
1.47630e+01
9.43055e-08
8.09711e-08
1.0000000e+00
829
Application Considerations
Due to the combinations of variation specified in the variation block and the
value of Normal_Limit, variations that are applied may be too large. This can
make some circuits display abnormal behavior and produce unrealistic results
for certain samples. This, in turn, can distort the summary statistics reported by
HSPICE at the end of the Monte Carlo simulation.
830
Random variables a and b are used in the Variation Block; c and d are not
used.
During the Monte Carlo sweep, a pseudo random number generator creates an
array of random values (Random1, Random2,...,RandomN) and assigns
them to each an independent random variable.
In case 1, the random number assignment is:
Monte=1 -- a=Random1 b=Random2
Monte=2 -- a=Random3 b=Random4
...
Monte=N -- a=Random2N-1 b=Random2N
Here, although Random1 through RandomN are the same in both cases, the
sequence of assignment to independent random variables differs. Hence, the
individual samples of a (or b) differ between the two simulations. As a
consequence, at low sample numbers the difference in the standard deviation
(sigma) of the distributions of a (or b) might be quite large. For higher sample
numbers, the differences get smaller, according to the general convergence
1
rate of Monte Carlo results of ------- where n is the number of samples.
n
831
832
References
[1] V. Czitrom: One-Factor-at-a-Time Versus Designed Experiments. The
American Statistician, pp.126-131, May 1999.
[2] M.D. McKay, R.J. Beckman, and W.J. Conover: A Comparison of Three
Methods for Selecting Values of Input Variables in the Analysis of Output
from a Computer Code. Technometrics, pp. 239-245, 1979.
[3] M. Stein: Large Sample Properties of Simulations Using Latin Hypercube
Sampling. Technometrics, pp. 143-151, 1987.
[4] I.M. Sobol: On the Systematic Search in a Hypercube. SIAM J. Numerical
Analysis, pp. 790-793, 1979.
[5] H. Niederreiter: Random Number Generation and Quasi-Monte Carlo
Methods. Society for Industrial and Applied Mathematics, Philadelphia, PA,
1992.
[6] A. Singhee and R.A. Rutenbar: Why Quasi-Monte Carlo is Better than
Monte Carlo or Latin Hypercube Sampling for Statistical Circuit Analysis.
IEEE Trans. on Computer Aided Design of Circuits and Systems, pp. 17631776, November, 2010.
833
834
25
Mismatch Analyses
25
DCMatch and ACMatch analyses are efficient techniques for computing the
effects of variations on a circuit's DC or AC response. The variation definitions
are taken from the Variation Block or from the traditional format (commonly
known as AGAUSS format). Both methods are small signal analyses, similar
to noise analysis. Unlike the traditional Monte Carlo analysis, these methods do
not rely on sampling, and are therefore significantly faster. The Monte Carlo
results converge to those from DCMatch or ACMatch analysis for a large
number of samples, provided that the circuit characteristics are close to linear
in the parameter perturbations. Matching analyses are supported with the
Variation Block format and, starting with the 2010.12-SP2 release, the
AGAUSS style.
DCMatch and ACMatch analyses are affected by the control options specified
in the Variation Block (see Control Options and Syntax in the chapter Variability
Analysis Using the Variation Block).
HSPICE ships many examples for your use. See Variability Examples for paths
to DC and AC mismatch demo files.
These topics are covered in the following sections:
Mismatch
DCMatch Analysis
ACMatch Analysis
Application Considerations
835
Mismatch
Variations in materials and processing steps are the source of differences in
the characteristics of identically designed devices in close proximity on the
same integrated circuit. These are random time-independent variations by
nature and are collectively called mismatch.
Mismatch is one of the key limiting factors in analog signal processing. It affects
more and more circuit types as device dimensions and signal swings are
reduced. Mismatch is a function of the geometry of the devices involved, their
spatial relationship (distance and orientation), and their environment.
-50
50
-50
50
Rep = 5 N = 32
Rep = 4 N = 32
Monte Carlo
0.04
0.03
0.02
DCMatch
0.01
0.00
Density
0.04
0.03
0.02
0.01
0.00
Rep = 3 N = 32
Rep = 2 N = 32
0.04
0.03
0.02
0.01
0.00
0.04
Replications
s
n
io
t
a
cil
p
e
R
0.03
0.02
0.01
0.00
Rep = 1 N = 32
0.04
0.03
0.02
0.01
0.00
-50
50
-50
50
Offset (mV)
Sample size
836
DCMatch Analysis
ACMatch Analysis
DCMatch Analysis
To observe the effects of variation on the DC response of a circuit, you can use
a method called DC mismatch (DCMatch) analysis.
In DCMatch analysis, the combined effects of variations of all devices on a
specified node voltage or branch current are determined. The primary purpose
is to consider the effects of Local variations (that is, for devices in close
proximity). DCMatch analysis also allows for identifying groups of matched
devices (that is, devices that should be implemented on the layout according to
special rules). A secondary set of results is calculated from the influences of
Global and Spatial Variations, which is useful for investigating whether their
effects on circuit response are much smaller than the effects of Local
variations, when optimizing a design.
DCMatch analysis is based on the following dependencies and assumptions:
837
Input Syntax
.DCMatch OUTVAR [THRESHOLD=T] [FILE=string] [INTERVAL=Int]
Parameter
Description
OUTVAR
One or more node voltages, voltage differences for a node pair, currents
through an independent voltage source or a resistor.
THRESHOLD
FILE
Valid file name for the output tables. Default is basename.dm# where #
is the usual sequence number for HSPICE output files.
INTERVAL
Note:
Example 1
In this example, HSPICE reports DCMatch variations on the voltage of node 9,
the voltage difference between nodes 4 and 2, on the current through the
source VCC, and the current through resistor x1.r1.
.DCMatch V(9) V(4,2) I(VCC) I(x1.r1)
Example 2
In this example, the variable XVal is being swept in the DC command from 1k
to 9k in increments of 1k. DCMatch variations are calculated for the voltage on
node out. Tables with DCMatch results are generated for the set XVal={1K, 4K,
7K, 9K}.
.DC XVal Start=1K Stop=9K Step=1K
.DCMatch V(out) Interval=3
838
global
local
spatial
839
( k )
-------------------- 100
n
( k )
Results for Spatial variations are similar to the previous item, Local
Variation.
840
The output table in Figure 152 shows the major sections of a table created by
DCmatch analysis in the following order:
The DCmatch results from an operating point, for the node called out,
which has an operating point voltage of 1.25 V.
The standard deviation (sigma) of the variation on the specified output, due
to combined global and local variations.
A section with detailed results for the global variations. First is the output
sigma due to global variations.
The results for the contribution and cumulative variance are reported as
percent of the total variance (which is the square of the total output sigma).
In the example shown, the variation in Vth0 for the model snps20p is the
largest contributor to the variation of the output.
841
The detailed results for local variations, starting with the output sigma due
to local variations.
0.030
Monte Carlo
Density
0.000
0.005
0.010
0.015
0.020
0.025
DCMatch
-60
-40
-20
20
40
Offset (mV)
842
The keywords available for saving specific results from DCMatch analysis are:
Table 80
Keyword
Description
DCM_Total
DCM_Global
DCM_Global(par)
DCM_Local
DCM_Local(dev)
DCM_Spatial
DCM_Spatial(var)
DC
DC
DC
DC
DC
DC
DC
DC
DCM_Total
DCM_Global
DCM_Local
DCM_Global(VariableName)
DCM_Global(ModelType,ModelName,ParameterName)
DCM_Local(InstanceName)
DCM_Spatial
DCM_Spatial(VariableName)
This type of output is useful for plotting the effects of mismatch as a function of
bias current, temperature, or a circuit parameter.
Examples
In the first example, the contribution of the variations on vth0 (threshold) of the
nmos devices with model SNPS20N is saved. In the second example, the
contribution of device mn1 in subcircuit X8 is saved.
843
.Probe DCM_Global(nmos,SNPS20N,vth0)
.Probe DCM_Local(X8.mn1)
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
Example
In this example, the result systoffset reports the systematic offset of the
amplifier, the result matchoffset reports the variation due to local mismatch,
and the result maxoffset reports the maximum (3-sigma) offset of the
amplifier.
.MEAS DC systoffset avg V(inp,inn)
.MEAS DC matchoffset avg DCM_Local
.MEAS DC maxoffset param='abs(systoffset)+3.0*matchoffset'
844
...
.param k=2
...
mn1 net031 inn net044 nmosbulk snps20N L='k*0.5u' W='k*3.5u' M=4
mn2 net18 inp net044 nmosbulk snps20N L='k*0.5u' W='k*3.5u' M=4
mp3 net031 net031 vdda pmosbulk snps20P L='k*0.5u' W='k*4.5u' M=4
mp4 net18 net031 vdda pmosbulk snps20P L='k*0.5u' W='k*4.5u' M=4
...
.Variation
.Global_Variation
Nmos snps20N vth0=0.07 u0=10 %
Pmos snps20P vth0=0.08 u0=8 %
.End_Global_Variation
.Local_Variation
Nmos snps20N vth0='1.234e-9/
sqrt(Get_E(W)*Get_E(L)*Get_E(M))'
+ u0='2.345e-6/sqrt(Get_E(W)*Get_E(L)*Get_E(M))' %
Pmos snps20P vth0='1.234e-9/
sqrt(Get_E(W)*Get_E(L)*Get_E(M))'
+ u0='2.345e-6/sqrt(Get_E(W)*Get_E(L)*Get_E(M))' %
.Element_Variation
R r=10 %
.End_Element_Variation
.End_Local_Variation
.End_Variation
...
.DCMatch v(out)
.dc k start=1 stop=4 step=0.5
...
.meas DC systoffset find V(in_pos,in_neg) at=2
.meas DC dcmoffset find DCM_Local at=2
.meas DC maxoffset param='abs(systoffset)+3.0*dcmoffset'
.meas DC dcm_mn2 find DCM_Local(xi82.mn2) at=2
.meas DC gloffset find DCM_Global at=2
.option post
...
The DCMatch analysis produces four types of output from this netlist:
845
Note:
ACMatch Analysis
In ACMatch analysis, the combined effects of variations of device
characteristics on the frequency response of a circuit are determined. The
variation definitions are taken from the Variation Block.
The main application for ACMatch analysis is in the simulation of circuits which
are sensitive to parasitics or require matching of parasitics, for characteristics
such as delays and power supply rejection.
ACMatch analysis takes the changes in frequency response due to variations in
DC parameters (which affect operating point and low frequency response, as
well as bias-dependent capacitors) and due to variations in AC parameters.
Note that variation on the stimuli (voltage and current sources) can be specified
on the DC and AC parameters, and both types are considered in the ACMatch
analysis.
ACMatch analysis is similar to DCMatch analysis in that:
846
output of ACMatch analysis is a table with the sorted parameter and device
contributions.
847
Input Syntax
.ACMatch OUTVAR [THRESHOLD=T] [FILE=string][INTERVAL=Int]
+ [Virtual_Sensitivity=Yes|No] [Sens_threshold=x]
+ [Sens_Node=(nodei_name,nodej_name),,(nodem_name,noden_name)]
Parameter
Description
OUTVAR
THRESHOLD
M
P
R
I
magnitude
phase
real part
imaginary part
FILE
Valid file name for the output tables. Default is basename.am# where # is
the usual sequence number for HSPICE output files.
INTERVAL
Virtual_Sensitivity
Sens_Threshold=x Only nodes with sensitivity above x are reported. At least 10 sensitivities (or
all) are displayed. This avoids generation of null output if you specify too
large a value for x. Default: 1e-6
Sens_Node
848
Output all sensitivities associated with the requested nodes. The node name
should appear in pairs. (See examples below.)
If more than one ACMatch analysis is specified per simulation, only the last
statement is executed.
Examples
.ACMatch VM(out) VP(out) IM(x1.r1) IP(x1.r1) IM(c1) IP(c1)
.AC dec 10 1k 10Meg interval=10
When using the virtual sensitivity option Sens_Node, multiple name pairs are
supported with a comma between node names, and between node name pairs.
.ACmatch v(out) virtual_sens=yes
+ sens_node= (out, xi82.net044),
+ (0,out), (xi82.net044,xi82.net031)
sens_threshold=1e-6
849
The sensitivities are multiplied by 1e-15. This is the natural unit for
measuring typical parasitic capacitors in nanometer technologies.
Variance (%)
Variance (%)
Name
148.43
100.00
100.00
xi82.ccomp
745.32m
2.52m
100.00
c1
4.82m
105.39n
100.00
c0
---------------------------------------------------Virtual capacitance table (per femto farad)
sens(real)
sens(imaginary)
(nodei, nodej)
196.06u
208.38u
(out, xi82.net058)
196.04u
208.40u
(out, xi82.net18)
-191.73u
-203.47u
(out, xi82.net031)
7.29u
8.21u
(xi82.net031, xi82.net18)
7.31u
8.19u
(xi82.net031, xi82.net058)
3.63u
4.19u
(in_pos, xi82.net18)
3.64u
4.18u
(in_pos, xi82.net058)
3.69u
4.05u
(xi82.net18, xi82.net0148)
3.70u
4.04u
(xi82.net0148, xi82.net058)
3.69u
4.05u
(gnda, xi82.net18)
3.69u
4.05u
(vdda, xi82.net18)
850
3.69u
4.05u
(xi82.net18, 0)
3.69u
4.05u
(in_neg, xi82.net18)
3.70u
4.04u
(gnda, xi82.net058)
3.70u
4.04u
(vdda, xi82.net058)
3.70u
4.04u
(xi82.net058, 0)
3.70u
4.04u
(in_neg, xi82.net058)
3.64u
4.06u
(xi82.net044, xi82.net18)
3.65u
4.06u
(xi82.net044, xi82.net058)
1.38u
1.52u
(out, xi82.net044)
171.31n
202.01n
(out, 0)
-12.88n
17.84n
(xi82.net031, xi82.net044)
***
ACmatch end for this simulation***
Note that the sensitivities of the last two rows are smaller than the threshold.
However, they are still printed because these nodes are selected with the
option sens_node = (0,out) (xi82.net044,xi82.net031).
Example 2 (Sensitivity Not Calculated)
frequency = 1.00000D+06
===============================================================
output = v(out) node voltage = 1.87 V threshold = 1.000E-02
perturbation = 2.00
interval = 1
virtual sensitivity = no
Output
851
4.87m
1.53m
1.49m
1.40m
563.27u
239.10u
184.24u
14.49
1.43
1.36
1.20
193.90m
34.94m
20.75m
95.75
97.18
98.54
99.74
99.93
99.97
99.99
xi82.mn8
xi82.mn2
xi82.mn1
r1
xi82.mp5
xi82.rcomp
xi82.mn6
AC
AC
AC
AC
AC
AC
ACM_Total
ACM_Global
ACM_Local
ACM_Global(VariableName)
ACM_Global(ModelType,ModelName,ParameterName)
ACM_Local(InstanceName)
AC
AC
AC
AC
AC
AC
AC
AC
res1
res2
res3
res5
res6
res7
res8
res9
max ACM_Total
max ACM_Global
max ACM_Local
max ACM_Global(VariableName)
max ACM_Global(ModelType,ModelName,ParameterName)
max ACM_Local(InstanceName)
find ACM_Local at=SweepValue
find ACM_Local(InstanceName) at=SweepValue
Example
An example netlist for running ACMatch analysis using a classic 7-transistor
CMOS operational amplifier is available in the HSPICE demo directory as
$installdir/demo/hspice/variability/opampacm.sp. The following
lines relate to ACMatch analysis:
.Variation
.Global_Variation
Nmos snps20N vth0=0.07 u0=10 %
Pmos snps20P vth0=0.08 u0=8 %
852
tox=3 %
tox=3 %
.End_Global_Variation
.Local_Variation
Nmos snps20N vth0='1.234e-9 sqrt(Get_E(W)*Get_E(L)*Get_E(M))'
+
u0='2.345e-6/sqrt(Get_E(W)*Get_E(L)*Get_E(M))' %
+
tox='3.456e-6/sqrt(Get_E(W)*Get_E(L)*Get_E(M))' %
Pmos snps20P vth0='1.234e-9/
sqrt(Get_E(W)*Get_E(L)*Get_E(M))'
+
u0='2.345e-6/sqrt(Get_E(W)*Get_E(L)*Get_E(M))' %
+
tox='3.456e-6/sqrt(Get_E(W)*Get_E(L)*Get_E(M))' %
.Element_Variation
R r=10 %
.End_Element_Variation
.End_Local_Variation
.End_Variation
.ACMatch v(out)
.ac dec 1 1k 10Meg
.meas ac res1 find acm_local at=1k
In this example, ACMatch analysis runs at 1 kHz, 10 kHz, 100 kHz, 1 MHz, and
10 MHz. After simulation, the results in opampacm.am0 show the contributions
of devices and parameters, and their different relative importance for the
different frequencies. The measurement result is printed in opampacm.ma0.
Figure 154 Fully Differential Amplifier: Calculate Effect of Variations on Power Supply
Rejection and Feedthrough
853
Application Considerations
ACMatch analysis results match those of a small signal Monte Carlo Analysis.
Discrepancies arise with certain test setups, if the operating point in Monte
Carlo analysis varies by a large amount. For example, the output of an amplifier
might saturate at one of the supply rails for some samples, if it is configured for
high gain at DC. If such conditions exist, and the amplifier is used with the
same gain configuration in the real application, then they point to issues which
need to be investigated with DCMatch analysis and resolved first. Otherwise,
the DC gain configuration of the amplifier needs to be changed in the test
setup.
854
Mismatch
Monte Carlo
Analysis type
DC or AC
Device/parameter
contribution report
Yes
Fast
Slow
Accuracy
Good
Distributions
Normal preferred
Any
855
References
[1] M.Pelgrom, A.Duinmaijer, and A.Welbers: Matching Properties of MOS
Transistors, IEEE J. Solid-State Circuits, pp. 1433-1439, May 1989.
[2] P.R.Kinget: Device Mismatch and Tradeoffs in the Design of Analog
Circuits, IEEE J. Solid-State Circuits, pp. 1212-1224, June 2005.
856
26
Monte Carlo Data Mining
26
Running Monte Carlo simulations is expensive and the raw outputs may not
provide sufficient insight into the circuit behavior or guidance on how the circuit
could be improved. Usually, designers import the data into external tools for
graphical and analytical analyses. The following describes techniques and fles
that provide post-processing capability within HSPICE itself.
The files described in this chapter are automatically generated with the
Variation Block style description. Use .Option Sampling_Method=SRS (or
one of the other choices) with the traditional AGAUSS style. See Using
Traditional Variation Format with Advanced Sampling Methods in Monte Carlo
in Chapter 24, Monte Carlo AnalysisVariation Block Flow.
For example cases and related *.mpp0 demo files, see Variability Examples.
The following sections discuss these topics:
857
are grouped into two sections: a summary statistics section and a variable
screening section.
The following sections discuss these topics:
Summary Statistics
Variable Screening
Summary Statistics
The Summary Statistics section of the *.mpp0 file lists the number of sample,
number of failures and a listing of responses with such a minor variation that
they are dropped from further analysis. See the top section in Figure 156 on
page 859.
The subsections consist of:
Note:
858
859
The median and MAD statistics are also reported in this section. These are the
robust estimates of the mean and standard deviation, respectively. Unlike the
mean and standard deviation, the median and mad are insensitive to
outliers in the data.
Sample moments etc:
------------------(mad is a robust estimate of stdDev)
mean
median
stdDev
mad
skewness kurtosis
leakpwr
2.467e-05 2.443e-05 2.268e-06 2.090e-06
0.5364
3.5106
systoffset1
1.448e-03 1.433e-03 1.129e-03 1.103e-03 4.546e-02
2.8158
systoffset2
1.112e-03 1.104e-03 5.483e-04 5.345e-04 5.342e-02
2.8395
systoffset3
9.241e-04 9.175e-04 3.625e-04 3.566e-04 6.209e-02
2.8618
systoffset4
7.872e-04 7.818e-04 2.718e-04 2.675e-04 7.349e-02
2.8873
860
systoffset1 =
1.400e-03
1.254e-03 7.500e-04 4.476e-03 2.584e-03 9.569e-04
6.650e-04 -1.410e-04 3.142e-03 1.753e-03 -1.695e-04 7.377e-04
3.634e-03 -6.850e-04 1.632e-03 1.690e-03 6.391e-04-4.123e-04
2.571e-03 2.506e-03
Mean
Median
stdDev
MAD
Skewness
Kurtosis
Generate a histogram of these 500 moments, then pick out the 2.5th and
97.5th percentiles. (This is the same as sorting the 500 moments and selecting
the 12th~13th avg and 488th sorted moments. These percentiles do actually
estimate the percentiles of the true distribution of moments.)
Take mean value for example: after the bootstraping resampling method, the
95% confidence interval of the mean is (9.060e-04, 2.041e-03), which means
that you can be fairly confident that the true systoffset1 mean value is
between (9.060e-04, 2.041e-03).
Current limitations:
See Figure 158 on page 862 for listing of Con fidence intervals (CI) in
Summary Statistics section of the *.mpp0 file.
861
862
Quantiles:
---------(Q50 is median, see above)
Q01
Q05
leakpwr
2.032e-05 2.134e-05
systoffset1
-1.155e-03-3.790e-04
systoffset2
-1.263e-04 2.242e-04
systoffset3
9.488e-05 3.390e-04
systoffset4
1.603e-04 3.521e-04
Q25
2.311e-05
7.043e-04
7.511e-04
6.867e-04
6.086e-04
Q75
2.592e-05
2.200e-03
1.480e-03
1.161e-03
9.656e-04
Q95
2.865e-05
3.345e-03
2.039e-03
1.528e-03
1.246e-03
Q99
3.060e-05
4.006e-03
2.371e-03
1.762e-03
1.417e-03
863
.Variation
Option Other_Percentile = percentile
.end_variation
.data percentile
q
0.001
0.1
0.25
0.75
0.9
0.999
.enddata
This option allows you to help to see how much impact there is from trailing
data points, or to count samples near the absolute minimum for a sample set.
You can set Q to gauge the true population of values near or around the
absolute minimum.
The data value range is (0<x<1.0). HSPICE issues a warning message if any
values exceed the range and the data mining feature ignores these values.
Because a data block can have more than one column, only the first column is
processed when you use Option Other_Percentile.
The following rows are added in the *.mpp0 file for user-defined percentiles;
the confidence intervals are calculated and displayed, as well:
864
.................
User Specified Quantiles:
---------Q(0.1%)
Q(90.0%)
Q(99.9%)
2.5%
2.578e-05 2.750e-05
3.214e-05
leakpwr
2.592e-05 2.780e-05
3.266e-05
97.5%
2.609e-05 2.804e-05
3.266e-05
2.5%
2.114e-03 2.805e-03
4.402e-03
systoffset1
2.200e-03 2.914e-03
4.643e-03
97.5%
2.286e-03 3.045e-03
4.643e-03
...............
Q(10.0%)
Q(25.0%)
Q(75.0%)
1.689e-05
2.177e-05
2.295e-05
1.992e-05
2.196e-05
2.311e-05
2.010e-05
2.211e-05
2.322e-05
-1.669e-03 -8.952e-05
5.768e-04
-1.620e-03
-1.323e-03
4.004e-05
1.139e-04
7.043e-04
7.738e-04
max
3.409e-05
5.049e-03
2.865e-03
2.075e-03
1.689e-03
minIndex
729
648
648
648
648
maxIndex
790
969
969
969
661
865
Variable Screening
The table in this section is similar to the DC and ACMatch tables shown in
Chapter 25, Mismatch Analyses. The contribution of each independent variable
to the response variability is computed. HSPICE uses correlation to measure
the variability contribution.
See Table 81 on page 869 for a listing and description of the column headings.
Variable Screening: Response and Important Elements/Models
By default, HSPICE uses the Pearson correlation coefficient for screening. See
http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient.
The Pearson correlation is a suitable measure when the responses are
approximately linearly related to the dominant sources of variation. The more
general Spearman rank correlation coefficient (see http://en.wikipedia.org/wiki/
Spearman%27s_rank_correlation_coefficient), which only requires monotone
behavior, can also be used by specifying the Variation Block command Option
Screening_Method=Spearman. The contributions from the independent
variables are then aggregated to the element level and sorted by importance.
Where possible, matched groups are identified. Careful layout techniques like
common centroid can be used to reduce the influence of spatial variation and
thermal/voltage gradients for matched groups. See Figure 161 on page 867.
Note:
866
Screening_method =
Response: systoffset1
Pearson|Spearman
-------------------Global Variation = 0.8%, Local Variation = 99.2%, IRV Variation = 0.%
Element Model EquivVar CumVar W(nm)
L(nm)
MatchGrp Par ID Corr ParVar
1:mn1
snps20n 30.8%
58.4% 1.39e+04 1.95e+03 1
vth0 ILN -0.425 18.0%
u0
ILN 0.360 12.9%
1:mn2
snps20n 27.6%
27.6% 1.39e+04 1.95e+03 1
vth0 ILN 0.428 18.3%
u0
ILN -0.306 9.3%
1:mp3
snps20p 21.7%
80.1% 1.79e+04 1.93e+03 2
vth0 ILN -0.356 12.6%
u0
ILN -0.302 9.1%
1:mp4 snps20p 17.9%
98.0% 1.79e+04 1.93e+03
2
vth0 ILN 0.314 9.8%
u0
ILN 0.284 8.0%
Subcircuit
number
Identify matched
groups
Figure 161 Response subsection of the Variable Screening portion of the *.mpp0 file
867
868
Column
Heading
Description
Element
Name, if applicable.
Model
Name of model.
EquivVar
Normalized variance associated with an element or model; it is the sum of all local/
global variation terms associated; uses normalized values for ease of
comprehension. (Elements with EquivVar smaller than 0.05 percent are not reported.)
CumVar
The elements and models ordered by their contribution and shown as cumulative
contributions.
MatchGrp Mainly for analog and SOC designs. The influence of spatial variation, including
thermal and bias gradients, is reduced if devices with the same MatchGrp index are
close together and in the same orientation on the layout, preferably common-centroid.
With the HSPICE F-2011.09 release, the *.mpp0 file reports for all instance
parameters for matched group MOSFETs for the following models: PSP/BSIM/
BSIMSOI and instance parameters W and L for all other models. See Figure 164 on
page 870.
Par
ID
ParVar
Contents are related to the square of the Corr column and gives the equivalent
normalized variance associated with the Corr column. The sum of this column is 100
percent if all sources of variation are displayed. The values in the Corr column are
aggregated to the element level for local variation and to the model level for global
variation. This drives the values in the left half of the table. (Parameters with ParVar
smaller than 0.01 percent are not reported.) By default, HSPICE uses the Pearson
correlation coefficient to calculate the ParVar items (you can optionally use the
Spearman method, controlled by Variation Block Option Screening_Method).
869
Table 81
Column
Heading
Description
E [ ( X x ) ( Y y ) ]
cov ( X, Y )
x, y = ------------------------- = -----------------------------------------------x y
x y
Spearman correlation coefficient, di = xi - yi
6 d i
= 1 --------------------2
n( n 1)
2
Corr
The raw correlations are shown in the Corr column. These are associated with
parameters in the Par column. Note: If the netlist has only one or more than 50
measure statements, no response correlation matrix is reported.
as=1.4175E-14
as=1.89E-14
as=3.51E-14
as=1.54E-14
ps=5.4E-07 ad=9.45E-15
as=1.365E-14
Figure 164 Instance parameters for PSP/BSIM4/BSIMSOI models (top) and all other
models W and L instance parameters, only (bottom)
870
The above method fails if elements are added or deleted from the design
because the association of the random numbers to the independent variables
changes. To support such use, HSPICE creates a *.corner file that can be
imported in a subsequent MC simulation using the external sampling option:
Option Sampling_Method=External with the Variation Block style
representation or with .option sampling_method = external with
traditional AGAUSS style.
871
872
Limitation
Example
The dark blue zone at the center represents observations within one
standard deviation on either side of the mean, which accounts for 68.2
percent of the population.
Two standard deviations from the mean (dark and medium blue) account for
95.4 percent, and 3-sigma (dark, medium, and light blue) for about 99.7
percent.
873
HSPICE only generates *.ms# files to locate the corners during data
mining. Other output files ( *.sw0, *.pa0, and so forth) are not generated.
Data mining files (*.mpp0 and *.annotate ), which are relatively small,
are created. Large files such as *.mc0 are suppressed.
See External Sampling *.corner File on page 871 for more information.
Syntax for Transient Monte Carlo
.TRAN tstep1 tstop1 [tstep2 tstop2 ...tstepN tstopN]
+ [START=val] [UIC] [SWEEP MONTE=dc_corner]
where: dc_corner is a keyword for Monte Carlo simulation only. With this
option, HSPICE reuses the corners generated in DC Monte Carlo and runs
transient analysis with these corners as random values.
Limitation
DC Monte Carlo does not currently support the CDPL distributed mode.
874
Example
The following is a complete netlist to illustrate running a transient simulation
with DC corners.
* run Tran simulation with DC corners
*.option mcfast
.options POST OPTS LIST MODMONTE=1 numdgt=10 measdgt=10
.model nch nmos LEVEL=54 TOXM=4E-9 wint=wint_nch VERSION=4.4
.param wint_nch = agauss ( 3e-7 , 1e-7
, 3.0 )
m11
m12
m13
v01
v02
2 11
2 11
2 11
2
11
.dc v02
.meas dc
.meas dc
.meas dc
.tran
.meas
.meas
.meas
0
0
0
0
0
0
0
0
nch W=1E-6
nch W=1E-6
nch W=1E-6
1.5
0.0 pulse (0 1
L=0.15E-6 dtemp=10
L=0.15E-6 dtemp=10
L=0.15E-6 dtemp=10
0 1n 1n 10n 20n)
0
2.0
0.1
sweep monte=500 corner_percentile=0.001
ids_1 find par('i(m11)*1E3') at = 1.5
ids_2 find par('i(m12)*1E3') at =1.5
ids_3 find par('i(m13)*1E3') at =1.5
.end
875
You can enter the following on the command line to have HSPICE skip netlist
readin, errchk, and simulation, and do standalone data mining:
hspice datamining
-i
*comments/description
*Required records
.sampleFile input.mc0
Note:
876
27
27
Input Syntax
877
Input Syntax
.DCSENS Output_Variable [File=string] [Perturbation=x]
+ [Interval=SweepValue] [Threshold=x] [GroupByDevice=0|1]
Here, Output_Variable is the response with respect to the parameters
designated in the Sensitivity Block. It can be a node voltage or branch current
in the circuit.
878
Argument
Description
Output_Variable
File=string
Argument
Description
Perturbation=x
Interval=SweepValue Positive integers for SweepValue. This option only applies to onedimensional sweeps. A summary is printed at the first sweep point,
and for each subsequent increment of SweepValue. The Interval key
is ignored with a warning if a sweep is not being carried out. The
option only controls the printed summary table. The analysis may be
carried out at additional sweep values if required by other forms of
output such as .PROBE and .MEASURE commands.
Threshold=x
GroupByDevice = 0|1
879
880
Part 5: Optimization
This Part contains the following chapters/topics.
881
882
28
Exploration Block
28
The Exploration Block addresses the need to study the behavior and
sensitivities of circuits to come up with an optimum design. During this early
design phase, you may want to explore ranges of device sizes for a given circuit
topology. The Exploration Block feature allows you to describe a set of
experiments with different geometries, without changes to the original netlist.
The Exploration Block is closely related to the Variation Block with external
sampling (see Chapter 23, Variability Analysis Using the Variation Block).
HSPICE ships hundreds of examples for your use; see Chapter 31, Running
Demonstration Files for paths to demo files.
Topics:
Usage Guidelines
Limitations
883
Usage Guidelines
To accommodate time restriction, exploration needs to be applied in an
organized manner, with the smallest number of unrelated variables. A good
approach for best results (partial and full matching) is to consider that
integrated circuits are built with hierarchy, and that known relationships exist
between devices. In essence, your knowledge about the circuit is encapsulated
in the way exploration is carried out. Experience with optimization tools has
shown that exploration methodology is crucial for your success, but is often
difficult to set up correctly.
884
bias.mn5=2*bias.mn6
Example
ad='120n*W' as='120n*W' ps='240n+W' pd='240n+W'
885
Resistors: R or W, L, M, dtemp
Capacitors: C or W, L, M, dtemp
When designing circuits, the multiplicity factor M is always a positive integer, but
the Exploration tool can request arbitrary positive values.
To preserve relationships which have been previously defined through
expressions, exploration can only be applied to parameters which are defined
with numerical values.
Example1
m1
out
l=100n m=3
in1
in1
in2
in1
in2
in2 out
wp=100n wn=50n len=100n
vdd vdd pch w=wp l=len
vdd vdd pch w=wp l=len
mid gnd nch w=wn l=len
gnd gnd nch w=wn l=len
Exploration can be applied to subcircuit parameters wp, wn, and len. The
application envisioned here is for leaf cells with programmable layout: separate
width and common length of pmos and nmos devices.
886
Example 3
.subckt onebit in1 in2 carry-in out carry-out
x1 in1
in2
7 nand
x2 in1
7
8 nand wp=100n wn=100n
x3 in2
7
9 nand wp=300n wn=150n
.ends onebit
subckt nand in1 in2 out
wp=200n wn=100n
m1 out in1 vdd vdd pch w=wp l=100n
m2 out in2 vdd vdd pch w=wp l=100n
m3 out in1 mid gnd nch w=wn l=100n
m4 mid in2 gnd gnd nch w=wn l=100n
.ends nand
887
include subcircuit name, device instance names, models and properties. In the
second section, the corresponding values are listed.
From Example 3 on page 887:
In the export phase, HSPICE runs a simulation from the originally supplied
netlist, ignoring any Exploration Block content other than options.
888
An external utility reads the files created by HSPICE with the device
information and any constraints.
The utility creates a set of experiments and formulates them as a data block,
with some or all variables contained in the Export Block, and one or more
sets of exploration data.
The utility submits the netlist with the Exploration Block to HSPICE.
Exploration Phase
These items are done in the exploration phase:
HSPICE applies the content of the data block, calculates the secondary
parameters and constraints, and runs a set of simulations with the updated
device geometries as specified in the Exploration Block. HSPICE produces
measurement results and a file with all the parameter values used for each
exploration simulation.
Based on the results, the utility might specify another set of experiments,
with a new set of simulations, and run through these steps until some
predefined goal is reached.
Refer to the Figure 167, and notice the flow difference before and after adding
Exploration Block.
Tech Info
Netlist
HSPICE
Parameter
List
Export
Explore
Matlab,
External
Perl script,
public domain Exploration
tool
Tool
Definition
Setup
Results
Modified
Parameter List
(variables)
HSPICE
889
options
parameters
area calculation
Syntax
The following syntax shows the parts and sequence of an Exploration Block:
.Design_Exploration
Options
Parameter Parameter_Name = value
Parameter Parameter_Name = expression
.Data BlockName
Index
Name
.EndData
.End_Design_Exploration
890
Name,
Control Options
The options below are described in the tables that follow.
Option Explore_only|Do_not_explore
Option Export
Option Exploration_method
Option Ignore_exploration
Option Secondary_param
Description
Description
Option Export=yes
Option Export=no
891
Description
Description
892
Parameters Section
Parameters can be defined here, which are used in subsequent definitions
within the Exploration Block. The name space is separate from the netlist.
893
The element parameters here include AD, AS, PD, PS, NRS, and NRD on the
left side and expressions of L and W of the same element on the right hand
side. For example:
Element opamp.nm1 AD='1e-7*Get_E(W)'
For example:
nmos snps65n as='asad*Get_E(W)' ad='asad*Get_E(W)'
This directive means that all nmos devices subject to exploration, with model
snps65n, and have AS and/or AD specified, have their source and drain areas
re-calculated by this equation prior to simulation. If the secondary parameter is
not specified on the device, then it is not added.
Note that HSPICE simulation results can change when such a definition is
added to the Exploration Block, if the original values for AS and AD are different
from the values calculated using the expression. While the secondary
parameters are not exported, they are available for exploration when defined in
the data block (expressions are not supported):
Opamp.mn1 AD=1e-12
894
Same-Circuit Parameters
To force relationship between parameters of the same subcircuit, use the
syntax
Subckt subcircuitName parameterName='expression of
parameterName'
Note that this function supports only relationship within the same subcircuit.
Device Relationships
Relationships between element properties exist, which must be respected
when changing device size. To reduce the amount of time required by the
Exploration Tool to calculate these dependencies, such relationships can be
defined directly in the Exploration Block.
To force a relationship between two different elements, use the syntax:
Element subcircuitName.ElementName parameterName=
'expression of
Get_E([subcircuitName.]ElementName@parameterName)'
The element parameter names here include W and L for NMOS and PMOS
devices. The subcircuit name on the right side of the definition is optional, if it is
the same as the one on the left side.
Element opamp.mn1 l='Get_E(mn2@l)'
Element inv4.mp1 w='2*Get_E(inv2.mp1@w)'
Property Relationships
Properties L of opamp.mn1 and W of inv4.mp1 are not exported, and are not
available for exploration.
Derived Device Properties
Derived device properties, as defined in the Exploration Block, are not
exported. While specifying device relationship in a direct way is not supported,
you can do this through parameter transformations.
Element Relationship: This relationship is enforced on all instantiations of
subcircuit opamp (unless specifically excluded from exploration). Also, the
895
Only opamp.mn2@L from the netlist is exported; here, the device property of
opamp.mn1@l is not exported.
Example 2:
nmos nch ad='120n*Get_E(W)'
+ as='120n*Get_E(W)'
+ ps='240n+Get_E(W)'
+ pd='240n+Get_E(W)'
896
Area Measurement
While an exact area is only available after layout in integrated circuit design,
following certain rules can provide a good estimate.
The complete measurement consists of three steps:
1. Calculate area of each device, according to model specific expressions
2. Calculate total area of top circuit or specified subcircuit.
3. Make results available to built-in measurement processor for output.
The calculation is performed as part of the operating point for AC and TRAN,
but executed for each step of a DC transfer characteristics. This allows for
reporting area at a certain value of a design parameter, which affects circuit
area. However, area is not recalculated if it changes during an AC or transient
sweep.
Syntax for device area calculation:
Modeltype Modelname design_area = expression
Example
nmos nch design_area='(Get_E(L)+1u)*(Get_E(W)+0.8u)'
The measurement syntax allows for reporting the area of the whole circuit or a
subcircuit, and has the following structure:
.measure analysisType measName Function
+ DESIGN_AREA(HierarchicalName DeviceName)
897
For MOSFETs:
(i) Expressions defined inside exploration_block
(ii) W*L*M (W and L are defined as instance parameters)
898
Specifying Constraints
While working through the device relationships, designers may want to specify
constraints in the Exploration Block. The IF-ELSE structure can be used to
constrain the circuit topology in HSPICE only.
Each device subject to exploration is checked to verify whether the condition
applies, and then the specified action or actions are executed.
Syntax
if (condition1){
statement_block1
}
The following statement block is optional, and can be repeated multiple times:
elseif (condition2)
{statement_block2
}
In an IF, ELSEIF, or ELSE statement block, you can reset certain elements
geometries or issue a warning, or an error, to cause the simulator to abort.
This example checks all MOSFETs that use model nch, if the length l is
larger than 10u, then a warning message is issued and the command resets
it to 10u.
If(nmos@nch@l>1e-5) {
Reset_parameter l=10u
Warning
}
899
|| Logical OR
When logical operators (&& and ||) are used, the ModelType, ModelName,
Subckt, SubcktName within the condition clauses must be the same.
Otherwise, an error message is issued and HSPICE aborts.
For example:
If(nmos@snps20n@w<2e-7 &&nmos@snps20n@l>10e-6){
action1
action2
}
elseif(subckt@opamp@k>3 ||subckt@opamp@n<2){
action
}
You can include an unlimited number of ELSE-IF statements within an IFELSE block. If one element is found to satisfy the IF condition, HSPICE
executes the action statements in the IF constraint for this element, and
ignores any later ELSEIF or ELSE blocks.
warning
}
900
The warning keyword does not abort the simulation, but generally
remedies the condition. In the example below, a warning message is
generated when the condition is met.
Warning: Condition "nmos@nch@l > 10u" encountered for device
"DeviceName.
Since the ELSE constraint block does not contain any CONDITION clauses,
its action statements are executed only if no element satisfies the
CONDTION in 'IF' constraint.
The subcircuit diffamp and its parameters lpair, wpair, and mpair will be
in the Export file along with their local values. The devices mn1 and mn2 are not
available for exploration.
901
reported first, followed by the names of all requested subcircuits and devices
with their respective parameter names.
Separators are used as follows:
Syntax Structure
The following constructs are provided:
Example:
Opamp.rbias@r@E
Example:
Opamp.mn1@snps65n@L@E
Example:
(.param factor) Opamp@factor@P
902
[SubcircuitName@]ParamName@P
Example:
nand@wp@P
Example:
onebit.x2@wp@P
If option export=yes is set, then the output file contains a single data set with
the original design values from the netlist. If option export=no (or default),
then one data set is written per exploration step with all the parameters suitable
for exploration, not only the ones which were changed through an Exploration
Data Block (see Exploration Block Structure).
The sample number is optional (and ignored if specified) when data export is
requested. The following table shows the tasks performed by the simulator with
the different combinations of EXCommand, option Export, and Data Block
definition (valid meaning here: defined and having at least one set). Simulation
with relationships means that the relationships described in the section Device
Relationships are enforced.
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
903
Action
Ignored
Yes
ignored
explore
No or
undefined
valid
explore=5
No or
undefined
valid
explore list=3 No or
undefined
valid
Ignored
No or
undefined
904
When there is both a monte and explore command and there is/are:
Limitations
The following feature is not implemented in this release.
Netlist Export
At the end of the exploration procedure, a valid netlist needs to be generated
which reflects the final choices for the device sizes, in order to be able to drive a
layout tool and run a successful LVS (layout versus schematic) verification.
905
906
29
29
Optimization
HSPICE ships numerous examples for your use; and Device Optimization
Examples for paths to demo files. See also Cell Characterization Examples for
.MODEL opt passfail and bisection methods.
These topics are covered in the following sections:
Overview
Optimization Statements
Optimization Examples
Overview
Optimization automatically generates model parameters and component
values from a set of electrical specifications or measured data. When 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.
The circuit-result targets are part of the .MEASURE command structure and you
use a .MODEL statement to set up the optimization.
Note:
907
If you provide the input netlist file, optimization specifications, component limits,
and initial guess, then the optimizer reiterates the circuit simulation until it either
meets the target electrical specification, or finds an optimized solution.
For improved optimization, reduced simulation time, and increased likelihood of
a convergent solution, the initial estimate of component values should produce
a circuit whose specifications are near those of the original target. This reduces
the number of times the optimizer reselects component values and resimulates
the circuit.
Optimization Control
How much time an optimization requires before it completes depends on:
Output tolerance.
Gradient tolerance.
Simulation Accuracy
For optimization, set the simulator with tighter convergence options than
normal. The following are suggested options.
For DC MOS model optimizations:
908
absmos=1e-8
relmos=1e-5
relv=1e-4
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.
To specify goal optimizations, do the following:
1. Use the GOAL keyword.
909
Timing Analysis
To analyze circuit timing violation, HSPICE uses a binary search algorithm.
This algorithm generate a set of operational parameters, which produce a
failure in the required behavior of the circuit. When a circuit timing failure
occurs, you can identify a timing constraint, which can lead to a design
guideline. Typical types of timing constraint violations include:
Optimization Statements
Optimization requires several statements:
910
RESULTS=measurename
Use .PRINT and .PROBE output statements, with the.DC, .AC, or .TRAN
analysis statements.
Only use an analysis statement with the OPTIMIZE keyword for
optimization. To generate output for the optimized circuit, specify another
analysis statement (.DC, .AC, or .TRAN), and the output statements.
Description
DATA
MODEL
The optimization reference name, which you also specify in the .MODEL
optimization statement.
911
Argument
Description
OPTIMIZE
RESULTS
Optimization Examples
This section contains examples of HSPICE optimizations (for HSPICE RF
optimization, see Optimization in the HSPICE RF Manual):
RC Network Optimization
912
VTO
GAMMA
UO
VMAX
THETA
KAPPA
After optimization, HSPICE compares the model to the data for the gate, and
then to the drain curves. .OPTION POST generates waveform files for
comparing the model to the data.
The circuit is one transistor. The VDS, VGS, and VBS parameter names,
match names used in the data statements.
.PARAM statements specify XL, XW, TOX, and RSH process variation
parameters, as constants. The device characterizes these measured
parameters.
The long .PARAM statement specifies initial, min and max values for the
optimized parameters. Optimization initializes UO at 480, and maintains it
within the range 400 to 1000.
Data is in the in-line .DATA all block, which contains merged gate and
drain curve data.
Parameters that you declared as OPT1 (in this example, all optimized
parameters) are optimized.
913
minval=10e-6 If you use minval, low current data does not dominate
the error.
Use the remaining .DC and .PRINT statements for print-back after
optimization. You can place them anywhere in the netlist input file because
parsing the file correctly assigns them.
The .PARAM VDS=0 VGS=0 VBS=0 IDS=0 statements declare these data
column names as parameters.
The .DATA statements contain data for IDS versus VDS, VGS and VBS.
Select data that matches the model parameters to optimize.
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:
914
ANP [LIN]
381.270U
300.0U
IO
200.0U
100.0U
ANP [LIN]
0
1.0
1.50
2.0
2.5
3.0
YOS [LIN]
3.5
4.0
4.50
5.0
5.0M
OPTLEVELS.90
IM
4.0M
IO
3.0M
2.0M
1.0M
250.0N
1.0
2.0
3.0
4.0
5.0
YOS [LIN]
915
300.0U
IO
200.0U
100.0U
0
1.0
1.50
2.0
2.5
3.0
YOS [LIN]
3.5
4.0
4.50
5.0
MLLSOPT.SV1
IM
ANP [LIN]
4.9787M
4.0M
IO
3.0M
2.0M
1.0M
250.0M
1.0
2.0
YOS [LIN]
3.0
4.0
5.0
RC Network Optimization
For a full demonstration example of optimizing speed or power for an RC
circuit, follow the path to rcopt.sp in Circuit Optimization Examples on
page 991.
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.
916
RC1 .MEASURE calculates the RC time constant, where the GOAL of .3679
V corresponds to 1 s time constant e-rc.
RC2 .MEASURE calculates the rms power, where the GOAL is 50 mW.
Optimization Results
RESIDUAL SUM OF SQUARES
NORM OF THE GRADIENT
MARQUARDT SCALING PARAMETER
NO. OF FUNCTION EVALUATIONS
NO. OF ITERATIONS = 9
= 4.291583E-16
= 5.083346E-04
= 2.297208E-04
= 20
Ei
i=1
In this equation, E is the error function, and ne is the number of error functions.
Norm of the Gradient: 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 =
Ei
( E i P j )
i=1
917
np
Gj
i=1
918
$
$
55.6965
44.3035
5.7945m
5.1872m
RCOPT.TR0
1
900.0N
RCOPT.TR1
1
800.0N
VOLT [LIN]
700.0N
600.0N
500.0N
400.0N
300.0N
200.0N
100.0N
929.90U
200.0M
400.0M
600.0M
TIME [LIN]
800.0M
1.0
919
1.80
RCOPT.TR1
PIR1
1.60
MATT [LIN]
1.40
1.20
1.0
800.0M
600.0M
400.0M
200.0M
0
200.0N
400.0N
600.0N
TIME [LIN]
800.0N
1.0
920
pad capacitance
leadframe inductance
50 pF capacitive load
Set up the internal power supplies, and the tristate enable as global nodes.
Perform an initial transient analysis for plotting purposes. Then optimize and
perform a final transient analysis for plotting.
921
VCC
VCC
VCC
VCC
MP1
DATAN
MP3
MP2
PEN
BUS
MP11
MP10
Cbus
MN1
VCC
VCC
NENN
MN3
MN2
MN12
MP12
VCC
Cext
PENN
Cpad
MP4
MN10
MN11
NEN
MN5
MN4
ENB
VCC
MP13
ENBN
Cenbn
Cenb
MN13
922
ASIC2.TR1
OUT
4.50
OUTBAR
4.0
ASIC2.TR0
OUT
VOLT [LIN]
3.50
OUTBAR
3.0
2.50
2.0
1.50
1.0
500.0N
0
0
2.0N
4.0N
6.0N
8.0N
TIME [LIN]
10.0N
12.0N
14.0N
15.0N
923
.AC optimization.
The maximum number of iterations (25) was exceeded. However, the results
probably are accurate. Increase ITROPT accordingly.
Optimized Parameters OPT1 Final Values
***OPTIMIZED PARAMETERS OPT1 SENS %NORM-SEN
.PARAM LBB = 1.5834N $ 27.3566X 2.4368
.PARAM LCC = 2.1334N $ 12.5835X 1.5138
.PARAM LEE =723.0995P $254.2312X 12.3262
.PARAM TF =12.7611P $ 7.4344G 10.0532
.PARAM CBE =620.5195F $ 23.0855G 1.5300
.PARAM CBC = 1.0263P $346.0167G 44.5016
.PARAM RB
= 2.0582
$ 12.8257M 2.3084
.PARAM RE
=869.8714M $ 66.8123M 4.5597
.PARAM RC =54.2262
$ 3.1427M 20.7359
.PARAM IS =99.9900P $ 3.6533X 34.4463M
924
[LIN]
600.0N
550.0N
500.0N
450.0N
400.0N
96.8250N
50.0N
20.0N
100.0X
500.0X
1.08
1.508
2.06
HERTZ [LIN]
925
10.0N
PARIIB
1.0N
I1IQ1
AMP 2 LOW
PARIIC
100.0U
10.0U
1.0U
100.0M
10.0M
1.0M
100.0P
400.0M
500.0M
600.0M
BASEF [LIN]
700.0M
800.0M
820.0M
926
10.0N
PARIIB
1.0N
I1IQ1
PARIIC
AMP 2 LCV
100.0U
10.0U
1.0U
100.0M
10.0M
1.0M
100.0P
200.0M
300.0M
400.0M
500.0M
BASER [LIN]
600.0M
700.0M
800.0M
927
The graph plot model sets the MONO=1parameter to remove the retrace lines
from the family of curves.
PARAM [LIN]
35.0M
30.0M
25.0M
20.0M
15.0M
10.0M
5.0M
0
0
1.0
2.0
DESIRED [LIN]
3.0
4.0
928
Minimize the gate area (and therefore the total cell area).
Open-loop transient step response of 100 ns for rising and falling edges.
Simultaneously optimize two amplifier cells for rising and falling edges.
Calculate the transistor area algebraically use a voltage value and minimize
the resulting voltage.
The transistor area measure statement uses MINVAL, which assigns less
weight to the area minimization.
929
vsupply
M4
M3
M6
vout
vin-
M1
vbias
M2
vin+
M5
M7
930
VOLT [LIN]
2.0
1.0
6.40M
6.20M
6.0M
5.80M
5.60M
5.40M
0
25.0N
50.0N
75.0N
100.0N
125.0N
150.0N
TIME [LIN]
931
932
30
30
HSPICE ships numerous examples for your use; see Bisection-Timing Analysis
Examples for paths to demo files.
For more information about optimization, see Chapter 29, Optimization in this
user guide.
For information on Monte Carlo, see Chapter 22, Monte CarloTraditional
Flow Statistical Analysis and Chapter 24, Monte Carlo AnalysisVariation
Block Flow.
This chapter discusses the following topics.
Overview of Bisection
Bisection Methodology
Using Bisection
933
Overview of Bisection
Before bisection methods were developed, engineers built external drivers to
submit multiple parameterized simulations to SPICE-type simulators. Each
simulation explored a region of the operating envelope for the circuit. To provide
part of the analysis, the driver also post-processed the simulation results, to
deduce the limiting conditions.
If you characterize small circuits this way analysis times are relatively small,
compared with the overall job time. This method is inefficient, due to overhead
of submitting the job, reading and checking the netlist, and setting up the
matrix. The newer bisection methods increase efficiency when you analyze
timing violations, to find the causes of timing failure. Bisection optimization is an
efficient cell-characterization method, in Synopsys HSPICE.
For a full demo example of finding early, optimal, and late setup times of a DFF,
follow the path to fig26_4.sp in Bisection-Timing Analysis Examples in this
user guide.
The bisection methodology saves time in three ways:
Before bisection, users had to run tight sweeps of the delay between the data
setup and clock edge, and look for the value at which no transition occurs. To
do this, you swept a value that specifies how far the data edge precedes a fixed
clock edge. This method is time consuming, and is accurate only if the sweep
step is very small. Linear search methods cannot accurately determine the
setup time value, unless you use extremely small steps from T1 to T2 to
simulate the circuit at each point, and monitor the outcome.
For example, even if you know that the desired transition occurs during a
particular 5 ns period, you might need to run 50 simulations to search for the
setup time to within 0.1 ns over that 5 ns period. But the error in the result can
be as large as 0.05 ns.
T1(varies)
T2(fixed)
Setup Time
= T2 - T1
Clock
0
Early enough to cause
a good V(out) transition
1
Data
0
1
V(out)
0
Time
T1
T2
Bisection can be used to quickly find
the latest time T1 at which a Data
transition causes a V(out) transition.
935
The bisection feature greatly reduces the amount of work and computational
time required to find an accurate solution for this type of problem. The following
sections show examples of using this feature to identify timing violations for the
setup, hold, and minimum clock pulse width.
Bisection Methodology
Bisection is an optimization method that uses a binary search method, to find
the value of an input variable (target value). This variable is associated with a
goal value of an output variable.
The type of the input and output variables can be voltage, current, delay time,
or gain, related by some transfer function. In general, use a binary search to
locate the goal value of the output variable within a search range of the input
variable. Then, iteratively halve that range to rapidly converge on the target
value. At each iteration, HSPICE compares the measured value of the output
variable with the goal value. Both the PASSFAIL method and the bisection
method use bisection (see Using Bisection).
The bisection procedure consists of two measurement and optimization steps,
when solving the timing violation problem:
Automatically varying the input parameter (T1 in Figure 180 on page 935) to
find the value for which the transition barely occurs.
Measurement
Use the MAX measurement function to detect the success or failure of an output
transition. For a low-to-high output transition, a MAX measurement produces
zero on failure, or approximately the Vdd supply voltage on success. This
measurement, using a goal of Vdd (minus a suitable small value to ensure a
solution), is sufficient to drive the optimization.
Optimization
The bisection method is straightforward if you specify a single measurement
with a goal, and known upper and lower boundary values for the input
936
Using Bisection
Before you can use bisection, you must specify the following:
A pair of values, for the upper and lower boundaries of the input variables.
To find a solution, one of these values must result in an output variable
>|goal value| and the other must result in <|goal value|.
A goal value. If there is no goal keyword in the statement, the goal value will
not be defaulted to zero, and HSPICE considers the measure result as a
relative error expression.
Error tolerance value. The bisection process stops when the difference
between successive test values is error tolerance. If the other criteria are
also met, see the following steps.
937
4. The bisection algorithm performs tests for each specified boundary value to
determine the direction in which to pursue the target value, after the first
bisection. In this example shown in Figure 180 on page 935, the upper
boundary has a pass value and the lower boundary has a fail value.
5. To start the binary search you specify the lower and upper boundaries. The
program tests the point midway between the lower and upper boundaries
(see Figure 181 on page 942).
If the initial value passes the test, the target value must be less than the
tested value (in this example). The bisection algorithm moves the upper
search limit to the value that it just tested.
If the test fails, the target value must be greater than the tested value.
Bisection moves the lower limit to the value that it just tested.
938
BISECTION
When the difference between the two latest test input values is within the
error tolerance and the latest measured value exceeds the goal, bisection
has succeeded and then ends. This process reports the optimized
parameter that corresponded to the test value that satisfies this error
tolerance and this goal (passes). See Bisection Optimization Application
Example on page 960.
PASSFAIL
When the difference between the last two optimization parameter test
values is < the error tolerance and the associated goal measurement fails
for one of the values and passes for the other, bisection has succeeded and
then ends. The process reports the optimization parameter test value
associated with the last passing measurement. Pass is defined as a
condition in which the associated goal measurement can produce a valid
result. Fail is defined as a condition in which the associated goal
measurement is unable to produce a valid result. For example, if the
measurement is of TRIG/TARG form, and the TARG event is not found, then
this optimization parameter test value is deemed a failure. When using
PUSHOUT bisection, the definition of a failure is modified to also include
any goal measurement result that is valid and > the push-out specification.
In the BISECTION method, the measure results for Lower and Upper limits of
ParamName must be on opposite sides of the goal value in the .MEASURE
statement. In the PASSFAIL method, the measure must pass for one limit and
fail for the other limit. The process ignores the value of the Initial field. The
error tolerance is a parameter in the model which is being optimized. Using the
BISECTION method, a bisectional search is applied to multiple parameters.
The logical relationship of these parameters is based on 'AND'. In the
PASSFAIL method, a bisectional search is applied to only one parameter.
When the OPTLST option is set (.OPTION OPTLST=1), the process outputs
the following information for the BISECTION method:
bisec-opt iter = num_iterations xlo = low_val xhi = high_val
x = result_low_val xnew = result_high_val err = error_tolerance
The x is the old parameter value and xnew is the new parameter value.
When .OPTION OPTLST=1, the process outputs the following information for
the PASSFAIL method:
HSPICE User Guide: Basic Simulation and Analysis
G-2012.06
939
+ RESULTS=MeasureNames MODEL=OptModelName
When performing a transient analysis bisection with the .MEASURE statement,
use the following syntax:
.MEASURE TRAN MeasureName MeasureClause GOAL=GOALMIN|GOALMAX
940
941
Measured value Y
- volts in this case
First bisection value is
mid-way between
specified boundaries.
First test value passes
because measured
value > goal value
(2.7 V in this case).
X1 =
(XU + XL)/2
~5V
Output signal
present for all
TS target value
Goal = 2.7V
Target
value
Lower boundary XL
- test fails
Input variable X
- Setup time Ts
in this case
Upper boundary XU
- test passes
First test
value - passes
X2 =
(X1 + XL)/2
XL
X1
Target
XU
XU
Second test
value - fails
X2 =
(X1 + X2)/2
v
Second test value
becomes new lower
limit. Third test value
is mid-way between
new lower limit and
current upper limit.
XL
X2
X1
Third test
value - passes
Results
The upper plot in Figure 182 on page 943 shows the relationship between the
clock and the data pulses that determine the setup time. The bottom plot is the
output transition.
942
Find the actual value for the setup time in the Optimization Results section of
the output listing file:
optimization completed, the condition
relin = 1.0000E-03 is satisfied
**** optimized parameters opt1
.PARAM DelayTime = 1.7822n
...
maxvout = 5.0001E+00 at= 4.8984E-09
from
= .0000E+00
to= 8.0000E-09
setuptime= 2.1777E-10 targ= 3.5000E-09 trig= 3.2822E-09
This listing file excerpt shows that the optimal value for the setup time is
0.21777 ns.
The upper plot in Figure 183 shows examples of early and late data transitions,
and the transition at the minimum setup time. The bottom plot shows how the
timing of the data transition affects the output transition. The following analysis
statement produces these results:
* Sweep 3 values for DelayTime
Early
Optim
Late
.TRAN 0.1n 8n Sweep DelayTime Poi 3
0.0n
1.7822
5.0n
943
Figure 183 Early, Minimum, and Late Setup and Hold Times
944
945
You can add measure options to support selective pushout, using these
keywords:
POSITIVE: pushout constraints only take effect when the measuring results
are larger than the golden measure. For example:
.MEASURE TRAN result MeasureClause pushout=time
+ pushout_perpercentage POSITIVE
NEGATIVE: pushout constraints only take effect when the measuring results
are smaller than the golden measure. For example:
.MEASURE TRAN result MeasureClause pushout=time
+ pushout_perpercentage NEGATIVE
To limit the range you can add both absolute and relative pushout together.
(Note the comma-separated parameters.)
For example:
.Measure Tran pushout When v(D_Output)='vih/2'
+ rise=1 pushout=20p,50p pushout_per=0.1
The final measure result for the preceding example should be in the range of:
| measresult-goldmeas | < Min (pushout_max, pushout_per*goldmeas)
946
Lower
Vin
Ts
Tp
Vclk
Lower
Pushout
Norm Upper
Vout
Delta
947
948
0.
0.
5.0000E-09
0.
bisec-opt.
iter =
.
.
.
bisec-opt.
iter =
bisec-opt.
iter =
.
.
.
bisec-opt.
iter =
1 xlo =
x =
err =
7 xlo =
x =
err =
8 xlo =
x =
err =
0.
xhi =
0.
xnew =
-1.91761E-02
5.00000E-09
5.00000E-09
1.87500E-09
2.03125E-09
0.99949
1.95313E-09
1.95313E-09
-0.11111
xhi =
xnew =
2.03125E-09
1.95313E-09
xhi =
xnew =
2.03125E-09
1.99219E-09
10 xlo =
1.21094E-09 xhi
x =
1.23047E-09 xnew
err =
0.46334
bisec-opt. iter = 11 xlo =
1.22070E-09 xhi
x =
1.22070E-09 xnew
err = -1.89848E-02
optimization completed, the condition
relin = 1.0000E-03 is satisfied
optimization completed, the condition
relout = 0.4000
is satisfied
=
=
1.23047E-09
1.22070E-09
=
=
1.23047E-09
1.22559E-09
RELIN * |
where: X(new) is the xnew value of the nth iteration and X(new-1) is the
xnew value of the (n-1)th iteration.
Both RELIN and RELOUT must be satisfied before the optimization can
converge.
Note that in iter = 8, the condition for RELOUT is satisfied but the condition
for RELIN is not. (Substitute 5n for X(upper) and 0n for X(lower) in the
949
formula for RELIN). In iter = 11, check that both RELIN and RELOUT are
satisfied.
Note:
If you use .OPTION RELIN its value overrides any value you
enter on the .MODEL statement for the parameter RELIN. (There
is no ".OPTION RELOUT" in HSPICE).
For more information about using RELOUT and RELIN in the .MODEL command
for bisection, see .MODEL in the HSPICE Reference Manual: Commands and
Control Options.
950
951
All arguments have the same meanings as those of the current bisection and
Monte Carlo .TRANsyntax. For argument names and their descriptions, refer
to .TRAN in the HSPICE Reference Manual: Commands and Control Options.
Note:
Example
In the following example, HSPICE runs 30 bisection analyses, using the 10th to
39th Monte Carlo iterations.
.Tran 1n 8n
+ SWEEP
+ Optimize = Opt1
+ Result = MaxVout
+ Model = OptMod
+ MONTE = 30 firstrun=10
$$
$$
$$
$$
$$
952
Bisection output/information
Common output/information
Info type
Common
output/
information
Monte Carlo
output/
information
2.7518E-08
par2 = -3.1778E-07
par3 = -4.1848E-08
953
Info type
entering lmopt
Bisection
output/
information
xlo = 0.0000
xhi = 5.00000E-09
xnew = 5.00000E-09
err = -4.97943E-05
bisec-opt. iter = 2
xlo = 0.0000
xhi = 5.00000E-09
954
Info type
Common
output/
information
Monte Carlo
output/
information
par1 = 2.3518E-08
par2 = -3.3778E-07
par3 = -4.3848E-08
955
Info type
entering lmopt
Bisection
output/
information
Common
output/
information
956
Info type
Monte Carlo
output/
information
varian = 4.397e-22
sigma = 20.9695p
avgdev = 14.2926p
max = 271.5352p
min = 229.6299p
varian = 971.5124p
sigma = 31.1691u
avgdev = 23.6264u
max = 6.6974m
min = 6.6388m
varian = 4.397e-22
sigma = 20.9695p
avgdev = 14.2926p
max = 271.5352p
min = 229.6299p
957
Info type
Common
output/
information
24
transient 0.00
153
219 76 rev=1
readin
0.00
errchk
0.01
setup
0.00
output
0.00
958
Output Waveform
The output waveform file superimposes all iterations of the Monte Carlo sweep
as a single plot, while each iteration simulation of Monte Carlo uses the
optimized parameter from Bisection.
Note:
959
Caution:
960
Part 6: Errors-Warnings/
Demonstration Files
The section contains the following chapters:
Benchmark Examples
Encryption Examples
Filters Examples
IBIS Examples
Magnetics Examples
RF Examples
Sources Examples
961
962
S-parameter Examples
Variability Examples
Verilog-A Examples
31
31
963
The tables in the section Listing of Demonstration Input Files on page 980 list
demonstration files, which are designed as training examples. All HSPICE
distributions include these examples in the demo directory tree, where
$installdir is the installation directory environment variable:
Table 82
Directory Path
Demo Directories
File Directory
Description
$installdir/demo/hspice /aa_integ
General applications
/apps
964
/behave
/bench
Standard benchmarks
/bjt
Bipolar components
/bisect
Bisection optimization
/cchar
/ciropt
/ddl
/devopt
/fft
Fourier analysis
/encrypt
/filters
Filters
/ibis
IBIS examples
/mag
/mos
MOS components
/si
/sources
/sparam
S-parameter applications
/tline
/twline
/variability
/veriloga
Verilog-A examples
Table 82
Directory Path
File Directory
Description
$installdir/demo/
hspicerf
/examples/
RF examples
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.
in1
X8
X2
in2
X4
X7
10
13
X5
X1
half1
2
X8
TIME [LIN]
X3
9
carry-in
X6
#1_nand
out
half2
carry-out
X9
965
A(0)
B(0)
A(1)
B(1)
carry-out_1
carry-in
One Bit
One Bit
C(0)
C(1)
carry-out_2
in1
X8
X2
in2
X4
X7
10
13
X5
X1
half1
2
X8
TIME [LIN]
X3
9
carry-in
X6
#1_nand
out
half2
carry-out
X9
966
Value
Description
SCALE=1u
DCCAP
node names
Printing Variables
Use this template to print internal variables, such as:
Table 84
Variable
Description
i(mn1)
i1, i2, i3, or i4 specifies true branch currents for each transistor node.
LV18(mn6)
LX7(mn1)
967
VOLT [LIN]
VOLT [LIN]
3.0
2.50
2.0
1.50
1.0
500.0M
0
10.0N
20.0N
30.0N
40.0N
50.0N
60.0N
TIME [LIN]
968
AMP [LIN]
140.0U
120.0U
100.0U
80.0U
60.0U
40.0U
20.0U
0
0
1.0
2.0
3.0
VOLTS [LIN]
4.0
5.0
969
59.5887U
55.0U
50.0U
45.0U
40.0U
AMP [LIN]
35.0U
30.0U
25.0U
20.0U
15.0U
10.0U
5.0U
0
1.0
2.0
3.0
4.0
5.0
VOLTS [LIN]
970
LX [LIN]
11.0F
10.0F
9.0F
8.0F
7.0F
6.0F
0
1.0
2.0
3.0
VOLTS [LIN]
4.0
5.0
971
Use the LUMP5 macro to input geometric units, and convert them to
electrical units.
Simulate and measure an output driver under load. The load consists of:
Leadframe capacitance.
Strategy
The HSPICE strategy is to:
972
40.0U
35.0U
30.0U
25.0U
20.0U
15.0U
10.0U
5.0U
0
0
1.0
2.0
3.0
4.0
5.0
VOLTS [LIN]
973
LX [LIN]
12.0F
11.0F
10.0F
9.0F
8.0F
7.0F
6.0F
0
1.0
2.0
3.0
VOLTS [LIN]
4.0
5.0
974
LX [LIN]
4.0
3.0
2.0
1.0
0
-1.0
0
5.0N
10.0N
15.0N
20.0N
25.0N
30.0N
TIME [LIN]
975
PARAM [LIN]
250.0M
225.0M
200.0M
175.0M
150.0M
125.0M
100.0M
75.0M
50.0M
25.0M
0
5.0N
10.0N
15.0N
TIME [LIN]
20.0N
25.0N
30.0N
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.
You need three temperatures to solve a second-order equation. You can extend
this simulation template to a transient simulation of non-linear components
(such as bipolar transistors, diodes, and FETs).
This example uses some simulation shortcuts. In the internal output templates
for resistors, LV1 (resistor) is the conductance (reciprocal resistance) at the
desired temperature.
To optimize more complex elements, use the current or voltage domain, with
measured sweep data.
The error function expects a sweep on at least two points, so the data
statement must include two duplicate points.
977
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) ')
* * Output section *
.dc data=RES_TEMP
.print 'r1_diff'=par('1.0/lv1(r-25)')
+
'r2_diff'=par('1.0/lv1(r0) ')
+
'r3_diff'=par('1.0/lv1(r+25)')
.data RES_TEMP R_meas_t1 R_meas_t2 R_meas_t3
950 1000 1010
950 1000 1010
.enddata
.end
W
Rpoly = ----- 40
L
Esio nsi
poly = -------------------------- L W
tox
100
Rpoly = --------- 40 = 800 ,
5
3.9 8.86
Co = ------------------------- 100 5 = 215 fF RC=138 ps
800
Drain
M1
W/18
M2
W/9
M3
W/9
M4
W/9
M5
W/19
M6
W/9
M7
W/9
M8
W/9
M9
W/9
M10
W/18
Bulk Source
979
You can find the sample Nine-Stage Ladder model netlist for this example in the
following directory:
$installdir/demo/hspice/apps/asic3.sp
PARAM [LIN]
7.0M
6.0M
5.0M
4.0M
3.0M
2.0M
1.0M
0
-1.0M
0
200.0
400.0
TIME [LIN]
600.0
800.0
980
Benchmark Examples
Encryption Examples
Filters Examples
IBIS Examples
Magnetics Examples
RF Examples
Sources Examples
S-parameter Examples
Variability Examples
Verilog-A Examples
File Name
Location: $installdir/demo/hspice/aa_integ/
Corner_Demo_51
Corner_Demo_61
981
Table 85
File Name
Location: $installdir/demo/hspice/aa_integ/
Mosra_Demo_51
Mosra_Demo_61
Optimization_Demo_51
Optimization analysis
Optimization_Demo_61
Mixer_Demo_61
Monte_Demo_51
Monte_Demo_61
PLL_Demo_51
PLL_Demo_61
Suites of files for ADE versions 5.1xx and 6.1xx (required to run a
guided tutorial found in the first chapter of the HSPICE Integration
User Guide, including a Verilog-A example). See Quick-Start Tutorial
in the HSPICE Integration to Cadence Virtuoso Analog Design
Environment User Guide
982
File Name
Location: $installdir/demo/hspice/apps/
alm124.sp
alm124.inc
Macro model
alter2.sp
.ALTER examples
ampg.sp
asic1.sp
asic3.sp
Table 86
File Name
Location: $installdir/demo/hspice/apps/
biaschk.sp
bjtdiff.sp
bjtschmt.sp
bjtsense.sp
cellchar.sp
four.sp
gaasamp.sp
gen28.inc
grouptim.sp
inv.sp
mcdiff.sp
mondc_a.sp
mondc_b.sp
mont1.sp
mos2bit.sp
noise_app.sp
quickAC.sp
AC analysis on a RC network
quickINV.sp
quickTRAN.sp
983
Table 86
File Name
Location: $installdir/demo/hspice/apps/
rc_monte.sp
sclopass.sp
tlib1
tlib2
tlib3
tlib4
trist_buf_opt.sp
wildchar.sp
worst.sp
xbjt2bit.sp
Back-Annotation Cases
Case Name
Location: $installdir/demo/hspice/back_annotation/
option_ba_activehier/
option_ba_dpfpfx/
option_ba_file/dspf/multiba/
984
Table 87
Back-Annotation Cases
Case Name
Location: $installdir/demo/hspice/back_annotation/
option_ba_file/dspf/
option_ba_file/spef/
option_ba_fingerdelim/
option_ba_hierdelim/
option_ba_idealpfx/
option_ba_mergeport/
option_ba_netfmt
option_ba_print/
option_ba_terminal/
selective_ba/ba_acheck/
selective_ba/option_ba_active/
985
986
File Name
Location: $installdir/demo/hspice/behave/
acl.sp
Acl gate
amp_mod.sp
behave.sp
calg2.sp
compar.sp
det_dff.sp
diff.sp
diode.sp
dlatch.sp
galg1.sp
idealop.sp
integ.sp
Integrator circuit
inv_vin_vout.sp
DC sweep of a INV
invb_op.sp
ivx.sp
op_amp.sp
pdb.sp
pll.sp
pll_bvp.sp
Table 88
File Name
Location: $installdir/demo/hspice/behave/
pwl2.sp
pwl10.sp
pwl4.sp
pwl7.sp
pwl8.sp
ring5bm.sp
ringb.sp
rtest.sp
sampling.sp
swcap5.sp
switch.sp
swrc.sp
vcob.sp
987
Benchmark Examples
Table 89
Benchmark Examples
File Name
Location: $installdir/demo/hspice/bench/
bigmos1.sp
demo.sp
example.sp
CMOS amplifier
digstim.vec
m2bit.sp
m2bit_v.sp
senseamp.sp
988
Bisection-Timing Examples
File Name
Location: $installdir/demo/hspice/alge/
dff_push.sp
dff_top.sp
fig26_4.sp
inv_a.sp
tsmc018.m
File Name
Location: $installdir/demo/hspice/bjt/
bjtbeta.sp
bjtgm.sp
dpntun.sp
hicum.sp
mextram.sp
mextram_ac.sp
mextram_dc.sp
mextram_tran.sp
quasisat.sp
self-heat.sp
vbic.sp
DC of a VBIC BJT
vbic99_ac.sp
vbic99_dc.sp
vbic99_tran.sp
File Name
Location: /$installdir/demo/hspice/cchar/
diff.sp
digin.sp
989
Table 92
990
gen28.inc
inv3.sp
inva.sp
invb.sp
load1.sp
setupbsc.sp
setup characteristics
setupold.sp
setuppas.sp
sigma.sp
tdgtl.a2d
tdgtl.d2a
tdgtl.sp
File Name
Location: $installdir/demo/hspice/ciropt/
ampgain.sp
ampopt.sp
asic2.sp
asic6.sp
delayopt.sp
lpopt.sp
opttemp.sp
rcopt.sp
Device Optimization
File name
Location: $installdir/demo/hspice/devopt/
beta.sp
bjtopt.sp
bjtopt1.sp
2n2222 DC optimization
bjtopt2.sp
d.sp
dcopt1.sp
jopt.sp
ml13opt.sp
991
Table 94
992
File name
Location: $installdir/demo/hspice/devopt/
ml2opt.sp
opt_bjt.sp
Encryption Examples
Table 95
Encryption Examples
File name
Location: $installdir/demo/hspice/encryption/
8-byte_key.tar
traditional.tar
triple_DES.tar
README and
auxiliary files
Filters Examples
Table 96
Filters
File Name
Location: $installdir/demo/hspice/filters/
bandstopl.sp
fbp_1.sp
fbp_2.sp
fbpnet.sp
fbprlc.sp
fhp4th.sp
fkerwin.sp
flp5th.sp
flp9th.sp
993
Table 96
994
Filters (Continued)
File Name
Location: $installdir/demo/hspice/filters/
lcline.sp
low_pass.sp
low_pass9a.sp
lowloss.sp
ninth.sp
phaseshift.sp
rcline.sp
File Name
Location: $installdir/demo/hspice/fft/
fft5.sp
fft6.sp
gauss.sp
hamm.sp
hann.sp
harris.sp
intermod.sp
kaiser.sp
mod.sp
pulse.sp
pwl.sp
rect.sp
rectan.sp
sffm.sp
sine.sp
swcap5.sp
tri.sp
win.sp
window.sp
winreal.sp
995
IBIS Examples
Table 98
996
File name
Location: $installdir/demo/hspice/ibis/
at16245.ibs
iob_ex1.sp
cmpt1.ibs
ebd.ebd
ebd.sp
pinmap.ebd
pinmap.sp
pinmap.ibs
readme
icm/nodepath_rlgc/
bga_1.sp
bga_example.icm
s_w_test_GHz_db.s4p
sect2_s_2.inc
test1.icm
test1.sp
sect3_rlgc_4.inc
sect_w_4.inc
icm/nodepath_sele/
test1.icm
test1.sp
complex.icm
complex.sp
Loop Stability
File Name
Location: $installdir/demo/hspice/lstb/
single.sp
Magnetics Examples
Table 100 Magnetics
File Name
Location: $installdir/demo/hspice/mag/
aircore.sp
bhloop.sp
jiles.sp
magcore.sp
tj2b.sp
tj_opt.sp
Location: $installdir/demo/hspice/mos/
calcap.sp
calcap.ic0
calcap.ic1
calcap.lis
997
998
File Name
Location: $installdir/demo/hspice/mos/
calcap.results
calcap.st0
capop0.sp
capop1.sp
capop2.sp
cascode.sp
chrgpump.sp
gatecap.sp
mcap2_a.sp
mcap3.sp
ml13iv.sp
ml13opt.sp
ml27iv.sp
ml5iv.sp
mosiv.sp
mosivcv.sp
nch0.inc
selector.sp
ssoi.sp
t1.sp
tempdep.sp
Location: $installdir/demo/hspice/mos/
tgam2.sp
RF Examples
The following is a listing of shipped demonstration files for illustrating HSPICE
RF functionality. (Note the hspicerf directory name.)
File Name
Description $installdir/demo/hspicerf/examples/
acpr.sp
bjt.inc
cmos49_model.inc
cmos90nmWflicker.lib
gpsvco.sp
gsmlna.sp
gsmlnaIP3_A.sp
mix_hb.sp
mix_hbac.sp
mix_snac.sp
mix_tran.sp
osc.sp
pa.sp
pfdcpGain.sp
phasefreqdet.sp
ringoscSN.sp
999
File Name
Description $installdir/demo/hspicerf/examples/
tsmc018.m
1000
File Name
Location: $installdir/demo/spice/si/
iotran.sp
ipopt.sp
qa8.sp
qabounce.sp
stateye_ex1.sp
STATEYE example
stateyeAMI
Sources Examples
Table 103 Sources
File Name
Location: $installdir/demo/hspice/sources/
amsrc.sp
datadriven_pwl.sp
datamanual_pwl.sp Simple data pwl example that does not use any sweep or tran
tstep/stop syntax. The results are individual voltage waveforms.
eelm.sp
exp.sp
prbs.sp
pulse.sp
pwl.sp
sffm.sp
sin.sp
uelm.sp
uelm.d2a
vcr1.sp
1001
S-parameter Examples
Table 104 S-Parameter Examples
File Name
Location: $installdir/demo/hspice/sparam/
diffamp_s.sp
mixed2p.s4p
mixedmode_s.sp
sparam.sp
spciti.sp
spmod.sp
ss_citi.citi
ss_ts.s2p
1002
File name
Location: $installdir/demo/hspice/tline/
rcfilt.inc
strip1.sp
strip2.sp
stripline.sp
uele.sp
Location: $installdir/demo/hspice/twline/
ex1.sp
ex2.sp
ex3.sp
example.rlc
fs_ex1.sp
fs_ex2.sp
fs_ex3.sp
fs_ex4.sp
petl_ex1.sp
petl_ex2.sp
rlgc.rlc
rlgc.sp
umodel.sp
Variability Examples
Table 107 Variation Block, Monte Carlo, and Mismatch Demo Files
File name
Location: $installdir/demo/hspice/variability/
matrix.sp
1003
Table 107 Variation Block, Monte Carlo, and Mismatch Demo Files (Continued)
File name
Location: $installdir/demo/hspice/variability/
monte_test.tar
opampacm.sp
opampdcm.sp
opampmc.sp
Verilog-A Examples
Table 108 HSPICE Verilog-A: Netlist and Verilog-A Files
File name
Location: $installdir/demo/hspice/veriloga/
biterrorrate.sp
biterrorrate.va
bjt.sp
BJT model
bjt.va
colpitts.sp
colpitts.va
dac.sp
dac.va
deadband.sp
Deadband amplifier
deadband.va
1004
ecl.sp
ECL inverter
opamp.sp
Opamp
Location: $installdir/demo/hspice/veriloga/
opamp.va
pll.sp
pll.va
resistor.sp
resistor.va
sample_hold.sp Sample and hold
sample_hold.va
sinev.sp
sinev.va
1005
1006
32
Warning/Error Messages
32
Provides an overview of the type of warnings and error messages that HSPICE
prints and troubleshooting measures to take when possible.
Users can exercise control over the number of occurrences of warning or error
messages and escalate the severity of certain messages by using .OPTIONS
MESSAGE_LIMIT and STRICT_CHECK. See .OPTION MESSAGE_LIMIT and
.OPTION STRICT_CHECK in the HSPICE Reference Manual: Commands and
Control Options.
HSPICE ships hundreds of examples for your use; see Listing of
Demonstration Input Files for paths to demo files.
This chapter contains the following topics:
Warning Messages
Error Messages
Exit Codes
1007
Warning Messages
The following sections present these topics:
Topology Warnings
Model Warnings
Device Warnings
Analysis Warnings
Topology Warnings
Note:
Topology Integrity
When HSPICE encounters topology integrity issues, it reports warning
messages similar to the four types shown:
**warning** only 1 connection at node 1:net0107 defined in subckt
bg: called in element 12:mn0 defined in subckt bg at line 161
within the hspice source, library or include file.
**warning** both nodes of resistor 1:rinp defined in subckt opa350
are connected. together
**warning** 2:r11 defined in subckt pwdr resistance limited to
1.000E-05
**warning** the following singular supplies were terminated to 1
meg resistor
supply
node1
node2
vdd18
0:dvdd18 defined in subckt 0 0:0 defined in subckt0
vdd1p8
0:dvdd1p8 defined in subckt 0 0:0 defined in subckt 0
No DC Path to Ground
The warning for no DC path to ground, effective from 2007.09, is:
**warning** no dc path to ground from node 13:fl defined in
subckt d****01 now it is connected with gdcpath.
1008
Duplicate Initialization
If a node is initialized using a .ic or .nodeset more than once, the following
warning is issued:
**warning** a duplicate initialization for node=1620:ram***,
keeping last value 0.900 only.
Model Warnings
Zero or Negative Conductance
The following two examples show sample warning messages for negative or
zero conductance:
**warning** negative-mos conductance = 0:m1 iter= 2
vds,vgs,vbs =
4.22
2.12
0.925
gm,gds,gmbs,ids= 1.707E-03
9.366E-05 -1.380E-04
5.040E-04
I
V
Region of Negative
Conductance
(Negative slope)
Encryption-Related Warnings
**warning** Data associated with encrypted blocks were suppressed
due to encrypted content
**warning** Some parameters in encrypted block are defined as
an expression containing output signals. which may cause incorrect
result. Suggest to use user defined functions to replace.
1009
For example:
.Param pdt = rs*pi*i(node2)+v(out)
1010
bypass= 2
mbypass=
2.00
bytol= 100.00u
ACCURATE
***accurate option (accurate=1) sets default value of the options:
lvltim= 3 dvdt= 2 relvar= 200.00m absvar= 200.00m ft= 200.00m
relmos= 10.00m bypass= 2
(used for FFT control) fft_accurate= 1
FAST
**warning** the fast option set the bypass on and the following
options:
dvdt= 3 bytol= 50.00u
GMIN, GMINDC
**warning** pivtol too large ** reset to half minimum value of
(gmindc,gmin)
Device Warnings
Device warnings are specific to each model.
1011
Analysis Warnings
Transient
**warning** the third value 0.00000D+00 and the fourth value
1.00000D-12 are both smaller than the second value 5.00000D-10,
so the transient statement is interpreted as'.tran tstep tstop
tstart delmax'.
Example:
.tran 1n 1u 0 1p
.tran 1n 1u 1p 2u
Bisection
With option OPTCON=1
**warning** endpoints have same sign in bisection
For x
=
0.0000
, y
=
0.0000
For x
=
1.0000
, y
=
1.0000
Both of these are on the same side of the goal value y
0.30000
.
.
.
=
Multiple Results:
**warning** multiple results used in bisection
Example:
.tran 1.0e-9 8.0e-9 sweep optimize=opt1 results=y,z
model=opt_model
Pass/Fail
**warning** passfail does not support more than one result, only
first one is validated
Example:
.model opt_model opt method=passfail relin=0.01 relout=0.01
.tran 1.0e-9 8.0e-9 sweep optimize=opt1 results=y,z
model=opt_model
1012
Measure
**warning** measure results may be incorrect since initial start
time is non-zero.
vin_pp= 1.4855E-01 from= 1.5000E-05
to= 2.0000E-05
**warning** the Equation Evaluation form of the .MEASURE statement
must not be a function of node voltages or branch currents.
Unexpected results may incur.
Example:
.MEAS VARG PARAM=(V(2) + V(3))/2
Example:
vlo2 in gnd dc vhaf sin(0 '(pwr(10,((toin)/20)))*(1e-6)*SQ2' fq
0 0 180)
1013
Error Messages
The following sections present these topics:
Topology Errors
Model Errors
Analysis Errors
Topology Errors
When constructing the circuit description HSPICE does not allow certain
topologies. Topology errors will be reported according the following
circumstances:
1014
I
v
Model Errors
Undefined Model
**error** model name pch in the element 0:mp is not defined.
Undefined parameter
**error** no definition for 0:rsit was called by
**error** no definition for 0:toxn it was called by
0:rin
0:n
1015
Analysis Errors
.DC and Operating Convergence Errors
No convergence error
**error** no convergence in operating point
15.851
then NC = NC + 1
then NC = NC + 1
Do I=1, # MOSFETs
if (| Ids(n) - Ids(n-1) | > RELMOS * Ids(n) + ABSMOS then NC = NC + 1
IF NC = 0
Save Solution
else
If (Iteration_Number < Iteration_Limit) do Another_Iteration
else Failed_to_Converge
1016
Circuit
Reason
Node Unstable
Model
Problem
Simulator
Options
Incomplete Netlist
Feedback
Parasitics
Negative Conductance
Model Discontinuity
Tolerances
Algorithms
Auto-convergence process
Model-related solutions
Source stepping/ramping
GSHUNT/CSHDC
DV
1017
1018
Convergence/Conductance
This section describes issues and possible solutions when conductance values
impact on convergence. For example: Using a conductance term to predict the
next voltage value, can create the problem that if conductance becomes small,
the 2nd term becomes large:
1019
Larger values of GMIN will affect accuracy and indicate that there may
be a model problem
Convergence/Diode Resistance
High conductance is troublesome to the algorithm:
Problem: Highly forward-biased diodes (greater than 0.8V)
Can cause HSPICE to reach iteration limit before reaching the proper
solution voltage
Solution:
1020
Always specify the series-resistance model parameter for all diodes, bipolar
devices, and MOSFETs in the circuit (Default is ZERO ohms).
Diode
RS
Bipolar transistor
RE and RC
JFET
RD and RS
MOSFET
RD and RS
1021
Transient Non-Convergence
Transient Non-Convergence
Rapid Voltage Transitions:
1022
Timestep is reduced.
Model Discontinuities:
Failure Mechanism
GEAR integration
All simulation models should have their associated capacitance terms set to
a non-zero value.
Diode
CJO
Bipolar
JFET
CGD, CGS
1023
MOSFET
GEAR Integration:
GEAR integration acts as a filter, removing oscillations that can occur due
to the trapezoidal algorithm.
Circuits that are non-convergent with TRAP will often converge with GEAR.
This past history helps to project over model discontinuities that exist.
.OPTION WARN
.OPTION MAXWARNS
1024
MOSFET:
BSIM4, PSP, HiSIM_HV, BSIM3, BSIM3SOI, BSIM4SOI, HVMOS. Terminal
voltages checked: Vgs, Vgd, Vgb, Vds, Vbs, and Vbd.
Terminal
Voltages
Checked
Model
Params
Check criteria (i.e., the device under checking is called M1) and
Warning Issued
Vgs
Vgs_max
Vgd
Vgd_max
Vgb
Vgb_max
Vds
Vds_max
Vbs
Vbs_max
Vbd
Vbd_max
Note:
Special considerations:
1. If Vgb_max is not given, Vgs and Vgb share the same model
warning parameter: "Vgs_max."
2. Vgd has a different warning parameter for HV device
considerations.
3.
If Vbs_max is not given, Vbs and Vbd share the same model
warning parameter "Vbd_max."
1025
BJT:
GP. Other BJT models may be included.
Terminal
Voltages
Checked
Model
Params
Check criteria (i.e., the device under checking is called Q1) and
Warning Issued
Vbe
Vbe_max
Vbc
Vbc_max
Vce
Vce_max
Vcs
Vcs_max
Model
Params
Check criteria (i.e., the device under checking is called D1) and
Warning Issued
Vj (from N to P)
Bv_max
Vf (forward)
Fv_max
Resistor (needed for both model and instance, instance Bv-max overrides
model)
Terminal
Voltages
Checked
Model
Params
Check criteria (i.e., the device under checking is called D1) and
Warning Issued
Vr
Bv_max
Model
Params
Check criteria (i.e., the device under checking is called C1) and
Warning Issued
Vc
Bv_max
1026
These messages provide useful information and help in debugging the VerilogA module. For example:
*pvaI* #### Total 131 line-size(s), 29 expr(s), 2 contr(s), 4
init(s), 4 behav(s), 2 port(s)
*pvaW* macro `P_Q redefined at (constants.vams:34)
1027
Index
1028
Index
10011 (10011.sp:4) First TAP value must be largest of all TAP values for Pseudo Random Bit
Generator source v. Assumes a descending order sort.
Example:
.param a=4 vlow=1 vhigh=5 tdelay=1n trise=0.5n tfall=0.5n
+ rate=0.1g seed=10 rout=10k
v 1 0 vlow LFSR (vlow vhigh tdelay trise tfall rate seed [2,5]
+ rout)
10012 (10012.sp:11) Mutual inductance value has not been specified for mutual inductor. Reset
to zero. Enter value of mutual inductance coefficient.
Example:
k1 l1 l2 l3 tsat MAG=2 $coefficient is not specified.
10013 (10013.sp:14) Magnetization (MAG) of mutual inductor can only be -1|0|1, assumes the
value is -1. Enter a valid number for MAG.
Example:
k1 l1 l2 l3 tsat MAG=2
.model tsat L(ac=1e4 lc=100 hc=.1 tc=1u br=6.4k bs=6.75k hs=.6
+ hcr=0)
10014 (10014.sp:3) Attempt to reference undefined pin x1.mid1 in isub(); branch output ignored.
Specify a valid pin name.
Example:
x1 1 0 aa
.subckt aa in out
r1 in mid aa
.probe tran isub(x1.mid1)
.ends
1029
Index
10015 (10015.sp:13) Attempt to reference undefined pin x1.1; biaschk output ignored. Specify a
valid pin name.
Example:
x1 1 0 aa
.subckt aa in out
r1 in mid aa
.ends
.biaschk subckt terminal1=1 simulation=tran monitor=i max=1
min=0.1 sname=x1
10016 (10016.sp:3) ISUB() unsupported for top-level node 1; branch output ignored.
Example: .probe tran isub(1)
10017 (10017.sp:12) Unable to find referenced node 100; Output variable ignored. Specify a
valid node.
Example: .probe tran v(100)
10018 (10018.sp:8) Inductance for the inductor lout >= 0.1 henry, please verify it.
Example: lout out 0 1
10019 (10019.sp:17) Skin Effect Coefficient parameter (Rs) for the element rout cannot be
negative. Parameter has been ignored. Enter a valid Rs value.
Example: rout out 0 1K rs=-1
10020 (10020.sp:6) Frequency "FMAX" cannot be negative for frequency dependent resistor
r11. Parameter has been ignored. Enter positive value of "FMAX".
Example: R11 1 2 1 Rs=1 FMAX=-100 FBASE=10 CONVOLUTION=1
10021 (10021.sp:6) Frequency "FBASE" cannot be negative for frequency dependent resistor
r11. Parameter has been ignored. Enter positive value for "FBASE".
Example: R11 1 2 1 Rs=1 FMAX=100 FBASE=-10 CONVOLUTION=1
10022 (10022.sp:6) "CONVOLUTION" can ONLY have value of 0|1|2 for frequency dependent
resistor r11. Reset to default(CONVOLUTION=0). Enter valid value of CONVOLUTION.
Example: R11 1 2 1 Rs=1 FMAX=100 FBASE=-10 CONVOLUTION=1
1030
Index
10023 (10023.sp:3) Propagation Delay (TD) cannot be negative for dependent source e11.
Reset it to default (TD=0). Enter positive value of "TD".
Example: E11 out 0 VCVS DELAY 1 0 td=-1n
10024 (10024.sp:6) "FBASE" cannot be > "FMAX" for element r11. Parameters have been
ignored. Enter FBASE value < FMAX.
Example: R11 1 2 1 Rs=1 FMAX=1k FBASE=1MEG CONVOLUTION=11
10025 (10025.sp:8) Scaling parameter (SCALE) for the x1.r1 cannot be < or = zero. Parameter
has been ignored. Enter a valid value of "SCALE".
Example: r1 in mid aa scale=0
10026 (10026.sp:5) Frequency (freq) of sine voltage source v1 cannot be negative. Reset to
freq= "1/TSTOP". Enter a positive value.
Example: v1 1 0 5 sin (5 1 -1g 0.5n 0.2 60)
10027 (10027.sp:5) Damping factor (theta) for sine voltage source v1 cannot be negative.
Please enter a positive value for "theta". Reset to default (theta=0).
Example: v1 1 0 5 sin (5 1 1g 0.5n -0.2 60)
10028 (10028.sp:4) Rise delay time for exponential voltage source v cannot be negative. Reset
to default (rise delay time=0). Enter positive rise delay time value.
Example: v 1 0 v0 exp(4 1 -2n 30n 40n 80n)
10029 (10029.sp:4) Fall delay time for exponential voltage source v cannot be negative. Reset
to default (fall delay time= Rise delay time +TSTEP). Enter positive fall delay time value.
Example: v 1 0 v0 exp(4 1 2n 30n -40n 80n)
10030 (10030.sp:4) Rise time constant for exponential voltage source v cannot be negative.
Reset to default (rise time constant=TSTEP). Enter positive rise time constant value.
Example: v 1 0 v0 exp(4 1 2n -30n 40n 80n)
10031 (10031.sp:4) Fall time constant for exponential voltage source v cannot be negative.
Reset to default (fall time constant=TSTEP). Enter positive fall time constant value.
Example: v 1 0 v0 exp(4 1 2n 30n 40n -80n)
10032 (10032.sp:4) Frequency cannot be negative for FM voltage source v. Reset to default
(freq= "1/TSTOP"). Enter a positive frequency value.
Example: v 1 0 4 SFFM (4 1 -1 2 20K)
1031
Index
10033 (10033.sp:4) Carrier frequency cannot be negative for AM voltage source v. Reset to
default (freq= 0). Enter a positive frequency value.
Example: v 1 0 AM (4 1 1 -2 20K)
10034 (10034.sp:4) Modulation frequency cannot be negative for AM voltage source v. Reset to
default (freq= 1/TSTOP). Enter a positive frequency value.
Example: v 1 0 AM (4 1 -1 2 20K)
10035 (10035.sp:4) Offset coefficient cannot be negative for AM voltage source v. Reset to
default (offset coefficient= 0). Enter a positive offset coefficient value.
Example: v 1 0 AM (4 -1 1 2 20K)
10036 (10036.sp:4) Propagation delay cannot be negative for AM voltage source v. Reset to
default (Propagation delay= 0). Enter a positive propagation delay value.
Example: v 1 0 AM (4 1 1 2 -20K)
10037 (10037.sp:3) Rise or fall time cannot be negative for voltage source v. Please enter
positive value of rise or fall time. Reset time to TSTEP.
Example: v 1 0 0 PULSE (0 5 1p -1p -1p 49p 50p)
10038 (10038.sp:9) Number of turns (NT) for the element x1.l1 cannot be <= zero. Parameter
has been ignored. Enter a valid value of NT.
Example: l1 mid 0 1n nt=-1
10039 (10039.sp:14) Value of "TD" cannot be negative in .measure of tdly. Reset to absolute
value.
Example: .measure tran tdly TRIG v(in) VAL=2.5 td=-1n RISE=1 TARG
v(out) VAL=1 CROSS=1
10040 (10040.sp:13) .MEASURE tdly never reached the trigger value, Measurement failed.
Example: .measure tran tdly TRIG v(in) VAL=9.5 td=1n RISE=1 TARG
v(out) VAL=10 CROSS=1 $the maximum value of v(out) is 2
10041 (10041.sp:13 .MEASURE tdly never reached the target value, Measurement failed.
Example: .measure tran tdly TRIG v(in) VAL=9.5 td=1n RISE=1 TARG
v(out) VAL=10 CROSS=1 $the maximum value of v(out) is 2
10042 (10042.sp:4) Both nodes of element v2 are connected together; Line ignored.
Example: v2 1 1 2
1032
Index
10043 (10043.sp:32) Variable v11 does not exists in the netlist for DC analysis. Please specify
the variable which is present in the netlist. v11 assumed to be new variable for DC
analysis however results may not be desired.
Example: .DC v11 0v 5v 0.1v $v11 does not exist
10044 (10044.sp:33) FIRSTRUN value -1 cannot be less than 1 for monte-carlo sweep in
Transient Analysis. Please specify correct value of FIRSTRUN. Parameter has been
ignored.
Example: .DC v1 0.5 1 0.5 monte=2 firstrun=-1
10045 (10045.sp:27) The third value 0.00D+00 and the forth value 1.00D-12 both are smaller
than the second value 1.00D-06, so the transient statement is interpreted as: .tran tstep
tstop tstart delmax.
Example: .tran 1n 1u 0 1p
10046 (10046.sp:12) Duplicate .ic declaration for node 1. Taking the last .ic value 1.00
Example: .ic v(1)=0
.ic v(1)=1
10047 (10047.sp:6) Area for diode cannot be 0.0, reset to 1e-12 (default value). Enter valid value
for area.
Example: d1 1 0 dm1 area=-100p
10048 (10048.sp:6) Geometry parameter "pj" cannot be negative for diode. Please specify
positive value to "pj". Reset to zero.
Example: d1 1 0 dm1 area=100p pj=-10n
10049 (10049.sp:8) Noise parameter (noise) for the resistance can ONLY be 1 or 0. Please enter
a valid value of "noise". Parameter has been ignored.
Example: r1 in mid aa noise=2
10050 (10050.sp:5) Argument of asin can range from -1 to 1. Reset value of asin(5.00) to zero.
Enter a valid argument for asin.
Example: .param aa=asin(5)
10051 (10051.sp:4) Argument of acos can range from -1 to 1. Reset value of acos(5.00) to zero.
Enter a valid argument for acos.
Example: .param aa=acos(5)
1033
Index
10052 (10052.sp:5) Argument of log cannot be zero. The value of log(0) is replaced by the value
of log(epsmin), set by option EPSMIN; Default = 1e-28.
Example: .param a='-log(0)'
10053 (10053.sp:82) Node name tn in .IC or .NODESET cannot be found. Nodal initial condition
is ignored. Enter a valid node.
Example: .IC V(TN)=0
10054 (10054.sp:87) Invalid node pathname on output variable or initialized node net0103; this
statement is ignored.
Example: .probe ac vdb(xeq_filter.net0103) $ pathname xeq_filter
does not exist
10055 (10055.sp:137) Multiple ACmatch/DCmatch commands found, only the last one is used.
Example: .acmatch v(out) threshold=0 perturb=1
.acmatch v(xi82.net18)
10056 (10056.sp:116) Maximum 30 output variables are supported in acmatch/dcmatch
analysis. Taking first 30 variables defined and ignoring the rest.
Example: .acmatch v(out) v(in_neg) v(gnda) v(vdda) v(in_pos)
+ v(out) v(in_neg) v(gnda) v(vdda) v(in_pos) |more than 30 output
variables
10057 (10057.sp:29) DCmatch/ACmatch analysis only supports independent voltage source.
i(xmdut0) output ignored. Enter a valid output source.
Example: .dcmatch I(xmdut0)
10058 (10058.sp:119) Threshold -10.000 specified in ACmatch/DCmatch analysis is negative.
Table has not been generated.
Example: .dcmatch v(out) threshold=-10 perturb=1
10059 (10059.sp:119) Perturbation 7.0000 specified in ACmatch/DCmatch analysis exceeds
valid range from 0.01 to 6.0. Reset to default (2.0). Enter a valid value.
Example: .dcmatch v(out) threshold=0 perturb=7
10060 (10060.sp:17) Interval specified in ACmatch/DCmatch analysis cannot be negative.
Parameter ignored. Enter a valid value.
Example: .acmatch v(12) perturb=3.0 interval=-3 threshold=0.9
matched=0.95
1034
Index
threshold=-60m
10063 (10063.sp:49) Perturbation 7.0000 specified in DCsens analysis exceeds valid range
from 0.0001 to 1.0. Reset it to default (0.05). Enter a valid value.
Example: .DCsens v(2) file='2357' pertur=7.0
interval = 2 _dsdbg=1
threshold=60m
10064 (10064.sp:49) Interval specified in DCsens analysis cannot be negative. Parameter reset
to default(1). Enter a valid value.
Example: .DCsens v(2) file='2357' pertur=1.0
interval = -2 _dsdbg=1
threshold=60m
threshold=60m
10066 (10066.sp:6) LEVEL cannot be used along with keyword LAPLACE for element lowpass.
Parameter has been ignored.
Example: Glowpass 0 out LAPLACE in 0 1.0 / 1.0 2.0 2.0 1.0 level=0
10067 (10067.sp:116) Measurement time value specified exceeds analysis limit in measure
variable vcp. .measure has been ignored. Enter a valid value in .measure.
Example:
.tran `1n` `10n` start=`0`
.measure TRAN vcp FIND v(vcp) AT 780u
10068 (10068.sp:2) noise
1035
Index
10069 (10069.sp:96) Multiple analysis statements are not allowed. The latter statement ignored.
Example:
.op all
.op
10070 (10070.sp:16) Capacitance between second node and BULK node cannot be negative for
resistor instance r1. Please enter a valid value of "C". Parameter has been ignored.
Example: r1 out 0 5 c=-1p
10071 (10071.sp:21) Capacitance of
1.00
Example: c0 in_neg 0 1
10072 (10072.sp:5) Value of resistance r1 defined is limited to 1.000E-05 (RESMIN). Please
modify RESMIN to incorporate resistances.
Example: r1 1 3 1e-10
10073 (10073.sp:336) Measure results may be incorrect since initial start time is non-zero.
Example:
.TRAN 0.001NS 9NS START=2NS
.measure tran inv_delay trig v(01) val=1.25 rise=1 targ v(02)
val=1.25
+ fall=1
10074 (10074.sp:24) Parameter weff is defined as an expression containing output signals,
which may cause incorrect result. Recommend replacing output signals with user-defined
functions.
Example:
.param Weff='(w(dW+pdWb*MAX((V(B,D)),(V(B,S)))+pdWd*ABS(V(D,S))))'
10075 (10075.sp:0) Parameter(s), within encrypted block, contain output signals in expression
which may cause incorrect result. Recommended: Replace output signals with userdefined functions.
Example:
.prot
.param Weff='(w(dW+pdWb*MAX((V(B,D)),(V(B,S)))+pdWd*ABS(V(D,S))))'
.unprot
1036
Index
10076 (10076.sp:32) Number of monte-carlo sweep cannot be negative number for DC analysis.
Please enter positive value of sweeps. Monte= -1.00 has been ignored.
Example: .DC v1 0.5 1 0.5 monte=-1
1037
Index
20007 (20007.sp:150) For AC analysis STOP frequency cannot be less than START frequency.
STOP frequency should be greater than START frequency.
Example: .AC lin 1000 10GHz 1GHz
20008 (20008.sp:195) Number of points for AC analysis cannot be less than 1. Please enter
number of points more than 1.
Example: .AC lin 0 1Hz 1GHz
20009 (20009.sp:4) Definition not declared for rsh(1+b). Please enter a defined name.
Example:
.param rsh=100 b=10
Rbody 1 0 'rsh(1+b)'
20010 (20010.sp:22) Mutual Inductor declaration contains only one reference inductor. Please
enter at least 2 reference inductors.
Example: K1 L1
20011 (20011.sp:509) Definition of model/subckt "pch_hvt_mac" is not found for the element
"xcut.xmmu7012345678901234567890". Please specify a defined model/subckt name.
Example:
xMMU7012345678901234567890 net132 MU70_GATE MU70_SRC MI33M_u3_BULK pch_hvt_mac ad=0.0119p as=0.017044p dfm_flag=1 $
pch_hvt_mac does not exist
20012 (20012.sp:15) Number of data points used in Delay (NPDELAY) cannot be negative for
element fd. Enter positive NPDELAY value.
Example: Fd in 0 DELAY vcc TD=7ns SCALE=5 NPDELAY=-10
20013 (20013.sp:17) For W element the number of terminals exceeds 6. For the given number
of signal conductors, N = 2, the number of terminals should be 2(N + 1) = 6. Enter correct
number of terminals.
Example:
WTL1_0_0 1 2 7 0 3 4 0 TABLEMODEL=MODEL_5 N=2 L=LEN delayopt=3
1038
Index
20014 (20014.sp:17) The W-element has invalid number of terminals 5 for the given number of
signal conductors N = 2. The number of terminals should be 2(N + 1). Enter valid number
of terminals.
Example:
WTL1_0_0 1 0 3 4 0 TABLEMODEL=MODEL_5 N=2 L=LEN delayopt=3
20015 (20015.sp:12) Physical length defined for U-element u1 cannot be zero or negative.
Please define a positive value to L.
Example:
U1 3 10 2 0 5 1 4 0 USTRIP L=-0.178
20016 (20016.sp:17) Number of conductors (N) parameter not found, for W element. Please
define value of N.
Example:
WTL1_0_0 1 2 0 3 4 0 TABLEMODEL=MODEL_5
20017 (20017.sp:12) Number of nodes "7" of U-element "u1" does not match with number of
nodes " 8" specified for U model "ustrip". Number of nodes of instance should match with
the model.
Example:
U1 3 10 2 0 5 1
1039
Index
20021 (20021.sp:5) Denominator cannot be zero for E-element ehipass. Please enter a nonzero denominator.
Example:
Ehipass out 0 LAPLACE in 0 0.0,0.0,0.0,1.0 / 0.0,0.0,0.0,0.0
20022 (20022.sp:4) Seed for Pseudo Random Bit Generator source v1 should lie between 0 and
1073741823. Please enter a valid value of seed.
Example:
.param a=4 vlow=1 vhigh=5 tdelay=1n trise=0.5n tfall=0.5n
rate=0.1g seed=-10 rout=10k
v1 1 0
LFSR (vlow vhigh tdelay trise tfall rate seed [5,2] rout)
20023 (20023.sp:13) Number of nodes miss match between instance "xres" and subcircuit
"ress ". Subcircuit definition has 2 node(s) whereas subckt instance was found with
node(s). Please specify same number of nodes.
Example:
.subckt ress 7 1
R1 7 1 50
.ends
Xres 7 1 10 ress
20024 (20024.sp:3) Name of rlgcmodel cannot start with a number. Names should start with
alphabet. Check/correct the parameter name.
Example: W1 N=3 1 3 5 0 2 4 6 0 RLGCMODEL=11 l=0.97
Exit Codes
HSPICE prints these exit codes. The numerals below may be preceded by the
word SIGTERM or SIGABRT. The corresponding meanings are as follows:
1040
0:
Simulation succeeded.
1:
2:
8:
Floating-point exception.
1041
1042
A
A
Contains information and sample input netlist for a full simulation example in
HSPICE.
The example in this appendix shows the basic text and post-processor output
for two sample input netlists. The example uses WaveView to view the results.
1043
Input netlist
* Example HSPICE netlist, using a linear CMOS amplifier
* netlist options
.option post probe brief nomod
* defined parameters
.param analog_voltage=1.0
* global definitions
.global vdd
* source statements
Vinput in gnd SIN ( 0.0v analog_voltage 10x )
Vsupply vdd gnd DC=5.0v
* circuit statements
Rinterm in gnd 51
Cincap in infilt 0.001
Rdamp infilt clamp 100
Dlow gnd clamp diode_mod
Dhigh clamp vdd diode_mod
Xinv1 clamp inv1out inverter
Rpull clamp inv1out 1x
Xinv2 inv1out inv2out inverter
Routterm inv2out gnd 100x
* subcircuit definitions
.subckt inverter in out
Mpmos out in vdd vdd pmos_mod l=1u w=6u
Mnmos out in gnd gnd nmos_mod l=1u w=2u
.ends
* model definitions
.model pmos_mod pmos level=3
.model nmos_mod nmos level=3
.model diode_mod d
* analysis specifications
.TRAN 10n 1u sweep analog_voltage lin 5 1.0 5.0
* output specifications
.probe TRAN v(in) v(clamp) v(inv1out) v(inv2out) i(dlow)
.measure TRAN falltime TRIG v(inv2out) VAL=4.5v FALL=1
+ TARG V(inv2out) VAL=0.5v FALL=1
.end
Figure 199 on page 1045 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.
1044
Note:
+5V
Analog
Source
10 MHz
1V to 5V
10 MOhm
0.001 F
100 Ohm
Output
Node
100 MOhm
51 Ohm
In this syntax, the input netlist name is example.sp, and the output listing file
name is example.lis. Simulation creates the following output files:
Table 109 HSPICE Output Files
Filename
Description
example.ic
example.lis
example.mt0
example.pa0
example.st0
Run-time statistics.
1045
Description
example.tr0
The following subsections show text files to simulate the amplifier by using
HSPICE on a UNIX workstation. The example does not show the two postprocessor output files, which are in binary format.
Example.ic0
Initial conditions for the circuit
* "simulator" "HSPICE"
* "version" "A-2008.03 32-BIT"
* "format" "HSP"
* "rundate" "15:39:17 04/07/2008"
* "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.mt0
Post-processor output for .MEASURE statements
$DATA1 SOURCE='HSPICE' VERSION='A-2008.03 32-BIT'
.TITLE '* example hspice netlist, using a linear cmos amplifier'
analog_voltage
falltime
temper
alter#
1.0000
3.788e-08
25.0000
1.0000
2.0000
1.639e-08
25.0000
1.0000
3.0000
1.085e-08
25.0000
1.0000
4.0000
7.843e-09
25.0000
1.0000
5.0000
6.572e-09
25.0000
1.0000
1046
Example.lis
Simulation output listing text file
Using: /usr/bin/time -p /remote/cktcae/HSPICE/A-2008.03/hspice/
linux/hspice example.sp
****** HSPICE -- A-2008.03 32-BIT (Feb 26 2008) linux ******
Copyright (C) 2008 by Synopsys Inc. All rights reserved.
Unpublished-rights reserved under US copyright laws.
This program is protected by law and is subject to the terms and
conditions of the license agreement found in:
/remote/cktcae/HSPICE/A-2008.03/hspice/license.warn
Use of this program is your acceptance to be bound by this
license agreement. HSPICE is a trademark of Synopsys, Inc.
Input File: example.sp
lic:
lic:FLEXlm: v8.5b
lic: USER:
hspiceuser
HOSTNAME: hspiceamd1
lic: HOSTID: 0015605ff6da
PID:
18077
lic: Using FLEXlm license file:
lic: 26585@us01_lic4
lic: Checkout 1 hspice
lic: License/Maintenance for hspice will expire on 31-jan-2009/
2009.12
lic: FLOATING license(s) on SERVER us01_lic4
lic:
Init: hspice initialization file: hspice.ini
* netlist options
.option post probe brief nomod
***************************************************************
** runlvl is invoked, you can disable it by:
a) Add option runlvl=0 to your current simulation job.
b) Copy $installdir/hspice.ini to your HOME directory and
customize it by adding option runlvl=0, which disables
it for all of your simulation jobs.
c) Re-invoke $installdir/bin/config program and unselect the
option runlvl setting in box 'hspice.ini' which disables
it for whole group simulation jobs.
** runlvl is invoked, some options are ignored or automatically
set:
Options below are automatically set (user setting will
overwrite them):
if runlvl=6,
.option bypass=0
if runlvl=[1|2|3|4|5], .option bypass=2
Options below are ignored, they are replaced by automated
1047
algorithms:
lvltim
dvdt
ft
fast
trtol absvar relvar
relq chgtol
dvtr
imin
itl3
rmax
** runlvl is invoked, actual option value used by HSPICE are:
runlvl= 3
bypass= 2
mbypass= 2.00 bytol= 100.00u
***************************************************************
**warning** dc voltage reset to initial transient source value
in source
0:vinput
new dc= 0.0000D+00
Opening plot unit= 15
file=example.pa0
*** parameter analog_voltage
1.000E+00 ***
******
* example hspice netlist, using a linear cmos amplifier
****** transient analysis tnom= 25.000 temp= 25.000 ******
falltime= 3.7885E-08 targ= 7.0408E-08
trig= 3.2524E-08
***** job concluded
*** parameter analog_voltage
2.000E+00 ***
******
* example hspice netlist, using a linear cmos amplifier
****** transient analysis tnom= 25.000 temp= 25.000
******
falltime= 1.6394E-08 targ= 5.8128E-08
trig= 4.1734E-08
***** job concluded
*** parameter analog_voltage
******
3.000E+00 ***
1.0848E-08
5.5187E-08
trig=
4.4339E-08
1048
4.000E+00 ***
5.000E+00 ***
******
* example hspice netlist, using a linear cmos amplifier
****** transient analysis tnom= 25.000 temp= 25.000 ******
falltime= 6.5718E-09 targ= 5.3069E-08
trig= 4.6497E-08
meas_variable = falltime
mean = 15.9083n
varian
sigma = 12.8551n
avgdev
max
= 37.8846n
min
1-sigma = 12.8551n
median
= 165.2538a
=
8.9848n
=
6.5718n
= 16.3940n
tot. iter
55
6881
0.06
1
15:39:17
15:39:18
conv.iter
2043 rev=
58
seconds
seconds
04/07/2008
04/07/2008
1049
Example.pa0
Subcircuit path output
1 xinv1.
2 xinv2.
Example.st0
Run-time statistics
***** HSPICE -- A-2008.03 32-BIT (Feb 26 2008) linux ******
Input File: example.sp
lic:
lic: FLEXlm: v8.5b
lic: USER:
hspiceuser
HOSTNAME: hspiceamd1
lic: HOSTID: 0015605ff6da
PID:
18077
lic: Using FLEXlm license file:
lic: 26585@us01_lic4
lic: Checkout 1 hspice
lic: License/Maintenance for hspice will expire on 31-jan-2009/
2009.12
lic: FLOATING license(s) on SERVER us01_lic4
lic:
Init: hspice initialization file: hspice.ini
init: begin read circuit files, cpu clock= 0.00E+00
option post
option probe
option brief
init: end read circuit files, cpu clock= 0.00E+00 memory= 145 kb
init: begin check errors, cpu clock= 0.00E+00
init: end check errors, cpu clock= 0.00E+00 memory=
145 kb
init: begin setup matrix, pivot=
10 cpu clock= 0.00E+00
establish matrix -- done, cpu clock= 0.00E+00 memory=
146 kb
re-order matrix -- done, cpu clock= 0.00E+00 memory=
147 kb
init: end setup matrix, cpu clock= 0.00E+00 memory=
158 kb
sweep: parameter
parameter1
begin, #sweeps =
5
parameter: analog_voltage =
1.00E+00
dcop: begin dcop, cpu clock= 0.00E+00
dcop: end dcop, cpu clock= 0.00E+00 memory= 158 kb tot_iter=
11
output: example.mt0
sweep: tran tran1
begin, stop_t= 1.00E-06 #sweeps= 101 cpu
clock= 0.00E+00
tran: time= 1.0000E-07 tot_iter=
97 conv_iter=
31 cpu
clock= 1.00E-02
tran: time= 2.0000E-07 tot_iter=
195 conv_iter=
62 cpu
clock= 1.00E-02
tran: time= 3.0000E-07 tot_iter=
296 conv_iter=
93 cpu
clock= 1.00E-02
1050
1051
1052
sx
1053
3. In the Open: Waveform Files dialog box, click on example.tr0 and click OK.
This opens the transient analysis waveform file.
4. Expand the hierarchy in the output view browser to show the available
output signals.
5. Left-click on the signal v(in, then drag and drop the selected signal into the
WaveView panel to display a plot similar to the one shown in Figure 200 on
page 1054.
6. To delete this plot, click on the X icon in the WaveView panel tool bar.
7. Repeat Step 5 to plot v(clamp. You should see a plot similar to the one
shown in Figure 240.
1054
8. Repeat Step 6 and Step 7 to view the signals v(inv1out and v(inv2out
(Figure 202 and Figure 203 on page 1057).
1055
1056
9. To delete this plot, click the X icon in the WaveView panel tool bar.
10. Left-click on the signal i(dlow, then drag and drop the selected signal into
the WaveView panel.
11. To show the individual members from the voltage sweep, expand the signal
hierarchy by clicking on the '+' sign near the signal name in the WaveView
panel.
12. Click the ungroup panels icon ( )on the WaveView panel tool bar to
display a plot similar to the one shown in Figure 204 on page 1058.
1057
13. To delete this plot, click the X icon in the WaveView panel tool bar.
14. In the menu bar, select File > Import Waveform file (Ctrl-O).
15. In the Open: Waveform Files dialog box, click on example.mt0 and click
OK to open the measure file.
16. Expand the hierarchy in the output view browser to show the available
output signals.
17. Left-click on the signal falltime. Drag and drop the selected signal into the
WaveView panel. You should see a plot similar to the one shown in
Figure 205 on page 1059.
1058
Figure 205 Plot of Measured Variable falltime vs. Amplifier Input Voltage
1059
1060
B
B
The following sections are included in the HSPICE documentation set for
completeness only. Most of this material has been replaced by more accurate,
efficient, and useful methodologies.
1061
Do not put a blank first line in a digital D2A file. If the first line of a digital file is
blank, HSPICE issues an error message.
Example
The following example demonstrates how to use the \ line continuation
character, to format an input file for text editing. The example file contains a
signal list for a 64-bit bus.
...
a00
a08
...
a56
...
General Form
Uxxx interface nlo nhi mname SIGNAME=sname IS=val
Parameter
Description
Uxxx
interface
nlo
nhi
mname
SIGNAME
IS
Initial state of the input element. Must be a state that the model defines.
Model Syntax
.MODEL mname U LEVEL=5 <parameters...>
1062
Units
Default
Description
CLO
farad
CHI
farad
S0NAME
S0TSW
sec
S0RLO
ohm
S0RHI
ohm
S1NAME
S1TSW
sec
S1RLO
ohm
S1RHI
ohm
S19NAME
S19TSW
sec
S19RLO
ohm
S19RHI
ohm
TIMESTEP
sec
1063
RHI
Node to
Hi_ref
source
CHI
CLO
Node to
Low_ref
source
Interface
Node
RLO
Example
The following example shows how to use the U element and model, as a digital
input for a HSPICE netlist.
You can find the sample netlist for this example in the following directory:
$installdir/demo/hspice/sources/uelm.sp
The associated digital input file is:
1
00
09
10
11
20
30
39
40
41
50
60
70
80
1:1
z:1
0:1
z:1
1:1
0:1
x:1
1:1
x:1
0:1
1:1
0:1
1:1
1064
Syntax
Uxxx interface reference mname SIGNAME=sname
Parameter
Description
Uxxx
interface
reference
mname
SIGNAME
Model Syntax
.MODEL mname U LEVEL=4 parameters...
Units
Default
Description
RLOAD
ohm
1/gmin
Output resistance.
CLOAD
farad
Output capacitance.
S0NAME
S0VLO
volt
S0VHI
volt
S1NAME
1065
Units
Default
Description
S1VLO
volt
S1VHI
volt
S19NAME
S19VLO
volt
S19VHI
volt
TIMESTEP
sec
1E-9
TIMESCALE
Interface Node
CLOAD
RLOAD
Analog-to-Digital
state conversion by
U model (level=4)
Reference Node
1066
1 2 3 4 5
0 1:1 0:2 0:3 0:4 0:5
75 0:1
150 1:1 1:2 1:3
225 0:1
300 1:1 0:2 0:3 1:4 1:5
375 0:1
450 1:1 1:2 1:3
525 0:1
600 1:1 0:2 0:3 0:4 0:5
Example
The following is an example of replacing sources with digital inputs. This
example is based on demonstration netlist digin.sp, which is available in
directory $installdir/demo/hspice/cchar:
1067
0:1
1:1
0:1
1:1
0:1
The second column has the signal value: signal index pairs. Signal index is
corresponds to the position of signal name in the signal name list.
For another example, see the file identified and the plot in Figure 27.
$installdir/demo/hspice/cchar/mos2bit.sp
See the plot in Figure 209 on page 1069.
In this example, a 2-bit MOS adder uses a digital input file. In the plot, the
a[0], a[1], b[0], b[1], and carry-in nodes all originate from a digital file
input similar to Figure 208 on page 1067. HSPICE outputs a digital file.
1068
V = [Z]
[I]
I = [Y]
[V]
T
= [H]
[I1 V2]T
[V1 I2]
[I1 V2]T = [S]
[V1 I2]T
the transpose of the M matrix).
1069
Note:
The preceding list does not mean that you must use combination
(1) to calculate Z parameters. However, if you specify .NET
Vout Isrc, HSPICE initially evaluates the Z matrix parameters.
It then uses standard conversion equations to determine Sparameters or any other requested parameters.
Figure 210 shows the importance of variables in the .NET statement. Here,
Isrc and Vce are the DC biases, applied to the BJT.
I2
I1
+
-
Isrc
V1
V2
Vce
1070
not satisfy the requirement that I2 must be zero. Instead, V2 is zero, which
results in incorrect values for Z11 and Z21.
Figure 211 shows the correct biasing configurations for performing network
analysis for the Z, Y, H, and S-parameters.
C
I1
I1
IB
+
V1
-
+
V2
-
IC
I2
+
V1
-
VBE
IB
+
V2
-
VCE
I1
+
V1
-
I2
I1
+
V2
-
VCE
VBE
+
V1
-
+
V2
-
I2
Example
To calculate the H parameters, HSPICE uses the .NET statement.
.NET I(VC) IB
VC denotes the voltage at the C node, which is the collector of the BJT. With
this statement, HSPICE uses the following equations to calculate H parameters
immediately after AC analysis:
V1 = H11 I1 + H12 V2
I2 = H21 I1 + H22 V2
1071
To calculate Hybrid parameters (H11 and H21), the DC voltage source (VCE)
sets V2 to zero, and the DC current source (IB) sets I1 to zero. Setting I1 and
V2 to zero, precisely meets the conditions of the circuit under examination: the
input current source is open-circuited, and the output voltage source shorts to
ground.
A data file containing measured results can drive external DC biases applied to
a BJT. Not all DC currents and voltages (at input and output ports) might be
available. When you run a network analysis, examine the circuit and select
suitable input and output variables. This helps you to obtain correctly calculated
results. The following example demonstrates HSPICE network analysis of a
BJT.
You can also export the output to either logic or VHDL simulators.
1072
input offsets
transient effects
1073
Description
in-
Inverting input
in+
Non-inverting input
out
vcc
vee
modelname
1074
Parameter
Description
mname
AMP
parameter
value
Example
X0 IN- IN+ OUT0 VCC VEE ALM124
.MODEL ALM124 AMP
+ C2=
30.00P
SRPOS=
.5MEG
SRNEG=
.5MEG
+ IB=
45N
IBOS=
3N
VOS=
4M
+ FREQ=
1MEG
DELPHS=
25
CMRR=
85
+ ROUT=
50
AV=
100K
ISC=
40M
+ VOPOS=
14.5
VONEG=
-14.5
PWR=
142M
+ VCC=
16
VEE=
-16
TEMP=
25.00
+ PSRR=
100
DIS=
8.00E-16
JIS=
8.00E-16
Units
Default
AV (AVD)
volt/volt
CMRR
volt/volt
AV1K
volt/volt
Description
1075
Units
C2
farad
Default
Description
COMP
DEF
1076
Units
DELPHS
deg
Default
Description
DIS
amp
1e-16
1077
Units
FREQ
Hz
(GBW, BW)
Default
Description
IB
amp
IBOS
amp
ISC
amp
JIS
amp
LEVIN
1078
Units
Default
Description
LEVOUT
MANU
PWR (PD)
watt
ohm
ROUT
ohm
SRNEG (SRN)
volt
1079
1080
Names (Alias)
Units
Default
Description
SRPOS (SRP)
volt
TEMP
VCC
volt
VEE
volt
VONEG (VON)
volt
VOPOS (VOP)
volt
VOS
volt
Description
DEF=0
DEF=1
DEF=2
AV
160k
417k
200k
AV1K
1.2 k
3k
C2
Feedback capacitance
30 p
30 p
10 p
CMRR
96 db
63.1k
106 db
199.5k
90 db
31.63k
COMP
DEF
DELPHS
25
17
52
DIS
8e-16
8e-16
8e-16
FREQ
600 k
IB
30 n
250 n
40 n
IBOS
1.5 n
0.7 n
5n
ISC
25 mA
25 mA
25 mA
LEVIN
LEVOUT
MANU
Manufacturers name
PWR
Power dissipation
72 mW
60 mW
50 mW
RAC
AC output resistance
75
70
ROUT
DC output resistance
200
550
100
SRPOS
450 k
1 meg
1 meg
1081
Description
DEF=0
DEF=1
DEF=2
SRNEG
450 k
800 k
800 k
TEMP
Temperature of model
25 deg
25 deg
25 deg
VCC
20
15
15
VEE
-20
-15
-15
VONEG
-14
-14
-14
VOPOS
14
14
14
VOS
0.3 m
0.5 m
Simulation Results
The simulation results include the DC operating point analysis, for an input
voltage of 0 v, and power supply voltages of 15 v.
1082
The DC offset voltage is 3.3021 mV, which is less than that specified for the
original VOS specification, in the op-amp .MODEL statement.
The unity-gain frequency is 907.885 kHz, which is within 10% of the 1 MHz
that the FREQ parameter (in the .MODEL statement) specifies.
The required time rate, for a 1 V change in the output (from the .MEASURE
statement), is 2.3 s (from the SRPOS simulation result listing). This provides
a slew rate of 0.434 mV/s, which is within about 12% of the 0.5 mV/s,
specified in the SRPOS parameter of the .MODEL statement.
The negative slew rate is almost exactly 0.5 mV/s, which is within 1% of the
slew rate specified in the .MODEL statement.
Example
$$ FILE ALM124.SP
.OPTION NOMOD AUTOSTOP SEARCH=' '
.OP VOL
.AC DEC 10 1HZ 10MEG
.MODEL PLOTDB
PLOT XSCAL=2 YSCAL=3
.MODEL PLOTLOGX PLOT XSCAL=2
.GRAPH AC MODEL=PLOTDB VM(OUT0)
.GRAPH AC MODEL=PLOTLOGX VP(OUT0)
.TRAN 1U 40US 5US .15MS
.GRAPH V(IN) V(OUT0)
.MEASURE TRAN
'SRPOS'TRIG V(OUT0) VAL=2V RISE=1
+ TARG V(OUT0) VAL=3V RISE=1
.MEASURE TRAN
'SRNEG'TRIG V(OUT0) VAL=-2V FALL=1
+ TARG V(OUT0) VAL=-3V FALL=1
.MEASURE AC
'UNITFREQ'TRIG AT=1
+ TARG VDB(OUT0) VAL=0 FALL=1
.MEASURE AC
'PHASEMARGIN' FIND VP(OUT0)
+ WHEN VDB(OUT0)=0
.MEASURE AC
'GAIN(DB)'MAX VDB(OUT0)
.MEASURE AC
'GAIN(MAG)'MAX VM(OUT0)
VCC VCC GND +15V
VEE VEE GND -15V
VIN IN GND AC=1 PWL 0US
0V 1US
0V 1.1US +10V 15US +10V
+ 15.2US -10V 100US -10V
.MODEL ALM124 AMP
+ C2=
30.00P
SRPOS=
.5MEG
SRNEG=
.5MEG
+ IB=
45N
IBOS=
3N
VOS=
4M
+ FREQ=
1MEG
DELPHS=
25
CMRR=
85
+ ROUT=
50
AV=
100K
ISC=
40M
+ VOPOS=
14.5
VONEG=
-14.5
PWR=
142M
+ VCC=
16
VEE=
-16
TEMP=
25.00
+ PSRR=
100
DIS=
8.00E-16
JIS=
8.00E-16
*
1083
1084
C
C
1085
or
.lib 'typical.lib' slow
Would match
.lib slow
Now, the entry name must exactly match in both the .lib call and the .lib
definition. If quotes (or any other allowed characters) are used in the .lib call,
they are taken literally and must be the same in the .lib definition. For
example:
slow=slow
'slow'='slow'
Resulting error:
.lib entry "'slow'"
cannot be found
Now required:
.del lib 'typical' slow
Now required:
.param b='-a'
1086
Now required:
.param a=5
.param b=a $OR
.param b='-a'
Now required
.stim tran data abcde par(time) i(r1)
Now required:
.measure tran i_avg avg par '(-1)*I(vdd)' from=1n to=3n
Now requires:
W1 in1 in2 gnd out1 out2 gnd FSmodel=U_MB N=2 l=0.5 PRINTZo=poi
1 1e9
1087
Now requires:
.param td1=500p
.MEAS TRAN iddq AVG I(VDDQ) FROM 0 TO td1
1088
Now required:
.hdl '../vafiles/buffer.va'
12. For a full listing of keywords that cannot be used as parameter or node
names in element lines of command statements and keywords that are
illegal in specified commands, see Reserved Keywords in Chapter 4 of this
manual.
1089
1090
Index
Symbols
!GND node 100
$installdir installation directory 117
Numerics
3DES encryption 159
3D-IC 673
8b-10b encoding 267
A
A2D
function 1061, 1072
model parameter 1061
output model parameters 1065
See also mixed mode
.a2d file 25, 1061
ABS element parameter 330
abs(x) function 382
ABSI option 482
ABSMOS option 482
absolute
power function 382
value function 382
value parameter 330
ABSV option 482
AC analysis 400
output 420
RC network 505
resistance 504
small signals 503
sources 243
AC analysis measurement results file 26
AC analysis results file 26
AC choke inductor 186
.AC statement 702, 911
.ac# file 25, 26
access functions
Get_E() 769, 770
Get_P() 769
accuracy
1091
Index
B
1092
B
B# node name in CSOS 101
back-annotation, data mining 875
back-annotation, post-layout 652
Bartlett FFT analysis window 557, 559, 573
batch job list, MS Windows launcher 136
behavioral
current source 319
digital stimulus files 1072
voltage source 299
behavioral capacitors 179
behavioral resistors 172
Biaschk 538
binary search 937??
Bipolar Junction Transistors. See BJTs
bisection 939
command syntax 938
function 933
measurement 936
methodology 936
optimization 936
overview 934
pass-fail method 936
pulse width analysis 944
pushout method 945
requirements 937
results plots 942
setup time analysis 940
transient analysis 940
violation analysis 936
bisection analysis warnings 1012
BJTs
current flow 415
Index
C
C
C2 model parameter 1076
calculating 48
calculating new measurements
new measurements 48
capacitance
element parameter 174
manufacturing variations 723
pins 602
capacitor
conductance requirement 489
current flow 414
element 174, 176, 441
frequency-dependent 178
models 174
voltage controlled 322, 325
CCCS element parameter 308
CCVS element parameter 329, 330
CDPL 50
C-element (capacitor) 176
cell characterization 699
cell characterization, advanced 604
cell characterization, examples 605
cell measurements, basic 598
CFL function 4
characterization of models 479
choke elements 180
circuits
adder 966
description syntax 88
inverter, MOS 528
nonconvergent 493
RC network 506
reusable 110
subcircuit numbers 100
temperature 702
test, FFT analysis 571
See also subcircuits
client/server mode 40
client 42
quitting 43
server 41
simulating 42
starting 41
CLOAD model parameter 1065
clock source, random jitter 358
CMI 5
CMOS
differential amplifier, pole/zero analysis 585
output driver demo 971
tristate buffer, optimization 920
CMRR model parameter 1072, 1075
commands
hspice 34, 49
hspicerf 39
limit descriptors 405
.MOSRA 612
.MOSRAPRINT 620
output 398
comment line
netlist 92
VEC files 369
Common Distributed Processing Library 50
COMP model parameter 1074, 1076
Compiled Function Library 4
compressed netlists 87
compute farm 50
condition-controlled netlists
netlist
condition-controlled 107
conductance
for capacitors 489
pn junction 496
conductance, negative 1009
confidence interval levels, data mining 860
configuiring text editor in Windows 142
configuration
MS Windows launcher 131
continuation of line
netlist 92
control option warnings 1010
1093
Index
D
control options
algorithm selection 480
convergence 480
DC convergence 480
initialization 480
method 530
printing 405
transient analysis
method 530??
controlled sources 277, 279
CONVERGE option 483, 490
convergence
error causes 1017
problems 490
analyzing 491
autoconverge process 484
causes 493
CONVERGE option 490
DCON setting 484
diagnosing 490496
diagnostic tables 490
floating point overflow 490
GMINDC ramping 484
op-amp models 1074
pole/zero analysis 579
reducing 487
remedies 1017
convergence error messages 1016
convergence termination criteria 1016
convergence/conductance error messages 1019
convergence-diode resistance errors/solutions
1020
corner files 871
cos(x) function 382
cosh(x) function 382
current
branch 413
controlled
current sources 278, 308, 442
voltage sources 278, 329, 443
in HSPICE elements 413
output 411
sources 312
custom CMI 5
Custom WaveView 133
C-V plots 967
1094
D
D2A
function 1061, 1072
input model parameters 1063
model parameter 1061
See also mixed mode
.d2a file 1061
Damped Pseudo Transient algorithm 490
data
encryption 146
sheet parameters 597
data mining 871
annotate file 875
back-annotation 875
cannotate file 875
conifdence intervals 860
corner files 871
external sampling 871
extremes and corners 865
other_percentiles 863
response correlation matrix 868
sample momentse 859
sample quartiles 862
summary statistics 858
variable screening 866
.DATA statement 102, 605
data-driven analysis 102
data-driven analysis 699, 700
PWL source function 259
db(x) function 383
DC
analysis 399, 479480
capacitor conductances 489
initialization 480
convergence control options 480
errors, reducing 487
matching 836
operating point
analysis 475
initial conditions file 24
See also operating point
operating-point convergence 485
sources 243
sweep 478
DC analysis measurement results file 26
DC analysis results file 26
DC block elements 180
DC mismatch 836
Index
D
1095
Index
E
DP 50
command-line invocation 52
licensing 53
limitations 57
master 52
network grids 51
supported features 53
tasks 52
workers 52
.dp# file 25
DTEMP parameter 701, 702, 977
E
E Elements
applications 278
element multiplier 292
parameters 291
syntax statements 289
temperature coefficients 292
time delay keyword 292
editor, notepad.exe 132
element
active
MESFETs 225
IC parameter 476
identifiers 79
independent source 238, 244
L (inductor) 184
markers, mutual inductors 190
names 99
OFF parameter 473
parameters See element parameters 167
passive
resistors 167
R (resistor) 171
statements 93, 118
current output 412
independent sources 238
Laplace 294
op-amps 1074
pole/zero 296
temperature 702
templates 425447
analysis 400
BJTs 444
capacitor 441
current-controlled 442
function 384
1096
independent 443
inductor 441
JFETs 446
MOSFETs 440
mutual inductor 441
resistor 440
saturable core 447, 448
voltage-controlled 442
transmission line 198, 202
voltage-controlled 277
-element (inductor) 184
element parameter, global variation 767
element parameters
.ALTER blocks 105
BJTs 223
capacitors 174175
DTEMP 701
F Elements 307311
G Elements 312317
H Elements 330331
independent sources 238239
data driven PWL function 259
PULSE function 250, 253, 257
SFFM function 262
inductors 182183
JFETs and MESFETs 225226
linear inductors 182, 194
MOSFETs 227229
mutual inductors, Kxxx 190
POLY 279
PWL 257, 259
resistors 168169
transmission lines
W-element 200
element parameters, transmission lines
U-element 203
W-element ??200
element parameters, transmission lines, W-element
199??
element, active
BJTs 223
JFETs 225
MOSFETs 227
element, passive
capacitors 174
inductor 182
mutual inductor 190
elements, multi-terminal 194
Index
F
.ELSEIF
.ELSE 107
encoding, 8b-10b 267
encryption
3DES 159
8-byte key 157
-d option 148
data 153
FREELIB keyword 148
guidelines 149
-i option 148
launching 147
library structure 150
-o option 148
permit file changes 148
-r option 148
structure 155
-t option 148
traditional 152
triple DES public-random keys 159
encryption warnings 1009
encryption,Verilog-A 150
.END statement
for multiple HSPICE runs 107
in libraries 103
location 107
missing 70
with .ALTER 106
.ENDL statement 103
environment variables 15, 118
HSPWIN_KEY 19
META_QUEUE 17
TEMP 19, 35
TMP 19, 35
tmpdir 19, 35
equations 431, 433
ERR function 433
ERR1 function 434, 909
ERR2 function 434
ERR3 function 434
error messages 1014
errors
analysis 1016
cannot open
output spool file 405
convergence 1016, 1017
convergence/diode resistance 1020
convergence-conductance 1019
DC 487
DIAGNOSTIC option 1021
digital file has blank first line 1062
file open 35
functions 433434
internal timestep too small 474, 494, 523
messages 1014
missing .END statement 70
model 1015
no DC path to ground 489
no input data 35
parameter name conflict 428
system resource inaccessible 405
topology 1014
transient analysis 1022
example
AC analysis 505
comment line 92
digital vector file 371
experiments 8
Monte Carlo 720, 728
optimization 912
transient analysis 527, 528
worst case 728
EXP source function
fall time 253
initial value 253
pulsed value 253
rise time 253
exp(x) function 383
experiment 8
Exploration block 883
exponential function 253, 383
expressions, algebraic 381
extended MOSFET element support 230
external data files 86
external sampling 871
external sampling, datamining 871
external sampling, Variation Block 806
extremes and corners, data mining 865
F
F Elements
applications 278
multiply parameter 310
syntax statements 307
time delay keyword 311
1097
Index
F
of interest 560
range 560, 561
harmonic distortion 566
modulator/demodulator 566
results 560561
spectral leakage 566
test circuit 571
measuring results 562
output 560
output results 562
windows 556558
Bartlett 557
Blackman 557
Blackman-Harris 557
Gaussian 557
Hamming 557
Hanning 557
Kaiser-Bessel 558
rectangular 557
FFT analysis graph data file 27
.FFT statement 551
file
analog transition data 24
DC operating point initial conditions 24
hspui.cfg 132
initialization 23
input netlist 24
library input 24
.lis 132
netlist 130, 131
output listing 132
.sp 130, 131
file descriptors limit 405
files
.a2d 25, 1061
1098
Index
G
G
G Elements
applications 278
controlling voltages 315, 317
current 315
curve smoothing 316
element value multiplier 316
gate type 314
initial conditions 315
multiply parameter 315
names 314
polynomial 316
resistance 315
syntax statements 312
time delay keyword 316
transconductance 316
voltage to resistance factor 316
GaAsFET model DC optimization 927
GAUSS
FFT analysis 557, 575
functions 721
keyword 715
parameter distribution 711
GBW model parameter 1078
global parameters 388
global variation element parameters 767
GMIN option 496
GMINDC option 483, 496
GND node 100
GOAL keyword 910
.gr# file 25
GRAMP
option 487
graphical user interface 129??
ground, node name 100
group operator, variation block 773
GUI
using 129??
Gxxx element parameters 314
H
H Elements
applications 278
controlling voltage 332
data points 331
element multiplier 331
element name 330
gate type 330
initial conditions 330
maximum current 331
minimum current 331
syntax statements 328
time delay keyword 331
transresistance 331
H parameters 1071
Hamming FFT analysis window 557, 574
Hanning FFT analysis window 557, 573
HCI and NBTI analysis 615
1099
Index
I
I
IB model parameter 1078
IBIS buffers 235
IBOS model parameter 1078
.ic file 25, 473
IC parameter 315, 330, 476
.IC statement 472, 473, 579
balancing input nodes 1074
IC, three-dimensional simulation 673
.ic# file 27
ideal
current sources 487
delay elements 278
op-amp 278, 300, 302
transformer 278, 300, 304
ideal transformer 194
IDELAY statement 367
.IF 107
.IFELSE 107
impedance
AC 424
Z parameters 420
include files 23
.INCLUDE statement 85, 106, 118, 120
independent sources
1100
AC 239, 243
AM function 264
current 239, 443
data driven PWL function 259
DC 243
elements 238
EXP function 253
functions 244
mixed types 244
PULSE function 245
PWL function 256
SFFM function 262
SIN function 249
transient 239, 243
types 244
voltage 239, 443
See also sources
individual element temperature 702
inductor
frequency-dependent 185
inductors
AC choke 186
current flow 414
element 182, 441
node names 182, 194
initial conditions 472
file 24
statement 477
initialization 472, 473
saved operating point 478
initialization file 23
INOISE parameter 425
input
admittance 424
analog transition data file 24
data
adding library data 107
for data driven analysis 102
DC operating point initial conditions file 24
files
analog transition data 24
character case 72
DC operating point 24
demonstration 980
library 24
names 23
netlist 24, 69
structure 85
table of components 86
Index
J
impedance 424
library file 24
netlist 88
netlist file 24, 88107, 1043
input netlist file 24
input stimuli 439
input syntax
Monte Carlo 792
input/output
cell modeling 978
installation directory $installdir 117
int(x) function 383
integer function 383
integration
algorithms 536
interactive mode
quitting 40
running command files 40
internal
nodes, referencing 100
inverter
analysis, transient 528
circuit, MOS 528
invoking
hspice 34, 49
hspicerf 39
ISC model parameter 1078
isomorphic analyses 36
iterations
number 918
I-V and C-V plotting demo 966
J
JFETs
current flow 414
elements 225, 446
length 226
power dissipation 418
width 225
JIS model parameter 1078
jitter
random, with clock source 358
jitter, random, clock source 358
K
Kaiser-Bessel FFT analysis window 558, 559, 576
Kerwins circuit, pole/zero analysis 583
keywords
analysis statement syntax 911
DTEMP 701
ERR1 909
FREELIB 148
GOAL 910
LAST 430
MONTE 711
optimization syntax 911
PAR 376, 381
power output 416
PP 432
source functions 238
k-string 267
L
LA_FREQ option 647
LA_MAXR option 647
LA_MINC option 647
LA_TIME option 648
LA_TOL option 648
Laplace
function 294, 319, 577
transform 294, 319
frequency 296, 319
LAST keyword 430
Latin Hypercube sampling 804, 811
launcher
MS Windows 129
LDS sampling 805, 812
leadframe example 971
LENGTH model parameter 722
Levenberg-Marquardt algorithm 918
LEVIN model parameter 1078
LEVOUT model parameter 1079
LHS 804, 811
.LIB
call statement 103
statement 85, 120
in .ALTER blocks 103, 105
with .DEL LIB 107
with multiple .ALTER statements 106
.LIB file encryption 154
libraries
adding with .LIB 107
ASIC cells 119
building 103
1101
Index
M
configuring 390
creating parameters 388
DDL 118
duplicated parameter names 388
encryption 146
.END statement 103
integrity 387
protecting 146
search 118
selecting 104
subcircuits 120
vendor 119
library input file 24
limit descriptors command 405
LIMIT keyword 715
line continuation
VEC files 369
linear
acceleration 644
capacitor
element
C (capacitor) 176
matrix reduction 644
linear elements
elements, linear 194
linear inductor 184
linear resistor 171
.lis file 25, 27
.lis file 132
listing file 132
listing file, text editor for Windows 142
LMAX model parameter 6
LMIN model parameter 6
.LOAD statement 478
local
parameters 388
log(x) function 383
log10(x) function 383
logarithm function 383
Low Discrepency Sequence sampling, LDS 805
Low-Discrepency Sequence sampling, LDS 812
Lsim models, calibrating 597
LV 426
LV18 model parameter 967
LX 426
LX7 model parameter 967
LX8 model parameter 967
1102
M
M element parameter 310, 315
.ma# file 25, 26
machine cluster 50
MACMOD option 230
MACMOD option limitations 233
macros 107
magnitude, AC voltage 420
MANU model parameter 1079
manufacturing tolerances 721
Marquardt scaling parameter 918
MAX parameter 315, 331, 936
max(x,y) function 384
maximum value, measuring 431
mean, statistical 700
measure data, pass/fail 435
.MEASURE statement 399, 429
expression 431
failure message 428
parameters 380
measure statements, order 427
measurement warnings 1013
measurements 562
measurements, complex, statement order 427
measuring parameter types 428
menu configuration, MS Windows launcher 131
MESFETs 225
messages, warnings 1008
META_QUEUE environment variable 17
Metaencrypt 147
metaencrypt
launching 147
options when invoking 148
MIN parameter 315, 331
min(x,y) function 383
minimum
value, measuring 431
mismatch 836
mixed mode
See also D2A, A2D
mixed sources 244
model binning warnings 1010
model error messages 1015
Index
N
N
NAND gate adder 966
natural
log function 383
natural frequency 578
NBTI and HCI analysis 615
NDIM 279
1103
Index
O
O
ODELAY statement 367
OFAT 803
1104
Index
O
initial conditions 24
pole/zero analysis 579
saving 101
solution 472, 473
operating point information file 27
operating point node voltages file 27
operators 382
OPT keyword 910
optimization
AC analysis 924
analysis statements 911
bisection method 936
CMOS tristate buffer 920
control 908
convergence options 908
curve-fit 909
data-driven vs. s-parameters 924
DC analysis 913, 915, 925, 927
example 912, 979
goal 909
incremental 926
lengths and widths 929
MODEL keyword 911
MOS 915, 928
network 916, 924
parameters 924
magnitude and phase 924
measured vs. calculated 924
results
function evaluations 918
iterations 918
Marquadt scaling parameter 918
norm of the gradient 917
residual sum of squares 917
simulation accuracy 908
simultaneous 921, 927, 929
S-parameters 923
statements 910
syntax 910
time
analysis 910
required 908
OPTIMIZE keyword 911
.OPTION
.ALTER blocks 106
DCSTEP 489
INGOLD, for exponential output 405
LA_FREQ 647
LA_MAXR 647
LA_MINC 647
LA_TIME 648
LA_TOL 648
POST, to display waveform plots 405
SIM_LA 644, 647
.OPTION MACMOD 230
.OPTION SEARCH
implicit include command 120
options
MOSRALIFE 625
MOSRASORT 626
OPTxxx parameter 909, 910
other_percentiles, data mining 863
output
AC analysis measurement results file 26
AC analysis results file 26
admittance 424
commands 398
current 412
DC analysis measurement results file 26
DC analysis results file 26
.DCMATCH output tables file 29
driver example 971
FFT analysis graph data file 27
.FFT results 560
files
AC analysis measurement results 26
AC analysis results 26
DC analysis measurement results 26
DC analysis results 26
.DCMATCH output tables file 29
FFT
1105
Index
P
P
.pa# file 25, 29
PAR keyword 376, 381, 608
.PARAM statement 104, 428, 699
in .ALTER blocks 105
parameter analysis, .NET 1069
parameter expression warnings 1010
parameters
admittance (Y) 420
algebraic 381, 382
analysis 380
assignment 375
cell geometry 387
constants 376
data type 375
data-driven analysis 102
defaults 393
defining 373, 388
DIM2 425
DIM3 425
encrypting 146
evaluation order 375
HD2 425
HD3 425
hierarchical 111, 387, 429
hybrid (H) 420
impedance (Z) 420
1106
Index
Q
Q
quality assurance 699
R
R Element (resistor) 171
RAC model parameter 1079
RC
analysis 505, 527
circuit 506
optimizing 916
rcells, reusing 388
rectangular FFT window 557
reference temperature 102, 702
RELI option 482
1107
Index
S
S
S19NAME model parameter 1066
S19VHI model parameter 1066
S19VLO model parameter 1066
S1NAME model parameter 1065
S1VHI model parameter 1066
S1VLO model parameter 1066
sample moments, data mining 859
sample quartiles, data mining 862
sampling
External 806
external 871
factorial, full factorial 804
LDS,Niederreiter, Sobol sampling 805, 812
LHS, Latin Hypercube sampling 804, 811
Niederreiter 805, 812
1108
Index
S
printing 406407
specifying 428429
reusing output 439
structure 7
title 91
simulation output
Monte Carlo 796
SIN source function 250
sin(x) function 382
single point experiment 8
single-frequency FM source function 262
sinh(x) function 382
sinusoidal source function 249
skew
file 707
parameters 703
SMOOTH element parameter 316
SNUG papers, HSPICE 12
Sobol sampling 805, 812
SolvNet articles 12
SONAME model parameter 1065
source
data driven 259
keywords 238
statements 93
See also independent sources
SOVHI model parameter 1065
SOVLO model parameter 1065
.sp file 130, 131
.sp file encryption 153
S-parameter 204
S-element 204
spectral leakage 556, 566
spectrum analysis 551
SPICE Explorer 1043
sqrt(x) function 382
square root function 382
SRN model parameter 1079
SRNEG model parameter 1079
SRP model parameter 1080
SRPOS model parameter 1080
SRS 810
.st# file 25, 29
Star-RC,Variation block 777
starting
hspice 34, 49
hspicerf 39
statement
.DOUT 364
statements
.AC 702
.DATA 102, 605
.DC 478, 702, 911
DOUT 399
element 93
.ENDL 103
.GRAPH 406
initial conditions 477
.LIB 103
.LOAD 478
.MEASURE 399, 426
.MODEL 702
.MOSRA 612
.MOSRAPRINT 620
.OP 475
.OPTION
CO 405
.PARAM 104
.PLOT 406
.PRINT 399, 401, 406
.PROBE 399, 401, 406
.SAVE 478
source 93
.STIM 399, 439
.SUBCKT 428, 1073
.TEMP 102, 702
.TRAN 702
statistical analysis 703736
statistical sensitivity coefficients 777
statistics
calculations 700
.STIM statement 399, 439
stimuli 439
stimulus input files 1072
string parameters 392
structure simulation 7
subcircuit cross-listing file 29
subcircuits
adder 965
calling tree 100
changing in .ALTER blocks 105
creating reusable circuits 110
generator 1072
hierarchical parameters 111
1109
Index
T
T
tabular data 363
Taguchi analysis 699
tan(x) function 382
tanh(x) function 382
tasks, distributed processing 52
TC1, TC2 element parameters 292
TD parameter 292, 311, 316, 331, 423, 430
TDELAY statement 367
TEMP
directory 19, 35
environment variable 19, 35
model parameter 102, 702, 1080
sweep variable 977
.TEMP statement 702
temper variable 386
temperature
circuit 700, 702
coefficients 169, 976
derating 102, 702
1110
element 702
optimizing coefficients 976
reference 102, 702
sweeping 977
variable 386
Temperature Variation Analysis 699
termination criteria, convergence 1016
.TF statement 479
three-dimensional function 281
three-dimensional IC
constrtuct usage 675
illegal netlist syntax 676
intrinsic model card, top-level IC instance 682
module usage 674
module, instance-specific properties scope 683
netlist definitions 674
netlist rules 673
parameter direct access, top-level netlist 687
scope reference rules 677
sweeps, temperature and parameters 688
top-level IC module reference 681
.TRAN and .ALTER simulations 687
Verilog-A reference rules 679
Verilog-A usage 679
time
delay 423
variable 386
TIMESCALE model parameter 1066
TIMESTEP model parameter 1066
timing
analysis 933
constraints 933
failures 934
hold time 936
setup time 936
violation analysis 934
title for simulation 91
.TITLE statement 91
TMI flow 5
TMP directory 19, 35
tmp directory 19, 35
TMP environment variable 19, 35
tmpdir environment variable 19, 35
TNOM option 102, 702
topology error messages 1014
topology integrity warnings 1008
TOX model parameter 704
Index
U
U
U Elements 1061
digital input 1061
UIC
analysis parameter 474
UNIF keyword 715
uniform parameter distribution 711
update training 12
V
valp() function 114
variability
defined in HSPICE 749
introduction 747
simulating 747
variation block 750
variable screening, data mining 866
variables
AC formats 422
changing in .ALTER blocks 105
DEFAULT_INCLUDE 23
Hspice-specific 386
output 399
AC 420
DC 409
transient 409
plotting 967
sweeping 977
TEMP 19, 35
TMP 19, 35
tmpdir 19, 35
variables, environment 15
variance, statistical 700
Variation Block
element parameters, global variation 767
variation block
absolute vs relative variation 760
access functions 769, 770
advantages 750
dependent random variables 758
element parameter variations 765
example 771
general section 753
options 753
global subblocks 754
group operator 773
independent random variables 755
local subblocks 754
model parameter variations 760
overview 751
structure 753
subexpressions 773
variation block options
Monte Carlo 793
VCC model parameter 1080
VCCAP 322
VCCS See voltage controlled current source
1111
Index
W
1112
W
warning messages 1008
warnings
all nodes connected together 488
auto-convergence 1013
bisection analaysis 1012
control options 1010
DC/OP analyses 1013
device 1011, 1012
encryption 1009
floating power supply nodes 100
measures 1013
model 1009
model binning 1010
parameter expression 1010
topology integrity 1008
transient analysis 1012
zero diagonal value detected 490
waveform
characteristics 367
Waveform Characteristics section 367
waveform viewer 1043
WaveView 133, 1043
webinar sign-up 12
website, HSPICE.com 12
W-elements 198
WHEN keyword 429
white papers 12
wildcard uses 97
WMAX model parameter 6
WMIN model parameter 6
worst case analysis 604, 703, 728
Worst Case Corners Analysis 699
worst-case analysis 736
worst-case, factorial sampling, Monte Carlo 804
X
XL model parameter 704
XPHOTO model parameter 722
XW model parameter 704
Index
Y
1113
Index
Z
1114