Commit | Line | Data |
---|---|---|
2cede8ff D |
1 | .th |
2 | .(l C | |
3 | .b "Spice VAX Version 2X.x User's Guide" | |
4 | .sp 0.2i | |
5 | R.Dowell, A.R.Newton, D.O.Pederson | |
6 | Department of Electrical Engineering and Computer Sciences | |
7 | University of California | |
8 | Berkeley, Ca., 94720 | |
9 | .sp 0.2i | |
10 | .)l | |
11 | .pp | |
12 | Spice is a general-purpose circuit simulation program for nonlinear dc, | |
13 | nonlinear transient, and linear ac analyses. Circuits may contain resistors, | |
14 | capacitors, inductors, mutual inductors, independent voltage and current | |
15 | sources, four types of dependent sources, transmission lines, and the four most | |
16 | common semiconductor devices: diodes, bjts, jfets, and mosfets. | |
17 | .pp | |
18 | Spice has built-in models for the semiconductor devices, and the user need | |
19 | specify only the pertinent model parameter values. The model for the bjt is | |
20 | based on the integral charge model of Gummel and Poon; however, if the Gummel- | |
21 | Poon parameters are not specified, the model reduces to the simpler Ebers-Moll | |
22 | model. In either case, charge storage effects, ohmic resistances, and a | |
23 | current-dependent output conductance may be included. The diode model can be | |
24 | used for either junction diodes or schottky barrier diodes. The jfet model is | |
25 | based on the fet model of Shichman and Hodges. The model for the mosfet is | |
26 | based on the Frohman-Grove model; however, channel-length modulation, | |
27 | subthreshold conduction, and some short-channel effects are included. | |
28 | .pp | |
29 | Note that the mosfet model parameter lambda has been changed to express | |
30 | channel length modulation in meters/volt in this version of spice. | |
31 | .bp | |
32 | .sh 1 "TYPES OF ANALYSIS" | |
33 | .sp 0.2i | |
34 | .sh 2 "dc analysis" | |
35 | .pp | |
36 | The dc analysis portion of spice determines the dc operating point of the | |
37 | circuit with inductors shorted and capacitors opened. A dc analysis is | |
38 | automatically performed prior to a transient analysis to determine the transient | |
39 | initial conditions, and prior to an ac small-signal analysis to determine the | |
40 | linearized, small-signal models for nonlinear devices. If requested, the dc | |
41 | small-signal value of a transfer function (ratio of output variable to input | |
42 | source), input resistance, and output resistance will also be computed as a | |
43 | part of the dc solution. The dc analysis can also be used to generate dc | |
44 | transfer curves: a specified independent voltage or current source is stepped | |
45 | over a user-specified range and the dc output variables are stored for each | |
46 | sequential source value. If requested, spice also will determine the dc | |
47 | small-signal sensitivities of specified output variables with respect to circuit | |
48 | parameters. The dc analysis options are specified on the .dc, .tf, .op, | |
49 | and .sens control cards. | |
50 | .pp | |
51 | If one desires to see the small-signal models for nonlinear devices | |
52 | in conjunction with a transient analysis operating point, then the '.op' | |
53 | card must be provided. The dc bias conditions will be identical for each | |
54 | case, but the more comprehensive operating point information is not available | |
55 | to be printed when transient initial conditions are computed. | |
56 | .sp 0.2i | |
57 | .sh 2 "ac small-signal analysis" | |
58 | .pp | |
59 | The ac small-signal portion of spice computes the ac output variables as a | |
60 | function of frequency. The program first computes the dc operating point of | |
61 | the circuit and determines linearized, small-signal models for all of the | |
62 | nonlinear devices in the circuit. The resultant linear circuit is then analyzed | |
63 | over a user-specified range of frequencies. The desired output of an ac small- | |
64 | signal analysis is usually a transfer function (voltage gain, transimpedance, | |
65 | etc). If the circuit has only one ac input, it is convenient to set that input | |
66 | to unity and zero phase, so that output variables have the same value as the | |
67 | transfer function of the output variable with respect to the input. | |
68 | .pp | |
69 | The generation of white noise by resistors and semiconductor devices can | |
70 | also be simulated with the ac small-signal portion of spice. Equivalent noise | |
71 | source values are determined automatically from the small-signal operating | |
72 | point of the circuit, and the contribution of each noise source is added at a | |
73 | given summing point. The total output noise level and the equivalent input | |
74 | noise level are determined at each frequency point. The output and input noise | |
75 | levels are normalized with respect to the square root of the noise bandwidth | |
76 | and have the units volts/rt hz or amps/rt hz. The output noise and equivalent | |
77 | input noise can be printed or plotted in the same fashion as other output | |
78 | variables. No additional input data is necessary for this analysis. | |
79 | .pp | |
80 | Flicker noise sources can be simulated in the noise analysis by including | |
81 | values for the parameters kf and af on the appropriate device model cards. | |
82 | .pp | |
83 | The distortion characteristics of a circuit in the small-signal mode can | |
84 | be simulated as a part of the ac small-signal analysis. The analysis is | |
85 | performed assuming that one or two signal frequencies are imposed at the input. | |
86 | .pp | |
87 | The frequency range and the noise and distortion analysis parameters are | |
88 | specified on the .ac, .noise, and .distortion control lines. | |
89 | .sp 0.2i | |
90 | .sh 2 "transient analysis" | |
91 | .pp | |
92 | The transient analysis portion of spice computes the transient output | |
93 | variables as a function of time over a user-specified time interval. The | |
94 | initial conditions are automatically determined by a dc analysis. All sources | |
95 | which are not time dependent (for example, power supplies) are set to their dc | |
96 | value. For large-signal sinusoidal simulations, a fourier analysis of the | |
97 | output waveform can be specified to obtain the frequency domain fourier | |
98 | coefficients. The transient time interval and the fourier analysis options are | |
99 | specified on the .tran and .fourier control lines. | |
100 | .sp 0.2i | |
101 | .sh 2 "analysis at different temperatures" | |
102 | .pp | |
103 | All input data for spice is assumed to have been measured at 25 deg c | |
104 | (298 deg k). The simulation also assumes a nominal temperature of 25 deg c. | |
105 | The circuit can be simulated at other temperatures by using a .temp control | |
106 | line. | |
107 | .pp | |
108 | Temperature appears explicitly in the exponential terms of the bjt and | |
109 | diode model equations. In addition, saturation currents have a built-in | |
110 | temperature dependence. The temperature dependence of the saturation current | |
111 | in the bjt models is determined by: | |
112 | .(l | |
113 | js(T1) = js(T0)*((T1/T0)**pt)*exp(q*Eg*(T1-T0)/(k*T1*T0)) | |
114 | .)l | |
115 | where k is boltzmans constant, q is the electronic charge, Eg is the energy | |
116 | gap which is a model parameter, and pt is the saturation current | |
117 | temperature exponent (also a model parameter, and usually equal to 3). The | |
118 | temperature dependence of forward and reverse beta is according to the formula: | |
119 | .(l | |
120 | beta(T1)=beta(T0)*(T1/T0)**tb | |
121 | .)l | |
122 | where T1 and T0 are in degrees kelvin, and tb is a user-supplied model | |
123 | parameter. Temperature effects on beta are carried out by appropriate | |
124 | adjustment to the values of bf, jle, br, and jlc. Temperature dependence of the | |
125 | saturation current in the junction diode model is determined by: | |
126 | .(l | |
127 | is(T1) = is(T0)*((T1/T0)**(pt/n))*exp(q*Eg*(T1-T0)/(k*n*T1*T0)) | |
128 | .)l | |
129 | where n is the emission coefficient, which is a model parameter, and the other | |
130 | symbols have the same meaning as above. Note that for schottky barrier diodes, | |
131 | the value of the saturation current temperature exponent, pt, is usually 2. | |
132 | .pp | |
133 | Temperature appears explicitly in the value of junction potential, phi, | |
134 | for all the device models. The temperature dependence is determined by: | |
135 | .(l | |
136 | phi(temp) = k*temp/q*log(Na*Nd/Ni(temp)**2) | |
137 | .)l | |
138 | where k is boltzmans constant, q is the electronic charge, Na is the acceptor | |
139 | impurity density, Nd is the donor impurity density, Ni is the intrinsic | |
140 | concentration, and Eg is the energy gap. | |
141 | .pp | |
142 | Temperature appears explicitly in the value of surface mobility, uo, for | |
143 | the mosfet model. The temperature dependence is determined by: | |
144 | .(l | |
145 | uo(temp) = uo(tnom)/(temp/tnom)**(1.5) | |
146 | .)l | |
147 | .pp | |
148 | The effects of temperature on resistors is modeled by the formula: | |
149 | .(l | |
150 | value(temp) = value(tnom)*(1+tc1*(temp-tnom)+tc2*(temp-tnom)**2)) | |
151 | .)l | |
152 | where temp is the circuit temperature, tnom is the nominal temperature, and | |
153 | tc1 and tc2 are the first- and second-order temperature coefficients. | |
154 | .sp 0.5i | |
155 | .sh 1 "CONVERGENCE" | |
156 | .sp 0.2i | |
157 | .pp | |
158 | Both dc and transient solutions are obtained by an iterative process which | |
159 | is terminated when both of the following conditions hold: | |
160 | .sp 0.2i | |
161 | .ip 1) | |
162 | The nonlinear branch currents converge to within a tolerance of | |
163 | 0.1 percent or 1 picoamp (1.0e-12 amp), whichever is larger. | |
164 | .ip 2) | |
165 | The node voltages converge to within a tolerance of 0.1 percent | |
166 | or 1 microvolt (1.0e-6 volt), whichever is larger. | |
167 | .pp | |
168 | Although the algorithm used in spice has been found to be very reliable, in | |
169 | some cases it will fail to converge to a solution. When this failure occurs, | |
170 | the program will print the node voltages at the last iteration and terminate | |
171 | the job. In such cases, the node voltages that are printed are not necessarily | |
172 | correct or even close to the correct solution. | |
173 | .pp | |
174 | Failure to converge in the dc analysis is usually due to an error in | |
175 | specifying circuit connections, element values, or model parameter values. | |
176 | Regenerative switching circuits or circuits with positive feedback probably | |
177 | will not converge in the dc analysis unless the 'off' option is used for some | |
178 | of the devices in the feedback path, or the .nodeset card is used to force the | |
179 | circuit to converge to the desired state. | |
180 | .sp 0.2i | |
181 | .bp | |
182 | .sh 1 "INPUT FORMAT" | |
183 | .sp 0.2i | |
184 | .pp | |
185 | The input format for spice is of the free format type. Fields on a card | |
186 | are separated by one or more blanks, a comma, an equal (=) sign, or a left or | |
187 | right parenthesis; extra spaces are ignored. A card may be continued by | |
188 | entering a + (plus) in column 1 of the following card; spice continues reading | |
189 | beginning with column 2. | |
190 | .pp | |
191 | A name field must begin with a letter (a through z) and cannot contain | |
192 | any delimiters. Only the first eight characters of the name are used. | |
193 | .pp | |
194 | A number field may be an integer field (12, -44), a floating point field | |
195 | (3.14159), either an integer or floating point number followed by an integer | |
196 | exponent (1e-14, 2.65e3), or either an integer or a floating point number | |
197 | followed by one of the following scale factors: | |
198 | .sp 0.2i | |
199 | .TS | |
200 | center; | |
201 | l l l l l. | |
202 | t=1e12 g=1e9 meg=1e6 k=1e3 mil=25.4e-6 | |
203 | m=1e-3 u=1e-6 n=1e-9 p=1e-12 f=1e-15 | |
204 | .TE | |
205 | .sp 0.2i | |
206 | Letters immediately following a number that are not scale factors are ignored, | |
207 | and letters immediately following a scale factor are ignored. Hence, 10, 10v, | |
208 | 10volts, and 10hz all represent the same number, and m, ma, msec, and mmhos all | |
209 | represent the same scale factor. Note that 1000, 1000.0, 1000hz, 1e3, 1.0e3, | |
210 | 1khz, and 1k all represent the same number. | |
211 | .bp | |
212 | .sh 1 "CIRCUIT DESCRIPTION" | |
213 | .pp | |
214 | The circuit to be analyzed is described to spice by a set of element | |
215 | cards, which define the circuit topology and element values, and a set of | |
216 | control cards, which define the model parameters and the run controls. The | |
217 | first card in the input deck must be a title card, and the last card must be | |
218 | a .end card. The order of the remaining cards is arbitrary (except, of course, | |
219 | that continuation cards must immediately follow the card being continued). | |
220 | .pp | |
221 | Each element in the circuit is specified by an element card that contains | |
222 | the element name, the circuit nodes to which the element is connected, and the | |
223 | values of the parameters that determine the electrical characteristics of the | |
224 | element. The first letter of the element name specifies the element type. | |
225 | The format for the spice element types is given in what follows. The strings | |
226 | 'xxxxxxx', 'yyyyyyy', and 'zzzzzzz' denote arbitrary alphanumeric strings. For | |
227 | example, a resistor name must begin with the letter r and can contain from one | |
228 | to eight characters. Hence, r, r1, rse, rout, and r3ac2zy are valid resistor | |
229 | names. | |
230 | .pp | |
231 | Data fields that are enclosed in lt and gt signs '< >' are optional. All | |
232 | indicated punctuation (parentheses, equal signs, etc.) are required. With | |
233 | respect to branch voltages and currents, spice uniformly uses the associated | |
234 | reference convention (current flows in the direction of voltage drop). | |
235 | .pp | |
236 | Nodes must be nonnegative integers but need not be numbered sequentially. | |
237 | The datum (ground) node must be numbered zero. The circuit cannot contain a | |
238 | loop of voltage sources and/or inductors and cannot contain a cutset of current | |
239 | sources and/or capacitors. Each node in the circuit must have a dc path to | |
240 | ground. Every node must have at least two connections except for transmission | |
241 | line nodes (to permit unterminated transmission lines) and mosfet substrate | |
242 | nodes (which have two internal connections anyway). | |
243 | .sh 1 "TITLE CARD, COMMENT CARDS AND .END CARD" | |
244 | .sp 0.2i | |
245 | .sh 2 "title card" | |
246 | .sp 0.2i | |
247 | .b "Examples:" | |
248 | .(l | |
249 | power amplifier circuit | |
250 | test of CAM cell | |
251 | .)l | |
252 | .pp | |
253 | This card must be the first card in the input deck. Its contents are | |
254 | printed verbatim as the heading for each section of output. | |
255 | .sh 2 ".end card" | |
256 | .sp 0.2i | |
257 | .b "Examples:" | |
258 | .(l | |
259 | .end | |
260 | .)l | |
261 | .pp | |
262 | This card must always be the last card in the input deck. Note that the | |
263 | period is an integral part of the name. | |
264 | .sp 0.2i | |
265 | .sh 2 "comment card" | |
266 | .sp 0.2i | |
267 | .b "General form:" | |
268 | .(l | |
269 | * <any comment> | |
270 | .)l | |
271 | .b "Examples:" | |
272 | .(l | |
273 | * rf=1k gain should be 100 | |
274 | * May the Force be with my circuit | |
275 | .)l | |
276 | .pp | |
277 | The asterisk in the first column indicates that this card is a | |
278 | comment card. Comment cards may be placed anywhere in the circuit description. | |
279 | .bp | |
280 | .sh 1 "ELEMENT CARDS" | |
281 | .sp 0.2i | |
282 | .sh 2 "resistors" | |
283 | .sp 0.2i | |
284 | .b "General form:" | |
285 | .(l | |
286 | rxxxxxxx n1 n2 value <tc=tc1<,tc2>> | |
287 | .)l | |
288 | .b "Examples:" | |
289 | .(l | |
290 | r1 1 2 100 | |
291 | rc1 12 17 1k tc=0.001,0.015 | |
292 | .)l | |
293 | .pp | |
294 | N1 and n2 are the two element nodes. Value is the resistance (in ohms) | |
295 | and may be positive or negative but not zero. Tc1 and tc2 are the (optional) | |
296 | temperature coefficients; if not specified, zero is assumed for both. The | |
297 | value of the resistor as a function of temperature is given by: | |
298 | .(l | |
299 | value(temp) = value(tnom)*(1+tc1*(temp-tnom)+tc2*(temp-tnom)**2)) | |
300 | .)l | |
301 | .sp 0.4i | |
302 | .sh 2 "capacitors and inductors" | |
303 | .sp 0.2i | |
304 | .b "General form:" | |
305 | .(l | |
306 | cxxxxxxx n+ n- value <ic=incond> | |
307 | lyyyyyyy n+ n- value <ic=incond> | |
308 | .)l | |
309 | .sp 0.2i | |
310 | .b "Examples:" | |
311 | .(l | |
312 | cbyp 13 0 1uf | |
313 | cosc 17 23 10u ic=3v | |
314 | llink 42 69 1uh | |
315 | lshunt 23 51 10u ic=15.7ma | |
316 | .)l | |
317 | .pp | |
318 | N+ and n- are the positive and negative element nodes, respectively. | |
319 | Value is the capacitance in farads or the inductance in henries. | |
320 | .pp | |
321 | For the capacitor, the (optional) initial condition is the initial | |
322 | time-zero) value of capacitor voltage (in volts). For the inductor, the (option | |
323 | initial condition is the initial (time-zero) value of inductor current (in | |
324 | amps) that flows from n+, through the inductor, to n-. Note that the initial | |
325 | conditions (if any) apply 'only' if the uic option is specified on the .tran | |
326 | card. | |
327 | .sh 2 "coupled (mutual) inductors" | |
328 | .sp 0.2i | |
329 | .b "General form:" | |
330 | .(l | |
331 | kxxxxxxx lyyyyyyy lzzzzzzz value | |
332 | .)l | |
333 | .b "Examples:" | |
334 | .(l | |
335 | k43 laa lbb 0.999 | |
336 | kxfrmr l1 l2 0.87 | |
337 | .)l | |
338 | .pp | |
339 | lyyyyyyy and lzzzzzzz are the names of the two coupled inductors, and | |
340 | value is the coefficient of coupling, k, which must be greater than 0 and less | |
341 | than or equal to 1. Using the 'dot' convention, place a 'dot' on the first | |
342 | node of each inductor. | |
343 | .sp 0.2i | |
344 | .sh 2 "transmission lines (lossless)" | |
345 | .sp 0.2i | |
346 | .b "General form:" | |
347 | .(l | |
348 | txxxxxxx n1 n2 n3 n4 z0=value <td=value> <f=freq <nl=nrmlen>> | |
349 | + <ic=v1,i1,v2,i2> | |
350 | .)l | |
351 | .sp 0.2i | |
352 | .b "Examples:" | |
353 | .(l | |
354 | t1 1 0 2 0 z0=50 td=10ns | |
355 | .)l | |
356 | .pp | |
357 | N1 and n2 are the nodes at port 1; n3 and n4 are the nodes at port 2. | |
358 | Z0 is the characteristic impedance. The length of the line may be expressed in | |
359 | either of two forms. The transmission delay, td, may be specified directly (as | |
360 | td=10ns, for example). Alternatively, a frequency f may be given, together | |
361 | with nl, the normalized electrical length of the transmission line with respect | |
362 | to the wavelength in the line at the frequency f. If a frequency is specified | |
363 | but nl is omitted, 0.25 is assumed (that is, the frequency is assumed to be the | |
364 | quarter-wave frequency). Note that although both forms for expressing the line | |
365 | length are indicated as optional, one of the two must be specified. | |
366 | .pp | |
367 | Note that this element models only one propagating mode. If all four | |
368 | nodes are distinct in the actual circuit, then two modes may be excited. To | |
369 | simulate such a situation, two transmission-line elements are required. (see | |
370 | the example in Appendix A for further clarification.) | |
371 | .pp | |
372 | The (optional) initial condition specification consists of the voltage | |
373 | and current at each of the transmission line ports. Note that the initial | |
374 | conditions (if any) apply 'only' if the uic option is specified on the .tran | |
375 | card. | |
376 | .pp | |
377 | One should be aware that spice will use a transient time-step which | |
378 | does not exceed 1/2 the minimum transmission line delay. Therefore very | |
379 | short transmission lines (compared with the analysis time frame) will cause | |
380 | long run times. | |
381 | .sh 2 "linear dependent sources" | |
382 | .pp | |
383 | Spice allows circuits to contain linear dependent sources characterized by | |
384 | any of the four equations | |
385 | .sp 0.2i | |
386 | i=g*v v=e*v i=f*i v=h*i | |
387 | .sp 0.2i | |
388 | where g, e, f, and h are constants representing transconductance, voltage gain, | |
389 | current gain, and transresistance, respectively. Note: a more complete | |
390 | description of dependent sources as implemented in spice is given in Appendix B. | |
391 | .sp 0.2i | |
392 | .sh 2 "linear voltage-controlled current sources" | |
393 | .sp 0.2i | |
394 | .b "General form:" | |
395 | .(l | |
396 | gxxxxxxx n+ n- nc+ nc- value | |
397 | .)l | |
398 | .sp 0.2i | |
399 | .b "Examples:" | |
400 | .(l | |
401 | g1 2 0 5 0 0.1mmho | |
402 | .)l | |
403 | .pp | |
404 | N+ and n- are the positive and negative nodes, respectively. Current flow | |
405 | is from the positive node, through the source, to the negative node. Nc+ and | |
406 | nc- are the positive and negative controlling nodes, respectively. Value is | |
407 | the transconductance (in mhos). | |
408 | .sp 0.2i | |
409 | .sh 2 "linear voltage-controlled voltage sources" | |
410 | .sp 0.2i | |
411 | .b "General form:" | |
412 | .(l | |
413 | exxxxxxx n+ n- nc+ nc- value | |
414 | .)l | |
415 | .sp 0.2i | |
416 | .b "Examples:" | |
417 | .(l | |
418 | e1 2 3 14 1 2.0 | |
419 | .)l | |
420 | .pp | |
421 | N+ is the positive node, and n- is the negative node. Nc+ and nc- are the | |
422 | positive and negative controlling nodes, respectively. Value is the voltage | |
423 | gain. | |
424 | .sp 0.2i | |
425 | .sh 2 "linear current-controlled current sources" | |
426 | .sp 0.2i | |
427 | .b "General form:" | |
428 | .(l | |
429 | fxxxxxxx n+ n- vnam value | |
430 | .)l | |
431 | .sp 0.2i | |
432 | .b "Examples:" | |
433 | .(l | |
434 | f1 13 5 vsens 5 | |
435 | .)l | |
436 | .pp | |
437 | N+ and n- are the positive and negative nodes, respectively. Current flow | |
438 | is from the positive node, through the source, to the negative node. Vnam is | |
439 | the name of a voltage source through which the controlling current flows. The | |
440 | direction of positive controlling current flow is from the positive node, | |
441 | through the source, to the negative node of vnam. Value is the current gain. | |
442 | .sp 0.2i | |
443 | .sh 2 "linear current-controlled voltage sources" | |
444 | .sp 0.2i | |
445 | .b "General form:" | |
446 | .(l | |
447 | hxxxxxxx n+ n- vnam value | |
448 | .)l | |
449 | .sp 0.2i | |
450 | .b "Examples:" | |
451 | .(l | |
452 | hx 5 17 vz 0.5k | |
453 | .)l | |
454 | .pp | |
455 | N+ and n- are the positive and negative nodes, respectively. Vnam is the | |
456 | name of a voltage source through which the controlling current flows. The | |
457 | direction of positive controlling current flow is from the positive node, | |
458 | through the source, to the negative node of vnam. Value is the transresistance | |
459 | (in ohms). | |
460 | .sh 2 "independent sources" | |
461 | .sp 0.2i | |
462 | .b "General form:" | |
463 | .(l | |
464 | vxxxxxxx n+ n- <<dc> dc/tran value> <ac <acmag <acphase>>> | |
465 | .)l | |
466 | iyyyyyyy n+ n- <<dc> dc/tran value> <ac <acmag <acphase>>> | |
467 | .sp 0.2i | |
468 | .b "Examples:" | |
469 | .(l | |
470 | vcc 10 0 dc 6 | |
471 | vin 13 2 0.001 ac 1 sin(0 1 1meg) | |
472 | isrc 23 21 ac 0.333 45.0 sffm(0 1 10k 5 1k) | |
473 | vmeas 12 9 | |
474 | .)l | |
475 | .pp | |
476 | N+ and n- are the positive and negative nodes, respectively. Note that | |
477 | voltage sources need not be grounded. Positive current is assumed to flow from | |
478 | positive node, through the source, to the negative node. | |
479 | A current sources of positive value, will force current to flow out of | |
480 | the n+ node, through the source, and into the n- node. | |
481 | Voltage sources, in addition to being | |
482 | used for circuit excitation, are the 'ammeters' for spice, | |
483 | that is, zero valued voltage sources may be inserted into the circuit for the pu | |
484 | of measuring current. They will, of course, have no effect on circuit | |
485 | operation since they represent short-circuits. | |
486 | .sp 0.2i | |
487 | .pp | |
488 | Dc/tran is the dc and transient analysis value of the source. If the | |
489 | source value is zero both for dc and transient analyses, this value may be | |
490 | omitted. If the source value is time-invariant (e.g., a power supply), then | |
491 | the value may optionally be preceded by the letters dc. | |
492 | .sp 0.2i | |
493 | .pp | |
494 | Acmag is the ac magnitude and acphase is the ac phase. The source is set | |
495 | to this value in the ac analysis. If acmag is omitted following the keyword | |
496 | ac, a value of unity is assumed. If acphase is omitted, a value of zero is | |
497 | assumed. If the source is not an ac small-signal input, the keyword ac and the | |
498 | ac values are omitted. | |
499 | .sp 0.2i | |
500 | .pp | |
501 | Any independent source can be assigned a time-dependent value for | |
502 | transient analysis. If a source is assigned adependent value, the time- | |
503 | time-zero value is used for dc analysis. There are five independent source | |
504 | functions: pulse, exponential, sinusoidal, piece-wise linear, and single-freque | |
505 | fm. If parameters other than source values are omitted or set to zero, the | |
506 | default values shown will be assumed. (tstep is the printing increment and | |
507 | tstop is the final time (see the .tran card for explanation)). | |
508 | .sp 0.2i | |
509 | 1. Pulse pulse(v1 v2 td tr tf pw per) | |
510 | .sp 0.2i | |
511 | .b "Examples:" | |
512 | .(l | |
513 | vin 3 0 pulse(-1 1 2ns 2ns 2ns 50ns 100ns) | |
514 | .)l | |
515 | .TS | |
516 | center; | |
517 | l l l. | |
518 | parameters default values units | |
519 | .sp 0.2i | |
520 | v1 (initial value) volts or amps | |
521 | v2 (pulsed value) volts or amps | |
522 | td (delay time) 0.0 seconds | |
523 | tr (rise time) tstep seconds | |
524 | tf (fall time) tstep seconds | |
525 | pw (pulse width) tstop seconds | |
526 | per (period) tstop seconds | |
527 | .TE | |
528 | .pp | |
529 | A single pulse so specified is described by the following table: | |
530 | .sp 0.2i | |
531 | .TS | |
532 | center; | |
533 | l l. | |
534 | time value | |
535 | .sp 0.2i | |
536 | 0 v1 | |
537 | td v1 | |
538 | td+tr v2 | |
539 | td+tr+pw v2 | |
540 | td+tr+pw+tf v1 | |
541 | tstop v1 | |
542 | .TE | |
543 | .sp 0.1i | |
544 | Intermediate points are determined by linear interpolation. | |
545 | .sp 0.1i | |
546 | 2. Sinusoidal sin(vo va freq td theta) | |
547 | .sp 0.2i | |
548 | .b "Examples:" | |
549 | .(l | |
550 | vin 3 0 sin(0 1 100meg 1ns 1e10) | |
551 | .)l | |
552 | .sp 0.2i | |
553 | .TS | |
554 | center; | |
555 | l l l. | |
556 | parameters default value units | |
557 | .sp 0.2i | |
558 | vo (offset) volts or amps | |
559 | va (amplitude) volts or amps | |
560 | freq (frequency) 1/tstop hz | |
561 | td (delay) 0.0 seconds | |
562 | theta (damping factor) 0.0 1/seconds | |
563 | .TE | |
564 | .pp | |
565 | The shape of the waveform is described by the following table: | |
566 | .TS | |
567 | center; | |
568 | l l. | |
569 | .sp 0.2i | |
570 | time value | |
571 | .sp 0.2i | |
572 | 0 to td vo | |
573 | td to tstop vo + va*exp(-(time-td)*theta)*sine(twopi*freq*(time-td)) | |
574 | .TE | |
575 | .sp 0.2i | |
576 | .bp | |
577 | 3. Exponential exp(v1 v2 td1 tau1 td2 tau2) | |
578 | .sp 0.2i | |
579 | .b "Examples:" | |
580 | .(l | |
581 | vin 3 0 exp(-4 -1 2ns 30ns 60ns 40ns) | |
582 | .)l | |
583 | .sp 0.2i | |
584 | .TS | |
585 | center; | |
586 | l l. | |
587 | parameters default values units | |
588 | .sp 0.2i | |
589 | v1 (initial value) volts or amps | |
590 | v2 (pulsed value) volts or amps | |
591 | td1 (rise delay time) 0.0 seconds | |
592 | tau1 (rise time constant) tstep seconds | |
593 | td2 (fall delay time) td1+tstep seconds | |
594 | tau2 (fall time constant) tstep seconds | |
595 | .TE | |
596 | .pp | |
597 | The shape of the waveform is described by the following table: | |
598 | .sp 0.2i | |
599 | .TS | |
600 | center; | |
601 | l l. | |
602 | time value | |
603 | .sp 0.2i | |
604 | 0 to td1 v1 | |
605 | td1 to td2 v1+(v2-v1)*(1-exp(-(time-td1)/tau1)) | |
606 | td2 to tstop v1+(v2-v1)*(1-exp(-(time-td1)/tau1)) | |
607 | +(v1-v2)*(1-exp(-(time-td2)/tau2)) | |
608 | .TE | |
609 | .sp 0.2i | |
610 | 4. Piece-wise linear | |
611 | .sp 0.2i | |
612 | pwl(t1 v1 <t2 v2 t3 v3 t4 v4 ...>) | |
613 | .sp 0.2i | |
614 | .b "Examples:" | |
615 | .(l | |
616 | vclock 7 5 pwl(0 -7 10ns -7 11ns -3 17ns -3 18ns -7 50ns -7) | |
617 | .)l | |
618 | .sp 0.2i | |
619 | .TS | |
620 | center; | |
621 | l l. | |
622 | parameters default values | |
623 | .TE | |
624 | .(l | |
625 | Each pair of values (ti, vi) specifies that the value of the source is vi | |
626 | (in volts or amps) at time=ti. The value of the source at intermediate values | |
627 | of time is determined by using linear interpolation on the input values. | |
628 | .)l | |
629 | .sp 0.2i | |
630 | .bp | |
631 | 5. Single-frequency fm | |
632 | .sp 0.2i | |
633 | sffm(vo va fc mdi fs) | |
634 | .sp 0.2i | |
635 | .b "Examples:" | |
636 | .(l | |
637 | v1 12 0 sffm(0 1m 20k 5 1k) | |
638 | .)l | |
639 | .sp 0.2i | |
640 | .TS | |
641 | center; | |
642 | l l l. | |
643 | parameters default values units | |
644 | .sp 0.2i | |
645 | vo (offset) volts or amps | |
646 | va (amplitude) volts or amps | |
647 | fc (carrier frequency) 1/tstop hz | |
648 | mdi (modulation index) | |
649 | fs (signal frequency) 1/tstop hz | |
650 | .TE | |
651 | .pp | |
652 | The shape of the waveform is described by the following equation: | |
653 | .(l | |
654 | value = vo + va*sine((twopi*fc*time) + mdi*sine(twopi*fs*time)) | |
655 | .)l | |
656 | .bp | |
657 | .sh 1 "SEMICONDUCTOR DEVICES" | |
658 | .pp | |
659 | The elements that have been described to this point typically require only | |
660 | a few parameter values to specify completely the electrical characteristics of | |
661 | the element. However, the models for the four semiconductor devices that are | |
662 | included in the spice program require many parameter values. Moreover, many | |
663 | devices in a circuit often are defined by the same set of device model | |
664 | parameters. For these reasons, a set of device model parameters is defined on a | |
665 | separate .model card and assigned a unique model name. The device element | |
666 | cards in spice then reference the model name. This scheme alleviates the need | |
667 | to specify all of the model parameters on each device element card. | |
668 | .pp | |
669 | Each device element card contains the device name, the nodes to which the | |
670 | device is connected, and the device model name. In addition, two optional | |
671 | parameters may be specified for each device: an area factor, and an initial | |
672 | condition. | |
673 | .pp | |
674 | The area factor determines the number of equivalent parallel devices of a | |
675 | specified model. The affected parameters are marked with an asterisk under the | |
676 | heading 'area' in the model descriptions below. | |
677 | .pp | |
678 | Two different forms of initial conditions may be specified for devices. | |
679 | The first form is included to improve the dc convergence for circuits that | |
680 | contain more than one stable state. If a device is specified off, the dc | |
681 | operating point is determined with the terminal voltages for that device set to | |
682 | zero. After convergence is obtained, the program continues to iterate to | |
683 | obtain the exact value for the terminal voltages. If a circuit has more than | |
684 | one dc stable state, the off option can be used to force the solution to | |
685 | correspond to a desired state. If a device is specified off when in reality | |
686 | the device is conducting, the program will still obtain the correct solution | |
687 | (assuming the solutions converge) but more iterations will be required since | |
688 | the program must independently converge to two separate solutions. | |
689 | The .nodeset card serves a similar purpose as the 'off' option. The .nodeset | |
690 | option is easier to apply and is the preferred means to aid convergence. | |
691 | .pp | |
692 | The second form of initial conditions are specified for use with | |
693 | the transient analysis. These are true 'initial conditions' as opposed | |
694 | to the convergence aids above. See the description of the .ic card and | |
695 | the .tran card for a detailed explanation of initial conditions. | |
696 | .sh 2 "junction diodes" | |
697 | .sp 0.2i | |
698 | .b "General form:" | |
699 | .(l | |
700 | dxxxxxxx n+ n- mname <area> <off> <ic=vd> | |
701 | .)l | |
702 | .sp 0.2i | |
703 | .b "Examples:" | |
704 | .(l | |
705 | dbridge 2 10 diode1 | |
706 | dclmp 3 7 dmod 3.0 ic=0.2 | |
707 | .)l | |
708 | .pp | |
709 | N+ and n- are the positive and negative nodes, respectively. Mname is the | |
710 | model name, area is the area factor, and off indicates an (optional) starting | |
711 | condition on the device for dc analysis. If the area factor is omitted, a | |
712 | value of 1.0 is assumed. The (optional) initial condition specification using | |
713 | ic=vd is intended for use with the uic option on the .tran card, when a | |
714 | transient analysis is desired starting from other than the quiescent operating | |
715 | point. | |
716 | .sp 0.2i | |
717 | .sh 2 "bipolar junction transistors (bjt's)" | |
718 | .sp 0.2i | |
719 | .b "General form:" | |
720 | .(l | |
721 | qxxxxxxx nc nb ne <ns> mname <area> <off> <ic=vbe,vce> | |
722 | .)l | |
723 | .sp 0.2i | |
724 | .b "Examples:" | |
725 | .(l | |
726 | q23 10 24 13 qmod ic=0.6,5.0 | |
727 | q50a 11 26 4 20 mod1 | |
728 | .)l | |
729 | .pp | |
730 | Nc, nb, and ne are the collector, base, and emitter nodes, respectively. | |
731 | Ns is the (optional) substrate node. If unspecified, ground is used. | |
732 | mname is the model name, area is the area factor, and off indicates an | |
733 | (optional) initial condition on the device for the dc analysis. If the area | |
734 | factor is omitted, a value of 1.0 is assumed. The (optional) initial condition | |
735 | specification using ic=vbe,vce is intended for use with the uic option on | |
736 | the .tran card, when a transient analysis is desired starting from other than th | |
737 | quiescent operating point. See the '.ic' card description for a better way to | |
738 | set transient initial conditions. | |
739 | .sp 0.2i | |
740 | .sh 2 "junction field-effect transistors (jfet's)" | |
741 | .sp 0.2i | |
742 | .b "General form:" | |
743 | .(l | |
744 | jxxxxxxx nd ng ns mname <area> <off> <ic=vds,vgs> | |
745 | .)l | |
746 | .sp 0.2i | |
747 | .b "Examples:" | |
748 | .(l | |
749 | j1 7 2 3 jm1 off | |
750 | .)l | |
751 | .pp | |
752 | Nd, ng, and ns are the drain, gate, and source nodes, respectively. Mname | |
753 | is the model name, area is the area factor, and off indicates an (optional) | |
754 | initial condition on the device for dc analysis. If the area factor is | |
755 | omitted, a value of 1.0 is assumed. The (optional) initial condition specification, | |
756 | using ic=vds,vgs is intended for use with the uic option on the .tran card, | |
757 | when a transient analysis is desired starting from other than the quiescent | |
758 | operating point (see the .ic card for a better way to set initial conditions). | |
759 | .sp 0.2i | |
760 | .sh 2 "mosfets" | |
761 | .sp 0.2i | |
762 | .b "General form:" | |
763 | .(l | |
764 | mxxxxxxx nd ng ns nb mname <l=val> <w=val> <ad=val> <as=val> | |
765 | + <rd=val> <rs=val> <off> <ic=vds,vgs,vbs> | |
766 | .)l | |
767 | .sp 0.2i | |
768 | .b "Examples:" | |
769 | .(l | |
770 | m1 24 2 0 20 type1 | |
771 | m31 2 17 6 10 modm l=5u w=2u | |
772 | m31 2 16 6 10 modm 5u 2u | |
773 | m1 2 9 3 0 mod1 l=10u w=5u ad=2p as=2p | |
774 | m1 2 9 3 0 mod1 10u 5u 2p 2p | |
775 | .)l | |
776 | Nd, ng, ns, and nb are the drain, gate, source, and bulk (substrate) | |
777 | nodes, respectively. Mname is the model name. L and w are the channel length | |
778 | and width, in meters. Ad and as are the areas of the drain and source | |
779 | diffusions, in sq-meters. Note that the suffix 'u' specifies microns (10**-6 m) | |
780 | and 'p' sq-microns (10**-12 sq-m). If any of l, w, ad, or as are not specified, | |
781 | default values are used. The user may specify the values to be used for | |
782 | these default parameters on the .option card. The use of defaults simplifies | |
783 | input deck preparation, as well as the editing required if devices geometries | |
784 | are to be changed. Off indicates an (optional) initial condition | |
785 | on the device for dc analysis. The (optional) initial condition | |
786 | specification using ic=vds,vgs,vbs is intended for use with the uic option | |
787 | on the .tran card, when a transient analysis is desired starting from other | |
788 | than the quiescent operating point. See the .ic card for a better and | |
789 | more convenient way to specify transient initial conditions. | |
790 | .bp | |
791 | .sp 0.2i | |
792 | .sh 2 ".model card" | |
793 | .sp 0.2i | |
794 | .b "General form:" | |
795 | .(l | |
796 | .model mname type(pname1=pval1 pname2=pval2 ... ) | |
797 | .)l | |
798 | .sp 0.2i | |
799 | .b "Examples:" | |
800 | .(l | |
801 | .model mod1 npn bf=50 js=1e-13 vbf=50 | |
802 | .)l | |
803 | .pp | |
804 | The .model card specifies a set of model parameters that will be used by | |
805 | one or more devices. Mname is the model name, and type is one of the following | |
806 | seven types: | |
807 | .TS | |
808 | center; | |
809 | l l. | |
810 | npn npn bjt model | |
811 | pnp pnp bjt model | |
812 | d diode model | |
813 | njf n-channel jfet model | |
814 | pjf p-channel jfet model | |
815 | nmos n-channel mosfet model | |
816 | pmos p-channel mosfet model | |
817 | .TE | |
818 | .pp | |
819 | Parameter values are defined by appending the parameter name, as given | |
820 | below for each model type, followed by an equal sign and the parameter value. | |
821 | Model parameters that are not given a value are assigned the default values | |
822 | given below for each model type. | |
823 | .sp 0.2i | |
824 | .sh 2 "diode model" | |
825 | .pp | |
826 | The dc characteristics of the diode are determined by the parameters is | |
827 | and n. An ohmic resistance, rs, is included. Charge storage effects are | |
828 | modeled by a transit time, tt, and a nonlinear depletion layer capacitance | |
829 | which is determined by the parameters cjo, pb, and m. The temperature | |
830 | dependence of the saturation current is defined by the parameters eg, the energy | |
831 | and pt, the saturation current temperature exponent. Reverse breakdown is | |
832 | modeled by an exponential increase in the reverse diode current and is | |
833 | determined by the parameters bv and ibv (both of which are positive numbers). | |
834 | .sp 0.2i | |
835 | .TS | |
836 | center; | |
837 | l l l l l l. | |
838 | area name parameter default example | |
839 | .sp 0.2i | |
840 | 1 * is saturation current 1.0e-14 1.0e-14 | |
841 | 2 * rs ohmic resistance 0 10 | |
842 | 3 n emission coefficient 1 1.0 | |
843 | 4 tt transit-time 0 0.1ns | |
844 | 5 * cjo zero-bias junction capacitance 0 2pf | |
845 | 6 pb junction potential 1 0.6 | |
846 | 7 m grading coefficient 0.5 0.5 | |
847 | 8 eg activation energy 1.11 1.11 si | |
848 | 0.69 sbd | |
849 | 0.67 ge | |
850 | 9 pt saturation-current temp. exp 3.0 3.0 jn | |
851 | 2.0 sbd | |
852 | 10 kf flicker noise coefficient 0 | |
853 | 11 af flicker noise exponent 1 | |
854 | 12 fc coefficient for forward-bias 0.5 | |
855 | depletion capacitance formula | |
856 | 13 bv reverse breakdown voltage infinite 40.0 | |
857 | 14 ibv current at breakdown voltage 1.0e-3 | |
858 | .TE | |
859 | .sh 2 "bjt models (both npn and pnp)" | |
860 | .pp | |
861 | The bipolar junction transistor model in spice is an adaptation of | |
862 | the integral charge control model of Gummel and Poon. This modified | |
863 | Gummel-Poon model extends the original model to include several effects | |
864 | at high bias levels. The model will automatically simplify to the simpler | |
865 | Ebers-Moll model when certain parameters are not specified. To permit | |
866 | one to use model parameters from earlier versions of spice, many | |
867 | of the model parameters can be called by two names. The parameter names | |
868 | used in the modified Gummel-Poon model have been chosen to be more easily | |
869 | understood by the program user, and to better reflect both physical and | |
870 | circuit design thinking. The dc model is defined by the parameters bf, | |
871 | jbf, jle, and nle which determine the forward current gain characteristics, | |
872 | br, jbr, jlc, and nlc which determine the reverse current gain characteristics, | |
873 | vbf and vbr, which determine the output conductance for forward and reverse | |
874 | regions, and the saturation current, js. Three ohmic resistances rb, rc, and | |
875 | re are included, where rb can be high current dependent. Base charge storage | |
876 | is modeled by forward and reverse transit times, tf and tr the forward transit | |
877 | time being bias dependent if desired, and nonlinear depletion layer | |
878 | capacitances which are determined by cje, vje, and mje for the b-e junction and | |
879 | cjc, vjc, and mjc for the b-c junction. A depletion formulation is used for | |
880 | the substrate capacitance described by cjs, vjs, and mjs. The temperature | |
881 | dependence of saturation current, js, is determined by the energy-gap, eg, | |
882 | and the saturation current temperature exponent, pt. Base current temperature | |
883 | dependence is modeled by the temperature exponent for beta, tb. | |
884 | .sp 0.2i | |
885 | .TS | |
886 | center; | |
887 | l l l l. | |
888 | name parameter units default | |
889 | .sp 0.2i | |
890 | js transport saturation current amps 1.0e-16 | |
891 | bf ideal maximum forward beta amp/amp 100 | |
892 | nf forward current emission coefficient - 1.0 | |
893 | vbf forward early voltage volts infinite | |
894 | jbf corner for forward beta high current roll-off amps infinite | |
895 | jle base-emitter leakage saturation current amps 0 | |
896 | nle base-emitter leakage emission coefficient - 1.5 | |
897 | br ideal maximum reverse beta amp/amp 1.0 | |
898 | nr reverse current emission coefficient - 1.0 | |
899 | vbr reverse early voltage volts infinite | |
900 | jbr corner for reverse beta high current roll-off amps infinite | |
901 | jlc base-collector leakage saturation current amps 0 | |
902 | nlc base-collector leakage emission coefficient - 2.0 | |
903 | rb zero bias base resistance ohms 0 | |
904 | jrb current where base resistance falls halfway to amps infinite | |
905 | its minimum value | |
906 | rbm minimum base resistance at high currents ohms rb | |
907 | re emitter resistance ohms 0 | |
908 | rc collector resistance ohms 0 | |
909 | cje base-emitter zero bias depletion capacitance farads 0 | |
910 | vje base-emitter built-in potential volts .75 | |
911 | mje base-emitter junction exponential factor - .33 | |
912 | tf ideal forward transit time sec 0 | |
913 | xtf coefficient for bias dependence of tf - 0 | |
914 | vtf voltage describing vbc dependence of tf volts infinite | |
915 | jtf high-current parameter for effect on tf amps 0 | |
916 | ptf excess phase at freq=1.0/(tf*2pi) hz degrees 0 | |
917 | cjc base-collector zero bias depletion capacitance farads 0 | |
918 | vjc base-collector built-in potential volts .75 | |
919 | mjc base-collector junction exponential factor - .33 | |
920 | cdis fraction of base-collector depletion - 1.0 | |
921 | capacitance connected to internal base node | |
922 | tr ideal reverse transit time sec 0 | |
923 | cjs zero bias substrate capacitance farads 0 | |
924 | vjs substrate junction built-in potential volts .75 | |
925 | mjs substrate junction exponential factor - 0 | |
926 | tb forward and reverse beta temperature exponent - 0 | |
927 | eg energy-gap for temperature effect on js ev 1.11 | |
928 | pt temperature exponent for effect on js - 3 | |
929 | kf flicker-noise coefficient - 0 | |
930 | af flicker-noise exponent - 1 | |
931 | fc coefficient for forward-bias depletion - .5 | |
932 | capacitance formula | |
933 | .TE | |
934 | .sp 0.2i | |
935 | .sh 2 "jfet models (both n and p channel)" | |
936 | .sp 0.2i | |
937 | .pp | |
938 | The jfet model is derived from the fet model of Shichman and Hodges. The | |
939 | dc characteristics are defined by the parameters vto and beta, which determine | |
940 | the variation of drain current with gate voltage, lambda, which determines the | |
941 | output conductance, and is, the saturation current of the two gate junctions. | |
942 | Two ohmic resistances, rd and rs, are included. Charge storage is modeled by | |
943 | nonlinear depletion layer capacitances for both gate junctions which vary as | |
944 | the -1/2 power of junction voltage and are defined by the parameters cgs, cgd, | |
945 | and pb. | |
946 | .sp 0.2i | |
947 | .TS | |
948 | center; | |
949 | l l l l l l. | |
950 | area name parameter default example | |
951 | .sp 0.2i | |
952 | 1 vto threshold voltage -2.0 -2.0 | |
953 | 2 * beta transconductance parameter 1.0e-4 1.0e-3 | |
954 | 3 lambda channel length modulation parameter 0 1.0e-4 | |
955 | 4 * rd drain ohmic resistance 0 100 | |
956 | 5 * rs source ohmic resistance 0 100 | |
957 | 6 * cgs zero-bias g-s junction capacitance 0 5pf | |
958 | 7 * cgd zero-bias g-d junction capacitance 0 1pf | |
959 | 8 pb gate junction potential 1 0.6 | |
960 | 9 * is gate junction saturation current 1.0e-14 1.0e-14 | |
961 | 10 kf flicker noise coefficient 0 | |
962 | 11 af flicker noise exponent 1 | |
963 | 12 fc coefficient for forward-bias 0.5 | |
964 | depletion capacitance formula | |
965 | .TE | |
966 | .sp 0.2i | |
967 | .sh 2 "mosfet models (both n and p channel)" | |
968 | .sp 0.2i | |
969 | The dc mosfet equations | |
970 | are determined by the parameters vto, kp, gamma, lambda, and phi. These | |
971 | parameters may be specified by the user, or they will be computed from | |
972 | values specified for nsub, tox, nss, nfs, ngate, tps, uo, ucrit, uexp, and | |
973 | utra. Vto is positive (negative) for enhancement mode and negative | |
974 | (posiive) for depletion mode n-channel (p-channel) devices. Charge storage is | |
975 | modeled by three constant capacitors, cgs, cgd, and cgb, by the nonlinear oxide | |
976 | gate capacitance which is distributed among the gate-source, gate-drain, and | |
977 | bulk regions using the formulation of J.E. Meyer, and by the nonlinear | |
978 | depletion-layer capacitances for both substrate junctions which vary as the -1/2 | |
979 | power of junction voltage and are determined by the parameters cbd, cbs, and | |
980 | pb. | |
981 | .sp 0.2i | |
982 | .TS | |
983 | center; | |
984 | l l l l l l. | |
985 | name parameter default example units | |
986 | .sp 0.2i | |
987 | 1 vto zero-bias threshold voltage 0.0 1.0 v | |
988 | 2 kp intrinsic transconductance parameter 2.417e-5 3.1e-5 a/v**2 | |
989 | 3 gamma bulk threshold parameter 0.0 0.37 v**(1/2) | |
990 | 4 phi surface potential at strong inversion 0.6 0.65 v | |
991 | 5 lambda channel-length modulation parameter 0.0 1.0e-7 meters/v | |
992 | 6 rd drain ohmic resistance 0.0 1.0 ohms | |
993 | 7 rs source ohmic resistance 0.0 1.0 ohms | |
994 | 8 cgs gate-source overlap capacitance | |
995 | per meter channel width 0.0 4.0e-11 f/m | |
996 | 9 cgd gate-drain overlap capacitance | |
997 | per meter channel width 0.0 4.0e-11 f/m | |
998 | 10 cgb gate-bulk overlap capacitance | |
999 | per meter channel length 0.0 2.0e-10 f/m | |
1000 | 11 cbd zero-bias b-d junction capacitance | |
1001 | per sq-meter of junction area 0.0 2.0e-4 f/sq-m | |
1002 | 12 cbs zero-bias b-s junction capacitance | |
1003 | per sq-meter of junction area 0.0 2.0e-4 f/sq-m | |
1004 | 13 tox oxide thickness 1.0e-7 1.0e-7 meters | |
1005 | 14 pb bulk junction potential 0.8 0.87 v | |
1006 | 15 js bulk junction reverse saturation current | |
1007 | per sq-meter of junction area 1.0e-4 1.0e-4 a/sq-m | |
1008 | 16 nsub substrate doping 0.0 4.0e15 /cm**3 | |
1009 | 17 nss surface state density 0.0 1.0e10 /cm**2 | |
1010 | 18 nfs fast surface state density 0.0 1.0e10 /cm**2 | |
1011 | 19 xj metallurgical junction depth 0.0 1.0e-6 meters | |
1012 | 20 ld lateral diffusion (channel length is 0.0 0.8e-6 meters | |
1013 | reduced such that leff=l-2*ld) | |
1014 | 21 wd width reduction (channel width is 0.0 1.0e-6 meters | |
1015 | reduced such that weff=w-2*wd) | |
1016 | 22 ngate polysilicon gate doping al gate 1.0e20 /cm**3 | |
1017 | 23 tps type of polysilicon: +1 opp to sub 1.0 | |
1018 | -1 same as sub | |
1019 | 24 uo surface mobility 700 600 cm**2/v-s | |
1020 | 25 ucrit critical field for mobility 1.0e+4 1.0e+4 v/cm | |
1021 | 26 uexp critical field exponent (mobility) 0.0 0.1 | |
1022 | 27 utra transverse field coefficient (mobility) 0.0 0.3 | |
1023 | 28 kf flicker noise coefficient 0.0 | |
1024 | 29 af flicker noise exponent 1.0 | |
1025 | 30 fc coefficient for forward-bias 0.5 | |
1026 | depletion capacitance formula | |
1027 | .TE | |
1028 | .bp | |
1029 | .sh 1 "SUBCIRCUITS" | |
1030 | .pp | |
1031 | A subcircuit that consists of spice elements can be defined and referenced | |
1032 | in a fashion similar to device models. The subcircuit is defined in the input | |
1033 | deck by a grouping of element cards; the program then automatically inserts | |
1034 | the group of elements wherever the subcircuit is referenced. There is no limit | |
1035 | on the size or complexity of subcircuits, and subcircuits may contain other | |
1036 | subcircuits. An example of subcircuit usage is given in Appendix A. | |
1037 | .sp 0.2i | |
1038 | .sh 2 ".subckt card" | |
1039 | .sp 0.2i | |
1040 | .b "General form:" | |
1041 | .(l | |
1042 | .subckt subnam n1 <n2 n3 ...> | |
1043 | .)l | |
1044 | .b "Examples:" | |
1045 | .(l | |
1046 | .subckt opamp 1 2 3 4 | |
1047 | .)l | |
1048 | .pp | |
1049 | A subcircuit definition is begun with a .subckt card. Subnam is the | |
1050 | subcircuit name, and n1, n2, ... Are the external nodes, which cannot be zero. | |
1051 | The group of element cards which immediately follow the .subckt card define the | |
1052 | subcircuit. The last card in a subcircuit definition is the .ends card (see | |
1053 | below). Control cards may not appear within a subcircuit definition; however, | |
1054 | subcircuit definitions may contain anything else, including other subcircuit | |
1055 | definitions, device models, and subcircuit calls (see below). Note that any | |
1056 | device models or subcircuit definitions included as part of a subcircuit | |
1057 | definition are strictly local (i.e., such models and definitions are not known | |
1058 | outside the subcircuit definition). Also, any element nodes not included on | |
1059 | the .subckt card are strictly local, with the exception of 0 (ground) which is | |
1060 | always global. | |
1061 | .sh 2 ".ends card" | |
1062 | .sp 0.2i | |
1063 | .b "General form:" | |
1064 | .(l | |
1065 | .ends <subnam> | |
1066 | .)l | |
1067 | .b "Examples:" | |
1068 | .(l | |
1069 | .ends opamp | |
1070 | .)l | |
1071 | .pp | |
1072 | This card must be the last one for any subcircuit definition. The sub- | |
1073 | circuit name, if included, indicates which subcircuit definition is being | |
1074 | terminated; if omitted, all subcircuits being defined are terminated. The | |
1075 | name is needed only when nested subcircuit definitions are being made. | |
1076 | .sp 0.2i | |
1077 | .sh 2 "subcircuit calls" | |
1078 | .sp 0.2i | |
1079 | .b "General form:" | |
1080 | .(l | |
1081 | xyyyyyyy n1 <n2 n3 ...> subnam | |
1082 | .)l | |
1083 | .sp 0.2i | |
1084 | .b "Examples:" | |
1085 | .(l | |
1086 | x1 2 4 17 3 1 multi | |
1087 | .)l | |
1088 | .pp | |
1089 | Subcircuits are used in spice by specifying pseudo-elements beginning with | |
1090 | the letter x, followed by the circuit nodes to be used in expanding the sub- | |
1091 | circuit. | |
1092 | .bp | |
1093 | .sh 1 "CONTROL CARDS" | |
1094 | .sp 0.2i | |
1095 | .sh 2 ".temp card" | |
1096 | .sp 0.2i | |
1097 | .b "General form:" | |
1098 | .(l | |
1099 | .temp t1 <t2 <t3 ...>> | |
1100 | .)l | |
1101 | .b "Examples:" | |
1102 | .(l | |
1103 | .temp -55.0 25.0 125.0 | |
1104 | .)l | |
1105 | .pp | |
1106 | This card specifies the temperatures at which the circuit is to be | |
1107 | simulated. T1, t2, ... Are the different temperatures, in degrees c. Temperatu | |
1108 | less than -223.0 deg c are ignored. Model data is specified at tnom degrees | |
1109 | (see the .option card for tnom); if the .temp card is omitted, the simulation | |
1110 | also will be performed at a temperature equal to tnom. | |
1111 | .sp 0.2i | |
1112 | .sh 2 ".width card" | |
1113 | .sp 0.2i | |
1114 | .b "General form:" | |
1115 | .(l | |
1116 | .width in=colnum out=colnum | |
1117 | .)l | |
1118 | .sp 0.2i | |
1119 | .b "Examples:" | |
1120 | .(l | |
1121 | .width in=72 out=133 | |
1122 | .)l | |
1123 | .pp | |
1124 | Colnum is the last column read from each line of input; the setting takes | |
1125 | effect with the next line read. The default value for colnum is 80. | |
1126 | The out parameter specifies the output print width. Permissible values for | |
1127 | the output print width are 80 and 133. | |
1128 | .sp 0.2i | |
1129 | .sh 2 ".options card" | |
1130 | .sp 0.2i | |
1131 | .b "General form:" | |
1132 | .(l | |
1133 | .options opt1 opt2 ... (or opt=optval ...) | |
1134 | .)l | |
1135 | .b "Examples:" | |
1136 | .(l | |
1137 | .options noacct nolist nonode | |
1138 | .)l | |
1139 | .pp | |
1140 | This card allows the user to reset program control and user options for | |
1141 | specific simulation purposes. Any combination of the following options may be | |
1142 | included, in any order. 'x' (below) represents some positive number. | |
1143 | .TS | |
1144 | center; | |
1145 | l l. | |
1146 | option effect | |
1147 | .sp 0.2i | |
1148 | noacct supresses the listing of accounting and run time | |
1149 | statistics. | |
1150 | nolist supresses the summary listing of input data. | |
1151 | nomod suppresses the printout of the model parameters. | |
1152 | nopage suppresses page ejects | |
1153 | nonode supresses the printing of the node table. | |
1154 | opts causes the option values to be printed. | |
1155 | gmin=x resets the value of gmin, the minimum conductance | |
1156 | allowed by the program. The default value is 1.0e-12. | |
1157 | reltol=x resets the relative error tolerance of the program. The | |
1158 | default value is 0.001 (0.1 percent). | |
1159 | abstol=x resets the absolute current error tolerance of the | |
1160 | program. The default value is 1 picoamp. | |
1161 | vntol=x resets the absolute voltage error tolerance of the | |
1162 | program. The default value is 1 microvolt. | |
1163 | trtol=x resets the transient error tolerance. The default value | |
1164 | is 7.0. This parameter is an estimate of the factor by | |
1165 | which spice overestimates the actual truncation error. | |
1166 | chgtol=x resets the charge tolerance of the program. The default | |
1167 | value is 1.0e-14. | |
1168 | numdgt=x resets the number of significant digits printed for | |
1169 | output variable values. X must satisfy the relation | |
1170 | 0 < x < 8. The default value is 4. Note: this option is | |
1171 | independent of the error tolerance used by spice (i.e., if | |
1172 | the values of options reltol, abstol, etc. Are not changed | |
1173 | then one may be printing numerical 'noise' for numdgt > 4. | |
1174 | tnom=x resets the nominal temperature. The default value is | |
1175 | 25 deg c (298 deg k). | |
1176 | itl1=x resets the dc iteration limit. The default is 100. | |
1177 | itl2=x resets the dc transfer curve iteration limit. The | |
1178 | default is 50. | |
1179 | itl3=x resets the lower transient analysis iteration limit. | |
1180 | the default value is 4. | |
1181 | itl4=x resets the transient analysis timepoint iteration limit. | |
1182 | the default is 10. | |
1183 | itl5=x resets the transient analysis total iteration limit. | |
1184 | the default is 5000. Set itl5=0 to omit this test. | |
1185 | cptime=x the maximum cpu-time in seconds allowed for this job. | |
1186 | limtim=x resets the amount of cpu time reserved by spice for | |
1187 | generating plots should a cpu time-limit cause job | |
1188 | termination. The default value is 2 (seconds). | |
1189 | limpts=x resets the total number of points that can be printed | |
1190 | or plotted in a dc, ac, or transient analysis. The | |
1191 | default value is 201. | |
1192 | lvlcod=x if x is 2 (two), then machine code for the matrix | |
1193 | solution will be generated. Otherwise, no machine code is | |
1194 | generated. The default value is 2. Applies only to cdc | |
1195 | computers. | |
1196 | lvltim=x if x is 1 (one), the iteration timestep control is used. | |
1197 | if x is 2 (two), the truncation-error timestep is used. | |
1198 | the default value is 1. If method=Gear and maxord>2 then | |
1199 | lvltim is set to 2 by spice. | |
1200 | method=name sets the numerical integration method used by spice. | |
1201 | Possible names are Gear or trapezoidal. The default is | |
1202 | trapezoidal. | |
1203 | maxord=x sets the maximum order for the integration method if | |
1204 | Gear's variable-order method is used. X must be between | |
1205 | 2 and 6. The default value is 2. | |
1206 | defl=x sets the default value for mos channel length. | |
1207 | defw=x sets the default value for mos channel width. | |
1208 | defad=x sets the default value for mos drain diffusion area. | |
1209 | defas=x sets the default value for mos source diffusion area. | |
1210 | .TE | |
1211 | .sp 0.2i | |
1212 | .sh 2 ".op card" | |
1213 | .sp 0.2i | |
1214 | .b "General form:" | |
1215 | .(l | |
1216 | .op | |
1217 | .)l | |
1218 | .sp 0.2i | |
1219 | .pp | |
1220 | The inclusion of this card in an input deck will force spice to determine | |
1221 | the dc operating point of the circuit with inductors shorted and capacitors | |
1222 | opened. Note: a dc analysis is automatically performed prior to a transient | |
1223 | analysis to determine the transient initial conditions, and prior to an ac | |
1224 | small-signal analysis to determine the linearized, small-signal models for | |
1225 | nonlinear devices. | |
1226 | .pp | |
1227 | Spice performs a dc operating point analysis if no other analyses are | |
1228 | requested. | |
1229 | .sp 0.2i | |
1230 | .sh 2 ".dc card" | |
1231 | .sp 0.2i | |
1232 | .b "General form:" | |
1233 | .(l | |
1234 | .dc srcnam vstart vstop vincr [src2 start2 stop2 incr2] | |
1235 | .)l | |
1236 | .sp 0.2i | |
1237 | .b "Examples:" | |
1238 | .(l | |
1239 | .dc vin 0.25 5.0 0.25 | |
1240 | .dc vds 0 10 .5 vgs 0 5 1 | |
1241 | .dc vce 0 10 .25 ib 0 10u 1u | |
1242 | .)l | |
1243 | .pp | |
1244 | This card defines the dc transfer curve source and sweep limits. Srcnam | |
1245 | is the name of an independent voltage or current source. Vstart, vstop, and | |
1246 | vincr are the starting, final, and incrementing values respectively. The first | |
1247 | example will cause the value of the voltage source vin to be swept from 0.25 | |
1248 | volts to 5.0 volts in increments of 0.25 volts. A second source (src2) may | |
1249 | optionally be specified with associated sweep parameters. In this case, | |
1250 | the first source will be swept over its range for each value of the second | |
1251 | source. This option can be useful for obtaining semiconductor device output | |
1252 | characteristics. See the second example data deck in that section of the guide. | |
1253 | .sp 0.2i | |
1254 | .bp | |
1255 | .sh 2 ".nodeset card" | |
1256 | .sp 0.2i | |
1257 | .b "General form:" | |
1258 | .(l | |
1259 | .nodeset v(nodnum)=val v(nodnum)=val ... | |
1260 | .)l | |
1261 | .b "Examples:" | |
1262 | .(l | |
1263 | .nodeset v(12)=4.5 v(4)=2.23 | |
1264 | .)l | |
1265 | .pp | |
1266 | This card helps the program find the dc solution by making a preliminary | |
1267 | pass with the specified nodes held to the given voltages. The restriction | |
1268 | is then released and the iteration continues to the true solution. | |
1269 | The .nodeset card may be necessary for convergence on bistable or astable | |
1270 | circuits. In general, this card should not be necessary. | |
1271 | .sp 0.2i | |
1272 | .sh 2 ".ic card" | |
1273 | .sp 0.2i | |
1274 | .b "General form:" | |
1275 | .(l | |
1276 | .ic v(nodnum)=val v(nodnum)=val ... | |
1277 | .)l | |
1278 | .b "Examples:" | |
1279 | .(l | |
1280 | .ic v(11)=5 v(4)=-5 v(2)=2.2 | |
1281 | .)l | |
1282 | .pp | |
1283 | This card is for setting transient initial conditions. It has two | |
1284 | different interpretations, depending on whether the 'uic' parameter is | |
1285 | specified on the '.tran' card. Also, one should not confuse this card with | |
1286 | the '.nodeset' card. The '.nodeset' card is only to help dc convergence, | |
1287 | and does not affect final bias solution (except for multi-stable circuits). | |
1288 | The two interpretations of this card are as follows: | |
1289 | .sp 0.2i | |
1290 | 1. When the 'uic' parameter is specified on the '.tran' card, then | |
1291 | .pp | |
1292 | The node voltages specified on the '.ic' card are used to compute | |
1293 | .pp | |
1294 | The capacitor, diode, bjt, jfet, and mosfet initial conditions. | |
1295 | .pp | |
1296 | This is equivalent to specifying the 'ic=...' parameter on each | |
1297 | .pp | |
1298 | Device card, but is much more convenient. The 'ic=...' parameter | |
1299 | .pp | |
1300 | Can still be specified and will take precedence over the '.ic' | |
1301 | .pp | |
1302 | Values. Since no dc bias solution is computed before the transient | |
1303 | .pp | |
1304 | Analysis, one should take care to specify all dc source voltages | |
1305 | .pp | |
1306 | On the '.ic' card if they are to be used to compute device initial | |
1307 | .pp | |
1308 | Conditions. | |
1309 | .sp 0.2i | |
1310 | 2. When the 'uic' parameter is not specified on the '.tran' card, | |
1311 | .pp | |
1312 | The a dc bias solution will be computed before the transient analysis. | |
1313 | .pp | |
1314 | In this case, the node voltages specified on the '.ic' card will | |
1315 | .pp | |
1316 | Be forced to the desired initial values during the bias solution. | |
1317 | .pp | |
1318 | During transient analysis, the constraint on these node voltages | |
1319 | is removed. | |
1320 | .sp 0.2i | |
1321 | .sh 2 ".tf card" | |
1322 | .sp 0.2i | |
1323 | .b "General form:" | |
1324 | .(l | |
1325 | .tf outvar insrc | |
1326 | .)l | |
1327 | .b "Examples:" | |
1328 | .(l | |
1329 | .tf v(5,3) vin | |
1330 | .tf i(vload) vin | |
1331 | .)l | |
1332 | .pp | |
1333 | This card defines the small-signal output and input for the dc small- | |
1334 | signal analysis. Outvar is the small-signal output variable and insrc is the | |
1335 | small-signal input source. If this card is included, spice will compute the | |
1336 | dc small-signal value of the transfer function (outputinput), input | |
1337 | resistance, and output resistance. For the first example, spice would compute t | |
1338 | ratio of v(5,3) to vin, the small-signal input resistance at vin, and the | |
1339 | small-signal output resistance measured across nodes 5 and 3. | |
1340 | .sp 0.2i | |
1341 | .sh 2 ".sens card" | |
1342 | .sp 0.2i | |
1343 | .b "General form:" | |
1344 | .(l | |
1345 | .sens ov1 <ov2 ... > | |
1346 | .)l | |
1347 | .b "Examples:" | |
1348 | .(l | |
1349 | .sens v(9) v(4,3) v(17) i(vcc) | |
1350 | .)l | |
1351 | .pp | |
1352 | If a .sens card is included in the input deck, spice will determine the | |
1353 | dc small-signal sensitivities of each specified output variable with respect to | |
1354 | every circuit parameter. Note: for large circuits, large amounts of output | |
1355 | can be generated. | |
1356 | .sp 0.2i | |
1357 | .sh 2 ".ac card" | |
1358 | .sp 0.2i | |
1359 | .b "General form:" | |
1360 | .(l | |
1361 | .ac dec nd fstart fstop | |
1362 | .ac oct no fstart fstop | |
1363 | .ac lin np fstart fstop | |
1364 | .)l | |
1365 | .b "Examples:" | |
1366 | .(l | |
1367 | .ac dec 10 1 10k | |
1368 | .ac dec 10 1k 100meg | |
1369 | .ac lin 100 1 100hz | |
1370 | .)l | |
1371 | .sp 0.2i | |
1372 | .pp | |
1373 | Dec stands for decade variation, and nd is the number of points per | |
1374 | decade. Oct stands for octave variation, and no is the number of points per | |
1375 | octave. Lin stands for linear variation, and np is the number of points. | |
1376 | Fstart is the starting frequency, and fstop is the final frequency. If this | |
1377 | card is included in the deck, spice will perform an ac analysis of the circuit | |
1378 | over the specified frequency range. Note that in order for this analysis to be | |
1379 | meaningful, at least one independent source must have been specified with an ac | |
1380 | value. | |
1381 | .sp 0.2i | |
1382 | .sh 2 ".disto card" | |
1383 | .sp 0.2i | |
1384 | .b "General form:" | |
1385 | .(l | |
1386 | .disto rload <inter <skw2 <refpwr <spw2>>>> | |
1387 | .)l | |
1388 | .b "Examples:" | |
1389 | .(l | |
1390 | .disto rl 2 0.95 1.0e-3 0.75 | |
1391 | .)l | |
1392 | .pp | |
1393 | This card controls whether spice will compute the distortion characteristic | |
1394 | of the circuit in a small-signal mode as a part of the ac small-signal | |
1395 | sinusoidal steady-state analysis. The analysis is performed assuming that | |
1396 | one or two signal frequencies are imposed at the input; let the two frequencies | |
1397 | be f1 (the nominal analysis frequency) and f2 (=skw2*f1). The program | |
1398 | then computes the following distortion measures: | |
1399 | .sp 0.2i | |
1400 | hd2 - the magnitude of the frequency component 2*f1 assuming that f2 | |
1401 | is not present. | |
1402 | hd3 - the magnitude of the frequency component 3*f1 assuming that f2 | |
1403 | is not present. | |
1404 | sim2 - the magnitude of the frequency component f1 + f2. | |
1405 | dim2 - the magnitude of the frequency component f1 - f2. | |
1406 | dim3 - the magnitude of the frequency component 2*f1 - f2. | |
1407 | .pp | |
1408 | Rload is the name of the output load resistor into which all distortion | |
1409 | power products are to be computed. Inter is the interval at which the summary | |
1410 | printout of the contributions of all nonlinear devices to the total distortion | |
1411 | is to be printed. If omitted or set to zero, no summary printout will be made. | |
1412 | Refpwr is the reference power level used in computing the distortion products. | |
1413 | if omitted, a value of 1 mw (that is, dbm) is used. Skw2 is the ratio of f2 to | |
1414 | f1. If omitted, a value of 0.9 is used (i.e., f2 = 0.9*f1). Spw2 is the | |
1415 | amplitude of f2. If omitted, a value of 1.0 is assumed. | |
1416 | .pp | |
1417 | The distortion measures hd2, hd3, sim2, dim2, and dim3 may also be be | |
1418 | printed and/or plotted (see the description of the .print and .plot cards). | |
1419 | .sp 0.2i | |
1420 | .sh 2 ".noise card" | |
1421 | .sp 0.2i | |
1422 | .b "General form:" | |
1423 | .(l | |
1424 | .noise outv insrc nums | |
1425 | .)l | |
1426 | .b "Examples:" | |
1427 | .(l | |
1428 | .noise v(5) vin 10 | |
1429 | .)l | |
1430 | .pp | |
1431 | This card controls the noise analysis of the circuit. The noise analysis | |
1432 | is performed in conjunction with the ac analysis (see .ac card). Outv is an | |
1433 | output voltage which defines the summing point. Insrc is the name of the | |
1434 | independent voltage or current source which is the noise input reference. Nums | |
1435 | is the summary interval. Spice will compute the equivalent output noise at | |
1436 | the specified output as well as the equivalent input noise at the specified | |
1437 | input. In addition, the contributions of every noise generator in the circuit | |
1438 | will be printed at every nums frequency points (the summary interval). If nums | |
1439 | is zero, no summary printout will be made. | |
1440 | .pp | |
1441 | The output noise and the equivalent input noise may also be printed and/or | |
1442 | plotted (see the description of the .print and .plot cards). | |
1443 | .sp 0.2i | |
1444 | .sh 2 ".tran card" | |
1445 | .sp 0.2i | |
1446 | .b "General form:" | |
1447 | .(l | |
1448 | .tran tstep tstop <tstart <tmax>> <uic> | |
1449 | .)l | |
1450 | .b "Examples:" | |
1451 | .(l | |
1452 | .tran 1ns 100ns | |
1453 | .tran 1ns 1000ns 500ns | |
1454 | .tran 10ns 1us uic | |
1455 | .)l | |
1456 | .pp | |
1457 | Tstep is the printing or plotting increment for line-printer output. | |
1458 | For use with the post-processor, tstep is the suggested computing increment. | |
1459 | tstop is the final time, and tstart is | |
1460 | the initial time. If tstart is omitted, it is assumed to be zero. The | |
1461 | transient analysis always begins at time zero. In the interval <zero, tstart>, | |
1462 | the circuit is analyzed (to reach a steady state), but no outputs are stored. | |
1463 | In the interval <tstart, tstop>, the circuit is analyzed and outputs are | |
1464 | stored. Tmax is the maximum stepsize that spice will use (for default, the | |
1465 | program chooses either tstep or (tstop-tstart)/50.0, whichever is smaller. | |
1466 | Tmax is useful when one wishes too guarantee a computing interval which is | |
1467 | smaller than the printer increment, tstep. | |
1468 | .pp | |
1469 | Uic (use initial conditions) is an optional keyword which indicates that | |
1470 | the user does not want spice to solve for the quiescent operating point before | |
1471 | beginning the transient analysis. If this keyword is specified, spice uses the | |
1472 | values specified using ic=... On the various elements as the initial transient | |
1473 | condition and proceeds with the analysis. If the .ic card has been specified, | |
1474 | then the node voltages on the .ic card are used compute the intitial conditions | |
1475 | for the devices. Look at the description on the .ic card for its | |
1476 | interpretation when 'uic' is not specified. | |
1477 | .sp 0.2i | |
1478 | .sh 2 ".four card" | |
1479 | .sp 0.2i | |
1480 | .b "General form:" | |
1481 | .(l | |
1482 | .four freq ov1 <ov2 ov3 ...> | |
1483 | .)l | |
1484 | .b "Examples:" | |
1485 | .(l | |
1486 | .four 100k v(5) | |
1487 | .)l | |
1488 | .pp | |
1489 | This card controls whether spice performs a fourier analysis as a part of | |
1490 | the transient analysis. Freq is the fundamental frequency, and ov1, ..., are | |
1491 | the output variables for which the analysis is desired. The fourier analysis | |
1492 | is performed over the interval <tstop-period, tstop>, where tstop is the final | |
1493 | time specified for the transient analysis, and period is one period of the | |
1494 | fundamental frequency. The dc component and the first nine components are | |
1495 | determined. For maximum accuracy, tmax (see the .tran card) should be set to | |
1496 | period/100.0 (or less for very high-q circuits). | |
1497 | .sp 0.2i | |
1498 | .sh 2 ".print cards" | |
1499 | .sp 0.2i | |
1500 | .b "General form:" | |
1501 | .(l | |
1502 | .print prtype ov1 <ov2 ... Ov8> | |
1503 | .)l | |
1504 | .b "Examples:" | |
1505 | .(l | |
1506 | .print tran v(4) i(vin) | |
1507 | .print ac vm(4,2) vr(7) vp(8,3) | |
1508 | .print dc v(2) i(vsrc) v(23,17) | |
1509 | .print noise inoise | |
1510 | .print disto hd3 sim2(db) | |
1511 | .)l | |
1512 | .pp | |
1513 | This card defines the contents of a tabular listing of one to eight output | |
1514 | variables. Prtype is the type of the analysis (dc, ac, tran, noise, or | |
1515 | distortion) for which the specified outputs are desired. The form for voltage o | |
1516 | current output variables is as follows: | |
1517 | .sp 0.2i | |
1518 | .ip v(n1<,n2>) 10 | |
1519 | specifies the voltage difference between nodes n1 | |
1520 | and n2. If n2 (and the preceding comma) is omitted, | |
1521 | ground (0) is assumed. For the ac analysis, five | |
1522 | additional outputs can be accessed by replacing the | |
1523 | letter v by: | |
1524 | .sp 0.2i | |
1525 | vr - real part | |
1526 | vi - imaginary part | |
1527 | vm - magnitude | |
1528 | vp - phase | |
1529 | vdb - 20*log10(magnitude) | |
1530 | .sp 0.2i | |
1531 | .ip i(vxxxxxxx) 10 | |
1532 | specifies the current flowing in the independent | |
1533 | voltage source named vxxxxxxx. Positive current | |
1534 | flows from the positive node, through the source, to | |
1535 | the negative node. For the ac analysis, the | |
1536 | corresponding replacements for the letter i may be | |
1537 | made in the same way as described for voltage outputs. | |
1538 | .sp 0.2i | |
1539 | .pp | |
1540 | Output variables for the noise and distortion analyses have a different | |
1541 | general form | |
1542 | form from that of the other analyses. The is | |
1543 | .(l | |
1544 | ov<(x)> | |
1545 | .)l | |
1546 | where ov is any of onoise (output noise), inoise (equivalent input noise), | |
1547 | hd2, hd3, sim2, dim2, or dim3 (see description of distortion analysis), and x | |
1548 | may be any of: | |
1549 | .(l | |
1550 | r - real part | |
1551 | i - imaginary part | |
1552 | m - magnitude (default if nothing specified) | |
1553 | p - phase | |
1554 | db - 20*log10(magnitude) | |
1555 | .)l | |
1556 | thus, sim2 (or sim2(m)) describes the magnitude of the sim2 distortion measure, | |
1557 | while hd2(r) describes the real part of the hd2 distortion measure. | |
1558 | .pp | |
1559 | There is no limit on the number of .print cards for each type of | |
1560 | analysis. | |
1561 | .sp 0.2i | |
1562 | .sh 2 ".plot cards" | |
1563 | .sp 0.2i | |
1564 | .b "General form:" | |
1565 | .(l | |
1566 | .plot pltype ov1 <(plo1,phi1)> <ov2 <(plo2,phi2)> ... Ov8> | |
1567 | .)l | |
1568 | .b "Examples:" | |
1569 | .(l | |
1570 | .plot dc v(4) v(5) v(1) | |
1571 | .plot tran v(17,5) (2,5) i(vin) v(17) (1,9) | |
1572 | .plot ac vm(5) vm(31,24) vdb(5) vp(5) | |
1573 | .plot disto hd2 hd3(r) sim2 | |
1574 | .plot tran v(5,3) v(4) (0,5) v(7) (0,10) | |
1575 | .)l | |
1576 | .pp | |
1577 | This card defines the contents of one plot of from one to eight output | |
1578 | variables. Pltype is the type of analysis (dc, ac, tran, noise, or distortion) | |
1579 | for which the specified outputs are desired. The syntax for the ovi is | |
1580 | identical to that for the .print card, described above. | |
1581 | .pp | |
1582 | The optional plot limits (plo,phi) may be specified after any of the | |
1583 | output variables. All output variables to the left of a pair of plot limits | |
1584 | (plo,phi) will be plotted using the same lower and upper plot bounds. If plot | |
1585 | limits are not specified, spice will automatically determine the minimum and | |
1586 | maximum values of all output variables being plotted and scale the plot to fit. | |
1587 | More than one scale will be used if the output variable values warrant (i.e., | |
1588 | mixing output variables with values which are orders-of-magnitude different | |
1589 | still gives readable plots). | |
1590 | .pp | |
1591 | The overlap of two or more traces on any plot is indicated by the letter | |
1592 | x. | |
1593 | .pp | |
1594 | When more than one output variable appears on the same plot, the | |
1595 | first variable specified will be printed as well as plotted. If a printout | |
1596 | of all variables is desired, then a companion .print card should be included. | |
1597 | .pp | |
1598 | There is no limit on the number of .plot cards specified for each | |
1599 | type of analysis. | |
1600 | .bp | |
1601 | .sh 1 "APPENDIX A: EXAMPLE DATA DECKS" | |
1602 | .sp 0.2i | |
1603 | .sh 2 "circuit 1" | |
1604 | .pp | |
1605 | The following deck determines the dc operating point and small-signal | |
1606 | transfer function of a simple differential pair. In addition, the ac | |
1607 | small-signal response is computed over the frequency range 1hz to 100meghz. | |
1608 | .(l | |
1609 | Simple differential pair | |
1610 | Vcc 7 0 12 | |
1611 | Vee 8 0 -12 | |
1612 | Vin 1 0 ac 1 | |
1613 | Rs1 1 2 1k | |
1614 | Rs2 6 0 1k | |
1615 | Q1 3 2 4 mod1 | |
1616 | Q2 5 6 4 mod1 | |
1617 | Rc1 7 3 10k | |
1618 | Rc2 7 5 10k | |
1619 | Re 4 8 10k | |
1620 | .model mod1 npn bf=50 vbf=50 js=1.e-12 rb=100 cjc .5pf tf .6ns | |
1621 | .tf v(5) vin | |
1622 | .ac dec 10 1 100meg | |
1623 | .plot ac vm(5) vp(5) | |
1624 | .print ac vm(5) vp(5) | |
1625 | .end | |
1626 | .)l | |
1627 | .sp 0.2i | |
1628 | .sh 2 "circuit 2" | |
1629 | .sp 0.2i | |
1630 | The following deck computes the output characteristics of a mosfet | |
1631 | device over the range 0-10v for vds and 0-5v for vgs. | |
1632 | .sp 0.2i | |
1633 | .(l | |
1634 | Mos output characteristics | |
1635 | .option nonode nopage | |
1636 | Vds 3 0 | |
1637 | Vgs 2 0 | |
1638 | M1 1 2 0 0 mod1 l=4u w=6u ad=10p as=10p | |
1639 | .model mod1 nmos vto=-2 nsub=1.0e15 uo=550 | |
1640 | * vids measures id, we could have used vds, but id would be negative | |
1641 | Vids 3 1 | |
1642 | .dc vds 0 10 .5 vgs 0 5 1 | |
1643 | .print dc i(vids) v(2) | |
1644 | .plot dc i(vids) | |
1645 | .end | |
1646 | .)l | |
1647 | .sp 0.2i | |
1648 | .sh 2 "circuit 3" | |
1649 | .sp 0.2i | |
1650 | .pp | |
1651 | The following deck determines the dc transfer curve and the transient | |
1652 | pulse response of a simple rtl inverter. The input is a pulse from 0 to 5 | |
1653 | volts with delay, rise, and fall times of 2ns and a pulse width of 30ns. The | |
1654 | transient interval is 0 to 100ns, with printing to be done every nanosecond. | |
1655 | .sp 0.2i | |
1656 | .(l | |
1657 | Simple rtl inverter | |
1658 | Vcc 4 0 5 | |
1659 | Vin 1 0 pulse 0 5 2ns 2ns 2ns 30ns | |
1660 | Rb 1 2 10k | |
1661 | Q1 3 2 0 q1 | |
1662 | Rc 3 4 1k | |
1663 | .plot dc v(3) | |
1664 | .plot tran v(3) (0,5) | |
1665 | .print tran v(3) | |
1666 | .model q1 npn bf 20 rb 100 tf .1ns cjc 2pf | |
1667 | .dc vin 0 5 0.1 | |
1668 | .tran 1ns 100ns | |
1669 | .end | |
1670 | .)l | |
1671 | .sp 0.2i | |
1672 | .sh 2 "circuit 4" | |
1673 | .pp | |
1674 | The following deck simulates a four-bit binary adder, using several sub- | |
1675 | circuits to describe various pieces of the overall circuit. | |
1676 | .sp 0.2i | |
1677 | .(l | |
1678 | Adder - 4 bit all-nand-gate binary adder | |
1679 | .sp 0.2i | |
1680 | *** subcircuit definitions | |
1681 | .sp 0.2i | |
1682 | .subckt nand 1 2 3 4 | |
1683 | * nodes: input(2), output, vcc | |
1684 | Q1 9 5 1 qmod | |
1685 | D1clamp 0 1 dmod | |
1686 | Q2 9 5 2 qmod | |
1687 | D2clamp 0 2 dmod | |
1688 | Rb 4 5 4k | |
1689 | R1 4 6 1.6k | |
1690 | Q3 6 9 8 qmod | |
1691 | R2 8 0 1k | |
1692 | Rc 4 7 130 | |
1693 | Q4 7 6 10 qmod | |
1694 | Dvbedrop 10 3 dmod | |
1695 | Q5 3 8 0 qmod | |
1696 | .ends nand | |
1697 | .subckt onebit 1 2 3 4 5 6 | |
1698 | * nodes: input(2), carry-in, output, carry-out, vcc | |
1699 | X1 1 2 7 6 nand | |
1700 | X2 1 7 8 6 nand | |
1701 | X3 2 7 9 6 nand | |
1702 | X4 8 9 10 6 nand | |
1703 | X5 3 10 11 6 nand | |
1704 | X6 3 11 12 6 nand | |
1705 | X7 10 11 13 6 nand | |
1706 | X8 12 13 4 6 nand | |
1707 | X9 11 7 5 6 nand | |
1708 | .ends onebit | |
1709 | .subckt twobit 1 2 3 4 5 6 7 8 9 | |
1710 | * nodes: input - bit0(2) / bit1(2), output - bit0 / bit1, | |
1711 | * carry-in, carry-out, vcc | |
1712 | X1 1 2 7 5 10 9 onebit | |
1713 | X2 3 4 10 6 8 9 onebit | |
1714 | .ends twobit | |
1715 | .sp 0.2i | |
1716 | .subckt fourbit 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
1717 | * nodes: input - bit0(2) / bit1(2) / bit2(2) / bit3(2), | |
1718 | * output - bit0 / bit1 / bit2 / bit3, carry-in, carry-out, vcc | |
1719 | X1 1 2 3 4 9 10 13 16 15 twobit | |
1720 | X2 5 6 7 8 11 12 16 14 15 twobit | |
1721 | .ends fourbit | |
1722 | .sp 0.2i | |
1723 | *** define nominal circuit | |
1724 | .sp 0.2i | |
1725 | .model dmod d | |
1726 | .model qmod npn(bf=75 rb=100 cje=1pf cjc=3pf) | |
1727 | Vcc 99 0 dc 5v | |
1728 | Vin1a 1 0 pulse(0 3 0 10ns 10ns 10ns 50ns) | |
1729 | .sp 0.2i | |
1730 | .sp 0.2i | |
1731 | Vin1b 2 0 pulse(0 3 0 10ns 10ns 20ns 100ns) | |
1732 | Vin2a 3 0 pulse(0 3 0 10ns 10ns 40ns 200ns) | |
1733 | Vin2b 4 0 pulse(0 3 0 10ns 10ns 80ns 400ns) | |
1734 | Vin3a 5 0 pulse(0 3 0 10ns 10ns 160ns 800ns) | |
1735 | Vin3b 6 0 pulse(0 3 0 10ns 10ns 320ns 1600ns) | |
1736 | Vin4a 7 0 pulse(0 3 0 10ns 10ns 640ns 3200ns) | |
1737 | Vin4b 8 0 pulse(0 3 0 10ns 10ns 1280ns 6400ns) | |
1738 | X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 fourbit | |
1739 | Rbit0 9 0 1k | |
1740 | Rbit1 10 0 1k | |
1741 | Rbit2 11 0 1k | |
1742 | Rbit3 12 0 1k | |
1743 | Rcout 13 0 1k | |
1744 | .plot tran v(1) v(2) v(3) v(4) v(5) v(6) v(7) v(8) | |
1745 | .plot tran v(9) v(10) v(11) v(12) v(13) | |
1746 | .print tran v(1) v(2) v(3) v(4) v(5) v(6) v(7) v(8) | |
1747 | .print tran v(9) v(10) v(11) v(12) v(13) | |
1748 | .sp 0.2i | |
1749 | .tran 1ns 6400ns | |
1750 | *** (for those with money (and memory) to burn) | |
1751 | .sp 0.2i | |
1752 | .opt acct list node limpts=6401 | |
1753 | .end | |
1754 | .)l | |
1755 | .sp 0.2i | |
1756 | .sh 2 "circuit 5" | |
1757 | .pp | |
1758 | The following deck simulates a transmission-line inverter. Two | |
1759 | transmission-line elements are required since two propagation modes are excited. | |
1760 | In the case of a coaxial line, the first line (t1) models the inner conductor wi | |
1761 | respect to the shield, and the second line (t2) models the shield with respect | |
1762 | to the outside world. | |
1763 | .sp 0.2i | |
1764 | .(l | |
1765 | Transmission-line inverter | |
1766 | V1 1 0 pulse(0 1 0 0.1n) | |
1767 | R1 1 2 50 | |
1768 | X1 2 0 0 4 tline | |
1769 | R2 4 0 50 | |
1770 | .subckt tline 1 2 3 4 | |
1771 | T1 1 2 3 4 z0=50 td=1.5ns | |
1772 | T2 2 0 4 0 z0=100 td=1ns | |
1773 | .ends tline | |
1774 | .tran 0.1ns 20ns | |
1775 | .plot tran v(2) v(4) | |
1776 | .end | |
1777 | .)l | |
1778 | .bp | |
1779 | .sh 1 "APPENDIX B: NONLINEAR DEPENDENT SOURCES" | |
1780 | .pp | |
1781 | Spice allows circuits to contain dependent sources characterized by any of | |
1782 | the four equations | |
1783 | .sp 0.2i | |
1784 | i=f(v) v=f(v) i=f(i) v=f(i) | |
1785 | .sp 0.2i | |
1786 | where the functions must be polynomials, and the arguments may be | |
1787 | multidimensional. The polynomial functions are specified by a set of coefficien | |
1788 | p0, p1, ..., pn. Both the number of dimensions and the number of coefficients | |
1789 | are arbitrary. The meaning of the coefficients depends upon the dimension of | |
1790 | the polynomial, as shown in the following examples: | |
1791 | .pp | |
1792 | Suppose that the function is one-dimensional (that is, a function of one | |
1793 | argument). Then the function value fv is determined by the following | |
1794 | expression in fa (the function argument): | |
1795 | .sp 0.2i | |
1796 | fv = p0 + (p1*fa) + (p2*fa**2) + (p3*fa**3) + (p4*fa**4) | |
1797 | .sp 0.2i | |
1798 | + (p5*fa**5) + ... | |
1799 | .pp | |
1800 | Suppose now that the function is two-dimensional, with arguments fa and | |
1801 | fb. Then the function value fv is determined by the following expression: | |
1802 | .sp 0.2i | |
1803 | fv = p0 + (p1*fa) + (p2*fb) + (p3*fa**2) + (p4*fa*fb) + (p5*fb**2) | |
1804 | .sp 0.2i | |
1805 | + (p6*fa**3) + (p7*fa**2*fb) + (p8*fa*fb**2) + (p9*fb**3) + ... | |
1806 | .pp | |
1807 | Consider now the case of a three-dimensional polynomial function with | |
1808 | arguments fa, fb, and fc. Then the function value fv is determined by the | |
1809 | following expression: | |
1810 | .sp 0.2i | |
1811 | fv = p0 + (p1*fa) + (p2*fb) + (p3*fc) + (p4*fa**2) + (p5*fa*fb) | |
1812 | .sp 0.2i | |
1813 | + (p6*fa*fc) + (p7*fb**2) + (p8*fb*fc) + (p9*fc**2) + (p10*fa**3) | |
1814 | .sp 0.2i | |
1815 | + (p11*fa**2*fb) + (p12*fa**2*fc) + (p13*fa*fb**2) | |
1816 | .sp 0.2i | |
1817 | + (p14*fa*fb*fc) | |
1818 | .sp 0.2i | |
1819 | + (p15*fa*fc**2) + (p16*fb**3) + (p17*fb**2*fc) + (p18*fb*fc**2) | |
1820 | .sp 0.2i | |
1821 | + (p19*fc**3) + (p20*fa**4) + ... | |
1822 | .pp | |
1823 | Note: if the polynomial is one-dimensional and exactly one coefficient is | |
1824 | specified, then spice assumes it to be p1 (and p0 = 0.0), in order to | |
1825 | facilitate the input of linear controlled sources. | |
1826 | .pp | |
1827 | For all four of the dependent sources described below, the initial | |
1828 | condition parameter is described as optional. If not specified, spice assumes 0 | |
1829 | the initial condition for dependent sources is an initial 'guess' for the value | |
1830 | of the controlling variable. The program uses this initial condition to obtain | |
1831 | the dc operating point of the circuit. After convergence has been obtained, | |
1832 | the program continues iterating to obtain the exact value for the controlling | |
1833 | variable. Hence, to reduce the computational effort for the dc operating | |
1834 | point (or if the polynomial specifies a strong nonlinearity), a value fairly | |
1835 | close to the actual controlling variable should be specified for the initial | |
1836 | condition. | |
1837 | .sh 2 "voltage-controlled current sources" | |
1838 | .sp 0.2i | |
1839 | .b "General form:" | |
1840 | .(l | |
1841 | gxxxxxxx n+ n- <poly(nd)> nc1+ nc1- ... P0 <p1 ...> <ic=...> | |
1842 | .)l | |
1843 | .sp 0.2i | |
1844 | Examples: g1 1 0 5 3 0 0.1mmho | |
1845 | gr 17 3 17 3 0 1m 1.5m ic=2v | |
1846 | gmlt 23 17 poly(2) 3 5 1 2 0 1m 17m 3.5u ic=2.5, 1.3 | |
1847 | .pp | |
1848 | N+ and n- are the positive and negative nodes, respectively. Current flow | |
1849 | is from the positive node, through the source, to the negative node. Poly(nd) | |
1850 | only has to be specified if the source is multi-dimensional (one-dimensional is | |
1851 | the default). If specified, nd is the number of dimensions, which must be | |
1852 | positive. Nc1+, nc1-, ... Are the positive and negative controlling nodes, | |
1853 | respectively. One pair of nodes must be specified for each dimension. P0, p1, | |
1854 | p2, ..., pn are the polynomial coefficients. The (optional) initial condition | |
1855 | is the initial guess at the value(s) of the controlling voltage(s). If not | |
1856 | specified, 0.0 is assumed. The polynomial specifies the source current as a | |
1857 | function of the controlling voltage(s). The second example above describes a | |
1858 | current source with value | |
1859 | .sp 0.2i | |
1860 | i = 1e-3*v(17,3) + 1.5e-3*v(17,3)**2 | |
1861 | .sp 0.2i | |
1862 | note that since the source nodes are the same as the controlling nodes, this | |
1863 | source actually models a nonlinear resistor. | |
1864 | .sp 0.2i | |
1865 | .sp 0.2i | |
1866 | .sp 0.2i | |
1867 | .sp 0.2i | |
1868 | .sp 0.2i | |
1869 | .sh 2 "voltage-controlled voltage sources" | |
1870 | .sp 0.2i | |
1871 | .b "General form:" | |
1872 | .(l | |
1873 | exxxxxxx n+ n- <poly(nd)> nc1+ nc1- ... P0 <p1 ...> <ic=...> | |
1874 | .)l | |
1875 | .sp 0.2i | |
1876 | Examples: e1 3 4 21 17 10.5 2.1 1.75 | |
1877 | ex 17 0 poly(3) 13 0 15 0 17 0 0 1 1 1 ic=1.5,2.0,17.35 | |
1878 | .pp | |
1879 | N+ and n- are the positive and negative nodes, respectively. Poly(nd) | |
1880 | only has to be specified if the source is multi-dimensional (one-dimensional is | |
1881 | the default). If specified, nd is the number of dimensions, which must be | |
1882 | positive. Nc1+, nc1-, ... Are the positive and negative controlling nodes, | |
1883 | respectively. One pair of nodes must be specified for each dimension. P0, p1, | |
1884 | p2, ..., pn are the polynomial coefficients. The (optional) initial condition | |
1885 | is the initial guess at the value(s) of the controlling voltage(s). If not | |
1886 | specified, 0.0 is assumed. The polynomial specifies the source voltage as a | |
1887 | function of the controlling voltage(s). The second example above describes a | |
1888 | voltage source with value | |
1889 | .sp 0.2i | |
1890 | v = v(13,0) + v(15,0) + v(17,0) | |
1891 | .sp 0.2i | |
1892 | (in other words, an ideal voltage summer). | |
1893 | .sh 2 "current-controlled current sources" | |
1894 | .sp 0.2i | |
1895 | .b "General form:" | |
1896 | .(l | |
1897 | fxxxxxxx n+ n- <poly(nd)> vn1 <vn2 ...> p0 <p1 ...> <ic=...> | |
1898 | .)l | |
1899 | .sp 0.2i | |
1900 | Examples: f1 12 10 vcc 1ma 1.3m | |
1901 | fxfer 13 20 vsens 0 1 | |
1902 | .pp | |
1903 | N+ and n- are the positive and negative nodes, respectively. Current flow | |
1904 | is from the positive node, through the source, to the negative node. Poly(nd) | |
1905 | only has to be specified if the source is multi-dimensional (one-dimensional is | |
1906 | the default). If specified, nd is the number of dimensions, which must be | |
1907 | positive. Vn1, vn2, ... Are the names of voltage sources through which the | |
1908 | controlling current flows; one name must be specified for each dimension. The | |
1909 | direction of positive controlling current flow is from the positive node, | |
1910 | through the source, to the negative node of each voltage source. P0, p1, | |
1911 | p2, ..., pn are the polynomial coefficients. The (optional) initial condition | |
1912 | is the initial guess at the value(s) of the controlling current(s) (in amps). | |
1913 | If not specified, 0.0 is assumed. The polynomial specifies the source current | |
1914 | as a function of the controlling current(s). The first example above describes | |
1915 | a current source with value | |
1916 | .sp 0.2i | |
1917 | i = 1e-3 + 1.3e-3*i(vcc) | |
1918 | .sp 0.2i | |
1919 | .sp 0.2i | |
1920 | .sp 0.2i | |
1921 | .sp 0.2i | |
1922 | .sp 0.2i | |
1923 | .sh 2 "current-controlled voltage sources" | |
1924 | .sp 0.2i | |
1925 | .b "General form:" | |
1926 | .(l | |
1927 | hxxxxxxx n+ n- <poly(nd)> vn1 <vn2 ...> p0 <p1 ...> <ic=...> | |
1928 | .)l | |
1929 | .sp 0.2i | |
1930 | Examples: hxy 13 20 poly(2) vin1 vin2 0 0 0 0 1 ic=0.5 1.3 | |
1931 | hr 4 17 vx 0 0 1 | |
1932 | .pp | |
1933 | N+ and n- are the positive and negative nodes, respectively. Poly(nd) | |
1934 | only has to be specified if the source is multi-dimensional (one-dimensional is | |
1935 | the default). If specified, nd is the number of dimensions, which must be | |
1936 | positive. Vn1, vn2, ... Are the names of voltage sources through which the | |
1937 | controlling current flows; one name must be specified for each dimension. The | |
1938 | direction of positive controlling current flow is from the positive node, | |
1939 | through the source, to the negative node of each voltage source. P0, p1, | |
1940 | p2, ..., pn are the polynomial coefficients. The (optional) initial condition | |
1941 | is the initial guess at the value(s) of the controlling current(s) (in amps). | |
1942 | If not specified, 0.0 is assumed. The polynomial specifies the source voltage | |
1943 | as a function of the controlling current(s). The first example above describes | |
1944 | a voltage source with value | |
1945 | .sp 0.2i | |
1946 | v = i(vin1)*i(vin2) |