Home
WinSpice3 User`s Manual 23 October, 2003 Mike Smith Copyright
Contents
1. Xname NL N2 NF subname Pl vall or exprl Pj valj or exprn where P1 through Pj are parameters passed to the subcircuit There are two ways to pass parameters into a subcircuit e Parameters may be defined with a PARAM statement inside the SUBCKT netlist e By stating the parameters on the subcircuit call line X line Copyright 2002 2003 Mike Smith 18 16 08 2005 WinSpice3 User Manual The following forms are all valid xl 1 2 3 Subname varl expr var2 val2 varn valn xl 1 2 3 Subname varl vall var2 expr varn valn x1 1 2 3 Subname varl vall var2 val2 varn valn X1 1 2 3 Subname PARAMS varl vall varn valn X1 1 2 3 Subname PARAMS varl vall var2 val2 varn expr x1 1 2 3 Subname PARAMS varl vall var2 expr varn valn Note A parameter can be a single parameter or a parameterised expression However the parameters must be previously defined in a PARAM statement or in the subcircuit that the subcircuit call line is used in so that a value can be passed to the subcircuit Parameters can be passed through multiple levels of a subcircuit s hierarchy For example PARAM Varmain 1 Varmain2 1 OUBCKT Stbneames Jy 23 x 1 2 3 Subname2 varl varmain ENDS SUBCKT SubnameZ L 2 3 x1 1 2 3 Subname3 var2 varl var3 varmain2 ENDS Any number of variables can be accommodated 3 6 3 3 Default Subcircuit Parameters Default subcircuit parameters can be
2. width x11linearares Some X 11 implementations have poor arc drawing If you set this option WinSpice3 will plot using an approximation to the curve using straight lines The height of the brush to use if X is being run Number The width of the brush to use 1f X 1s being run The name of the X font to use when plotting data and entering xbrushheight xbrushwidth xfont labels The plot may not look good if this is a variable width font Copyright 2002 2003 Mike Smith 88 16 08 2005 WinSpice3 User Manual There are several set variables that WinSpice3 uses They are The current plot name e g tranl ac3 curplottitle String The current plot title e g Example 8 7 Astable multivibrator curplotname String The plot name generated by WinSpice e g Transient Analysis curplotdate String The date and time that the result was generated e g Tue Mar 11 02 09 18 2003 editor String The command used to start the circuit editor Used by the edit command The name of the model card normally model modelline String The name of the model card normally model Same as modelcard noaskquit Boolean Do not check to make sure that there are no circuits suspended and no plots unsaved Normally WinSpice3 warns the user when he tries to quit 1f this is the case nobjthack Assume that BJTs have 4 nodes noparse Boolean Don t attempt to parse input files when they are read in useful for d
3. Different styles of plot can be selected via the linplot pointplot and combplot keywords Specifying linplot gives a plot where each point is connected to the next by a line If pointplot is used the points are represented by a character with no joining lines The combplot is drawn with a vertical line from each point to the X axis The plot type can also be specified via the plotstyle variable e g set plotstyle combplot The if a plot style is given in the plot command this overrides the variable Finally the keyword polar to generate a polar plot To produce a smith plot use the keyword smith Note that the data is transformed so for smith plots you will see the data transformed by the function x 1 x 1 To produce a polar plot with a smith grid but without performing the smith transform use the keyword smithgrid If maxplots is non zero as each new plot window is displayed older ones may be automatically closed See section 6 2 Copyright 2002 2003 Mike Smith 106 16 08 2005 WinSpice3 User Manual 6 9 29 Print Print values General Form print col line expr Prints the vector described by the expression expr If the col argument 1s present print the vectors named side by side If line is given the vectors are printed horizontally col is the default unless all the vectors named have a length of one in which case line is the default The options width length and nobreak are effective for this command see asciip
4. If set enables the options listing in batch mode plotstyle String This should be one of linplot combplot or pointplot chars linplot the default causes points to be plotted as parts of connected lines combplot causes a comb plot to be done see the description of the combplot variable above pointplot causes each point to be plotted separately the chars are a list of characters that are used for each vector plotted If they are omitted then a default set is used pointchars String A string of characters to be used when plotstyle is set to pointplot or the pointplot keyword is used in the plot command If not defined and internal set of characters 1s used polydegree Number The degree of the polynomial that the plot command should fit to the data If polydegree 1s N then WinSpice3 fits a degree N polynomial to every set of N points and draw 10 intermediate points in between each endpoint If the points aren t monotonic then it tries rotating the curve and reducing the degree until a fit is achieved polysteps Number The number of points to interpolate between every pair of points available when doing curve fitting The default is 10 The name of the current program argv 0 prompt String The prompt with the character replaced by the current event number The default name for rawfiles created Copyright 2002 2003 Mike Smith 87 16 08 2005 WinSpice3 User Manual rawfileprec Number The number of significan
5. Generate a Fourier transform vector cccccccccnccnnonnnnnonnnnnnnnnnnnnnnnnnnnnnnnnnnnannnnnnnos 114 6 9 51 Status Display breakpoint and trace information 115 6 9 52 Step Run a fixed number of time points ss 115 DS SLOP Sela D cak pon iann aci adn epa ae cil cel eeibe 115 69034 Srciip Compare SMS cece ve A tnt 115 69 55 Temp Delne circuit temperate eor Rs te te cc 116 6 9 56 EE ua Eranster Puncuon analy 16 Ein RS ate ee heen 116 0957 Trace race NOUS siria sms RT 116 6 9 35 Trani Performa transient analysis usina 116 6 9 59 Transpose Swap the elements in a multi dimensional data set 116 6900 Tutorial Display hypertext heiD eet a as 117 09 61 Unahas RerIctan las Sn tete nie state art ete 117 60 92 02 Undetie Retract a de Mn mada 117 000 05 While Delete Veces 117 09 04 Unset E karavana bE os adela dis 117 6 9 65 Version Print the version Of WINSPICE usina tai 117 6 9 66 Where Identify troublesome node Or device 118 6 9 07 Write We dat to ate A tet d te si a 118 OO Miscellaneous rat rra mon nr sp nant di Man 118 rL EU ees Re on OT OP RT Ce ee en ee 118 CONVERGENCE adi 120 7 1 DOMIN Conversence PIO DIC IIS SL nn Rd ct 120 12 Wihatis Convergence or None onver Gene iia ia 120 7 3 SPICE3 New Convergence Algorithms ss 121 7 4 Non Convergence Error Messages Indications cccccccecccecceeeeeeeeeseeessseeeeeeeeeeeeeeeeaeaas 121 7 5 CONVELSENCS SOMMMOTIS e aa a a a oem eS
6. If a device is specified OFF the DC operating point is determined with the terminal voltages for that device set to zero After convergence 1s obtained the program continues to iterate to obtain the exact value for the terminal voltages If a circuit has more than one DC stable state the OFF option can be used to force the solution to correspond to a desired state If a device is specified OFF when in reality the device is conducting the program still obtains the correct solution assuming the solutions converge but more iterations are required since the program must independently Copyright 2002 2003 Mike Smith 47 16 08 2005 WinSpice3 User Manual converge to two separate solutions The NODESET control line serves a similar purpose as the OFF option The NODESET option is easier to apply and is the preferred means to aid convergence The second form of initial conditions is specified for use with the transient analysis These are true initial conditions as opposed to the convergence aids above See the description of the IC control line and the TRAN control line for a detailed explanation of initial conditions 4 4 1 Dxxxx Junction Diodes General form DXXXXXXX N N MNAME lt AREA gt lt OFF gt lt IC VD gt lt TEMP T gt Examples DBRIDGE 2 10 DIODEL DELMP 3 1 DMOD 320 TG 0 2 N and N are the positive and negative nodes respectively MNAME is the model name AREA is the area factor and OFF indicates an
7. LTHRESH x Sets the switchover point between logic O and logic 1 The default value is 1 5V MINCONVSHUNT x If a circuit does not converge WinSpice tries to shunt all nodes in the circuit with a resistance and tries again If convergence fails 1t reduces the resistance value by 10 and tries again This option specifies the minimum shunt value that can be used If set to zero the shunt convergence aid is disabled The default value is 1e6 MINTIMESTEP x The same as DELMIN Copyright O 2002 2003 Mike Smith 69 16 08 2005 WinSpice3 User Manual PIVREL x Sets the relative ratio between the largest column entry and an acceptable pivot value The default value is 1 0e 3 In the numerical pivoting algorithm the allowed minimum pivot value is determined by EPSREL AMAX1 PIVREL MAXVAL PIVTOL where MAXVAL is the maximum element in the column where a pivot is sought partial pivoting PIVTOL x Sets the absolute minimum value for a matrix entry to be accepted as a pivot The default value is 1 0e 13 RELTOL x Resets the relative error tolerance of the program The default value is 0 001 0 1 RESBRANCH Calculate resistor branch currents during analyses This is an experimental feature which can cause convergence problems but which may be useful in some cases RSHUNT x Shunt resistors of value x are placed between all voltage nodes and node 0 the ground node This helps avoid nodes having no DC paths to ground and h
8. O SIN 0 L 100MEG INS LETO Copyright 2002 2003 Mike Smith 32 16 08 2005 WinSpice3 User Manual parameters default value VO offset MO Volts or Amps VA amplitude MN Volts or Amps The following table describes the shape of the waveform VO VAe HET sin 27FREQ t TD 4 2 1 3 EXP Exponential General Form EXP VI V2 TDI TAUL TD2 TAUZ2 Examples VIN 3 0 EXP 4 1 2NS 30NS 60NS 40NS parameter default value VI initial value MN Volts or Amps V2 pulsed value MO Volts or Amps TD1 rise delay time o0 seconds TAUI rise time constant TD2 fall delay time TAU2 fall time constant The following table describes the shape of the waveform Copyright 2002 2003 Mike Smith 33 16 08 2005 WinSpice3 User Manual TD1 to TD2 t TD1 V1 V2 vif e TAUI TD2 to TSTOP t TD1 t TD2 V1 V2 vi V1 val e TAU 4 2 1 4 PWLO Piece Wise Linear General Form EWNEXEL Vil SES V2 TS VO 4 VA wb Examples MELOEK T SENLCO ST ONS SY LINS S INS ES LENS SONS Each pair of values Ti Vi specifies that the value of the source is Vi in Volts or Amps at time Ti The value of the source at intermediate values of time 1s determined by using linear interpolation on the input values 4 2 1 5 SFFMO Single Frequency FM General Form SFEM VO VA EC MDI ES Examples VI 1240 SEEM O 1M Z20K 9 IK parameter default value units VO offset Volts or Am
9. The Print line defines the contents of a tabular listing of one to eight output variables PRTYPE is the type of the analysis DC AC TRAN NOISE or DISTO for which the specified outputs are desired SPICE2 restricts the output variable to the following forms though this restriction is not enforced by WinSpice3 V N1 lt N2 gt Copyright O 2002 2003 Mike Smith 78 16 08 2005 WinSpice3 User Manual specifies the voltage difference between nodes N1 and N2 If N2 and the preceding comma is omitted ground 0 is assumed For AC analysis V N1 lt N2 gt gives the magnitude of the complex voltage For compatibility with SPICE2 the following five additional values can be accessed for the AC analysis by replacing the V in V NI N2 with V magnitude same as VM below VR real part VI imaginary part VM magnitude VP phase in radians or degrees see the units variable description VDB 20 log 10 magnitude I VXXXXXXX specifies the current flowing in the independent voltage source named VXXXXXXX Positive current flows from the positive node through the source to the negative node For the AC analysis the corresponding replacements for the letter I may be made in the same way as described for voltage outputs 1 e I magnitude same as IM below IR real part II imaginary part IM magnitude IP phase in radians or degrees see the units variable description IDB 20 log 10 magnitude Output variables for the noise and d
10. control and endc These commands are executed immediately after the circuit is loaded so a control line of ac works the same as the corresponding ac card The first line in any input file is considered a title line and not parsed but kept as the name of the circuit The exception to this rule is the file spiceinit Thus a WinSpice3 command script must begin with a blank line and then with a control line Also any line beginning with the characters is considered a control line This makes it possible to embed commands in WinSpice3 input files that are ignored by SPICE2 Lines beginning with the character are considered comments and ignored 6 9 50 Spec Generate a Fourier transform vector General Form spec startf stopf stepf vector Calculates a new vector containing the Fourier transform of the input vector This vector should be the output of a transient analysis This command takes note of the following shell variables which can be set using the set command see section 6 9 40 specwindow String Specifies the wndowing function Possible values are none hamning or cosine rectangular hamming triangle or bartlet blackman gaussian If this variable is not defined the hanning window is used Specifies the window order for the gaussian window only Note that the time axis of the input vector should be linearised first by using the linearize command see section 6 9 23 because WinSpice3 does not p
11. to the negative node POLY ND only has to be specified if the source is multi dimensional one dimensional is the default If specified ND is the number of dimensions which must be positive VNI VN2 are the names of voltage sources through which the controlling current flows one name must be specified for each dimension The direction of positive controlling current flow 1s from the positive node through the source to the negative node of each voltage source PO P1 P2 Pn are the polynomial coefficients The optional Copyright O 2002 2003 Mike Smith 37 16 08 2005 WinSpice3 User Manual initial condition is the initial guess at the value s of the controlling current s in Amps If not specified 0 0 1s assumed The polynomial specifies the source current as a function of the controlling current s The first example above describes a current source with value T 1E 3 1 3E 3 I VCC 4 2 3 4 Current Controlled Voltage Sources General form HR NF POE ND YNI INIA pese PO PT a LO Sa Examples HAX ES A BOBA ENT VINA 20 010 0 TL EG Ou os dues HR a eh WAX OI SL N and N are the positive and negative nodes respectively POLY ND only has to be specified if the source is multi dimensional one dimensional is the default If specified ND is the number of dimensions which must be positive VN1 VN2 are the names of voltage sources through which the controlling current flows one name must be specifie
12. with control C and issue the where command Note that only one node or device is printed there may be problems with more than one node 6 9 67 Write Write data to a file General Form write file exprs Writes out the expressions to file First vectors are grouped together by plots and written out as such 1 e if the expression list contained three vectors from one plot and two from another then two plots are written one with three vectors and one with two Additionally if the scale for a vector isn t present it is automatically written out as well The default format is ASCH but this can be changed with the set filetype command The default filename is rawspice raw or the argument to the r flag on the command line if there was one and the default expression list is all If file 1s given and it has the file extension csv the file will be written as ASCII in comma separated value format 6 10 Miscellaneous If there are subcircuits in the input file WinSpice3 expands instances of them A subcircuit is delimited by the cards subckt and ends or whatever the value of the variables substart and subend is respectively An instance of a subcircuit is created by specifying a device with type x the device line is written xname nodel node2 subcktname where the nodes are the node names that replace the formal parameters on the subckt line All nodes that are not formal parameters are prepended with the name g
13. 09 25 Load Odd rawile Ads Americans 105 Copyright 2002 2003 Mike Smith iii 16 08 2005 WinSpice3 User Manual 6926 Noise P HOHMNANOISS alaridos idioteces 106 6 9 27 Op Perform an operating point analysis 106 69 28 Plot PlOE Vales Om MS US SE NS ne 106 029 PENE Ponty aie di aid 107 6 9 30 Pz Perform a Pole Zero ARA SIS diiniita 107 OL Quit Leave Win S PICS ita iia ico od 107 6 9 32 Rawfile Send further results directly to a rawfile oooooonnnnncccncnnnnnononononnnnonnnnnos 107 003 Reset Reser amandi ys Suie ee aie eer ae a Ne ne nn au 108 6 9 34 Reshape Alter the dimensionality or dimensions Of a vector 108 6 9 35 Resume Continue a simulation after a Stop 108 6 9 36 Run Run analysis from the input file 108 DST RUSSES RESOUICE US AUC roai nenin E E E E E ENT 108 69 38 Save Save a Set Of Output VES erennere sante 110 00 39 Sens R n a sensitivity analysis idas 110 GIAO SEE SEC IN VOIE OF AV Ar ADS alt 110 6 9 41 Setcirc Change the current circuit 110 6 9 42 Setplot Switch the current set of vectors 111 6943 Setscale el The Scale dora Pla dE ne 111 0 90 44 Seuype Set the Ty pe Ol A E el eras 112 6 945 Shell Call the command Interpreten a 112 03 40 DATE Alter HSE VatlaDles wicca ae eases Ss 113 OOAT Show Lir device Sta E aauina E E E E a 113 6 9 48 Showmod List model parameter values ss 113 0 9 49 Source Read a Winspice3 input les RE nes 114 6 9 50 Spec
14. 1 gt 4 when v 2 lt 2 the conjunction of the conditions is implied 6 9 54 Strcmp Compare strings General Form strcmp res varl var2 Example strcmp i Sresp new if 1 0 set curplot new GOO DOEEONM end Compare two string variables var1 and var2 for equality and set variable res as follows Copyright 2002 2003 Mike Smith 115 16 08 2005 WinSpice3 User Manual 0 1f they are equal 1 if varl lt var2 1 if varl gt var2 6 9 55 Temp Define circuit temperature General Form temp temp The command line version of the TEMP directive see section 5 3 8 Specifies a list of temperatures in degrees centigrade Subsequent analyses will be repeated at each of the listed temperatures Thre results are concatenated to the plot buffers such that in the example above three separate plots will appear overlaid on the plot window one plot for each temperature To disable the sweep enter the command TEMP 27 Subsequent analyses will be made only for 27 degrees Centigrade 6 9 56 Tf Run a Transfer Function analysis General Form tf output_node input_source The tf command performs a transfer function analysis returning the transfer function output input output resistance and input resistance between the given output node and the given input source The analysis assumes a small signal DC slowly varying input 6 9 57 Trace Trace nodes General Form trace node For every step of an ana
15. 1 BJT Models NPN PNP The bipolar junction transistor model in WinSpice3 is an adaptation of the integral charge control model of Gummel and Poon This modified Gummel Poon model extends the original model to include several effects at high bias levels The model automatically simplifies to the simpler Ebers Moll model when certain parameters are not specified The parameter names used in the modified Gummel Poon model have been chosen to be more easily understood by the program user and to reflect better both physical and circuit design thinking The DC model is defined by the parameters IS BF NF ISE IKF and NE which determine the forward current gain characteristics IS BR NR ISC IKR and NC which determine the reverse current gain characteristics and VAF and VAR which determine the output conductance for forward and reverse regions Three ohmic resistances RB RC and RE are included where RB can be highly current dependent Base charge storage is modelled by forward and reverse transit times TF and TR the forward transit time TF being bias dependent 1f desired CJE VJE and MJE determine non linear depletion layer capacitances for the B E junction CJC VJC and MJC for the B C junction and CJS VJS and MJS for the C S Collector Substrate junction The temperature dependence of the saturation current IS is determined by the energy gap EG and the saturation current temperature exponent XTI Additionally the beta temperat
16. 16 08 2005 WinSpice3 User Manual you typed the command cat etc lasswd you could re execute the command with lasswd changed to passwd by typing AJAp e You can enclose a history substitution in braces to prevent it from absorbing the following characters In this case the entire substitution except for the starting must be within the braces For example suppose that you previously issued the command cp accounts money Then the command cps looks for a previous command starting with cps while the command cp s turns into a command cp accounts moneys 6 7 Filename Expansions Some characters are handled specially as follows Expands to the home directory Matches any string of characters in a filename Matches any single character in a filename Used within to specify a range of characters For example b k matches on any character between and including b through to k If the is included within as the first character then it negates the following characters matching on anything but those For example agm would match on anything other than a g and m a zA Z would match on anything other than an alphabetic character Matches any of the characters enclosed in a filename The wildcard characters and can be used but only if you unset noglob first This makes them rather useless for typing algebraic expressions so you should set nog
17. 16 Edit Edit the current circuit General Form edit file Open the current WinSpice3 input file in the editor and allow the user to modify it While the editor is running WinSpice3 watches for the original file to be updated and if so reads the file back in If a filename is given then edit that file and load it making the circuit the current one By default Windows Notepad is used This can be changed by setting the environment variable editor see section 6 2 e g WinSpice3 18 gt set editor c program files accessories wordpad exe WinSpice3 19 gt edit 6 9 17 Fourier Perform a fourier transform General Form fourier fundamental_frequency value Does a fourier analysis of each of the given values using the first 10 multiples of the fundamental frequency or the first nfreqs if that variable is set see below The output is like that of the four WinSpice3 line The values may be any valid expression The values are interpolated onto a fixed space grid with the number of points given by the fourgridsize variable or 200 if it is not set The interpolation is of degree polydegree if that variable is set or 1 If polydegree is 0 then no interpolation is done This 1s likely to give erroneous results if the time scale is not monotonic though 6 9 18 Hardcopy Save a plot to a file for printing General Form hardcopy file plotargs Just like plot except creates a file called file containing the plot The fil
18. 4 Note that you can either use scientific notation or one of the abbreviations like MEG or G but not both As with SPICE a number may have trailing alphabetic characters after it Copyright 2002 2003 Mike Smith 90 16 08 2005 WinSpice3 User Manual The notation expr num denotes the num th element of expr For multi dimensional vectors a vector of one less dimension is returned Also for multi dimensional vectors the notation expr m n will return the nth element of the mth subvector To get a subrange of a vector use the form expr lower upper To reference vectors in a plot that 1s not the current plot see the setplot command below the notation plotname vecname can be used Either a plotname or a vector name may be the wildcard all If the plotname is all matching vectors from all plots are specified and if the vector name 1s all all vectors in the specified plots are referenced Vector names in SPICE may have a name such as name param where name is either the name of a device instance or model This denotes the value of the param parameter of the device or model See Appendix B for details of what parameters are available The value is a vector of length 1 This function is also available with the show command and is available with variables for convenience for command scripts 6 5 1 Expressions An expression 1s an algebraic formula involving vectors and scalars and the following operations E DE MG is the mod
19. 9 36 Run Run analysis from the input file General Form run rawfile Run the simulation loaded by a previous source command If there were any of the control lines ac op tran or de they are executed The output is put in rawfile if it was given in addition to being available interactively The rawfile will be written as ASCII text or in binary form depending upon the value of the filetype variable see section 6 2 6 9 37 Rusage Resource usage General Form rusage resource Print resource usage statistics If any resources are given just print the usage of that resource Most resources require that a circuit be loaded Copyright O 2002 2003 Mike Smith 108 16 08 2005 WinSpice3 User Manual Currently valid resources are listed incorrectly as Transient iterations per point Copyright 2002 2003 Mike Smith 109 16 08 2005 WinSpice3 User Manual 6 9 38 Save Save a set of output vectors General Form save all vector vector Examples save i vin input output save ml id Save a set of output vectors discarding the rest If a vector has been mentioned in a save command it appears in the working plot after a run has completed or in the rawfile if SPICE is run in batch mode If a vector is traced or plotted see below it is also saved For backward compatibility if there are no save commands given all outputs are saved When the keyword all appears in the s
20. For an example set of parameters and the format of a process file see the SPICE2 implementation notes 3 For more information on BSIM2 see reference 5 Copyright 2002 2003 Mike Smith 58 16 08 2005 WinSpice3 User Manual SPICE BSIM level 4 parameters a PS CS CONT PS CS pu fans E E CO ES ES COR ES E CON PE CS EI X2MZ sens of mobility to substrate bias at V 4 0 ca sens of drain induced barrier lowering effect to substrate bias cali sens of drain induced barrier lowering effect to drain bias at Vds Vdd sens of transverse field mobility degradation effect to substrate bias X2U1 sens of velocity saturation effect to substrate bias MUS mobility at zero substrate bias and at Vas V qq ca a LE X2MS sens of mobility to substrate bias at Vas V gq m2 X3MS sens of mobility to drain bias at V4s V qq cm2 V2 s X3UI sens of velocity saturation effect on drain bias at Vg Vqq umV Copyright 2002 2003 Mike Smith 59 16 08 2005 WinSpice3 User Manual PT PS p ET PE ST PS D PS XPART 0 selects a 40 60 drain source charge partition in saturation while XPART 1 selects a 0 100 drain source charge partition ND NG and NS are the drain gate and source nodes respectively MNAME is the model name AREA is the area factor and OFF indicates an optional initial condition on the device for DC analysis If the area factor is omitted a value of 1 0 is assumed The optional initial condition
21. LIB Tines CPSpiCe SC vic ao ane 12 DS LIB Eines CHSPICE SIN IC een M bie 13 3 6 Extended yt usan lidia lit 14 3 6 1 UN CLUDE i 14 3 6 2 DEFINE dadas 14 3 6 3 PARAM O A 15 30L Parametr Passina genran e a ici 16 300 2 Passing Parameters TO SUBCIRCUIUS ois scaiccerwaneatcacadscuaasansbooncaiacsauwanseleiendeuusruess 18 203 Default Subcircuit Parameters sim id a 19 4 CIRCUIT ELEMENTS AND MODELS ne unis 21 4 1 elementary DEV CE usa aa 21 4 1 1 odos R SISTER teen tan 22 ELEU CS HADIe Resist nn sen ns aa 22 AZ ISCHACONQUCIOF INCSISLOLS ea a tbe nd 22 4 1 1 3 Semiconductor Resistor Model R or RES 23 4 1 2 CRI C PACOS RS A E a shee Pete 24 AI Smple CC apa tor is O a 24 41 22 Pp emiconductor Capacitadores 24 41 23 Semiconductor Capacitor MOdel x css cussossspustssardwncoosacopsoudataviviantoomadeitenencebses 24 4 1 3 LADOS INRA 0 0 renee ie Re RPE RC a RR re ee 25 4 1 4 Kxxxx Coupled Mutual Inductors ccc 0 cn 5 de ea 26 4 1 5 SK WAR XX WIICHES AAA ee nan its 26 4 1 5 1 Sxxxx Voltage Controlled Switch oooooonnnnncccconononcnnononononooonnnncnnnnnnnnnnnnnnnnos 26 41 52 WKXXX Current Controlled Switchs nanena aa 26 4 115 23 Spices Switch Model SWEET a a E E 26 Copyright 2002 2003 Mike Smith 1 16 08 2005 WinSpice3 User Manual 4 1 5 4 PSpice Switch Model ISWITCH VSWITCH us 28 4 2 Voltage And Curent SOULCES ac ia 31 4 2 1 Ixxxx and VAR Independent SOUPCES dd 31 RAM PULSE PUISE Ra A
22. MESPET modeleoicqu iria ica biopic co 152 10 17 Mosl Level 1 MOSFET model with Meyer capacitance model 154 10 18 Mos2 Level 2 MOSFET model with Meyer capacitance model 157 10 19 Mos3 Level 3 MOSFET model with Meyer capacitance model 161 10 20 Mos6 Level 6 MOSFET model with Meyer capacitance model 165 OZ TI Resio Simple tesi ici 169 10 22 Switch Ideal voltage controlled Wicho 169 10 23 Tranlmes Lossless transmission ine a A iia 170 10 24 VYECS Voltage controlled current source sii ion 171 1025 VENS gt Voltage controlled votare Source eranen n a A di alaieancaes 171 10 26 Vsource Independent voltage source ooocncccnccnnnccccnnnnnnnnononnnnnnnnnnnnnnnnnnnnnonnnnanannnnnnnninnnos 172 Copyright 2002 2003 Mike Smith V 16 08 2005 WinSpice3 User Manual 1 INTRODUCTION WinSpice3 is a general purpose circuit simulation program for non linear DC non linear transient and linear AC analyses Circuits may contain resistors capacitors inductors mutual inductors independent voltage and current sources four types of dependent sources lossless and lossy transmission lines two separate implementations switches uniform distributed RC lines and the five most common semiconductor devices diodes BJTs JFETs MESFETs and MOSFETs WinSpice3 is based on Spice3F4 which in turn was developed from SPICE2G 6 While WinSpice3 is being developed to include new features it continues to support those capabilities and models
23. above are provided for compatibility with PSPICE The switch model allows an almost ideal switch to be described in WinSpice3 The switch is not quite ideal in that the resistance can not change from 0 to infinity but must always have a finite positive value By proper selection of the on and off resistances they can be effectively zero and infinity in comparison to other circuit elements The parameters available are pow owe O CN CON ETT CN COC CC CEE IOFF threshold current CRE E off resistance See the OPTIONS control line for a description of GMIN its default value results in an off resistance of 1 0e 12 ohms ION or VON defines the point at which the switch resistance is RON IOFF or VOFF defines the point at which the switch resistance has the value ROFF The switch resistance varies smoothly between ROFF and RON In the case of the VSWITCH device for the following equations Vc voltage across the control nodes Lm In RON ROFF Lr In RON ROFF Vm VON VOFF 2 Vd VON VOFF Rs switch resistance Copyright 2002 2003 Mike Smith 28 16 08 2005 WinSpice3 User Manual For VON gt VOFF If VE gt VON Rs RON else if Vea lt VOFF Rs ROFF else Rs exp Lm 3 Lr Vc Vm 2 Vd 2 Lr Vc Vm Vd For VON lt VOFF LE O E VON Rs RON else if VC gt VOFE Rs ROFF else Re exo im gt 3 Gr Ve Vm 2 Vd 4 2 Er Va Vm Vd In the
24. above subcircuit the variable Rval within the curly braces will be substituted with a value of 1 The reference designator Rval at the beginning of the line will be unaffected Subckt sub 1 2 PARAMS PARAMI 2u X1 1 2 3 NextSub PARAMS PARAMI PARAM1 ENDS In the above subcircuit the variable PARAM within the curly braces will be substituted with 2u The parameter PARAM for subcircuit NextSub will not be modified Likewise Subckt sub 1 2 PARAMS PARAMI 2u X1 1 2 3 NextSub PARAM1 PARAM1 ENDS should produce the same results Local subcircuit parameters PARAMS or PARAM supersede global parameters PARAM parameters defined in the main netlist of the same name Expressions in the main circuit are treated the same as expressions in subcircuits In B elements parameterised expressions can be used inside of the behavioural equations This allows you to mix parameters with circuit quantities like voltages currents and device power dissipations For example Bl 1 0 V TE ear er TS TEE tM It should be pointed out that in this example the expressions within the curly braces must resolve to a numerical value at the timethe circuit is loaded before any simulation has started The expression outside the curly braces is evaluated dynamically as the simulation runs but with the curly braced expressions replaced by a numerical value 3 6 3 2 Passing Parameters To Subcircuits Subcircuit calling statement syntax
25. an expression as described above If expr is a zero length vector then the vector becomes undefined Individual elements of a vector may be modified by appending a subscript to name ex name 0 Copyright 2002 2003 Mike Smith 104 16 08 2005 WinSpice3 User Manual A vector variable can be used within the scripting language like variables in other languages For example CONT EFOL destroy all let ii O while ii lt 2 alter El TOR F De 1d ac dec FO LL LOk let 11 11 1 end plow abia Liz tal vz ende VL L ON elie Ar a I ELLE A2 AR Ga 2 O be end In the example shown i is a single element vector scalar used as a loop counter 6 9 23 Linearize Interpolate to a linear scale General Form linearize vec Create a new plot with all of the vectors in the current plot or only those mentioned if arguments are given The new vectors are interpolated onto a linear time scale which is determined by the values of tstep tstart and tstop in the currently active transient analysis The currently loaded input file must include a transient analysis a tran command may be run interactively before the last reset alternately and the current plot must be from this transient analysis This command is needed because WinSpice3 doesn t output the results from a transient analysis in the same manner that SPICE2 did WinSpice3 uses a dynamic timestep which means that the timescale is non monotonic SPICE2 int
26. are given There are different vectors in the two plots or any values in the vectors differ significantly the difference 1s reported The variable diff_abstol diff_reltol and diff_vntol are used to determine a significant difference 6 9 13 Display List known vectors and types General Form display varname Prints a summary of currently defined vectors or of the names specified The vectors are sorted by name unless the variable nosort is set The information given is the name of the vector the length the type of the vector and whether it is real or complex data Additionally one vector is labelled scale When a command such as plot is given without a vs argument this scale is used for the X axis It is always the first vector in a rawfile or the first vector defined in a new plot If you undefine the scale 1 e let TIME one of the remaining vectors becomes the new scale which is undetermined Copyright 2002 2003 Mike Smith 102 16 08 2005 WinSpice3 User Manual 6 9 14 Disto Perform a distortion analysis General Form disto DEC ND EFSTART ESTOP SEZOVEREL gt adaisto OCT NO PSTART PSIOP lt EFZOVEREL gt disto LIN NB FESTARI STOP lt EZOVERE1 gt Examples disto dec 10 1kKHz 100Mbz disto dec 10 1kHz 100Mhz 0 9 The command line form of the DISTO directive See section 5 3 3 for details 6 9 15 Echo Print text General Form echo text Echoes the given text to the screen 6 9
27. are various command scripts installed in lib scripts where is the directory containing the EXE file and the default sourcepath variable includes this directory so you can use these command files almost like built in commands In fact the setplot command is actually implemented as a script in this way 6 2 Variables The operation of WinSpice3 may be affected by setting variables with the set command In addition to the variables mentioned below the set command in WinSpice3 also affect the behaviour of the simulator via the options previously described under the section on OPTIONS Variables can contain text strings numbers or be Boolean 1 e have the meaning TRUE or FALSE Variables can be defined and deleted with the set and unset commands see later String and number variables can be defined with a command of the form set variable value Boolean variables are a little odd in that they take the value TRUE if they are defined and FALSE if they do not exist For example the variable slowplot can be set to TRUE with the command Copyright 2002 2003 Mike Smith 81 16 08 2005 WinSpice3 User Manual set slowplot Setting a variable like slowplot to FALSE is done with the command unset slowplot To enter a list e g the sourcepath variable the list must be supplied within and Y e g set sourcepath c mike spice3f5 To display the value of a variable use the command echo Svariable The variables
28. can be resolved in that library The process is then repeated for succeeding libraries The program runs until a pass is made with no unresolved references Libraries may cause additional unresolved references to occur if your subcircuits call other subcircuits or models It is best to resolve those references within the same library In the example above INCLUDE may be substituted for LIB with the same results see section 3 6 1 3 5 3 LIB Lines HSPICE style General form LIB filename section Examples LIB users spice common bipolar lib MOS If two parameters are supplied on a LIB line WinSpice assumes that an Hspice style library is to be read The directive searches the library file filename for section section and inserts it into the circuit in place of the LIB directive A Hspice library has the following format LIB Seer ond section contents ENDE Section LIB Section section contents ENDL section2 LIB Sections section Contents LIB filename section ENDL section3 etc The library can contain nested library references as long as the reference 1s not recursive Copyright O 2002 2003 Mike Smith 13 16 08 2005 WinSpice3 User Manual 3 6 Extended Syntax By extending the normal SPICE syntax several new capabilities have been added to the standard WinSpice capabilities These include the ability to e Call models and subcircuits from library files e Pass parameters to
29. expression FREQ The current circuit frequency in radians This variable has the value 0 0 during DC and transient analyses TIME The current circuit time in seconds This variable has the value 0 0 during an AC analysis TEMP The current circuit temperature in degrees C The following standard operators are defined precedence decreasing down the table unary Exponentiation xy gt x ECS Es ee CCS Table 2 Operator Precedence Note here that the If Then Else operator found in the C programming language is available here This greatly increases the capabilities of the B line by allowing very complex equations to be defined For example BL O24 Ve VOL 2 IV 2 av OV defined a voltage source which outputs SV if the voltage at node 1 is greater than or equal to 1V and OV otherwise When using Boolean operators like amp and the expression each side 1s evalueate to a logical true or false value using the the LONE LZERO and LTHRESH OPTION line settings see section 5 1 Copyright O 2002 2003 Mike Smith 41 16 08 2005 WinSpice3 User Manual If the argument of log In or sqrt becomes less than zero the absolute value of the argument is used If a divisor becomes zero or the argument of log or In becomes zero an error will result Other problems may occur when the argument for a function in a partial derivative enters a region where that function is undefined To get time into the expression
30. from strictly geometric information Copyright O 2002 2003 Mike Smith 24 16 08 2005 WinSpice3 User Manual CCC COS CEE CO OS CCC CCS pa PE CC TS mentee CE ose menos CS PS ann ET wen oo The capacitor has a capacitance computed as CAP CJ LENGTH NARROW WIDTH NARROW 2CJSW LENGTH WIDTH 2NARROW TNOM is used to override the circuit wide value given on the OPTIONS control line where the parameters of this model have been measured at a different temperature After the nominal capacitance is calculated above it is adjusted for temperature and voltage nonlinearity by the formula C p CAP L VC V VC V l 7C T T TC T T cap nom 4 1 3 Lxxxx Inductors General form LYYYYYYY N N VALUE lt IC INCOND gt Examples LLINK 42 69 1UH LSHUNT 23 51 10U IC 15 7MA N and N are the positive and negative element nodes respectively VALUE is the inductance in Henries The optional initial condition is the initial time zero value of inductor current in Amps that flows from N through the inductor to N Note that the initial conditions if any apply only 1f the UIC option is specified on the TRAN analysis line NOTE unlike Spice2 non linear inductors are not directly supported by WinSpice3 However they can be simulated using non linear current and voltage sources Copyright 2002 2003 Mike Smith 25 16 08 2005 WinSpice3 User Manual 4 1 4 Kxxxx Coupled Mutual Indu
31. in a specified range the calculated value of the noise corresponds to the spectral density of the circuit variable viewed as a stationary gaussian stochastic process After calculating the spectral densities noise analysis integrates these values over the specified frequency range to arrive at the total noise voltage current over this frequency range This calculated value corresponds to the variance of the circuit variable viewed as a stationary gaussian process 2 8 Analysis At Different Temperatures All input data for WinSpice3 is assumed to have been measured at a nominal temperature of 27 C which can be changed by use of the TNOM parameter on the OPTION control line This value can further be overridden for any device which models temperature effects by specifying the TNOM parameter on the model itself The circuit simulation is performed at a temperature of 27 C unless overridden by a TEMP parameter on the OPTION control line Individual instances may further override the circuit temperature through the specification of a TEMP parameter on the instance Temperature dependent support is provided for resistors capacitors diodes JFETs BJTs and level 1 2 and 3 MOSFETs BSIM levels 4 and 5 MOSFETs have an alternate temperature dependency scheme that adjusts all of the model parameters before input to SPICE For details of the BSIM temperature adjustment see 6 and 7 Temperature appears explicitly in the exponential terms of th
32. instance parameters input output Initially off Diode power Diode model parameters input only d Diode model Diode model parameters input output Saturation current Current at reverse breakdown voltage Diode model parameters output only cond Ohmic conductance Copyright O 2002 2003 Mike Smith 148 16 08 2005 WinSpice3 User Manual 10 11 Inductor Inductors Inductor instance parameters input output inductance Inductance of inductor Initial current through inductor Inductor instance parameters output only Flux through inductor acphase Copyright O 2002 2003 Mike Smith 149 16 08 2005 WinSpice3 User Manual Isource instance parameters output only neg_node Negative node of source Power dissipated by the JFET Copyright O 2002 2003 Mike Smith 150 16 08 2005 WinSpice3 User Manual JFET model parameters input output N type JFET model Source conductance 10 15 LTRA Lossy transmission line LTRA instance parameters input only Initial condition vector v1 11 v2 12 LTRA instance parameters input output Initial voltage at end 1 Negative node of end 2 of t line Copyright 2002 2003 Mike Smith 151 16 08 2005 WinSpice3 User Manual LTRA model parameters input output LTRA model Initial G S voltage Copyright 2002 2003 Mike Smith 152 16 08 2005 WinSpice3 User Manual MES instance parameters output only Device initially
33. is available in the same was as is found in the MSDOS and UNIX command shells as follows Ce Sends standard output to file If the file already exists it is truncated to zero length and its contents discarded If it doesn t exist it is created gt gt file Appends standard output to file If the file already exists the output is added to the end of the file If it doesn t exist it is created it doesn t exist it is created gt gt amp Appends standard output and standard error streams to file If the file already exists the output is added to the end of the file If it doesn t exist gt amp file Sends standard output and standard error streams to file If the file already exists it is truncated to zero length and its contents discarded If it is created Takes standard input from the file file 6 5 Vectors amp Scalars WinSpice3 data is in the form of vectors time voltage etc Each vector has a type and vectors can be operated on and combined algebraically in ways consistent with their types Vectors are normally created when a data file is read in see the load command in section 6 9 25 and when the initial datafile is loaded They can also be created with the let command see section 6 9 22 A scalar is a vector of length 1 A vector may be either the name of a vector already defined or a floating point number a scalar A number may be written in any format acceptable to SPICE such as 14 6Meg or 1 231e
34. lot of debugging information is printed must be compiled with the DFTEDEBUG flag Unsupported in the current release Enables a named debug output must be compiled with the DFTEDEBUG flag Possible names are debug siminterface cshpar parser eval vecdb graf ginterface control async Unsupported in the current release String The name dev tty of the graphics device If this variable isn t set then the user s terminal is used To do plotting on another monitor you probably have to set both the device and term variables If device is set to the name of a file WinSpice3 dumps the graphics control codes into this file this is useful for saving plots String device diff_abstol diff_reltol diff_vntol echo exec_path filetype This can be either ascii or binary and determines the file format used by the write command see section 6 9 67 is used The default is ascii fourgridsize Number How many points to use for interpolating into when doing Fourier analysis Copyright 2002 2003 Mike Smith 84 16 08 2005 WinSpice3 User Manual gridsize Number If this variable is set to an integer this number is used as the number of equally spaced points to use for the Y axis when plotting Otherwise the current scale is used which may not have equally spaced points If the current scale 1sn t strictly monotonic then this option has no effect gridstyle String Sets the style of grid to be u
35. may not produce satisfactory results particularly with iterated differentiation The implementation only calculates the derivative with respect to the real component of that vector s scale 6 5 3 Constants There are a number of pre defined scalar constants in WinSpice3 which can be used in expressions They are CO CC po EEC CON ENTE CONO CE TN These are all in MKS units If you have another variable with a name that conflicts with one of these then it takes precedence 6 6 History Substitutions A history substitution enables you to reuse a portion of a previous command as you type the current command History substitutions save typing and also help reduce typing errors A history substitution normally starts with a l A history substitution has three parts an event that specifies a previous command a selector that selects one or more word of the event and some modifiers that modify the selected words The selector and modifiers are optional A history substitution has the form llevent selector modifier The event is required unless it is followed by a selector that does not start with a digit The can be omitted before selector if selector does not begin with a digit Copyright O 2002 2003 Mike Smith 94 16 08 2005 WinSpice3 User Manual History substitutions are interpreted before anything else even before quotations and command substitutions The only way to quote the of a history
36. mouse button A tutorial in the form of a Word document 1s also provided and you should run this tutorial to understand some of the basic concepts of WinSpice3 1 3 Uninstalling WinSpice3 Use the Add Remove Programs applet in the Control Panel to uninstall the program 1 4 Command Line Options wspuces n l b 11 Er trawiale input file ssa Options are n or N Don t try to source the file spice rc upon start up Normally WinSpice3 tries to find the file in the current directory and if it is not found then in the directory containing the WinSpice3 program b Batch mode Simulates the input file and writes the results to a rawfile After the circuit has been simulated WinSpice will exit i Interactive mode default WinSpice simulates the input file and continues running It then monitors the state of the input file If it changes in any way WinSpice will reload the circuit r rawfile Specifies the name of the output rawfile This causes WinSpice to output results directly to the file Further arguments to WinSpice3 are taken to be SPICE3 input files which are read and saved if running in batch mode then they are run immediately WinSpice3 accepts most SPICE2 input files and output ASCII plots Fourier analyses and node printouts as specified in plot four and print cards If an out parameter is given on a width card the effect is the same as set width Since WinSpice3 ASCII plots do not use mult
37. negative node 4 1 5 3 Spice3 Switch Model SW CSW General form MODEL MNAME TYPE PNAME1 PVAL1 PNAME2 PVAL2 Examples MODEL SMOD SW RON 5M ROFF 10E9 VI 1 0 VH 0 1 MODEL SMOD CSW RON 5M ROFF 10E9 IT 0 5MA IH 0 5MA The switch model allows an almost ideal switch to be described in WinSpice3 The switch is not quite ideal in that the resistance can not change from 0 to infinity but must always have a finite positive value By proper Copyright O 2002 2003 Mike Smith 26 16 08 2005 WinSpice3 User Manual selection of the on and off resistances they can be effectively zero and infinity in comparison to other circuit elements The parameters available are CE EE CI CE US CE CE CN CCOO EE E CH CS off resistance 1 GMIN x See the OPTIONS control line for a description of GMIN its default value results in an off resistance of 1 0e 12 ohms For the voltage controlled switch the switch is in the ON state if gt VT VH Von It is in the OFF state 1f lt VT VH Vo For the current controlled switch the switch is in the ON state 1f gt UT 1H Lo It is in the OFF state if lt 1T IH Le n The use of an ideal element that is highly non linear such as a switch can cause large discontinuities to occur in the circuit node voltages A rapid change such as that associated with a switch changing state can cause numerical roundoff or tolerance problems leading to erroneous result
38. nothing in WinSpice noglob Boolean Don t expand the global characters and J in filenames This 1s the default nogrid 277 Does Don t plot a grid when graphing curves but do label the axes nothing momod Boolean If set disables the model parameter listing in batch mode nomoremode Boolean If nomoremode is not set whenever a large amount of data is being printed to the screen e g the print or asciiplot commands the output is stopped every screenful and continues when a carriage return is typed If nomoremode is set then data scrolls off the screen without check nonomatch If noglob is unset and a global expression cannot be matched use the global characters literally instead of complaining Copyright 2002 2003 Mike Smith 86 16 08 2005 WinSpice3 User Manual Don t have display sort the variable names nopadding If TRUE enables rawfile padding nopage Boolean Don t have asciiplot and print col break between pages If nopage is set nobreak is ignored noprintscale Boolean Don t print the scale in the leftmost column when a print col command is given numdgt 277 Does The number of digits to print when printing tables of data nothing fourier print col The default precision is 6 digits Approximately 16 decimal digits are available using double precision so numdgt should not be more than 16 If the number is negative one fewer digit 1s printed to ensure constant widths in tables
39. off Flicker noise exponent Copyright O 2002 2003 Mike Smith 153 16 08 2005 WinSpice3 User Manual MES model parameters output only N type or P type MESfet model Instance temperature Copyright O 2002 2003 Mike Smith 154 16 08 2005 WinSpice3 User Manual Mosl instance parameters output only Drain current qgb Gate Bulk charge storage Copyright O 2002 2003 Mike Smith 155 16 08 2005 WinSpice3 User Manual Flicker noise exponent Copyright 2002 2003 Mike Smith 156 16 08 2005 WinSpice3 User Manual Mos1 model parameters output only type N channel or P channel MOS 10 18 Mos2 Level 2 MOSFET model with Meyer capacitance model Mos2 instance parameters input only Device initially off Source area Multiplier Instance operating temperature Copyright O 2002 2003 Mike Smith 157 16 08 2005 WinSpice3 User Manual Mos2 instance parameters output only Drain current qgd Gate Drain charge storage Copyright 2002 2003 Mike Smith 158 16 08 2005 WinSpice3 User Manual qgb Gate Bulk charge storage Bulk Drain charge storage P type MOSFET model Copyright O 2002 2003 Mike Smith 159 16 08 2005 WinSpice3 User Manual Mos2 model parameters input output Threshold voltage Flicker noise exponent Mos2 model parameters output only type N channel or P channel MOS Copyright O 2002 2003 Mike Smith 160 16 08 2005 WinSpice3 User Manual 10 19 M
40. optional starting condition on the device for DC analysis If the area factor is omitted a value of 1 0 is assumed The optional initial condition specification using IC VD is intended for use with the UIC option on the TRAN control line when a transient analysis is desired starting from other than the quiescent operating point The optional TEMP value is the temperature at which this device 1s to operate and overrides the temperature specification on the OPTION control line 4 4 1 1 Diode Model D The DC characteristics of the diode are determined by the parameters IS and N An ohmic resistance RS is included which WinSpice defaults to 0 01 ohms if not specified to prevent convergence problems Charge storage effects are modelled by a transit time TT and a non linear depletion layer capacitance which is determined by the parameters CJO VJ and M The temperature dependence of the saturation current is defined by the parameters EG the energy and XTI the saturation current temperature exponent The nominal temperature at which these parameters were measured is TNOM which defaults to the circuit wide value specified on the OPTIONS control line Reverse breakdown is modelled by an exponential increase in the reverse diode current and is determined by the parameters BV and IBV both of which are positive numbers Copyright 2002 2003 Mike Smith 48 16 08 2005 WinSpice3 User Manual CC ES CE E 0 0 DA SS 1
41. passed parameters and replaced with a resultant value Note that individual parameter definitions on a PARAM line can be separated by a space or a comma Hence PARAM VCC 12V VEE 12V and PARAM VCC 12V VEE 12V are treated in the same way Spaces within the values is not allowed because it will confuse WinSpice3 Copyright 2002 2003 Mike Smith 15 16 08 2005 WinSpice3 User Manual 3 6 3 1 Parameter Passing Many electronic devices can be represented through the use of equations which are based on known or measured values It would be helpful if these equations could be incorporated into a SPICE model and the model s behaviour controlled by supplying the dependent variables This is exactly what parameter passing accomplishes Parameters can be passed from a PARAM statement to the main circuit or to subcircuits via the X subcircuit call line Parameters can also be passed directly from a subcircuit call line X line into a subcircuit In both cases parameters passed into a subcircuit can be further passed to another subcircuit down the hierarchy Parameters can be used alone or as part of an expression Example Parameter Passing To The Main Circuit PARAM T1 1U T2 5U Mi oak O Pulse 0 als HOE ALA LR LA O EZ After parameters are passed and evaluated Vi 1 0 Pulse 0 1 20 TU 20507 150 Example Parameter Passing To Subcircuits x1 12 3 4 XFMR RATIO 3 SUBCKT XFMR 1 2 3 4 RP 1 2 1MEG El 5 4 1 2
42. program The default value 1s 1 microvolt In addition the following options have the listed effect when operating in SPICE2 emulation mode ACCT causes accounting and run time statistics to be printed LIST causes the summary listing of the input data to be printed suppresses the printout of the model parameters suppresses page ejects causes the printing of the node table causes the option values to be printed 5 2 Initial Conditions 5 2 1 NODESET Specify Initial Node Voltage Guesses General form NODESET V NODNUM VAL V NODNUM VAL Examples NODESET V 12 4 5 V 4 2 23 The Nodeset line helps the program find the DC or initial transient solution by making a preliminary pass with the specified nodes held to the given voltages The restriction is then released and the iteration continues to the true solution The NODESET line may be necessary for convergence on bistable or a stable circuits In general this line should not be necessary Copyright 2002 2003 Mike Smith 71 16 08 2005 WinSpice3 User Manual 5 2 2 IC Set Initial Conditions General form IC V NODNUM VAL V NODNUM VAL Examples IG VELL VOIES V 27 2 2 The IC line is for setting transient initial conditions It has two different interpretations depending on whether the UIC parameter is specified on the TRAN control line Also one should not confuse this line with the NODESET line The NODESET line is only to help DC c
43. terminate the run because both the AC and transient analyses require an initial stable operating point in order to start During the transient analysis this iterative process 1s repeated for each individual time step If the node voltages do not settle down the time step is reduced and SPICE tries again to determine the node voltages If the time step is reduced beyond a certain fraction of the total analysis time the transient analysis will issue an error message Time step too small and the analysis will be halted Copyright 2002 2003 Mike Smith 120 16 08 2005 WinSpice3 User Manual Solutions to the DC analysis may fail to converge because of e incorrect initial voltage guesses e model discontinuities e unstable bistable operation e unrealistic circuit impedances Transient analysis failures are usually due to model discontinuities or unrealistic circuit source or parasitic modelling The various solutions to convergence problems fall under one of two types Some are simply Band Aids That is they merely try to fix the symptom by adjusting the simulator options While other solutions actually effect the real cause of the convergence problems The following techniques can be used to solve 90 95 of all convergence problems When a convergence problem is encountered you should start at solution 1 and continue on with the subsequent fixes until convergence is achieved The order of the solutions is set up so those lower number fixes c
44. that is the mean of the elements of the vector The result is a scalar a length 1 vector that is the sum of the elements of the vector The result is a scalar a length 1 vector that 1s the maximum value in a vector For complex vectors the value returned 1s the maximum magnitude value The result is a scalar a length 1 vector that 1s the minimum value in a vector For complex vectors the value returned 1s the minimum magnitude value The result is a vector of length number with elements 0 1 number 1 If number is a vector then just the first element is taken and if it isn t an integer then the floor of the magnitude 1s used The result is a vector with each component set to 1 0 The length of the resultant vector 1s the value of the first number in vector If vector was complex the length 1s mag vector 0 The result is a scalar a length 1 vector that is the length of the vector vector The result is a vector which contains the group delay of complex vector vector Perform degree radian conversion on vector vector Perform radian degree conversion on vector vector The result of interpolating the named vector onto the scale of the current plot This function uses the variable polydegree to determine the degree of interpolation 93 16 08 2005 WinSpice3 User Manual deriv vector Calculates the derivative of the given vector This uses numeric differentiation by interpolating a polynomial and
45. the output curve This helps to speed up analysis during parts of the curve that have small rates of change and concentrate the analysis where the rate of change is high For this reason the value of TSTEP is only used as a guide to the initial timestep A minimum timestep can be enforced in WinSpice3 using the DELMIN or MINTIMESTEP system variables see section 5 1 in this document 5 4 Batch Output These lines are ignored by the interactive WinSpice3 and are only handled by the batch mode versions cspice and bspice They are provided for backward compatibility with SPICE2 5 4 1 SAVE Lines General form SAVE vector Vector vector Examples SAVE VIA Input Output SAVE mi ad SAVE ALL The vectors listed on the SAVE line are recorded in the rawfile for use later with WinSpice3 The standard vector names are accepted If no SAVE line is given then the default set of vectors is saved all node voltages and voltage source branch currents If SAVE lines are given only those vectors specified are saved For more discussion on internal device data see Appendix B See also the section on the interactive command interpreter for information on how to use the rawfile The interactive version of this statement is described in section 6 9 38 5 4 2 PRINT Lines General form SPRINT BREYER OVL SOV sai OM O Examples PRINT TRAN V 4 I VIN Ce RENE DESVELAR WAS Ll PRINT AC VM 4 2 VR 7 VP 8 3
46. the delimiter can be quoted by escaping 1t with V If 1s empty the most recently used string takes its place either a previous or the string str in an event selector of the form str The closing delimiter can be omitted if it is followed by a newline g 6 Repeats the previous substitution The following modifiers quote the selected words possibly after earlier substitutions q Quotes the selected words preventing further substitutions X Quotes the selected words but breaks the selected text into words at whitespace P Shows prints the new command but doesn t execute it 6 6 4 Special Conventions The following additional special conventions provide abbreviations for commonly used forms of history substitution e Anevent specification can be omitted from a history substitution if it is followed by a selector that does not start with a digit In this case the event is taken to be the event used in the most recent history reference on the same line if there is one or the preceding event otherwise For example the command Echo quetzal echoes the first and last arguments of the most recent command containing the string quetzal e Ifthe first nonblank character of an input line is the 4 is taken as an abbreviation for s This form provides a convenient way to correct a simple spelling error in the previous line For example if by mistake Copyright 2002 2003 Mike Smith 96
47. the feedback path or the NODESET control line is used to force the circuit to converge to the desired state 7 1 Solving Convergence Problems The following techniques on solving convergence problems are taken from various sources including 1 Meares L G Hymowitz C E Simulating With Spice Intusoft 1988 2 Muller K H A SPICE Cookbook Intusoft 1990 3 Meares L G Hymowitz C E Spice Applications Handbook Intusoft 1990 4 Intusoft Newsletters various dates from 1986 to present 5 Quarles T L Analysis of Performance and Convergence Issues for Circuit Simulation U C Berkeley ERL Memo M89 42 April 1989 7 2 What is Convergence or Non Convergence The answer to a non linear problem such as those in the SPICE DC and Transient analyses is found via an iterative solution For example WinSpice3 makes an initial guess at the circuit s node voltages and then using the circuit conductances finds the mesh currents The currents are then used to recalculate the node voltages and the cycle begins again This continues until all of the node voltages settle to within certain tolerance limits which can be altered using various OPTIONS parameters such as RELTOL VNTOL and ABSTOL If the node voltages do not settle down within a certain number of iterations the DC analysis will issue an error message such as No convergence in DC analysis PIVTOL Error Singular Matrix or Gmin Source Stepping Failed SPICE will then
48. tnt den han Ni tata ts 32 BON SINO TS maso dal See an diese trees a tie etes 32 AD Ad EXPO Exponen alo in a 33 AeA PWS PIece W 186 LO a eee 34 421 5 SERENO singlesFrequency PNEU cae hates ee ns 34 4 2 2 mear Dependent SOULCES calce a 34 4 2 2 1 Gxxxx Linear Voltage Controlled Current Sources ccccceceeeeeeeeeeeeeeees 35 4 2 2 2 Exxxx Linear Voltage Controlled Voltage Sources oooooooooooooocccncncnnnnnnnnnnos 35 4 2 2 3 Fxxxx Linear Current Controlled Current Sources cccccsceeeeeeeeeeeeeeeees 35 4 2 2 4 Hxxxx Linear Current Controlled Voltage Sources oooooooooonncccnnnnnnnnnnnnnnnnss 35 4 2 3 Non linear Dependent Sources using POLY cccccseceeceeeeeeeeeeeeaeeeessseeeeeeeeeess 36 ADS VOltase Controled Current S OUNCES sacs tute nn tea retenue 36 4 2 3 2 Voltage Controlled Voltage Sources ooooooooonnnnccconononnnnnnnnonononononanonnnnnnnnnnnnnnnnoss 37 42 33 Current Controlled Current SourceS lisis alli 37 4 2 3 4 Current Controlled Voltage Sources 38 4 2 4 Non linear Dependent SOULCES a 38 4 2 4 1 Bxxxx gt Non linear Dependent Sources id 38 4 2 4 2 Exxxx Non linear Voltage Controlled Voltage Source ooooooonnnnnnccccnnnnnnnnnss 42 4 2 4 3 Fxxxx Non linear Current Controlled Current Source cccccceeeeeeeeeeeees 42 4 2 4 4 Gxxxx Non linear Voltage Controlled Current Source ooooooooonnncncnnnnnnnnnnnoss 43 4 2 4 5 Hxxxx No
49. using the URC and TRA models however the newer LTRA model is usually faster and more accurate than the others are The operation of the LTRA model is based on the convolution of the transmission line s impulse responses with its inputs see 8 Copyright 2002 2003 Mike Smith 44 16 08 2005 WinSpice3 User Manual The LTRA model takes a number of parameters some of which must be given and others that are optional Due mme tte aus ou CE pee CC CEE CE CN CT CS CE CON CT CS encinas CCS CE CE M ET CE CS RS CE NOSTEPLIMIT don t limit timestep to less flag not set than line delay 1 se NOCONTROL dont do complex timestep not set se control MIXEDINTERP use linear when quadratic not set set seems bad COMPACTREL special reltol for history ag RELTOL 1 0e 3 compaction COMPACTABS special abstol for history compaction TRUNCNR use Newton Raphson method g not set set for timestep control TRUNCDONTCUT don t limit timestep to keep flag not set impulse response errors low The following types of lines have been implemented so far fla fla fl fla a e RLC uniform transmission line with series loss only e RC uniform RC line e LC lossless transmission line and RG distributed series resistance and parallel conductance only Any other combination will yield erroneous results and should not be tried The length LEN of the line must be specified NOSTEPLIMIT is a flag that will remove the default restrict
50. value I 1E 3 V 17 3 1 5E 3 V 17 3 2 note that since the source nodes are the same as the controlling nodes this source actually models a nonlinear resistor 4 2 3 2 Voltage Controlled Voltage Sources General form EX XOX ON INS POLY NE NG IL INCU 23 4 IPO SP eee ALS Examples Bel A AL LP PO see SZ dl al O EX del U POL Lo DU alo a OD VE ECs iy oO 1 a 55 N and N are the positive and negative nodes respectively POLY ND only has to be specified if the source is multi dimensional one dimensional is the default If specified ND is the number of dimensions which must be positive NC1 NC1 are the positive and negative controlling nodes respectively One pair of nodes must be specified for each dimension PO PI P2 Pn are the polynomial coefficients The optional initial condition is the initial guess at the value s of the controlling voltage s If not specified 0 0 is assumed The polynomial specifies the source voltage as a function of the controlling voltage s The second example above describes a voltage source with value V V 13 0 V 15 0 VAT7 0 in other words an ideal voltage summer 4 2 3 3 Current Controlled Current Sources General form EII NF POE END YNI SVN sase PO SPL LR KIC Sieg tee Examples PL L2 10 VCC IMA ToM EXPER 15 20 VSENS 0 1 N and N are the positive and negative nodes respectively Current flow 1s from the positive node through the source
51. you can integrate the current from a constant current source with a capacitor and use the resulting voltage don t forget to set the initial voltage across the capacitor Non linear resistors capacitors and inductors may be synthesised with the non linear dependent source Non linear resistors are obvious Non linear capacitors and inductors are implemented with their linear counterparts by a change of variables implemented with the non linear dependent source The following subcircuit will implement a non linear capacitor po UOCKE MLCap pos neg Bx calculate input voltage BX t 0 v f v pos neg Cx linear capacitance CX 2 0 i Vx Ammeter to measure current into the capacitor VX 2 1 BDG OVGLES Drive the current through Cx back into the circuit FX pos neg Vx 1 ends Non linear inductors are similar 4 2 4 2 Exxxx Non linear Voltage Controlled Voltage Source General form EXXXXXXX N N VALUE EXPR Examples EL Od VA BUESTaA cos log Gy lL 272 SL El 3 4 VALUE exp pi v vda This the Pspice version of the Bxxx source in section 4 2 4 1 The expression syntax also applies here WinSpice3 textually substitutes an equivalent Bxxx line when the circuit is read in Note that although this 1s defined as a voltage controlled voltage source no checking 1s done that the expression contains only voltages For example EL 5 VALUE Y42 branch s Hi 1 5 VALUE v2 branch 3 are both current contro
52. 11 1 11 Si 0 69 Sbd 0 67 Ge ll m UN i m E G activation energy saturation current temp exp flicker noise exponent coefficient for forward bias depletion capacitance formula C 2 0 Sbd e i sl current at breakdown voltage NOM parameter measurement temperature 4 4 2 Qxxxx Bipolar Junction Transistors BJTs BV IBV T flicker noise coefficient UN General form OXXXXXXX NC NB NE lt NS gt MNAME lt AREA gt lt OFF gt lt IC VBE VCE gt lt TEMP T gt Examples 023 EO 241 198 MOD TO SUb 0 00 Q50A 11 26 4 20 MODI NC NB and NE are the collector base and emitter nodes respectively NS is the optional substrate node If unspecified ground is used MNAME is the model name AREA is the area factor and OFF indicates an optional initial condition on the device for the DC analysis If the area factor is omitted a value of 1 0 1s assumed The optional initial condition specification using IC V BE VCE is intended for use with the UIC option on the TRAN control line when a transient analysis is desired starting from other than the quiescent operating point See the IC control line description for a better way to set transient initial conditions Copyright 2002 2003 Mike Smith 49 16 08 2005 WinSpice3 User Manual The optional TEMP value is the temperature at which this device is to operate and overrides the temperature specification on the OPTION control line 4 4 2
53. 122 7 5 1 DE Conver sence SONON cre SR E eae let ele Oi oat ele 122 19 2 DG SWeeDConvercence SOIUHONS sas ne CU ia 124 TID Transient Convergence Solutions ane A ee ae 125 7 5 4 Special Cases EE E E E ET T E 127 7 5 5 WinSpiees Conversence Her 127 BIBLIOGRAPHY was a la a ico 129 APPENDIX A EXAMPLE CIRCUITS yrrir aE dados 130 Copyright 2002 2003 Mike Smith 16 08 2005 WinSpice3 User Manual 9 1 Circuit LL Ditterential Pale SR ic pido io cc 130 9 2 Circuit 2 MOSFET Characters O idos 130 9 3 Ei ld A aca 130 9 4 Circuit Pour Bit Binary Added adas 131 9 5 Circ its5 Transmission Line Merritt dol 133 10 APPENDIX B MODEL AND DEVICE PARAMETERS cccceceecseseeeeeeeeeeeeeeeeeeeeeeeees 134 IOT IRC rr RC ne e eme cine 135 102 ASRES ATA ee e 135 103 BJE Bipolar Junction tabs add 135 10 4 BSIMI Berkeley Short Channel IGFET Model 138 10 5 BSIM2 Berkeley Short Channel IGFET Model 141 10 6 Capacitor Pixed capacitor einstein ic 145 107 CCCS Current controlled Current SOULCE ita 146 10 8 CCVS Linear current controlled current source UV 146 10 97 ESwiteh Current controlled 1deal Ss With dana 147 10 10 Diode Junction Diode model und aia 148 IO Inductor INCU C LORS ra nee and 149 1012 mutual Mutual Adu CUES ii aca 149 10 135 IsSourc Independent Current SOU te othe run Na en 149 10 14 JFET Junction Field ettect transistor a 150 10 15 LETRA Lossy transmission MS td A E ae a 151 I MES GaAs
54. 2 and 2 Fl F2 In the latter case Fl F2 F2 so the result at the F1 F2 component is erroneous because there is the strong fundamental F2 component at the same frequency Also Fl F2 2 Fl F2 in the latter case and each result is erroneous individually This problem is not there in the case where F2OVERFI 49 100 because F1 F2 51 100 Fl lt gt 49 100 Fl F2 In this case there are two very closely spaced frequency components at F2 and Fl F2 One of the advantages of the Volterra series technique is that it computes distortions at mix frequencies expressed symbolically i e n Fl m F2 Therefore one is able to obtain the strengths of distortion components accurately even if the separation between them is very small as opposed to transient analysis for example The disadvantage is of course that if two of the mix frequencies coincide the results are not merged together and presented though this could presumably be done as a post processing step Currently the interested user should keep track of the mix frequencies and add the distortions at coinciding mix frequencies together should it be necessary 5 3 4 NOISE Noise Analysis General form NOISE VAOUTEUT lt REE Sj SRE DEGC TEN M OCE J BES ESTART Foor PTS PER SUMMARY gt Examples NOISE V 5 VIN DEC 10 IkHZ 100Mhz NOISE Vlogs Vil DELS 220 Lees 1 The Noise line does a noise analysis of the circuit OUTPUT is the node at which the total output nois
55. 7 7 spice and spice3 give the correct results Lin 10 LAC EL EELK Morse wel iin dee 10 10 100k T print noise onoise end A sample session showing how WinSpice3 stores the results is shown below Spice gt run Noise analysis Spice 2 gt setplor Type the name of the desired plot new New plot Current noise2 simple resistor circuit Integrated Noise V or A noisel simple resistor circuit Noise Spectral Density Curves Y or A 2 Hz conse Constant values constants noisel Spurs gt gt display Here are the vectors currently active Title simple resistor circult Name noisel Noise Spectral Density Curves V or A 2 Hz Date Tue Aug 20 23735717 1996 frequency frequency real 41 long grid xlog default scale inoise_spectrum voltage real 41 long onoise_rl voltage real 41 long onoise_spectrum voltage real 41 long Spice 4 gt The onoise_rl plot contains the noise contributions of resistor rl at each frequency point If the last option on the noise line had been omitted this vector would not have been created NOTE in SPICE2 the syntax for noise lines was different and SPICE2 required an AC line to be present The AC line is not required for WinSpice3 For your information to make the circuit above work on SPICE2 the noise line above would need to be replaced by ac dec 10 10 100k noise v 1 iin 1 5 3 5 OP Operating Point Analysis General form OB
56. EC 00 DES VIN LS 2 OA0O0T ACL SEN COL MEG SRE 29 271 AC Us so 45 0 ISFEMCO 1 TORK pF IK VMEAS 12 9 VCARRIBR L 0 DISTORT OL 90 00 VMODULATOR 2 0 DISTOF2 0 01 TEN Ll SAC LL DISTOEL DISTOB Z 0 000 N and N are the positive and negative nodes respectively Note that voltage sources need not be grounded Positive current is assumed to flow from the positive node through the source to the negative node A current source of positive value forces current to flow out of the N node through the source and into the N node Voltage sources in addition to being used for circuit excitation are the ammeters for WinSpice3 that is zero valued voltage sources may be inserted into the circuit for the purpose of measuring current They of course have no effect on circuit operation since they represent short circuits DC TRAN is the DC and transient analysis value of the source If the source value 1s zero both for DC and transient analyses this value may be omitted If the source value is time invariant e g a power supply then the value may optionally be preceded by the letters DC ACMAG is the AC magnitude and ACPHASE 1s the AC phase The source is set to this value in the AC analysis If ACMAG is omitted following the keyword AC a value of unity is assumed If ACPHASE is omitted a value of zero is assumed If the source is not an AC small signal input the keyword AC and the AC values are omitted DISTOF1 and DISTOF2 are the key
57. ENDS After a simulation is run the subcircuit names will have a sharp sign and a number appended to them in order to make them unique If two RSUBs are called with different sets of parameters then two different subcircuit representations will be created automatically For example X1 1 2 RSUB WIDTH 50U RPERSQ 1000HMS X2 3 4 RSUB WIDTH 10U RPERSO 1KOHMS will produce XL 2 RSUBFO X2 3 4 RSUB 1 SUBCOKT RSUB 0 EL 2 RL 1 2 250 200K ENDS SUBCKI RSUB L L 2 RE E 2 AO DOK ENDS Each subcircuit call with a different parameter list will automatically create a new subcircuit If all subcircuit calls use the same parameter list only one subcircuit will be generated for all calls Copyright O 2002 2003 Mike Smith 20 16 08 2005 WinSpice3 User Manual 4 CIRCUIT ELEMENTS AND MODELS Data fields that are enclosed in less than and greater than signs lt gt are optional All indicated punctuation parentheses equal signs etc 1s optional but indicate the presence of any delimiter Further future implementations may require the punctuation as stated A consistent style adhering to the punctuation shown here makes the input easier to understand With respect to branch voltages and currents WinSpice3 uniformly uses the associated reference convention current flows in the direction of voltage drop 4 1 Elementary Devices The first letter of a line specifies the type of device being defined WinSpice supports the follo
58. FET Model IC Vector of DS GS BS initial voltages Copyright 2002 2003 Mike Smith 141 16 08 2005 WinSpice3 User Manual BSIM2 instance parameters input output Source area Multiplier Flag to indicate PMOS Copyright 2002 2003 Mike Smith 142 16 08 2005 WinSpice3 User Manual BSIM2 model parameters input output Flat band voltage Imu3g Length dependence of mu3g Copyright 2002 2003 Mike Smith 143 16 08 2005 WinSpice3 User Manual Ivofd Length dependence of vofd Copyright 2002 2003 Mike Smith 144 16 08 2005 WinSpice3 User Manual Device length Copyright 2002 2003 Mike Smith 145 16 08 2005 WinSpice3 User Manual Capacitor instance parameters output only Device current Instantaneous device power Capacitor model parameters input only c Capacitor model Capacitor model parameters input output j Bottom Capacitance per area control neg_node control Controlling voltage source Copyright 2002 2003 Mike Smith 146 16 08 2005 WinSpice3 User Manual CCVS instance parameters output only pos_node Positive node of source Initially open CSwitch instance parameters input output control Name of controlling source CSwitch instance parameters output only pos_node Positive node of switch Open conductance Copyright 2002 2003 Mike Smith 147 16 08 2005 WinSpice3 User Manual 10 10 Diode Junction Diode model Diode
59. JS Also intrinsic model parameter values such as the threshold voltage can either be user specified or derived from process parameters NSUB TOF etc However user specified values always override derived values CE EE E EE CO TOB Back oxide thickness t b 3E 7 Silicon film thickness ty 3E 7 Copyright 2002 2003 Mike Smith 61 16 08 2005 WinSpice3 User Manual Type of gate material 1 opposite to substrate ss same as substrate aluminium gate CO E CI rer CECI E of por pencas EE CS CS po Er EE CS CT pa CE CE TS ES CS EC EE TS ES o PE CS CS CE EE CE TS ES paar Er CS CS CR ET CS LS ann er CS CS COM ES po fimes ET CE EC er PET CS CE CS CE errno E CS CCS CR poean e o COM irmana CS fees ras er ES CS LS When not given an estimate is derived from other model parameters gt When not given an estimate is derived from other model parameters Copyright O 2002 2003 Mike Smith 62 16 08 2005 WinSpice3 User Manual LX Effective pinch off region length second CLM FF model Cr ow fe gt anemones CS is omens CS CS IE JS Junction saturation current density per metre A m le 10 1E 9 width JS1 Second junction saturation current density per A m 1E 12 metre width rot EP CS CS CR CE ea CON EE CS TS _ DVT Switch for 6 temperature dependence in diodes only Zero bias junction capacitance per square metre of sidewall junction area avarar emana e aonar
60. OL 01 This option 1s actually encouraged for most simulations as reducing the RELTOL will speed the simulation up greatly 10 50 with only a very minor loss in accuracy A useful recommendation 1s to set RELTOL to 0 01 for initial simulations and then reset 1t when you have the simulation going the way you like it and a more accurate answer 1s required Reduce the accuracy of ABSTOL VNTOL if current voltage levels allow Example OPTIONS ABSTOL 1N VNTOL 1M ABSTOL VNTOL can be set to about 8 orders of magnitude below the average voltage current Defaults are ABSTOL 1PA and VNTOL 1UV Set ITL4 100 in the OPTIONS statement Example OPTIONS ITL4 100 Increases the number of transient iterations at each time point that WinSpice3 will go through before giving up Copyright O 2002 2003 Mike Smith 125 16 08 2005 WinSpice3 User Manual Realistically Model Your Circuit add parasitics especially stray junction capacitance The idea here is to smooth any strong nonlinearities or discontinuities Adding capacitance to various nodes and making sure that all semiconductor junctions have capacitance can do this Other tips include Use RC snubbers around diodes Capacitance for all semiconductor junctions 3PF for diodes SPF for BJT s if no specific value is known Add realistic circuit and element parasitics Find a subcircuit representation 1f the model doesn t fit the device behaviour especially for RF and power devices li
61. OUT 13 0 LK XXX FOR THOSE WITH MONEY AND MEMORY TO BURN TRAN INS 6400NS END 9 5 Circuit 5 Transmission Line Inverter The following deck simulates a transmission line inverter T wo transmission line elements are required since two propagation modes are excited In the case of a coaxial line the first line T1 models the inner conductor with respect to the shield and the second line T2 models the shield with respect to the outside world TRANSMISSION LINE INVERTER Vi L 0 PULLS ECO T 1010 UN RI L 2 a0 X1 2 U p A TLINE R2 4 0 50 SUBCKT TEINE 1 2 3 4 ale L 22 o gt 4 Z0 50 TD 1 5NS a 2 0 4 0 ZO 100 TD 1NS ENDS TLLINE TRAN O INS 20NS END Copyright O 2002 2003 Mike Smith 133 16 08 2005 WinSpice3 User Manual 10 APPENDIX B MODEL AND DEVICE PARAMETERS The following tables summarise the parameters available for each of the devices and models There are several tables for each type of device supported by WinSpice Input parameters to instances and models are parameters that can occur on an instance or model definition line in the form keyword value where keyword 1s the parameter name as given in the tables Default input parameters such as the resistance of a resistor or the capacitance of a capacitor obviously do not need the keyword specified Output parameters are parameters which are available for the output of operating point and debugging information There are two types of param
62. P 10 3 DMOD OS 3 8 0 QMOD ENDS NAND SUBCKT ONEBIT 123 4 5 6 A NODES INPUL 2 CARRY EN QULPUL CARKY OUL VEC X1 dl se PE NAND X2 LT lt 8 NAND X3 Zt OG NAND X4 o 9 10 6 NAND X5 gt 10 EE p NAND X6 a L ee G NAND x LU LL Dos 6 NAND Xo LA La A 6 NAND xo AE F o G NAND ENDS ONEBILT SUBCKT TWOBIT L 2 3 4 56 7 8 9 amp ODES INPUT BITO 2 BIT OUTPUT Biro 7 BIT CARRY IN CARRY OUT VCC X1 i 2 Y Sar OERI X2 3 4 10 6 8 9 ONEBIT ENDS TWOBIT sOUBCK FOURS LE L 2 84 OL to SO LO EL AA do A Lo x NODES INPUT BETO 2 7 BIT 2 ABLA E 7 BIT 2 A OUTPUT BITO BITLI Z BLIZ 7 BIT CARRY IN CARRY OUT VCC X1 L A a Ud SO LS de T9 TWOBIT X2 D sor o EL 2 Lo da 109 TWOBIT ENDS FOURBIT FFSA DEFINE NOMINAL CTREUTT MODEL DMOD D MODEL QMOD NPN BF 75 RB 100 CJE 1PF CJC 3PF VCC oo Y DE OV VINIA 1 0 PULSE 0 3 0 IONS IONS 10NS 50NS VINIB 2 Q PULSE 0 3 0 10NS TONS 20NS 100NS VIN2A 3 0 PULSE 08 10 LONS LONS AONS 200NS VIN2B 4 0 PULSE 0 2 0 LONS LONS SONS 400NS VIN3A 5 0 PULSE O 3 0 10NS IONS IGONS GOONS VENSB 6 0 PULSE 05 0 LONS IONS 320NS 1600NS VIN4A 7 0 PULSE 0 3 0 LONS TONS lt 640NS 3200NS VIN4B 8 0 PULSE 0 3 0 LONS LUNS 1280NS 6400NS X1 Ll 2 Se A SC A TS COLO SEL ZA 100 15 99 BORBET RBEEO 9 50 LK REE L0 30 1K EBETZ Le Y 1K Copyright O 2002 2003 Mike Smith 132 16 08 2005 WinSpice3 User Manual RETIES 12 30 IK RC
63. PICE element types is given in what follows The strings XXXXXXX Y Y Y Y YY Y and ZZZZZZZ denote arbitrary alphanumeric strings For example a resistor name must begin with the letter R and can contain one or more characters Hence R R1 RSE ROUT and R3AC2ZY are valid resistor names Details of each type of device are supplied in a following section Fields on a line are separated by one or more blanks a comma an equal sign or a left or right parenthesis extra spaces are ignored A line may be continued by entering a plus in column 1 of the following line WinSpice3 continues reading beginning with column 2 A name field must begin with a letter A through Z and cannot contain any delimiters A number field may be an integer field e g 12 44 a floating point field 3 14159 either an integer or floating point number followed by an integer exponent le 14 2 65e3 or either an integer or a floating point number followed by one of the following scale factors Letters immediately following a number that are not scale factors are ignored and letters immediately following a scale factor are ignored Hence 10 10V 10Volts and 10Hz all represent the same number and M MA MSec and MMhos all represent the same scale factor Note that 1000 1000 0 1000Hz le3 1 0e3 1KHz and 1K all represent the same number Copyright O 2002 2003 Mike Smith 8 16 08 2005 WinSpice3 User Manual Be careful when defining values in
64. RATIO parameterised expression in curly braces EL Diz VM RATIO 224 RS 6 93 LU VM 5 6 ENDS Subcircuit after parameters are passed and evaluated SUBCKT XFMR 1 2 3 4 RP 1 2 1MEG EL 5 amp 1 28 Fl 12 VM 6 Ro 461 8 LU VM 5 6 ENDS In the example you can see that the subcircuit model for the transformer XFMR can represent many different transformers by merely changing the value of RATIO Therefore it is not necessary to construct a different subcircuit for every turns ratio The turns ratio can be set at runtime and the PARAM function will take care of passing the parameter and calculating the correct values The PARAM statement defines the value of a parameter 1 A parameter name can be used in place of most numeric values in the circuit description or passed into a subcircuit 2 Parameters can be constants or expressions involving other parameters 3 PARAM expressions may also take on the same form and features of analog behavioural element expressions including Inline equations and If Then Else statements 4 Name cannot begin with a number 5 The parameter values must be either constants or expressions 6 Curly braces are optional for constants or single parameters but mandatory for all expressions Copyright 2002 2003 Mike Smith 16 16 08 2005 WinSpice3 User Manual 7 If curly braces are not used expansion is only applied to model parameters and device parameters This is done to prevent in
65. Since this fix may affect parameter fitting the option BADMOS3 may be set to use the old implementation see the section on simulation variables and the OPTIONS line SPICE level 1 2 3 and 6 parameters GAMMA bulk threshold parameter y PHI surface potential p LAMBDA channel length modulation MOS1 and MOS2 only Copyright 2002 2003 Mike Smith 55 16 08 2005 WinSpice3 User Manual CEC CN EEE CN ee r porros fr ae sans fr rx Ce CS gate source overlap capacitance per meter channel width CGSO CGDO gate drain overlap capacitance per meter channel width CGBO gate bulk overlap capacitance per meter channel length RSH drain and source diffusion sheet resistance Q 00 10 0 zero bias bulk junction bottom cap per sq F m2 2 0e 4 meter of junction area bulk junction bottom grading coefficient e Jos e zero bias bulk junction sidewall cap per meter of junction perimeter A CJSW MJSW bulk junction sidewall grading coefficient levell 0 33 level2 3 a UN bulk junction saturation current per sq meter of junction area NSUB Substrate doping aa 1 Surface state density em foo 1 0e10 fast surface state density e foo TPG type of gate material 1 opp to substrate 1 same as substrate 0 Al gate Copyright O 2002 2003 Mike Smith 56 16 08 2005 WinSpice3 User Manual Cr CC eon TC EC CT fom D E CE ES critical field for mobility degrad
66. T model PJF P channel JFET model NMOS N channel MOSFET model PMOS P channel MOSFET model NMF N channel MESFET model PMF P channel MESFET model Parameter values are defined by appending the parameter name followed by an equal sign and the parameter value Model parameters that are not given a value are assigned the default values given below for each model type Models model parameters and default values are listed in the next section along with the description of device element lines 3 4 Subcircuits A subcircuit that consists of WinSpice3 elements can be defined and referenced in a fashion similar to device models The subcircuit is defined in the input file by a grouping of element lines the program then automatically inserts the group of elements wherever the subcircuit is referenced There is no limit on the size or complexity of subcircuits and subcircuits may contain other subcircuits An example of subcircuit usage is given in Appendix A Copyright 2002 2003 Mike Smith 10 16 08 2005 WinSpice3 User Manual 3 4 1 SUBCKT Line General form SUBCKT subnam N1 lt N2 N3 gt Examples SUBCKT OPAMP 1 2 3 4 A circuit definition is begun with a SUBCKT line SUBNAM is the subcircuit name and N1 N2 are the external nodes which cannot be zero The group of element lines which immediately follow the SUBCKT line define the subcircuit The last line in a subcircuit definition 1s the ENDS line see section 3 4 2 Con
67. The inclusion of this line in an input file directs WinSpice3 to determine the DC operating point of the circuit with inductors shorted and capacitors opened Copyright O 2002 2003 Mike Smith 75 16 08 2005 WinSpice3 User Manual NOTE a DC analysis is automatically performed prior to a transient analysis to determine the transient initial conditions and prior to an AC small signal Noise and Pole Zero analysis to determine the linearized small signal models for non linear devices see the KEEPOPINFO in section 5 1 5 3 6 PZ Pole Zero Analysis General form PL PA EZ PE EA LL NODE1 NODE1 NODE1 NODE1 NODE1 NODE 1 Examples EZ EL SEA 03 Ze 30 D 414 NODE 2 NODE2 NODE2 NODE2 NODE 2 NODE 2 O CUR O VOL 1 UE NODE3 NODE3 NODE3 NODE3 NODE3 NODE3 POL ZER PZ NODE 4 NODE 4 NODE 4 NODE 4 NODE 4 NODE 4 CUR CUR CUR VOL VOL VOL POL AER PZ POL ZER PZ CUR stands for a transfer function of the type output voltage input current while VOL stands for a transfer function of the type output voltage input voltage POL stands for pole analysis only ZER for zero analysis only and PZ for both This feature is provided mainly because if there is a non convergence in finding poles or zeros then at least the other can be found Finally NODE1 and NODE2 are the two input nodes and NODE3 and NODE4 are the two output nodes Thus there is complete freedom regarding the outp
68. WinSpice3 User s Manual 23 October 2003 Mike Smith Copyright 2003 Mike Smith Based on Spice 3 User Manual by T Quarles A R Newton D O Pederson A Sangiovanni Vincentelli Department of Electrical Engineering and Computer Sciences University of California Berkeley Ca 94720 WinSpice3 User Manual Table Of Contents 1 Fo HORS o A a Ne cie l 1 1 Installation is cios l 1 2 RUTAS WARS PICS in Sn 2 1 3 Uris tale Win ICC eh diese deien tetes ni oeil iren sente 4 1 4 Command Pie OP GMs Es None annee 4 2 IVPE SOF ANAL TS IS dt o A 5 2 1 TAINAN SUS ahs as ene rs eo tt nt nd ane 5 222 AC Side Sion al AAA SSSR ea 5 2 3 Transient AAA SSSR A EN 5 2 4 FOLZ 10 Analysis votes li ltd 5 2 5 Small Signal Distortion Amal S18 viendo iia Dd iii 5 2 6 SECHS A a E a E e a a 6 2 7 NOISE ANANS is APR ne te da ent 6 2 8 Analysis At Different Temperatures biie 6 3 CIRCUIT DESCRIP HON atera liar irreal 8 3 1 General Structure And Conventions sisi nri er aE N E E EE 8 3 2 Title Line Comment Eines And END Ln en Oe ROR eee Re 9 21 ECV Re dass na A a 9 3 22 BND RIRE ne ae a en Dino on nese waancaoeatncteemenes 9 3 2 9 COMM NES aiii 9 319 MODEL Device Mod a cs eto o o dal 9 3 4 A SR oe Ma aed ta de 10 3 4 1 SUBO TEN RS tic bin RCN ne ater bn clasica 11 3 4 2 ENDS oa 11 3 4 3 GLOBAL ARS chers rachat dirt ti ect toirnedities 11 3 4 4 XK SUDCINCUIC Call Serer A 1 3 5 Combina les tii 12 3 5 1 INCLUDE LINES ta ey ch des ee en a tn 12 3 3 2
69. Xil xindices Kil6 XIN xcompress comp xdelta xdel ydelta ydel xlog ylog loglog vs xname xlabel word ylabel word title word samep linear Tlimplot combpiors point plore Plot the given exprs on the screen 1f you are on a graphics terminal The xlimit and ylimit arguments determine the high and low x and y limits of the axes respectively The xindices arguments determine what range of points are to be plotted everything between the xilo th point and the xihi th point is plotted The xcompress argument specifies that only one out of every comp points should be plotted If an xdelta or a ydelta parameter 1s present 1t specifies the spacing between grid lines on the X and Y axis These parameter names may be abbreviated to xl yl xind xcomp xdel and ydel respectively The xname argument is an expression to use as the scale on the x axis If xlog or ylog are present then the X or Y scale respectively is logarithmic loglog is the same as specifying both The xlabel and ylabel arguments cause the specified labels to be used for the X and Y axes respectively If samep is given the values of the other parameters other than xname from the previous plot hardcopy or asciiplot command is used unless re defined on the command line The title argument is used in the place of the plot name at the bottom of the graph The linear keyword is used to override a default log scale plot as in the output for an AC analysis
70. a subcircuit apply only within the subcircuit definition Passed parameters override all other parameters of the same name e Expressions support the same operators and syntax used in the B element including mathematical and 1f then else expressions detailed in section 4 2 4 The resulting value is inserted using engineering notation e Recursive parameter values are not allowed for example Param N N 1 e You may pass unused parameters However each parameter which is used within an expression must be assigned a value or have a default value e Parameters passed into subcircuits must be accounted for with PARAM statement s put on the subcircuit call line in curly braces or appear in the subcircuit s default listings e Expressions to be evaluated in the PARAM statements or in a subcircuit listing must also be placed inside curly braces e Default parameters are placed on the SUBCKT definition line All of the parameters should have defaults Copyright O 2002 2003 Mike Smith 17 16 08 2005 WinSpice3 User Manual e Parameters are available only within the subcircuit definition in which they appear If a PARAM is defined in the main netlist it is available in all subcircuits e Passed parameters will take precedence over default parameters Parameters or Expressions using parameters must appear within curly braces in order to be evaluated For example Subckt sub 1 2 PARAMS Rval 1 Rval 1 2 Rval ends In the
71. advertent expansion of parameters occurring 8 Expression can contain constants parameters or mathematical operators similar to the B element see section 4 2 4 9 The PARAM statements are order independent but parameter values must be completely defined such that all expressions can be evaluated to a resultant numeric value 10 A PARAM statement can be used inside a subcircuit definition to establish local subcircuit parameters Item 7 above prevents accidental expansion of a parameter which may have the same name as a circuit element or a node e g PARAM VCC 2V MOS 23 might otherwise cause the VCC line to be corrupted to A 2 3 T which isn t what is wanted Parameters and parameterised equations can be used in just about any facet of the circuit including but not limited to all numeric element properties including transmission lines and polynomials analysis statements AC TRAN DC and independent sources PWL etc WinSpice3 parameter passing syntax attempts to be compatible with the PARAMS PARAM and parameterised expression syntax used by Hspice Pspice Ispice and others The PARAM function evaluates expressions in the main circuit or in subcircuits using PARAM statement variables passed parameters or default parameters Expressions may be as complex or as simple as desired Several rules follow e Parameters defined in the main circuit file are applied to all subcircuits Parameters defined in
72. alysis FREQ is the fundamental frequency and OV1 the desired output vector The Fourier analysis is performed over the interval lt TSTOP period TSTOP gt where TSTOP is the final time specified for the transient analysis and period is one period of the fundamental frequency The DC component and the first nine harmonics are determined For maximum accuracy TMAX see the TRAN line should be set to period 100 0 or less for very high Q circuits Copyright 2002 2003 Mike Smith 80 16 08 2005 WinSpice3 User Manual 6 INTERACTIVE INTERPRETER WinSpice3 consists of a simulator and a front end for data analysis and plotting The command line interface has most of the capabilities of the UNIX C shell WinSpice3 can plot data from a simulation on a graphics terminal or a workstation display Note that the raw output file is different from the data that SPICE2 writes to the standard output 6 1 Command Interpretation If a word is typed as a command and there is no built in command with that name the directories in the sourcepath list see section 6 2 are searched in order for the file If it is found it is read in as a command file as if it had been loaded using the source command see section 6 9 49 Before it is read however the variable argc is set to the number of words following the filename on the command line and argv is set to a list of those words After the file is finished these variables are unset Note that if a com
73. an be left in the simulation as additional fixes are added The order is also set up so that the initial fixes will be of the most benefit The user should note that fixes involving simulation options might simply mask the underlying circuit instabilities Invariably the user will find that once the circuit is properly modelled many of the options fixes will no longer be required 7 3 SPICE3 New Convergence Algorithms In addition to automatically invoking the traditional source stepping algorithm SPICE3 contains a new superior algorithm called Gmin Stepping This algorithm uses a constant minimal junction conductance to keep the sparse matrix well conditioned and a separate variable conductance to ground at each node as a DC convergence aid These variable conductances make the solution converge faster they are then reduced and the solution re computed Eventually the solution is found with a sufficiently small conductance Finally the conductance is removed entirely to obtain a final solution This technique has been found to work very well and SPICE3 uses it by default when convergence problems occur The suggestion made in a number of textbooks of reducing the OPTIONS GMIN value in order to solve convergence problems is performed automatically by this new algorithm 7 4 Non Convergence Error Messages Indications DC Analysis OP small signal bias solution before the AC analysis or Initial transient solution before the Transient a
74. an nos rr A Copyright 2002 2003 Mike Smith 63 16 08 2005 CBD CBS MJ FC WinSpice3 User Manual NLEV 1 f noise model level 1 1 f KFI MLC 1 F KF IZ NW L C 1 FU KE 8 NW LC AF A 1 f noise coefficient CGFSO Front gate source overlap capacitance per metre channel width CGFDO Front gate drain overlap capacitance per metre channel width CGFBO Front gate bulk overlap capacitance per metre channel length CGBSO Back gate source overlap capacitance per metre channel width CGBDO Back gate drain overlap capacitance per metre channel width CGBBO Back gate bulk overlap capacitance per metre channel length Copyright 2002 2003 Mike Smith 64 16 08 2005 WinSpice3 User Manual 4 4 66 Zxxxx MESFETs General form ZXXXXXXX ND NG NS MNAME lt AREA gt lt OFF gt lt IC VDS VGS gt Examples AL 275 AMI OFE 4 4 6 1 MESFET Models NMF PMF The MESFET model is derived from the GaAs FET model of Statz et al as described in 11 The DC characteristics are defined by the parameters VTO B and BETA which determine the variation of drain current with gate voltage ALPHA which determines saturation voltage and LAMBDA which determines the output conductance The formula are given by BV V _ A 3 lv 1 3 1 AV AS 2 V V TE aO for no L b V V a Two ohmic resistances RD and RS are included Charge storage 1s modelled by total gate charge as a function o
75. and periphery These vary as the MJ and MJSW power of junction voltage respectively and are determined by the parameters CBD CBS CJ CJSW MJ MJSW and PB Charge the piecewise linear voltages dependent capacitance model proposed by Meyer models storage effects The thin oxide charge storage effects are treated slightly different for the LEVEL 1 model These voltage dependent capacitances are included only if TOX is specified in the input description and they are represented using Meyer s formulation There is some overlap among the parameters describing the junctions e g the reverse current can be input either as IS in A or as JS in A m2 Whereas the first is an absolute value the second is multiplied by AD and AS to give the reverse current of the drain and source junctions respectively This methodology has been chosen since there is no sense in relating always junction characteristics with AD and AS entered on the device line the areas can be defaulted The same idea applies also to the zero bias junction capacitances CBD and CBS in F on one hand and CJ in F m2 on the other The parasitic drain and source series resistance can be expressed as either RD and RS in ohms or RSH in ohms sq the latter being multiplied by the number of squares NRD and NRS input on the device line A discontinuity in the MOS level 3 model with respect to the KAPPA parameter has been detected see 10 The supplied fix has been implemented in WinSpice3
76. and CT are the first order thermal resistance and thermal capacitance of the device If RT is not specified simulations are carried out without self heating The optional IC and OFF statements are for use in transient analyses to allow the user to set the device initial conditions The optional TEMP value allows the user to specify the ambient temperature of the device and overrides the temperature specification in the OPTION control line A model card specifying the STAG v2 1 parameters has the following general format MODEL MNAME NSOI PSOI lt LEVEL VAL gt model parameters After the model name MNAME the parameter NSOI or PSOI must be specified to indicate that the model is for either an n channel or p channel SOI MOSFET respectively LEVEL should be set to 3 to select the surface potential based partially depleted SOI MOSFET modes Levels 1 and 2 refer to relatively simple current based fully and partially depleted SOI MOSFET models This models are intended for internal use only and are not supported After this comes a list of model parameters which are assigned values via the format parameter name VAL The table at the end of this guide gives a description of all model parameters for the STAG SOI model together with default values and typical values for a 1 m NMOSFET There is some overlap in the model parameters For instance the junction saturation current can be given as an absolute value IS or as a current density
77. and the base emitter voltage for gl and q2 save bcl07 rb ql vbe q2 vbe Perform an analysis Op print bclO07 rb ql vbe q2 vbe Some variables are listed as both input and output and their output simply returns the previously input value or the default value after the simulation has been run Some parameters are input only because the output system can not handle variables of the given type yet or the need for them as output variables has not been apparent Many such input variables are available as output variables in a different format such as the initial condition vectors Copyright 2002 2003 Mike Smith 134 16 08 2005 WinSpice3 User Manual that can be retrieved as individual initial condition values Finally internally derived values are output only and are provided for debugging and operating point output purposes Please note that these tables do not provide the detailed information available about the parameters provided in the section on each device and model but are provided as a quick reference guide 10 1 URC Uniform R C line URC instance parameters input output l Length of transmission line n Number of lumps URC instance parameters output only pos_node Positive node of URC neg_node Negative node of URC gnd Ground node of URC URC model parameters input only urc Uniform R C line model URC model parameters input output k Propagation constant of interest Saturation cu
78. are specified by the arguments of the DISTOF2 keyword The analysis produces plots of all node voltages branch currents at the intermodulation product frequencies Fl F2 Fl F2 and 2 F1 F2 vs the swept frequency Fl The IM product of interest may be selected using the Setplot command and displayed with the print and plot commands It is to be noted as in the harmonic analysis case the results are the actual AC voltages and currents at the intermodulation frequencies and need to be normalised with respect to AC values to obtain the IM parameters If the DISTOFT or DISTOF2 keywords are missing from the description of an independent source then that source 1s assumed to have no input at the corresponding frequency The default values of the magnitude and phase are 1 0 and 0 0 respectively The phase should be specified in degrees It should be carefully noted that the number FZROVERF1 should ideally be an irrational number Since this is not possible in practice efforts should be made to keep the denominator in its fractional representation as large as possible certainly above 3 for accurate results That is if F2OVERF1 is represented as a fraction A B where A and B are integers with no common factors B should be as large as possible Note that A lt B because F2OVERFI1 is constrained to be lt 1 To illustrate why consider the cases where FLOVERF 1 is 49 100 and 1 2 In a spectral analysis the outputs produced are at Fl F2 Fl F
79. ared as a model name then it is assumed that there are 3 nodes otherwise it is considered a node To disable this you can set the variable nobjthack which forces BJTs to have 4 nodes for the purposes of subcircuit expansion at least The name param notation might not work with trace iplot etc yet The first line of a command file except for the spiceinit file should be a comment otherwise WinSpice3 may create an empty circuit Files specified on the command line are read before spiceinit is read Copyright O 2002 2003 Mike Smith 119 16 08 2005 WinSpice3 User Manual 7 CONVERGENCE Both DC and transient solutions are obtained by an iterative process which is terminated when both of the following conditions hold e The non linear branch currents converge to within a tolerance of 0 1 or 1 picoamp 1 0e 12 Amp whichever is larger e The node voltages converge to within a tolerance of 0 1 or 1 microvolt 1 0e 6 Volt whichever is larger Although the algorithm used in SPICE has been found to be very reliable in some cases it fails to converge to a solution When this failure occurs the program terminates the job Failure to converge in DC analysis is usually due to an error in specifying circuit connections element values or model parameter values Regenerative switching circuits or circuits with positive feedback probably will not converge in the DC analysis unless the OFF option is used for some of the devices in
80. arguments argl arg2 to be expression which may involve the arguments When the function is later used the arguments it is given are substituted for the formal arguments when it is parsed If expression is not present any definition for function is printed and if there are no arguments to define then all currently active definitions are printed Note that you may have different functions defined with the same name but different arities Some useful definitions are define max x y x gt y define min x y x lt y 6 9 10 Delete Remove a trace or breakpoint General Form delete debug number Delete the specified breakpoints and traces The debug numbers are those shown by the status command unless you do status gt file in which case the debug numbers are not printed 6 9 11 Destroy Delete a data set plot General Form destroy plotnames all Release the memory holding the data for the specified runs The command destroy all also resets plot numbering back to such that running an AC analysis say after destroy all always generates the acl plot vector This is useful if cir files contain plot lines which address explicit plot names like tranl v 6 because if other circuits are run first then the plot numbering may be changed 6 9 12 Diff Compare vectors General Form diff plot PLOC Nes ssl Compare all the vectors in the specified plots or only the named vectors if any
81. ation MOS2 only critical field exponent in mobility degradation MOS2 only Transverse field coefficient mobility deleted for MOS2 VMAX NEFF total channel charge fixed and mobile coefficient MOS2 only Coefficient for forward bias depletion 0 5 capacitance formula width effect on threshold voltage MOS2 and 1 0 MOS3 The level 4 and level 5 BSIM1 and BSIM2 parameters are all values obtained from process characterisation and can be generated automatically J Pierret 4 describes a means of generating a process file and the program Proc2Mod provided with WinSpice3 converts this file into a sequence of BSIM1 MODEL lines suitable for inclusion in a WinSpice3 input file Parameters marked below with an in the l w column also have corresponding parameters with a length and width dependency For example VFB is the basic parameter with units of Volts and LVFB and WVFB also exist and have units of Volt micrometer The formula Fri Q P F TE 0 Pi effective Wesrective 1s used to evaluate the parameter for the actual device specified with Copyright O 2002 2003 Mike Smith 57 16 08 2005 WinSpice3 User Manual ha Dl lg o D L and W fective 7 input D W Note that unlike the other models in WinSpice3 the BSIM model is designed for use with a process characterisation system that provides all the parameters thus there are no defaults for the parameters and leaving one out is considered an error
82. ation limit A value of O the default disables this limit ITL6 x If a circuit does not converge WinSpice tries the source stepping method where all voltage sources are scaled by a value between 0 and 1 over a number of steps ITL6 sets the number of steps to use If set to 1 the source stepping is disabled The default value is 100 KEEPOPINFO Retain the operating point information when an AC Distortion or Pole Zero analysis is run This is particularly useful if the circuit is large and you do not want to run a redundant OP analysis MAXORD x Maximum integration order NOTE This value defaults to 2 Contrary to what some textbooks say Spice3 does not implement the variable order Gear integration method so there is little point changing this value from its default This option is for compatability with Spice2 If MAXORD is set to 1 the Backward Euler integration method is used METHOD name Sets the numerical integration method used by SPICE Possible names are gear or trapezoidal or just trap The default is trapezoidal Only 2 order integrations are supported If MAXORD 1s set to 1 the Backward Euler integration method is used LONE x Sets the logical 1 voltage for Boolean behavioural expressions used in B voltage sources see section 4 2 4 1 Default value is 3 5V LZERO x Sets the logical O voltage for Boolean behavioural expressions used in B voltage sources see section 4 2 4 1 The default value is 0 3V
83. ave command all default values node voltages and voltage source currents are saved in addition to any other values listed 6 9 39 Sens Run a sensitivity analysis General Form sens output_variable sens output_variable ac DEC OCT LIN N Fstart Fstop Perform a Sensitivity analysis output_variable is either a node voltage ex v 1 or v A out or a current through a voltage source ex 1 vtest The first form calculates DC sensitivities the second form calculates AC sensitivities The output values are in dimensions of change in output per unit change of input as opposed to percent change in output or per percent change of input 6 9 40 Set Set the value of a variable General Form set word set word value Set the value of word to be value if itis present You can set any word to be any value numeric or string If no value is given then the value is the boolean true The value of word may be inserted into a command by writing word If a variable is set to a list of values that are enclosed in parentheses which must be separated from their values by white space the value of the variable is the list The variables used by WinSpice3 are listed in section 6 2 6 9 41 Setcirc Change the current circuit General Form setcirc circuit name The current circuit is the one that is used for the simulation commands below When a circuit is loaded with the source command see below it becomes the
84. be negligible with respect to other circuit elements Using switch impedances that are close to ideal in all cases aggravates the problem of discontinuities mentioned above Of course when modelling real devices such as MOSFETs the on resistance should be adjusted to a realistic level depending on the size of the device being modelled Copyright 2002 2003 Mike Smith 30 16 08 2005 WinSpice3 User Manual 2 If a wide range of ON to OFF resistance must be used in the switches ROFF RON gt le 12 then the tolerance on errors allowed during transient analysis should be decreased by using the OPTIONS control line and specifying TRTOL to be less than the default value of 7 0 When switches are placed around capacitors then the option CHGTOL should also be reduced Suggested values for these two options are 1 0 and le 16 respectively These changes inform WinSpice3 to be more careful around the switch points so that no errors are made due to the rapid change in the circuit 4 2 Voltage And Current Sources 4 2 1 Ixxxx and Vxxxx Independent Sources General form VXXXXXXX N N lt lt DC gt DC TRAN VALUE gt lt AC lt ACMAG lt ACPHASE gt gt gt lt DISTOF1 lt FI1MAG lt F1PHASE gt gt gt lt DISTOF2 lt F2MAG lt F2PHASE gt gt gt IYYYYYYY N N lt lt DC gt DC TRAN VALUE gt lt AC lt ACMAG lt ACPHASE gt gt gt lt DISTOF1 lt FI1MAG lt FIPHASE gt gt gt lt DISTOF2 lt F2MAG lt F2PHASE gt gt gt Examples V
85. bject Display hierarchical help information from an on line manual 6 9 61 Unalias Retract an alias General Form uinalias word axa Removes any aliases present for the words 6 9 62 Undefine Retract a definition General Form undefine function Definitions for the named user defined functions are deleted 6 9 63 Unlet Delete vectors General Form unlet varname Delete one or more vectors 6 9 64 Unset Clear a variable General Form unset word Clear the value of the specified variable s word 6 9 65 Version Print the version of WinSpice General Form version version id Print out the version of WinSpice that is running If there are arguments it checks to make sure that the arguments match the current version of WinSpice Copyright 2002 2003 Mike Smith 117 16 08 2005 WinSpice3 User Manual 6 9 66 Where Identify troublesome node or device General Form where When performing a transient or operating point analysis the name of the last node or device to cause non convergence is saved The where command prints out this information so that you can examine the circuit and either correct the problem or make a bug report You may do this either in the middle of a run or after the simulator has given up on the analysis For transient simulation the iplot command can be used to monitor the progress of the analysis When the analysis slows down severely or hangs interrupt the simulator
86. case of the ISWITCH device for the following equations Ic control current Lm In RON ROFF Lr In RON ROFF Im ION IOFF 2 Id ION IOFF Rs switch resistance For ION gt IOFF If Ic gt ION Rs RON Else if Ic lt IOFF Rs ROFF Else Rs exp Lm 3 Lr Ic Im 2 Id 2 Lr Ic Im Id For ION lt IOFF EE La E LON Rs RON Else ut Le Ore Rs ROFF Else RS exo 3 Le Che me C2 Ta de 2e I0 Im Id These equations give a continuous curve for Rs For example from the circuit Copyright 2002 2003 Mike Smith 29 16 08 2005 WinSpice3 User Manual PSpice voltage controlled switch example VS RS R1 oul VX R2 MODEL ho pa z a N SIN O 10V 1KHZ 100K 100K 2 U SMOD DE SV 1000 SMOD VSWITCH RON 100 ROFF 10000 VON 4 VOFF 1 TRAN 5US 2M5 SAVE ALL PLOT TRAN V 2 V 6 V 5 E ROBE END we get the output Figure 1 VSWITCH example The use of an ideal element that is highly non linear such as a switch can cause large discontinuities to occur in the circuit node voltages A rapid change such as that associated with a switch changing state can cause numerical roundoff or tolerance problems leading to erroneous results or timestep difficulties The user of switches can improve the situation by taking the following steps L First it is wise to set ideal switch impedances just high or low enough to
87. circuit the LIB line uses far less memory The input file can have any extension but by convention has the extension lib If the filename or path contain spaces double quote marks must be used As an example consider the following call to a BC338AP BJT OT TO To 20 BCS33AP The model name BC338AP is the name of the library entry that contains the description of the transistor The model is located in the library ZMODELS LIB provided with WinSpice The LIB ZMODELS LIB statement would retrieve the model from the BJTN library Copyright 2002 2003 Mike Smith 12 16 08 2005 WinSpice3 User Manual SAMPLE NETLIST LIB Z MODELS LIB DE VCE DO a a LO AIM 00 0 PRINT DOING TB 0 1 OL 24 1 UU BCSSCAP MC OZ WCBS Q END When the simulation is run the model library ZMODELS LIB will be searched for the BC338AP model statement which will be inserted into the final netlist SAMPLE NETLIST MODEL BC338AP NPN 1S 3 941445E 14 BF 175 VAF 109 45 NF 1 IKF 8 TSE 7 4025E 15 NE 1 3 BR 20 5 VAR 14 25 NR 974 IKR 1 15C 3 157E 13 NC 1 2 RB 1 1 RE 1259 RC 0539 CJE 63E 12 TF 75E 9 CJC 15 8E 12 TR 85E 9 VJC 505 MJC 39 SPRINT DE Dive TBO 2 OL 2 LU BC SSRAP VEO a VCR 3 0 END The netlist is loaded and the specified libraries are searched for unresolved subcircuit or model references in the order in which they appear in the netlist Each library will be searched repeatedly until no additional references
88. countered WinSpice3 includes both Trapezoidal and Gear integration Gear Integration 1s a very valuable especially for Power supply designers Copyright O 2002 2003 Mike Smith 126 16 08 2005 WinSpice3 User Manual 7 5 4 Special Cases MOSFETs Check the connectivity Connecting two gates together but to nothing else will give a PIVTOL Singular matrix error Check Model Level SPICE2 does not behave properly when MOSFETs of different Levels are used in the same simulation Long Transient Runs ITL5 0 Don t forget to change the ITLS OPTIONS parameter of transient iterations to 0 which means run until completion no matter how many iterations it takes 7 5 5 WinSpice3 Convergence Helpers WinSpice3 has several other options available to help convergence Gminsteps DC Convergence Example OPTIONS GMINSTEPS 200 The Gminsteps option adjusts the number of increments that Gmin will be stepped during the DC analysis Gmin stepping is invoked automatically when there is a convergence problem Gmin stepping is a new algorithm in WinSpice3 that greatly improves DC convergence The where function DC Transient Convergence Example CONEJO where endc The new ICL Interactive Command Language in WinSpice3 allows the user to ask for specific information about where a convergence problem is taking place In some cases WinSpice3 does not report the node or device that is failing to converge The where function is norma
89. ctors General form KXXXXXXX LYYYYYYY L4444444 VALUE Examples K43 LAA LBB 0 999 KXFRMR LI LZ 0287 LYYYYYYY and LZZZZZZZ are the names of the two coupled inductors and VALUE is the coefficient of coupling K which must be greater than O and less than or equal to 1 Using the dot convention place a dot on the first node of each inductor 4 1 5 Sxxxx and Wxxxx Switches 4 1 5 1 Sxxxx Voltage Controlled Switch General form SXAXXAXA NF N NE NC MODEL lt ON gt lt OF F gt Examples Sie bL 2 SA SWELCRET ON 282 3 6 00 Sm OL Switch1 1 2 10 O smodell Nodes l and 2 are the nodes between which the switch terminals are connected The model name is mandatory while the initial conditions are optional Nodes 3 and 4 are the positive and negative controlling nodes respectively Two types of switch model are provided the Spice3 switch SW and CSW and the Pspice switch ISWITCH and VSWITCH 4 1 5 2 Wxxxx Current Controlled Switch General form WYYYYYYY N N VNAM MODEL lt ON gt lt OFF gt Examples wl 1 2 vclock switchmodl W2 3 0 vramp sml ON wreset 5 6 vclck lossyswitch OFF Nodes 1 and 2 are the nodes between which the switch terminals are connected The model name is mandatory while the initial conditions are optional The controlling current is that through the specified voltage source The direction of positive controlling current flow is from the positive node through the source to the
90. current circuit WinSpice3 maintains a list of circuits which have been loaded into the system The length of this list is defined by the value of the environment variable maxcircuits which to conserve memory is set to 1 by default Copyright 2002 2003 Mike Smith 110 16 08 2005 WinSpice3 User Manual 6 9 42 Setplot Switch the current set of vectors General Form setplot plotname setplot new Set the current plot to the plot with the given name or if no name is given prompt the user with a menu Note that the plots are named as they are loaded with names like tranl or op2 These names are shown by the setplot and display commands and are used by diff below If the New plot item is selected or the command setplot new is used the current plot becomes one with no vectors defined Note that here the word plot refers to a group of vectors that are the result of one SPICE run When more than one file is loaded in or more than one plot is present in one file WinSpice3 keeps them separate and only shows you the vectors in the current plot 6 9 43 Setscale Set the scale for a plot General Form setscale vector Changes the scale vector for the current plot If vector is not given this command displays the scale for the plot Copyright 2002 2003 Mike Smith 111 16 08 2005 WinSpice3 User Manual 6 9 44 Settype Set the type of a vector General Form S bEvpe CYPE Vector Change the type of th
91. d for each dimension The direction of positive controlling current flow is from the positive node through the source to the negative node of each voltage source PO P1 P2 Pn are the polynomial coefficients The optional initial condition is the initial guess at the value s of the controlling current s in Amps If not specified 0 0 is assumed The polynomial specifies the source voltage as a function of the controlling current s The first example above describes a voltage source with value V I VIN1 I VIN2 4 2 4 Non linear Dependent Sources 4 2 4 1 Bxxxx Non linear Dependent Sources General form BXXXXXXX N N V EXPR BXXXXXXX N N I EXPR EXXXXXXX Nt N VALUE EXPR FXXXXXXX N N VALUE EXPR Examples B1 0 1 I cos v 1 sin v 2 Bi 0 1 Vin eos logy 1s 272 Per Sr V2 Aw CL B1 3 4 I 17 Bl 3 4 V exp pi i vdd N is the positive node and N is the negative node The values of the V and I parameters determine the voltages and currents across and through the device respectively If I is given then the device is a current source and if V is given the device is a voltage source One and only one of these parameters must be given The small signal AC behaviour of the non linear source is a linear dependent source or sources with a proportionality constant equal to the derivative or derivatives of the source at the DC operating point The expressions given for V and I may be any function of voltages a
92. e BJT and diode model equations In addition saturation currents have built in temperature dependence The temperature dependence of the saturation current in the BJT models is determined by T XTI gE T I T 1 TN exp 1 2 s 1 st 2 p ml where k is Boltzmann s constant q is the electronic charge E is the energy gap which is a model parameter and XTI is the saturation current temperature exponent also a model parameter and usually equal to 3 Copyright O 2002 2003 Mike Smith 6 16 08 2005 WinSpice3 User Manual The temperature dependence of forward and reverse beta 1s according to the formula where T and To are in degrees Kelvin and XTB is a user supplied model parameter Temperature effects on beta are carried out by appropriate adjustment to the values of Bp ISF PR and Isc WinSpice3 model parameters BF ISE BR and ISC respectively Temperature dependence of the saturation current in the junction diode model is determined by XTI Dn qE T ES 0 1 0 where N is the emission coefficient which is a model parameter and the other symbols have the same meaning as above Note that for Schottky barrier diodes the value of the saturation current temperature exponent XTI is usually 2 Temperature appears explicitly in the value of junction potential y in WinSpice3 PHI for all the device models The temperature dependence is determined by a r E op en l where k is Boltzmann s constant q is
93. e WinSpice3 to abort by supplying an unreasonable format string Copyright 2002 2003 Mike Smith 85 16 08 2005 WinSpice3 User Manual Iprps String This is a printf 3s style format string used to specify the command to use for sending PostScript plots to a printer or plotter The first parameter supplied is the printer name the second parameter supplied is a file name containing the plot Both parameters are strings It is trivial to cause WinSpice3 to abort by supplying a unreasonable format string maxcircuits Number The maximum number of circuits that WinSpice3 will store When a circuit is opened with the source command and the number of circuits exceeds this value the earliest circuit is deleted A list of circuits in the system can be displayed using the setcirc command see section 6 9 41 for details maxplots Number The maximum number of plot windows that can be open As new plots are created old ones are closed If maxplots is zero automatic closure of plot windows is disabled If maxplots is not defined a maximum of 10 plots can be displayed nfreqs Number The number of frequencies to compute in the fourier command Defaults to 10 Don t have asciiplot and print col break between pages noasciiplotvalue Boolean Don t print the first vector plotted to the left when doing an asciiplot Don t overwrite existing files when doing IO redirection Boolean If set enables the node listing in batch mode Does
94. e drain gate and source nodes respectively MNAME is the model name AREA is the area factor and OFF indicates an optional initial condition on the device for DC analysis If the area factor is omitted a value of 1 0 is assumed The optional initial condition specification using IC VDS VGS is intended for use with the UIC option on the TRAN control line when a transient analysis is desired starting from other than the quiescent operating point See the IC control line for a better way to set initial conditions The optional TEMP value is the temperature at which this device is to operate and overrides the temperature specification on the OPTION control line 4 4 3 1 JFET Models NJF PJF WinSpice provides two JFET models LEVEL 1 gt Shichman Hodges LEVEL 2 gt Parker Skellern FET model see 9 The Level 1 JFET model is derived from the FET model of Shichman and Hodges The Level 2 model is an alternative model by Anthony Parker at Macquarie University In both models the DC characteristics are defined by the parameters VTO and BETA which determine the variation of drain current with gate voltage LAMBDA which determines the output conductance and IS the saturation current of the two gate junctions Two ohmic resistances RD and RS are included Charge storage is modelled by non linear depletion layer capacitances for both gate junctions which vary as the 1 2 power of junction voltage and are defined by the paramet
95. e is an image in plot 5 format and can be printed by either the plot 1 program or Ipr with the g flag Copyright 2002 2003 Mike Smith 103 16 08 2005 WinSpice3 User Manual 6 9 19 Help Print summaries of WinSpice3 commands General Form help all command sss Prints help If the argument all is given a short description of everything you could possibly type 1s printed If commands are given descriptions of those commands are printed Otherwise help for only a few major commands is printed 6 9 20 History Review previous commands General Form history number Print out the history or the last number commands typed at the keyboard 6 9 21 Iplot Incremental plot General Form Loe mode ns Example MOOG VAL EZ Incrementally plot the values of the nodes while WinSpice3 runs The iplot command can be used with the where command to find trouble spots in a transient simulation The iplot command adds a form of visual trace to the circuit See the trace command section 6 9 57 for a different type of trace that 1s available Several iplot commands may be active at once Iplotting 1s not applicable for all analyses To remove an 1plot trace entry use the delete command see section 6 9 10 To display a list of iplots use the status command see section 6 9 51 6 9 22 Let Assign a value to a vector General Form let name expr Creates a new vector called name with the value specified by expr
96. e is desired 1f REF is specified then the noise voltage V OUTPUT V REF is calculated By default REF is assumed to be ground SRC is the name of an independent source to which input noise is referred PTS FSTART and FSTOP are AC type parameters that specify the frequency range over which plots are desired PTS_PER_SUMMAR Y is an optional integer if specified the noise contributions of each noise generator is produced every PTS_PER_SUMMARY frequency points These are stored in the spectral density curves use Setplot command to select the correct set of curves The NOISE control line produces two plots one for the Noise Spectral Density curves and one for the total Integrated Noise over the specified frequency range All noise voltages currents are in units of V Hz and A Hz for spectral density Vand A for integrated noise NOTE The output vector units generated by WinSpice and Spice3 are different from Berkeley Spice2 If a pure Spice circuit is loaded into WinSpice PLOT and PRINT lines will result in output in units of V Hz and Copyright 2002 2003 Mike Smith 74 16 08 2005 WinSpice3 User Manual A Hz or V or A to be compatible with Spice2 and to prevent confusion If the input circuit contains control endc lines or commands prefixed with this conversion is not made For examples take the simple circuit below Simple resistor circuit simple resistor circuit to test which ones of vspice uf
97. e named vectors to type The available type names are as follows Units shown on plots Units shown on pos OoOo O e onoise spectrum ven Lin onoise integrated V or A inoise spectrum V or A 2 Hz phase Degrees or Radians EA 6 9 45 Shell Call the command interpreter General Form shell command Call the operating system s command interpreter execute the specified command or call for interactive use Copyright O 2002 2003 Mike Smith 112 16 08 2005 WinSpice3 User Manual 6 9 46 Shift Alter a list variable General Form shift varname number If varname is the name of a list variable it is shifted to the left by number elements 1 e the number leftmost elements are removed The default varname is argv and the default number is 1 6 9 47 Show List device state General Form show show devs params show devs params devs params show dev dev dev param param param dev dev param param show t param param param t param param The show command prints out tables summarising the operating condition of selected devices much like the SPICE2 operation point summary e If device is missing a default set of devices are listed e If device is a single letter devices of that type are listed woe e If device is a subcircuit name beginning and ending in only devices in that subcircuit are shown end the name in a double to get devices within sub subcircuits recursi
98. e nd 73 5 3 4 NOBENO C ANIIYSIS raised 74 3 919 OP Operating PoimbANaly SIS er A line 75 5 3 6 PFA Pole Zeto ANAINSIS dui iii 76 5 3 7 SENS DC or Small Signal AC Sensitivity Analysis 76 5 3 8 LEMPS Eomperatllo Weil dae Tt 5 3 9 LES Trans Puncuon Anal YSIS berlina 77 Copyright 2002 2003 Mike Smith ii 16 08 2005 WinSpice3 User Manual SOLO IRAN Transient Amal SI aplican rte 77 5 4 Batch Oublie nation T8 5 4 1 AV LINE SES O A ania Tine eee T8 5 4 2 D SD I LATE id lied T8 5 4 3 COTES SR A te ren ct ee ne 80 5 4 4 FOUR Fourier Analysis of Transient Analysis Output 80 6 INTERACTIVE INTERPRE TER srr a a o eee 81 6 1 Command iS ATOME e ln 81 6 2 Vana DIE aerer irradia 81 6 3 Vanable SU OSA A et nt de nee 89 6 4 IRE GIL CC LIOM COPPER OOO OE moine nenen ne noms sen nee amsn 90 6 5 VECOS OC CAES Sn RN 90 6 5 1 EXPTESSONS SSSR Rs sta cea nr nes 91 6 5 2 Vector PUNCHIONS slo 92 6 5 3 APP a A A 94 6 6 History Su DSULUMONS sce sett tics R a se cette ten 94 6 6 1 Events nd The Specifications asii eee essence 95 6 6 2 CLEC O RS no II O dan lee en mt ta 95 6 6 3 O 96 6 6 4 Special CONVENIOS ie 96 6 7 Filename Expansions A tt daa 97 6 8 Control SS MUG EUS esoo opi liar 97 6 8 1 We ER ie M Se PNR et Rene 97 6 8 2 Repe A A dd ne ne 98 6 8 3 Downes End cirerer a aA E A EE E OOE A OEO 98 6 8 4 A e n a enr orci e 98 6 8 5 A O ETT 99 6 8 6 A O 99 6 8 7 TOA A NA dais 99 6 8 8 COn ne Ce tn A 99 6 8 9 A a eta Seca a dawned ee co vece
99. e you haven t read that far yet the quickest way of running a simulation is to open one of the circuit files in the examples directory To do this click File Open The dialogue box shown below will appear Copyright 2002 2003 Mike Smith 2 16 08 2005 WinSpice3 User Manual Open circuit ca Dv 2 a on Look irr sa Diemo cir laa Demo cir sa Demo cir sa work cir Open Files of type Circuit Files Cancel File name Open as read only Double click on Examples and then double click on Phonoamp cir As soon as the file is loaded it begins simulating the circuit and generating plot windows as it goes Make one of the plot windows the active window PERE phonoamp File Edit magivi li vli branch i kOhm I I I I I lt 100 frequency The plot can be resized by dragging the window border The plot can be printed to the default printer by clicking The plot can be copied to the clipboard by clicking Edit Copy and then pasting the plot into on File Print a document e g magivili vlfbranch kOhms a a a m 200 0 100 0 Hz frequency 16 08 2005 Copyright 2002 2003 Mike Smith WinSpice3 User Manual You can also zoom into an area of a plot by clicking on the graph and dragging the mouse to select the required area zoomed in graph will be displayed when you release the
100. ebugging Of course they cannot be run if they are not parsed plots List Gives a list of plot sets currently in existence each name separated by a space e g const unknown op tranl uns fun mena r O 6 3 Variable Substitution The values of variables may be used in commands by writing varname where the value of the variable is to appear Copyright 2002 2003 Mike Smith 89 16 08 2005 WinSpice3 User Manual A variable may be replaced by its value within a command before it is interpreted by enclosing it in and Y For example SET pts 3 LET in vector 5pts LET Sdataplot in k db sqrt mean in The special variables and lt refer to the process ID of the program and a line of input which is read from the terminal when the variable is evaluated respectively If a variable has a name of the form amp word then word is considered a vector see above and its value is taken to be the value of the variable If foo is a valid variable and is of type list then the expression foo low high represents a range of elements Either the upper index or the lower may be left out and the reverse of a list may be obtained with foo len 0 Also the notation foo evaluates to 1 if the variable foo is defined 0 otherwise and foo evaluates to the number of elements in foo if it is a list 1 if it is a number or string and O if it is a boolean variable 6 4 Redirection IO redirection
101. ed Voltage Source General form HXXXXXXX N N VALUE EXPR Examples H1 O 1 VALUE cos vl branch sin v2 branch H1 3 4 VALUE exp pi 1 vda This the Pspice version of the Bxxx source in section 4 2 4 1 The expression syntax also applies here WinSpice3 textually substitutes an equivalent Bxxx line when the circuit is read in Note that although this is defined as a current controlled voltage source no checking is done that the expression contains only currents For example El 1 5 VALUE v 2 3 HL 1 5 VALUE v 2 3 are both current controlled voltage sources 4 3 Transmission Lines 4 3 1 Txxxx Lossless Transmission Lines General form TXXXXXXX N1 N2 N3 N4 ZO VALUE lt TD VALUE gt lt F FREQ lt NL NRMLEN gt gt lt LO YV Ly ly Vos 12 gt Examples TL 1020 Z0 50 TD 10NS N1 and N2 are the nodes at port 1 N3 and N4 are the nodes at port 2 ZO is the characteristic impedance The length of the line may be expressed in either of two forms The transmission delay TD may be specified directly Copyright 2002 2003 Mike Smith 43 16 08 2005 WinSpice3 User Manual as TD 10ns for example Alternatively a frequency F may be given together with NL the normalised electrical length of the transmission line with respect to the wavelength in the line at the frequency F Ifa frequency is specified but NL is omitted 0 25 is assumed that is the frequency is assumed to be the quarter wave frequency Note t
102. efined as an expression The expression can include voltages and currents from the circuit See section 4 2 4 1 for details about the expression 4 1 2 2 Semiconductor Capacitors General form CXXXXXXX N1 N2 lt VALUE gt lt MNAME gt lt L LENGTH gt lt W WIDTH gt lt IC VAL gt CXXXXXXX N1 N2 lt MNAME gt lt L LENGTH gt lt W WIDTH gt lt IC VAL gt Examples CLOAD 2 10 10P CMOD 3 7 CMODEL L 10u W lu This 1s the more general form of the Capacitor presented in section 4 1 2 1 and allows for the calculation of the actual capacitance value from strictly geometric information and the specifications of the process If VALUE is specified it overrides the geometric information and defines the capacitance If MNAME is specified then the capacitance is calculated from the process information in the model MNAME and the given LENGTH and WIDTH If VALUE is not specified then MNAME and LENGTH must be specified If WIDTH is not specified then it is taken from the default width given in the model 4 1 2 3 Semiconductor Capacitor Model C General form MODEL MNAME CAP PNAMEI PVALI PNAME2 PVAL2 MODEL MNAME C PNAME1 PVAL1 PNAME2 PVAL2 Examples MODEL MRISC CAP TCI 0 001 MODEL MRISE C ICIS 04 001 The model type name CAP can be used instead of C for compatibility with other commercial Spice simulators The capacitor model contains process information that may be used to compute the capacitance
103. el into the netlist by hand Check to see that all resistors have a value In WinSpice3 resistors without values are given a default of 1Kohm Increase ITL1 to 300 in the OPTIONS statement Example OPTIONS ITL1 300 Increases the number of DC iterations WinSpice3 will go through before giving up Further increases in ITL1 in all but the most complex circuits will not usually yield convergence Copyright 2002 2003 Mike Smith 122 16 08 2005 WinSpice3 User Manual Set ITL6 100 in the OPTIONS statement Example OPTIONS ITL6 100 Invokes the source stepping algorithm 100 are the number of steps used Example NODESET V 6 0 Check the node voltage table in the output file Add NODESETS statements to nodes that SPICE says have unrealistic or way out voltages Use a NODESET of OV 1f you do not have a better estimation of the proper DC voltage Add resistors and use the OFF keyword Example DT 1 2 DMOD OFF RD1 1 2 100MEG Add resistors across diodes to simulate leakage and resistors across MOSFET drain to source connections to simulate realistic channel impedances Add ohmic resistances RC RB and RE to transistors Reduce Gmin an order of magnitude in the OPTIONS statement Add the OFF keyword to semiconductors especially diodes that may be causing convergence problems The OFF keyword tells WinSpice3 to first solve the operating point with the device off Then the device 1s turned on and the previously found
104. ence not converging It also allow for more realistic circuits to be simulated If x is zero shunt resistors are not placed in the circuit By default x 0 SCALE x Element scaling factor used as a multiplier for device dimension parameters L W AD AS PD and PS Currently used only used by the following device models MOS1 MOSFET level 1 MOS2 MOSFET level 2 MOS3 MOSFET level 3 BSIM1 MOSFET level 4 BSIM2 MOSFET level 5 MOS6 MOSFET level 6 BSIM3 MOSFET level 8 EKV MOSFET level 44 The default value is 1 0 SRCSTEPS x The same as the ITL6 option above TEMP x Sets the operating temperature of the circuit The default value is 27 deg C 300 deg K TEMP can be overridden by a temperature specification on any temperature dependent instance Copyright 2002 2003 Mike Smith 70 16 08 2005 WinSpice3 User Manual Sets the nominal temperature at which device parameters are measured The default value is 27 deg C 300 deg K TNOM can be overridden by a specification on any temperature dependent device model TRTOL x Sets the transient error tolerance The default value is 7 0 This parameter 1s an estimate of the factor by which SPICE overestimates the actual truncation error TRYTOCOMPACT Applicable only to the LTRA model When specified the simulator tries to condense LTRA transmission lines past history of input voltages and currents VNTOL x Sets the absolute voltage error tolerance of the
105. ernally does the same but it does an automatic linearization the non linearized result is not normally available 6 9 24 Listing Print a listing of the current circuit General Form listing logical physical deck expand If the logical argument is given the listing is with all continuation lines collapsed into one line and if the physical argument is given the lines are printed out as they were found in the file The default is logical A deck listing is just like the physical listing except without the line numbers it recreates the input file verbatim except that it does not preserve case If the word expand is present the circuit is printed with all subcircuits expanded 6 9 25 Load Load rawfile data General Form load filename Loads either binary or ASCII format rawfile data from the files named The default filename is rawspice raw or the argument to the r flag if there was one Copyright 2002 2003 Mike Smith 105 16 08 2005 WinSpice3 User Manual 6 9 26 Noise Perform a noise analysis General Form Noise VAQUIPUL lt 7 REFS SRC DEC GEN lt DEL 7 ETS ESTART FSTOP lt PTS PER SUMMARY gt See section 5 3 4 for details of this command 6 9 27 Op Perform an operating point analysis General Form OP Do an operating point analysis See section 5 3 5 of this manual for more details 6 9 28 Plot Plot values on the display General Form plow expres yLlimrte vyilo yha Klimie xlo
106. ers CGS CGD and PB Copyright 2002 2003 Mike Smith 52 16 08 2005 WinSpice3 User Manual BETA transconductance parameter B LAMBDA ae length modulation parameter A rs zero bias G S junction capacitance Cos zero bias G D junction capacitance EF Cod COR EE CS CO EH CE CT ES CN TS ES CE CE E CO RS ES CE ES coefficient for forward bias depletion Lune capacitance formula ro ES E E 4 4 4 Mxxxx MOSFETs General form MXXXXXXX ND NG NS NB MNAME lt L VAL gt lt W VAL gt lt AD VAL gt lt AS VAL gt lt PD VAL gt lt PS VAL gt lt NRD VAL gt lt NRS VAL gt lt OFF gt lt IC VDS VGS VBS gt lt TEMP T gt Examples M1 24 2 0 20 TYPE1 M31 2 17 6 10 MODM L 5U W 2U M1 2 9 3 0 MOD1 L 10U W 5U AD 100P AS 100P PD 40U PS 40U ND NG NS and NB are the drain gate source and bulk substrate nodes respectively MNAME is the model name L and W are the channel length and width in meters AD and AS are the areas of the ay and source diffusions in meters Note that the suffix U specifies microns le 6 m and P sq microns 1e 12 m 2 Copyright O 2002 2003 Mike Smith 53 16 08 2005 WinSpice3 User Manual If any of L W AD or AS are not specified the default values defined by the OPTION control line variables DEFL DEFW DEFAD and DEFAS are used see section 5 1 The use of defaults simplifies input file preparation as well as the editing required 1f device geometry s are to be changed PD a
107. escribed next PLOT PRINT and FOUR lines are meant for compatibility with SPICE2 5 1 OPTIONS Simulator Variables Various parameters of the simulations available in WinSpice3 can be altered to control the accuracy speed or default values for some devices These parameters may be changed via the set command described later in the section on the interactive front end or via the OPTIONS line General form OPTIONS OPTIL OPT vrea Or OPT OPIVAT rat Examples OPTIONS RELTOL 005 TRTOL 8 The options line allows the user to reset program control and user options for specific simulation purposes See the following section on the interactive command interpreter for the parameters that may be set with a OPTIONS line and the format of the set command Any combination of the following options may be included in any order x below represents some positive number Copyright 2002 2003 Mike Smith 67 16 08 2005 WinSpice3 User Manual ABSTOL x Sets the absolute current error tolerance of the program The default value is 1 picoamp BADMOS3 Use the older version of the MOS3 model with the kappa discontinuity BYPASS x This option when set to a non zero value avoids recomputation of nonlinear functions that do not change with iterations The default value is 0 CAPBRANCH Calculate capacitor branch currents during analyses This is an experimental feature which can cause convergence problems but which may be useful i
108. espectively Current flow 1s from the positive node through the source to the negative node VNAM is the name of a voltage source through which the controlling current flows The direction of positive controlling current flow 1s from the positive node through the source to the negative node of VNAM GAIN is the current gain 4 2 2 4 Hxxxx Linear Current Controlled Voltage Sources General form HXXXXXXX N N VNAM VALUE Examples HX 225 DT Var Ow N and N are the positive and negative nodes respectively VNAM is the name of a voltage source through which the controlling current flows The direction of positive controlling current flow is from the positive node through the source to the negative node of VNAM VALUE is the transresistance in ohms Copyright 2002 2003 Mike Smith 35 16 08 2005 WinSpice3 User Manual 4 2 3 Non linear Dependent Sources using POLY For compatibility with SPICE2 WinSpice allows circuits to contain dependent sources characterised by any of the four equations 1 f v v f v 1 f 1 v f 1 where the functions must be polynomials and the arguments may be multidimensional The polynomial functions are specified by a set of coefficients pO pl pn Both the number of dimensions and the number of coefficients are arbitrary The meaning of the coefficients depends upon the dimension of the polynomial as shown in the following examples Suppose that the function is one dimensional that 1s a funct
109. eters e instance parameters These are parameters which are calculated for each instance of a device e model parameters These are parameters which are calculated for a specific model and are shared by all instances of the model Instance parameters are specified as device keyword and are available for the most recent point computed or if specified in a save statement for an entire simulation as a normal output vector Thus to monitor the gate to source capacitance of a MOSFET a command save ml cgs given before a transient simulation causes the specified capacitance value to be saved at each timepoint and a subsequent command such as plot ml cgs produces the desired plot note that the show command does not use this format Model parameters are specified as model keyword and are available for the most recent point computed or if specified in a save statement for an entire simulation as a normal output vector as for instance parameters Another example showing the use of instance and model parameters for a BJT model is below model BC107 NPN Is 1 527 Xti 3 Eg 1 11 Vaf 106 8 Bf 334 5 Ne 1 642 Ise 222f Ikf 1596 Xtb 1 5 Br 788 Nc 2 Isc 0 Ikr 0 Re 6 Rc 0 25 1Ce 04072p Mic 3338 Vic 10 ECs o CJ 10 67b MJe 3533 Ve 10 Tr 10n Tf 471 8p Itf 0 Vtf 0 Xtf 0 Declare two BC107 instances in a circuit OL 022 24 75 BOS Oz A42 AA AS BELO Save internal base resistance model parameter
110. f gate drain and gate source voltages and 1s defined by the parameters CGS CGD and PB Copyright O 2002 2003 Mike Smith 65 16 08 2005 WinSpice3 User Manual Parameter pinch off voltage transconductance parameter Bo doping tail extending parameter saturation voltage parameter 2 LAMBD channel length modulation A parameter drain ohmic resistance source ohmic resistance zero bias G S junction capacitance gate junction potential flicker noise coefficient flicker noise exponent coefficient for forward bias depletion capacitance formula CGD zero bias G D junction capacitance Copyright 2002 2003 Mike Smith 66 16 08 2005 WinSpice3 User Manual 5 ANALYSES AND OUTPUT CONTROL The following command lines are for specifying analyses or plots within the circuit description file Parallel commands exist in the interactive command interpreter detailed in the following section Specifying analyses and plots or tables in the input file is useful for batch runs Batch mode is entered when either the b option is given or when the default input source is redirected from a file In batch mode the analyses specified by the control lines in the input file e g ac tran etc are immediately executed unless control lines exist see the section on the interactive command interpreter Output plots in line printer form and tables can be printed according to the PRINT PLOT and FOUR control lines d
111. hat although both forms for expressing the line length are indicated as optional one of the two must be specified Note that this element models only one propagating mode If all four nodes are distinct in the actual circuit then two modes may be excited To simulate such a situation two transmission line elements are required see the example in Appendix A for further clarification The optional initial condition specification consists of the voltage and current at each of the transmission line ports Note that the initial conditions if any apply only if the UIC option is specified on the TRAN control line Note that a lossy transmission line see below with zero loss may be more accurate than the lossless transmission line due to implementation details 4 3 2 Oxxxx Lossy Transmission Lines General form OXXXXXXX N1 N2 N3 N4 MNAME Examples OS 0 2 0 DOSS MOD OCONNECT T0 5 20 5 INTERCONNECT This is a two port convolution model for single conductor lossy transmission lines N1 and N2 are the nodes at port 1 N3 and N4 are the nodes at port 2 Note that a lossy transmission line with zero loss may be more accurate than the lossless transmission line due to implementation details 4 3 2 1 Lossy Transmission Line Model LTRA The uniform RLC RC LC RG transmission line model referred to as the LTRA model henceforth models a uniform constant parameter distributed transmission line The RC and LC cases may also be modelled
112. ibed in 6 LEVEL 8 BSIM3 v3 2 2 unless VERSION xxx given LEVEL 9 MOS9 LEVEL 10 B3SOI LEVEL 14 BSIM4 LEVEL 44 EKV from Ecole Polytechnique Federale de Lausanne see http legwww epfl ch ekv LEVEL 49 BSIM3 v3 2 2 unless VERSION xxx given For HSPICE compatibility LEVEL 50 BSIM3 v3 2 for HSPICE compatibility Copyright 2002 2003 Mike Smith 54 16 08 2005 WinSpice3 User Manual Note that three versions of the BSIM3 model are supported by WinSpice This is needed because different versions Of BSIM3 are not compatible with each other in term of the model parameters The version 1s selected by placing a VERSION x x x option in the MODEL line as follows VERSION 3 1 BSIM3 v3 1 VERSION 3 2 BSIM3 v3 2 Omitted BSIM3 v3 2 2 The DC characteristics of the level 1 through level 3 MOSFETS are defined by the device parameters VTO KP LAMBDA PHI and GAMMA These parameters are computed by WinSpice3 if process parameters NSUB TOX are given but user specified values always override VTO is positive negative for enhancement mode and negative positive for depletion mode N channel P channel devices Charge storage is modelled by three constant capacitors CGSO CGDO and CGBO which represent overlap capacitances by the non linear thin oxide capacitance which is distributed among the gate source drain and bulk regions and by the non linear depletion layer capacitances for both substrate junctions divided into bottom
113. in Appendix A 5 3 3 DISTO Distortion Analysis General form DISTO DEC ND START EFSTOP lt EZOVEREL1 gt DLSTO OCT NO START EPSIOP lt FZOVERE L gt DISTO LIN NP FSTART ESTOP lt F2OVERFI gt Examples DISTO DEC LOU HZ LOOMhzZ DESIO DEC LO Lez DOOM Z 079 The DISTO line does a small signal distortion analysis of the circuit A multi dimensional Volterra series analysis is done using multi dimensional Taylor series to represent the nonlinearities at the operating point Terms of up to third order are used in the series expansions If the optional parameter F2OVERF1 is not specified DISTO does a harmonic analysis 1 e it analyses distortion in the circuit using only a single input frequency F1 which is swept as specified by arguments of the DISTO command exactly as in the AC command Inputs at this frequency may be present at more than one input source and their magnitudes and phases are specified by the arguments of the DISTOF1 keyword in the input file lines for the input sources see the description for independent sources the arguments of the DISTOF2 keyword are not relevant in this case The analysis produces information about the AC values of all node voltages and branch currents at the harmonic frequencies 2F1 and 3F1 vs the input frequency Fl as it is swept A value of 1 as a complex distortion output signifies cos 2J 2F1 t at 2F1 and cos 2J 3F1 t at 3Fl using the convention that at the input fundamen
114. in WinSpice3 which may be altered by the set command are appendwrite Boolean Append to the file when a write command is issued if one already exists Copyright 2002 2003 Mike Smith 82 16 08 2005 WinSpice3 User Manual colorN These variables determine the colours used for plots Colour 0 is the background colour 1 is the grid and text colour and colours 2 onwards are used in order for vector plots On Unix Linux N may be in the range 0 15 The value of the colour variables should be names of colours which may be found in the file usr lib rgb txt In Windows N can be in the range 0 18 and the available colour names are white black It_red It_green It_blue It_yellow It_cyan It_magenta red green blue yellow cyan magenta grey brown orange pink If no colour variables are defined the colour mappings are equivalent to set colorO white set color black set color2 It_red set color3 It_green set color4 It_blue set color5 it_ yellow set color6 It_cyan set color7 It_magenta set color8 red set color9 green set color10 blue set color 1 yellow set colorl2 cyan set colorl3 magenta set colorl4 grey set color15 brown set colorl6 0range set colorl7 pink set color 8 It_grey Copyright 2002 2003 Mike Smith 83 16 08 2005 WinSpice3 User Manual cpdebug Boolean Print cshpar debugging information must be complied with the DCPDEBUG flag Unsupported in the current release debug Boolean If set then a
115. ion of limiting time steps to less than the line delay in the RLC case NOCONTROL is a flag that prevents the default limiting of the time step based on convolution Copyright 2002 2003 Mike Smith 45 16 08 2005 WinSpice3 User Manual error criteria in the RLC and RC cases This speeds up simulation but may in some cases reduce the accuracy of results LININTERP is a flag that when specified will use linear interpolation instead of the default quadratic interpolation for calculating delayed signals MIXEDINTERP 1s a flag that when specified uses a metric for judging whether quadratic interpolation is not applicable and if so uses linear interpolation otherwise it uses the default quadratic interpolation TRUNCDONTCUT is a flag that removes the default cutting of the time step to limit errors in the actual calculation of impulse response related quantities COMPACTREL and COMPACTABS are quantities that control the compaction of the past history of values stored for convolution Larger values of these lower accuracy but usually increase simulation speed These are to be used with the TRYTOCOMPACT option described in the OPTIONS section TRUNCNR is a flag that turns on the use of Newton Raphson iterations to determine an appropriate timestep in the timestep control routines The default is a trial and error procedure by cutting the previous timestep in half REL and ABS are quantities that control the setting of breakpoints The optio
116. ion of one argument Then the function value fv 1s determined by the following expression in fa the function argument fv pO pl fa p2 fa 2 p3 fa 3 p4 fa 4 pS fa 5 Suppose now that the function is two dimensional with arguments fa and fb Then the function value fv 1s determined by the following expression fv pO pl fa p2 fb p3 fa 2 p4 fa fb p5 fb 2 p6 fa 3 p7 fa 2 fb p8 fa fb 2 p9 fb 3 Consider now the case of a three dimensional polynomial function with arguments fa fb and fc Then the function value fv is determined by the following expression fv p0 pl fa p2 fb p3 fc p4 fa 2 pS fa fb p6 fa fc p7 fb 2 p8 fb fc p9 fc 2 pl10 fa 3 pl1 fa 2 fb p12 fa 2 fc p13 fa fb 2 p14 fa fb fc plS fa fc 2 pl6 fb 3 pl7 fb 2 fc p18 fb fc 2 p19 fc 3 p20 fa 4 Note if the polynomial is one dimensional and exactly one coefficient is specified then SPICE assumes it to be p1 and p0 0 0 in order to facilitate the input of linear controlled sources For all four of the dependent sources described below the initial condition parameter is described as optional If not specified WinSpice assumes O the initial condition for dependent sources is an initial guess for the value of the controlling variable The program uses this initial condition to obtain the dc operating p
117. iple ranges however if vectors together on a plot card have different ranges they do not provide as much information as they would in SPICE2 The output of WinSpice3 is also much less verbose than SPICE2 in that the only data printed is that requested by the above cards Copyright 2002 2003 Mike Smith 4 16 08 2005 WinSpice3 User Manual 2 TYPES OF ANALYSIS 2 1 DC Analysis The DC analysis portion of SPICE determines the DC operating point of the circuit with inductors shorted and capacitors opened The DC analysis options are specified on the DC TF and OP control lines A DC analysis 1s automatically performed prior to a transient analysis to determine the transient initial conditions and prior to an AC small signal analysis to determine the linearized small signal models for non linear devices If requested the DC small signal value of a transfer function ratio of output variable to input source input resistance and output resistance 1s also computed as a part of the DC solution The DC analysis can also be used to generate DC transfer curves a specified independent voltage or current source is stepped over a user specified range and the DC output variables are stored for each sequential source value 2 2 AC Small Signal Analysis The AC small signal portion of WinSpice3 computes the AC output variables as a function of frequency The program first computes the DC operating point of the circuit and determines linearized small
118. istortion analyses have a different general form from that of the other analyses There is no limit on the number of PRINT lines for each type of analysis Copyright 2002 2003 Mike Smith 79 16 08 2005 WinSpice3 User Manual 5 4 3 PLOT Lines General form PLOI POIYPE OVL lt PiOL PHILS KOV S ELOZ PALZ So gos OVOS Examples PLOT DC V 4 VS V L PLOT ERAN YV T77 Si 2 5 LIVIN VALIA ELO PLOT AC VMS VM Sl 224 VDB S VP 5 ELOT DISTO DZ HDSER GEM POT TRAN V oza VAr COS VC 0 T0 The Plot line defines the contents of one plot of from one to eight output variables PLTYPE is the type of analysis DC AC TRAN NOISE or DISTO for which the specified outputs are desired The syntax for the OV1 is identical to that for the PRINT line and for the plot command in the interactive mode The letter X indicates the overlap of two or more traces on any plot When more than one output variable appears on the same plot the first variable specified is printed as well as plotted If a printout of all variables is desired then a companion PRINT line should be included There is no limit on the number of PLOT lines specified for each type of analysis 5 44 FOUR Fourier Analysis of Transient Analysis Output General form FOUR FREO OVI KOVZ OVS 40 gt Examples FOUR LOOK V5 The Four or Fourier line controls whether WinSpice3 performs a Fourier analysis as a part of the transient an
119. ive node of source Copyright O 2002 2003 Mike Smith 171 16 08 2005 WinSpice3 User Manual 10 26 Vsource Independent voltage source Vsource instance parameters input only Pulse description vector Instantaneous power Copyright 2002 2003 Mike Smith 172 16 08 2005
120. iven to the instance and a as are the names of the devices in the subcircuit If there are several nested subcircuits node and device names look like subckt1 subckt2 name If the variable subinvoke is set then it is used as the prefix that specifies instances of subcircuits instead of x WinSpice3 occasionally checks to see if it is getting close to running out of space and warns the user if this is the case 6 11 Bugs When defining aliases like alias pab plor dot TIAL se Mig y you must be careful to quote the argument list substitutions in this manner If you quote the whole argument it might not work properly In a user defined function the arguments cannot be part of a name that uses the plot vec syntax For example Copyright O 2002 2003 Mike Smith 118 16 08 2005 WinSpice3 User Manual define check v 1 cos tranl v 1 does not work If you type plot all all or otherwise use a wildcard reference for one plot twice in a command the effect is unpredictable The asciiplot command doesn t deal with log scales or the delta keywords WinSpice3 recognises all the notations used in SPICE2 plot cards and translates vp 1 into ph v 1 and so forth However if there are spaces in these names it won t work Hence v 1 2 and 5 5 aren t recognised BJTs can have either 3 or 4 nodes which makes it difficult for the subcircuit expansion routines to decide what to rename If the fourth parameter has been decl
121. ke RF BJTs and power MOSFETs Many vendors cheat and try to force fit the SPICE MODEL statement to represent a device s behaviour This 1s a sure sign that the vendor has skimped on quality in favour of quantity Primitive MODEL statements CAN NOT be used to model most devices above 200MHz because of the effect of package parasitics And MODEL statements CAN NOT be used to model most power devices because of extreme non linear behaviour In particular if your vendor uses a MODEL statement to model a power MOSFET throw away the model It s almost certainly useless for transient analysis 6 Reduce the rise fall times of the PULSE sources Example From VCC 10 PULSE O E 0 10 0 To VOS GT PULSE 10 AL Oe AU AU Again we are trying to smooth strong nonlinearities The pulse times should be realistic not ideal If no rise or fall times are given or if 0 1s specified the rise and fall time will be set equal to the TSTEP value in the TRAN statement Change the integration to Gear Example OPTIONS METHOD GEAR Gear should be coupled with a reduction in the RELTOL value Gear integration with a reduction in RELTOL tends to produce answers in the direction of a more stable numerical solution while trapezoidal integration tends to produce a less stable solution Gear integration often produces superior results for power circuitry simulations due to the fact that high frequency ringing and long simulation periods are often en
122. l treaties Unauthorized reproduction or distribution of this program or any portion of it may result in severe civil and criminal penalties and Will be prosecuted to the maximum extent possible under law Cancel Make sure you read the readme txt file which might contain some useful information and give details of how to contact the author it is amazing how many people don t read ANY of the documents when in doubt RTFM Note that WinSpice3 adds no files to the Windows directories 1 2 Running WinSpice3 Click on Start point to Programs and find the WinSpice3 popout Click on wspice3 to run the program The following window or something like 1t will appear E Z SPICE3 WSPICE3 EXE Of File Help Program WinSpice version 6 63 based on Berkeley Spice 3f5 a Date built Jul 16 1998 66 53 31 Type help for more information quit to leave WinSpice 1 gt This window emulates a terminal window as is seen in versions of Spice3 running on Unix machines At this point WinSpice3 will accept numerous commands typed in at the keyboard see section 6 9 for details of the commands supported The command interpreter is based on the Unix C shell and it is possible to write complex programs with it For example the setplot command see section 6 9 42 is implemented using such a script look in the lib script directory in the directory WinSpice3 is installed in for the script However sinc
123. lled voltage sources 4 2 4 3 Fxxxx Non linear Current Controlled Current Source General form FXXXXXXX N N VALUE EXPR Examples Fl O 1 VALUE cos vl branch sin v 2 branch FI 3 4 VALUE 17 This the Pspice version of the Bxxx source in section 4 2 4 1 and 1s used to define a current source The expression syntax also applies here WinSpice3 textually substitutes an equivalent Bxxx line when the circuit is read in Note that although this is defined as a current controlled current source no checking is done that the expression contains only currents For example Copyright O 2002 2003 Mike Smith 42 16 08 2005 WinSpice3 User Manual Fi 1 5 VALUE v2 branch 3 Gl L 5 VALUER v24 branch 3 are both voltage controlled current sources 4 2 4 4 Gxxxx Non linear Voltage Controlled Current Source General form GXXXXXXX N N VALUE EXPR Examples Gl 0 1 VALUE cos v 1 sin v 2 Gl 3 4 VALUE 17 This the Pspice version of the Bxxx source in section 4 2 4 1 and 1s used to define a current source The expression syntax also applies here WinSpice3 textually substitutes an equivalent Bxxx line when the circuit is read in Note that although this is defined as a current controlled current source no checking is done that the expression contains only currents For example Fi 1 5 VALUE v2 branch 3 Gl 1 5 VALUE v2 branch 3 are both currenr controlled current sources 4 2 4 5 Hxxxx Non linear Current Controll
124. lly added to the control block after the simulation fails When the simulation is run again the problem area will be reported ALTINIT function Transient Convergence Example OPTIONS ALTIN TSL Setting ALTINIT to one causes the default algorithm used when the UIC use initial condition keyword is issued in the TRAN to be bypassed in favour of a second more lenient algorithm Normally the second algorithm is automatically invoked when the default method fails Copyright 2002 2003 Mike Smith 127 16 08 2005 WinSpice3 User Manual RSHUNT option Example OPTION RSHUNT 1e9 If a circuit fails to converge or simulates very slowly try using option rshunt 1e9 to the circuit file This guarantees that all voltage nodes have a path to ground and avoids one cause of non convergence Note that recent versions of WinSpice automatically perform shunt ramping if a circuit fails to converge and GMIN and source stepping methods have failed 1 e a shunt 1s applied and 1f the circuit fails to converge it reduces the shunt value by a factor of 10 It repeats this until the circuit converges and then it removes the shunts for the rest of the analysis Use the DELMIN option Transient Convergence Example OPTION DELMIN 0 OPTION DELMIN 1e 20 If you get the Timestep too small message try disabling the timestep limit with setting it to zero The default minimum timestep 1s often too large and disabling the mi
125. lob again after you are done with wildcard expansion 6 8 Control Structures 6 8 1 While End General Form while condition statement end While condition an arbitrary algebraic expression is true execute the statements Copyright 2002 2003 Mike Smith 97 16 08 2005 WinSpice3 User Manual The condition is an expression involving vector and scalar variables see sections 6 5 and 6 5 1 For example the following will sweep a resistor value COTE POL echo KXYKKKKKKKKKEKKEKEKKEKEKKKEKKKKEKEKKEKEKKKKKKKEKEKKEKEKKKKKKKEKKXK KE XKX KKK KK k XX echo Sweep altering R1 directly echo KKEKKKKKKKKRKKKKRKKKKRKKKKRKKKKKRKKKKRKKKKRKKKKRKRKKKKRKKKKRKKKKKKKKKEKK let res 1 while res lt 100 alter rl resistance res Op pring CL mt let res res 5 end ende 6 8 2 Repeat End General Form repeat number statement end Execute the statements number times or forever if no argument is given 6 8 3 Dowhile End General Form dowhi Le condition statement end The same as while except that the condition is tested after the statements are executed The condition is an expression involving vector and scalar variables see sections 6 5 and 6 5 1 6 8 4 Foreach End General Form foreach var value statement end The statements are executed once for each of the values in the list each time with the variable var set to the current one var can be accessed by the var nota
126. lot If the expression is all all of the vectors available are printed Thus print col all gt file prints everything in the file in SPICE2 format The scale vector time frequency is always in the first column unless the variable noprintscale is true 6 9 30 Pz Perform a Pole Zero Analysis General Form pz pz pz pz pz pz NODE 1 NODE1 NODE 1 NODE 1 NODE 1 NODE 1 Examples pz pz pz dh a 63 ZO 4 1 4 NODE2 NODE2 NODE2 NODE2 NODE2 NODE2 0 EUR O VOL 1 CUR NODE3 NODE3 NODE3 NODE3 NODE3 NODE3 POL ZER PZ NODE 4 NODE 4 NODE 4 NODE 4 NODE 4 NODE 4 CUR GUR CUR VOL VOL VOL POL ZER PZ POL AER PZ CUR stands for a transfer function of the type output voltage input current while VOL stands for a transfer function of the type output voltage input voltage POL stands for pole analysis only ZER for zero analysis only and PZ for both This feature is provided mainly because if there is a non convergence in finding poles or zeros then at least the other can be found Finally NODE1 and NODE2 are the two input nodes and NODE3 and NODE4 are the two output nodes Thus there is complete freedom regarding the output and input ports and the type of transfer function 6 9 31 Quit Leave WinSpice3 General Form quit Quit WinSpice3 6 9 32 Rawfile Send further results directly to a rawfile General Form rawfile rawfile OFF Send the output of subsequent analyses direc
127. lt W WIDTH gt lt TEMP T gt Examples RLOAD 2 10 10K RMOD 3 7 RMODEL L 10u W lu This is the more general form of the resistor presented in section 4 1 1 1 and allows the modelling of temperature effects and for the calculation of the actual resistance value from strictly geometric information and the specifications of the process If VALUE is specified it overrides the geometric information and defines the resistance If MNAME is specified then the resistance may be calculated from the process information in the model MNAME and the given LENGTH and WIDTH If VALUE is not specified then MNAME and LENGTH must be specified If WIDTH is not specified then it is taken from the default width given in the model The optional TEMP value is the temperature at which this device is to operate and overrides the temperature specification on the OPTION control line Copyright 2002 2003 Mike Smith 22 16 08 2005 WinSpice3 User Manual 4 1 1 3 Semiconductor Resistor Model R or RES General form MODEL MNAME RES PNAMEI PVALI PNAME2 PVAL2 MODEL MNAME R PNAMEI PVALI PNAME2 PVAL2 Examples MODEL MRISC RES TCI1 0 001 MODET MRISCUR TCI 0 001 The model type name RES can be used instead of R for compatibility with other commercial Spice simulators The resistor model consists of process related device data that allow the resistance to be calculated from geometric information and to be corrected for te
128. lysis the value of the node is printed Several traces may be active at once Tracing is not applicable for all analyses To remove a trace use the delete command See the iplot command see section 6 9 21 for a visual form of trace 6 9 58 Tran Perform a transient analysis General Form tran step stop Tstart Tmax UIC Perform a transient analysis See section 5 3 10 of this manual for more details 6 9 59 Transpose Swap the elements in a multi dimensional data set General Form transpose Vector vector Example transpose i vdd v drain This command transposes a multidimensional vector No analysis in WinSpice3 produces multidimensional vectors although the DC transfer curve may be run with two varying sources You must use the reshape Copyright 2002 2003 Mike Smith 116 16 08 2005 WinSpice3 User Manual command to reform the one dimensional vectors into two dimensional vectors In addition the default scale is incorrect for plotting You must plot versus the vector corresponding to the second source but you must also refer only to the first segment of this second source vector For example circuit to produce the transfer characteristic of a MOS transistor spices gt de gg 0 5 1 vdd 0 5 iL spices gt plot 1 vaa spice3 gt reshape all 6 6 spice3 gt transpose i vdd v drain spice3 gt plot i vdd vs v drain 0 6 9 60 Tutorial Display hypertext help General Form tutorial su
129. mand file calls another it must save its argv and argc since they are altered Also command files may not be re entrant since there are no local variables of course the procedures may explicitly manipulate a stack This way one can write scripts analogous to UNIX shell scripts for WinSpice3 Note that for the script to work with WinSpice3 it must begin with a blank line or whatever else since it is thrown away and then a line with control on it This is an unfortunate result of the source command being used for both circuit input and command file execution Note also that this allows the user to merely type the name of a circuit file as a command and it is automatically run The commands are executed immediately without running any analyses that may be specified in the circuit to execute the analyses before the script executes include a run command in the script C shell type quoting with and and backquote substitution may be used Within single quotes no further substitution like history substitution is done and within double quotes the words are kept together but further substitution is done Any text between backquotes is replaced by the result of executing the text as a command to the shell If any command takes a filename the filename must be enclosed in double quotes if the filename contains spaces as is permitted in Windows long filenames You may type multiple commands on one line separated by semicolons There
130. mperature The parameters available are first order temperature coefficient are oo second order temperature coefficient arc oo CET D penans CS oo The sheet resistance 1s used with the narrowing parameter and L and W from the resistor device to determine the nominal resistance by the formula L NARROW R RSH W NARROW DEFW is used to supply a default value for W if one is not specified for the device If either RSH or L is not specified then the standard default resistance value of 1k Z is used TNOM is used to override the circuit wide value given on the OPTIONS control line where the parameters of this model have been measured at a different temperature After the nominal resistance is calculated it is adjusted for temperature by the formula R T R T 1 7C T T TC T T Copyright 2002 2003 Mike Smith 23 16 08 2005 WinSpice3 User Manual 4 1 2 Cxxxx Capacitors 4 1 2 1 Simple Capacitors General form CXXXXXXX N N VALUE lt IC VAL gt CXXXXXXX N1 N2 C lt expression gt Examples CBE do U LUF COSC LF 23 LOU TCV CA 35 C L0u N and N are the positive and negative element nodes respectively VALUE is the capacitance in Farads The optional initial condition is the initial time zero value of capacitor voltage in Volts Note that the initial conditions if any apply only if the UIC option is specified on the TRAN control line The capacitance value can also be d
131. n linear Current Controlled Voltage Source ooooooonnnnncncnnnnnnnnnns 43 4 3 Transmission LIMES ai oie 43 4 3 1 Txxxx Lossless Transmission Lines eta 43 4 3 2 Oxxxx Lossy Transmission Lines dista 44 4 3 2 1 Lossy Transmission Line Model LTRA 44 4 3 3 Uxxxx Uniform Distributed RC Lines LOSSY ooooococononnncccnonnnnnonnnnnonnnononancnnnnnnnnnnos 46 4 3 3 1 Uniform Distributed RC Model URC ss 46 4 4 Transistor and Did dos 4 4 4 1 DO J n ON Diode Sine sant eine 48 dAd Diode Mode D herenean n EE A E 48 4 4 2 Qxxxx Bipolar Junction Transistors BJTs ccoonnnnnnnnonononananonoccnccnnnnnnnnnonononononos 49 AAD BJ Models NENEN Ph A Un ne 50 4 4 3 Jxxxx Junction Field Effect Transistors JFETS oooncccnnnnccnninoccnnonoccnnnnoccnnnaccnnonos 52 AS REA Models NVETEIE iia 52 4 4 4 MERS MO SETS stars nio ota ts 53 4 4 4 1 MOSFET Models NMOS PMOS inner 54 4 4 5 AO SAG DC VICE sich ven ees noi dee Base Rd en cis 60 4 4 6 TRIN MES DES Stan lei ados 65 AAO MESFET Models NME PME a 65 5 ANALYSES AND OUTPUT CONTROL cosas asa 67 5 1 OPTIONS Simulator Varia Dies yes ia 67 3 2 Initial Condino nS RER tn aide 71 41 NODESET Specify Initial Node Voltage Guesses occcccccccccncnononnnnnononncnnnnnnnnnnnonos 71 Died AC Se MAFC Ond ONS lili aia 12 5 3 A E es 12 5 3 1 AC Smal Signal AC ANalysiS sta aaa 12 De DESDE TAE UA eo eii SU ll 73 5 39 DISTO DISTOHON Analy SiS AS cl e
132. n most worth experimenting with for increasing the speed of simulation is REL The default value of 1 is usually safe from the point of view of accuracy but occasionally increases computation time A value greater than 2 eliminates all breakpoints and may be worth trying depending on the nature of the rest of the circuit keeping in mind that it might not be safe from the viewpoint of accuracy Breakpoints may usually be entirely eliminated if 1t is expected the circuit will not display sharp discontinuities Values between 0 and 1 are usually not required but may be used for setting many breakpoints COMPACTREL may also be experimented with when the option TRYTOCOMPACT is specified in a OPTIONS card The legal range is between 0 and 1 Larger values usually decrease the accuracy of the simulation but in some cases improve speed If TRYTOCOMPACT is not specified on a OPTIONS card history compaction is not attempted and accuracy is high NOCONTROL TRUNCDONTCUT and NOSTEPLIMIT also tend to increase speed at the expense of accuracy 4 3 3 Uxxxx Uniform Distributed RC Lines Lossy General form UXXXXXXX N1 N2 N3 MNAME L LEN lt N LUMPS gt Examples Ul 1 2 O URCMOD L 50U URC2 1 12 2 UMODL 1 1MIL N 6 N1 and N2 are the two element nodes the RC line connects while N3 is the node to which the capacitances are connected MNAME is the model name LEN is the length of the RC line in meters LUMPS if specified is the number of lumped segments to u
133. n some cases Sets the charge tolerance of the program The default value is 1 0e 14 Sets the value for MOS channel length the default is 100 0 micrometer Sets the value for MOS channel width the default is 100 0 micrometer DELMIN x Sets the minimum timestep value used in transient analyses If WinSpice3 tries to go below this value in attempting to achieve convergence the analysis will be aborted A value of 0 disables the minimum limit Any negative value sets the minimum timestep to 1E 9 TMAX as in the original Spice3 The default value is 1 0e 20 Sets the value of GMIN the minimum conductance allowed by the program The default value is 1 0e 12 GMINSTEPS x If a circuit does not converge WinSpice tries the GMIN stepping method where the value of GMIN is first set to GMIN 10 GMINSTEPS and then divided by 10 with each step until the circuit converges This option sets the value of GMINSTEPS If set to 1 the GMIN stepping is disabled The default value is 10 ITL1 x Sets the DC iteration limit The default is 100 ITL2 x Sets the DC transfer curve iteration limit The default is 50 ITL3 x Sets the lower transient analysis iteration limit The default value is 4 Note not implemented in WinSpice3 ITL4 x Sets the transient analysis timepoint iteration limit The default is 10 Copyright 2002 2003 Mike Smith 68 16 08 2005 WinSpice3 User Manual ITL5 x Sets the transient analysis total iter
134. nalysis No Convergence in DC analysis PIVTOL Error WinSpice3 programs will issue Gmin Source Stepping Failed or Singular Matrix messages DC SWEEP Analysis No Convergence in DC analysis at Step xxx DC Transient TRAN Internal timestep too small IMPORTANT NOTE The suggestions listed below are applicable to most SPICE programs especially if they are Berkeley SPICE compatible Copyright 2002 2003 Mike Smith 121 16 08 2005 WinSpice3 User Manual 7 5 Convergence Solutions 7 5 1 DC Convergence Solutions OPTIONS NODE LIST will provide a nice summary print out of the nodal connections Common mistakes Make sure all of the circuit connections are valid Check for incorrect node numbering or dangling nodes Make sure you didn t use the letter O instead of a zero 0 Check for syntax mistakes Make sure you used the correct SPICE units MEG instead of M for 1E6 Check for a DC path to ground from every node Ensure that there are two connections at each node No loops of inductors or voltage sources No series capacitors or current sources Have ground node 0 somewhere in the circuit Be careful when using floating grounds a large valued resistor connected from the floating point to ground may be needed Check to see that voltage current generators are at their proper values Check to see that dependent source gains are correct Check for realistic model parameters especially if you copied the mod
135. nd PS are the perimeters of the drain and source junctions in meters and default to 0 0 NRD and NRS designate the equivalent number of squares of the drain and source diffusions these values multiply the sheet resistance RSH specified on the MODEL control line for an accurate representation of the parasitic series drain and source resistance of each transistor NRD and NRS default to 1 0 OFF indicates an optional initial condition on the device for DC analysis The optional initial condition specification using IC VDS VGS VBS is intended for use with the UIC option on the TRAN control line when a transient analysis is desired starting from other than the quiescent operating point See the IC control line for a better and more convenient way to specify transient initial conditions The optional TEMP value is the temperature at which this device is to operate and overrides the temperature specification on the OPTION control line The temperature specification is ONLY valid for level 1 2 3 and 6 MOSFETs not for level 4 or 5 BSIM devices 4 4 4 1 MOSFET Models NMOS PMOS SPICE provides four MOSFET device models which differ in the formulation of the I V characteristic The variable LEVEL specifies the model to be used LEVEL 1 MOS1 Shichman Hodges LEVEL 2 MOS2 as described in 1 LEVEL 3 MOS3 a semi empirical model see 1 LEVEL 4 BSIMI as described in 3 LEVEL 5 BSIM2 as described in 5 LEVEL 6 MOS6 as descr
136. nd currents through voltage sources in the system In an AC analysis only the DC component of a voltage or current source when the initial operating point was calculated is used In a transient analysis any voltages or currents are evaluated at each time point Copyright 2002 2003 Mike Smith 38 16 08 2005 WinSpice3 User Manual The following functions of real variables are defined expl x y if t x y Returns e with a limit y If e lt y return e else return y if t TRUE return x else return y t is a Boolean expression that evaluates to TRUE or FALSE and can include logical and relational operators x and y are either numerical values or expressions Copyright O 2002 2003 Mike Smith 39 16 08 2005 WinSpice3 User Manual pwrs x y x y if x gt 0 xy if x lt 0 Signum function If x gt 0 returns 1 else returns 1 1 sin x x 1n radians The unit step function with a value of one for arguments greater than zero and a value of zero for arguments less than zero The integral of the unit step for an input x the value is zero if x is less than zero or if x is greater than zero the value is x Table 1 Functions The u and uramp functions are useful in synthesising piece wise non linear functions though convergence may be adversely affected Copyright 2002 2003 Mike Smith 40 16 08 2005 WinSpice3 User Manual The following variables may be used in an
137. nia Berkeley December 1986 Clement Szeto Simulator of Temperature Effects in MOSFETs STEIM Master s thesis University of California Berkeley May 1988 J S Roychowdhury and D O Pederson Efficient Transient Simulation of Lossy Interconnect Proc of the 28th ACM IEEE Design Automation Conference June 17 21 1991 San Francisco A E Parker and D J Skellern An Improved FET Model for Computer Simulators IEEE Trans CAD vol 9 no 5 pp 551 553 May 1990 R Saleh and A Yang Editors Simulation and Modeling IEEE Circuits and Devices vol 8 no 3 pp 7 8 and 49 May 1992 H Statz et al GaAs FET Device and Circuit Simulation in SPICE IEEE Transactions on Electron Devices V34 Number 2 February 1987 pp160 169 Copyright 2002 2003 Mike Smith 129 16 08 2005 WinSpice3 User Manual 9 APPENDIX A EXAMPLE CIRCUITS 9 1 Circuit 1 Differential Pair The following deck determines the DC operating point of a simple differential pair In addition the ac small signal response is computed over the frequency range 1Hz to 100MEGH Z SIMPLE DIFFERENTIAL PAIR VCC 4 10 12 VEE 8 OQ 2 MIN A Y AC 1 Rol E A 1K Roa 0 1K od 3 2 4 MODI 02 5 6 4 MODI ROT 9 3 FOK REZ Gk a 10K RE 4 8 10K MODEL MODE NPN BF 50 VAF 50 IS 1 E 12 RB 100 CJC 5PF TF 6NS STE AS VEN AC DEC 10 1 100MEG END 9 2 Circuit 2 MOSFET Characterisation The following deck computes the output characteristics of a MOSFET device
138. nimum value can help a circuit converge Be careful though It is possible for the timestep to get so small that numerical problems may occur which could stop the program Copyright 2002 2003 Mike Smith 128 16 08 2005 WinSpice3 User Manual 8 BIBLIOGRAPHY 1 2 5 4 5 6 7 8 9 10 11 A Vladimirescu and S Liu The Simulation of MOS Integrated Circuits Using SPICE2 ERL Memo No ERL M80 7 Electronics Research Laboratory University of California Berkeley October 1980 T Sakurai and A R Newton A Simple MOSFET Model for Circuit Analysis and its application to CMOS gate delay analysis and series connected MOSFET Structure ERL Memo No ERL M90 19 Electronics Research Laboratory University of California Berkeley March 1990 B J Sheu D L Scharfetter and P K Ko SPICE2 Implementation of BSIM ERL Memo No ERL M85 42 Electronics Research Laboratory University of California Berkeley May 1985 J R Pierret A MOS Parameter Extraction Program for the BSIM Model ERL Memo Nos ERL M84 99 and M84 100 Electronics Research Laboratory University of California Berkeley November 1984 Min Chie Jeng Design and Modeling of Deep Submicrometer MOSFETSs ERL Memo Nos ERL M90 90 Electronics Research Laboratory University of California Berkeley October 1990 Soyeon Park Analysis and SPICE implementation of High Temperature Effects on MOSFET Master s thesis University of Califor
139. of each element in the COMPLEX vector vector If the units variable is not defined the phase is in radians If units has the value of degrees the phase angle will be in degrees j vector 1 sqrt 1 times COMPLEX vector vector real vector The real component of vector re vector imag vector The imaginary part of vector im vector db vector 20 logl10 mag vector log vector The logarithm base 10 of vector log10 vector In vector The natural logarithm base e of vector exp vector e to the vector power abs vector The absolute value of vector 1 e the magnitude Same as mag vector sqrt vector The square root of vector The sine of vector The cosine of vector The tangent of vector The inverse tangent of vector norm vector The vector normalised to 1 1 e the largest magnitude of any component is 1 Copyright 2002 2003 Mike Smith 92 16 08 2005 WinSpice3 User Manual Function rnd vector pos vector vecmax vector vecmin vector vector number unitvec vector length vector ed vector rad vector deg vector interpolate plot vector Copyright O 2002 2003 Mike Smith Description A vector with each component a random integer between 0 and the absolute value of the vector s corresponding component The result is a vector containing 1 0 1f the corresponding element of vector was gt 0 0 and zero otherwise The result is a scalar a length 1 vector
140. oint of the circuit After convergence has been obtained the program continues iterating to obtain the exact value for the controlling variable Hence to reduce the computational effort for the dc operating point or if the polynomial specifies a strong nonlinearity a value fairly close to the actual controlling variable should be specified for the initial condition 4 2 3 1 Voltage Controlled Current Sources General form GXAXAOS NF N KPOnY ND gt NCI NCIS de PO XPI wrer Ier La Examples Copyright 2002 2003 Mike Smith 36 16 08 2005 WinSpice3 User Manual Gl AOS 107 Un UM GR LP Lo 0 IM LSM IGSA CM E 29 L7 POLY 2 So b 2 0 IM ATM SA OU LC H 2 5 cles N and N are the positive and negative nodes respectively Current flow is from the positive node through the source to the negative node POLY ND only has to be specified if the source is multi dimensional one dimensional is the default If specified ND is the number of dimensions which must be positive NC1 NCI are the positive and negative controlling nodes respectively One pair of nodes must be specified for each dimension PO P1 P2 Pn are the polynomial coefficients The optional initial condition is the initial guess at the value s of the controlling voltage s If not specified 0 0 is assumed The polynomial specifies the source current as a function of the controlling voltage s The second example above describes a current source with
141. onvergence and does not affect final bias solution except for multi stable circuits The two interpretations of this line are as follows 1 When the UIC parameter is specified on the TRAN line then the node voltages specified on the IC control line are used to compute the capacitor diode BJT JFET and MOSFET initial conditions This is equivalent to specifying the IC parameter on each device line but is much more convenient The IC parameter can still be specified and takes precedence over the IC values Since no DC bias initial transient solution is computed before the transient analysis one should take care to specify all DC source voltages on the IC control line 1f they are to be used to compute device initial conditions 2 When the UIC parameter is not specified on the TRAN control line the DC bias initial transient solution is computed before the transient analysis In this case the node voltages specified on the IC control line are forced to the desired initial values during the bias solution During transient analysis the constraint on these node voltages is removed This is the preferred method since it allows SPICE to compute a consistent DC solution 5 3 Analyses 5 3 1 AC Small Signal AC Analysis General form AC DEC ND FSTART ESTOP SAC OCT NOUFSTART ESTO AC LIN INP ESTART FoTOP Examples AC DEC 10 2 LOK AC DEC 10 1K 100MEG AC LIN 100 1 100HZ DEC stands for decade variation and ND i
142. operating point 1s used as a starting condition for the final operating point 6 Change DC power supplies into PULSE statements Example From VCE LU Tope To VCC I O PULSE 0 LS This allows the user to selectively turn on certain power supplies just like in real life This is sometimes known as the Pseudo Transient method Use a reasonable rise time in the PULSE statement to simulate realistic turn on for example VI 1 0 PULSE 05 0 1U would provide a 5 volt supply with a turn on of 1 microsecond The first value after the 5 voltage in this case 0 is the turn on delay that can be used to let the circuit settle down before turning on the power supply Copyright 2002 2003 Mike Smith 123 16 08 2005 WinSpice3 User Manual Example ERAN TN SOON UTE Insert the UIC keyword in the TRAN statement UIC means Use Initial Conditions UIC will cause WinSpice3 to completely by pass the DC analysis You should add any applicable IC and IC initial conditions statements to assist in the initial stages of the transient analysis Note this solution 1s not viable when you want to perform an AC analysis because the AC analysis must be proceeded by an operating point AC Analysis Note Solutions 5 and 6 should be used as a last resort because they will not produce a valid DC operating point for the circuit All supplies turned ON However 1f your aim is to get to the transient analysis then solutions 5 and 6 may help you get the
143. os3 Level 3 MOSFET model with Meyer capacitance model off Device initially off Mos3 instance parameters input output Source area Multiplier Copyright O 2002 2003 Mike Smith 161 16 08 2005 WinSpice3 User Manual Mos3 instance parameters output only Drain current qgs Gate Source charge storage Copyright O 2002 2003 Mike Smith 162 16 08 2005 WinSpice3 User Manual qgd Gate Drain charge storage Gate Bulk charge storage P type MOSFET model Copyright 2002 2003 Mike Smith 163 16 08 2005 WinSpice3 User Manual Mos3 model parameters input output Threshold voltage Flicker noise coefficient af Flicker noise exponent Mos3 model parameters output only type N channel or P channel MOS Copyright O 2002 2003 Mike Smith 164 16 08 2005 WinSpice3 User Manual 10 20 Mos6 Level 6 MOSFET model with Meyer capacitance model Device initially off Source area Multiplier Instance temperature Copyright 2002 2003 Mike Smith 165 16 08 2005 WinSpice3 User Manual Mos6 instance parameters output only Drain current qgb Gate Bulk charge storage Copyright O 2002 2003 Mike Smith 166 16 08 2005 WinSpice3 User Manual qbd Bulk Drain charge storage Bulk Source charge storage P type MOSFET model Copyright O 2002 2003 Mike Smith 167 16 08 2005 WinSpice3 User Manual Mos6 model parameters input output Threshold voltage Parameter measurement tempe
144. ot buffers such that in the example above three separate plots will appear overlaid on the plot window one plot for each temperature Note that if a TEMP line exists in a circuit the sweep will be performed even for analyses started from the command line with the ac tran etc commands To disable the sweep enter the command set TEMP 27 to disable the temperature sweep Subsequent analyses will be made only for 27 degrees Centigrade 5 3 9 TF Transfer Function Analysis General form LE QUIVAR INSRC Examples LE YO 3 VIN TF T VLOAD VIN The TF line defines the small signal output and input for the DC small signal analysis OUTVAR is the small signal output variable and INSRC is the small signal input source If this line is included WinSpice3 computes the DC small signal value of the transfer function output input input resistance and output resistance For the first example WinSpice3 would compute the ratio of V 5 3 to VIN the small signal input resistance at VIN and the small signal output resistance measured across nodes 5 and 3 5 3 10 TRAN Transient Analysis General form lt TRAN TSTEP TSTOP lt TSTART lt TMAX gt gt lt UIC gt TRAN TSTEP TSTOP lt TSTART lt TMAX gt gt lt SKIPBP gt Examples TRAN INS 100NS TRAN INS 1000NS SOONS ERAN ONS EUS TSTEP is the printing or plotting increment for line printer output For use with the post processor TSTEP is the sugge
145. over the range 0 10V for VDS and 0 5V for VGS MOS OUTPUT CHARACTERISTICS OPTIONS NODE NOPAGE VDS 3 VGS 2 30 M1 1 2 0 0 MODI L 4U W 6U AD 10P AS 10P VIDS MEASURES ID WE COULD HAVE USED VDS BUT ID WOULD BE NEGATIVE VIDS 3 1 MODEL MOD1 NMOS VTO 2 NSUB 1 0E15 UO 550 DE VOS OO o Mes 10 ET END 9 3 Circuit 3 RTL Inverter The following deck determines the DC transfer curve and the transient pulse response of a simple RTL inverter The input is a pulse from 0 to 5 Volts with delay rise and fall times of 2ns and a pulse width of 30ns The transient interval is O to 100ns with printing to be done every nanosecond SIMPLE RTL INVERTER VCC 4 0 9 VIN 1 0 PULSE O 5 2NS 2NS 2NS 3ONS RB Ty Z 10K Q1 z s OOL RG 3 4 1K MODEL 01 NEN BE 20 RE TIOU TE INS CJC ZPF DO VEN Uoo Del TRAN INS 100NS END Copyright O 2002 2003 Mike Smith 130 16 08 2005 WinSpice3 User Manual 9 4 Circuit 4 Four Bit Binary Adder The following deck simulates a four bit binary adder using several subcircuits to describe various pieces of the overall circuit Copyright O 2002 2003 Mike Smith 131 16 08 2005 WinSpice3 User Manual ADDER 4 BIT ALL NAND GATE BINARY ADDER SUBCIRCUIT DEFINITIONS SUBCKT NAND 1 2 3 4 NODES ANPUT 2 OUTPUT a VEC Q1 9 amp 1 OMOD D1CLAMP On al DMOD 02 O 3 2 QMOD D2CLAMP Ur 2 DMOD RB 4 5 4K Ral 4 6 a 03 6 9 8 QMOD R2 8 0 LK RC 47 130 Q4 17 6 10 QMOD DVBEDRO
146. ponding to the number of blocks the user has entered The current control structures may be examined with the debugging command cdump Copyright O 2002 2003 Mike Smith 99 16 08 2005 WinSpice3 User Manual 6 9 Commands 6 9 1 Ac Perform an AC frequency response analysis General Form ac DEC OCT EN IN EsStart ESTOS Do an AC analysis See section 5 3 1 of this manual for more details 6 9 2 Alias Create an alias for a command General Form alias word text Causes word to be aliased to text History substitutions may be used as in C shell aliases 6 9 3 Alter Change a device or model parameter General Form alter name expression alter name parameter expression alter name parameter expression Alter changes the value for a device or a specified parameter of a device or model The first form 1s used by simple devices which have one principal value resistors capacitors etc where the second and third forms are for more complex devices BJTs etc If name is the name of a device instance then the command will change a parameter within an individual device instance e g alter ml temp 273 If name is the name of a model then the command will change a model parameter and this will affect all device instances in the circuit which use this model e g alter nmos lambda 3 For specifying vectors as expressions start the vector with followed by the values in the vector and end wi
147. predefined on the subcircuit definition line If a value is passed in by the calling X line it will override the default value Defaults can appear in curly braces on the Subckt line or after the PARAMS keyword Syntax sSUBCKT subname Nil 444 NF DPLl vall ses DEJ valjy SUBCKT subname N1 N DPl expr SUBCKT subname N1 NF PARAMS DPl vall DPj valj SUBCKT subname NL N PARAMS DP1 expr where D1 through Dj are default parameters val is a valid SPICE number and expr is a valid expression Curly braces around an expression in the default list are optional PARAM keywords can be placed anywhere in the subcircuit definition However all text after PARAM up to the end of the line will be read in a parameters As an example we will consider a semiconductor resistor subcircuit model The subcircuit call is X1 1 2 RSUB WIDTH 10U RPERSO 1KOHMS The subcircuit contains CUBERT RSUB L 2 LWIDTH 2U R1 1 2 1RPERSO WIDTH 2 1E 12 ENDS The subcircuit call X1 calls the subcircuit and passes two parameters WIDTH and RPERSQ into the subcircuit The resistance value R1 will be calculated based on the equation which is shown next All of the extended syntax 1s transformed into WinSpice3 syntax by evaluating the expression s and then replacing each one with a value For example Copyright O 2002 2003 Mike Smith 19 16 08 2005 WinSpice3 User Manual XI 1 2 RSUBEO SOUBORT RSUBHO 1 2 RL 2 TOOK
148. ps VA amplitude Volts or Amps FC carrier frequency 1 TSTOP Hz MDI modulation index FS signal frequency 1 TSTOP Hz The shape of the waveform is described by the following equation V t V V sin 2aFCt MDI sin 2zFSt 4 2 2 Linear Dependent Sources SPICE allows circuits to contain linear dependent sources characterised by any of the four equations Copyright 2002 2003 Mike Smith 34 16 08 2005 WinSpice3 User Manual l1 gv v ev i fi v hi where g e f and h are constants representing transconductance voltage gain current gain and transresistance respectively 4 2 2 1 Gxxxx Linear Voltage Controlled Current Sources General form GXXXXXXX N N NC NC VALUE Examples EL 220 0 190 0 TMMAO N and N are the positive and negative nodes respectively Current flow is from the positive node through the source to the negative node NC and NC are the positive and negative controlling nodes respectively VALUE is the transconductance in mhos 4 2 2 2 Exxxx Linear Voltage Controlled Voltage Sources General form EXXXXXXX N N NC NC GAIN Examples EL 22 do LAO N is the positive node and N is the negative node NC and NC are the positive and negative controlling nodes respectively GAIN is the voltage gain 4 2 2 3 Fxxxx Linear Current Controlled Current Sources General form FXXXXXXX N N VNAM GAIN Examples Bal ASS VS ENS O N and N are the positive and negative nodes r
149. r 1f the Gummel Poon parameters are not specified the model reduces to the simpler Ebers Moll model In either case charge storage effects ohmic resistances and a current dependent output conductance may be included The diode model can be used for either junction diodes or Schottky barrier diodes The JFET model is based on the FET model of Shichman and Hodges Six MOSFET models are implemented MOS is described by a square law I V characteristic MOS2 1 is an analytical model while MOS3 1 is a semi empirical model MOS6 2 is a simple analytic model accurate in the short channel region MOS4 3 4 and MOSS 5 are the BSIM Berkeley Short channel IGFET Model and BSIM2 MOS2 MOS3 and MOS4 include second order effects such as channel length modulation sub threshold conduction scattering limited velocity saturation small size effects and charge controlled capacitances The area factor used on the diode BJT JFET and MESFET devices determines the number of equivalent parallel devices of a specified model The affected parameters are marked with an asterisk under the heading area in the model descriptions below Several geometric factors associated with the channel and the drain and source diffusions can be specified on the MOSFET device line Two different forms of initial conditions may be specified for some devices The first form is included to improve the DC convergence for circuits that contain more than one stable state
150. r devices are automatically supported by distortion analysis If there are switches present in the circuit the analysis continues to be accurate provided the switches do not change state under the small excitations used for distortion calculations 2 6 Sensitivity Analysis WinSpice3 will calculate either the DC operating point sensitivity or the AC small signal sensitivity of an output variable with respect to all circuit variables including model parameters WinSpice3 calculates the difference in an output variable either a node voltage or a branch current by perturbing each parameter of each device independently Since the method is a numerical approximation the results may demonstrate second order affects in highly sensitive parameters or may fail to show very low but non zero sensitivity Further since each variable is perturbed by a small fraction of its value zero valued parameters are not analysed this has the benefit of reducing what is usually a very large amount of data 2 7 Noise Analysis The noise analysis portion of WinSpice3 does analysis device generated noise for the given circuit When provided with an input source and an output port the analysis calculates the noise contributions of each device and each noise generator within the device to the output port voltage It also calculates the input noise to the circuit equivalent to the output noise referred to the specified input source This is done for every frequency point
151. rature Mos6 model parameters output only type N channel or P channel MOS Copyright O 2002 2003 Mike Smith 168 16 08 2005 WinSpice3 User Manual 10 21 Resistor Simple resistor Resistor instance parameters input output resistance Resistance Resistor model parameters input only r Device is a resistor model Switch power Copyright 2002 2003 Mike Smith 169 16 08 2005 WinSpice3 User Manual Switch model parameters input output Switch model Conductance when open 10 23 Tranline Lossless transmission line Tranline instance parameters input only ic Initial condition vector v1 11 v2 12 Tranline instance parameters input output Characteristic impedance i Initial current at end 1 1 12 Initial current at end 2 Tranline instance parameters output only Rel rate of change of deriv for bkpt Delayed values of excitation Copyright 2002 2003 Mike Smith 170 16 08 2005 WinSpice3 User Manual 10 24 VCCS Voltage controlled current source VCCS instance parameters input output gain Transconductance of source gain VCCS instance parameters output only pos_node Positive node of source cont_n_ node 10 25 VCVS Voltage controlled voltage source VCVS instance parameters input only 1C Initial condition of controlling source VCVS instance parameters input output gain Voltage gain VCVS instance parameters output only pos_node Posit
152. rder to apply them to all subsequent entries e Be careful of what you are substituting The variable name must be unique so that inadvertent substitutions are avoided e The variable name cannot start with a number e The DEFINE statement cannot longer than one line long As an example with the following netlist DEFINE WIDTH 5U M1 1 2 3 4 WIDTH M2 7 8 9 10 WIDTH M20 34 45 23 12 WIDTH When the netlist is loaded into WinSpice3 the DEFINE lines are read and removed from the netlist Then the netlist is scanned and substitutions made to give the following result MA 2 o aU MZ oh 26 9 0 SU M20 34A 45 23 42 OU Note that this is a pure text substitution Unlike the PARAM substitutions see section 3 6 3 if the substitution text contains an expression then this is not evaluated as the substitution is made 3 6 3 PARAM General form PARAM namel valuel namen valuen PARAM namel expressionl namen expressionn Examples PARAM VCC 12V VEE 12V PARAM Freq 10K Period 1 FREQ TRISE period 100 PARAM PI 3 14159 TWO PI 2 3 14159 PARAM TEST 1 Phase 90 PARAM K1 10 Sin Test 1 TEST 180 PARAM K2 TEST lt 1 gt PI ExXp lesce 2 5K The PARAM function is used to pass parameters into the main circuit and to subcircuits They may then be used as is or inserted into mathematical expressions The mathematical expressions will then be evaluated using the
153. re and possibly uncover the hidden problems plaguing the DC analysis along the way 7 5 2 DC Sweep Convergence Solutions Check circuit topology and connectivity Make sure every node has two connections and all nodes have a DC path to ground Increase the maximum numer of iterations This is the same as O in DC analysis Set ITL2 100 in the OPTIONS statement Example OPTIONS ITL2 100 Increases the number of DC iterations WinSpice3 will go through before giving up Make the steps in the DC sweep larger or smaller Example From E MOC 0 ET To DE NCE 0 dle E Discontinuities in the SPICE models can cause convergence problems Larger steps can help to bypass the discontinuities while smaller steps can help WinSpice3 find the intermediate answers that will be used to find non converging point Copyright O 2002 2003 Mike Smith 124 16 08 2005 WinSpice3 User Manual Use transient analysis instead of the DC sweep analysis Example From DES MISS Ui Sel VEC LQ To IRAN 01 1 YES 1 0 PULSE 00 501 In many cases it is more effective and efficient to use the transient analysis by ramping the appropriate voltage and or current sources than to use the DC analysis 7 5 3 Transient Convergence Solutions Check circuit topology and connectivity Make sure every node has two connections and all nodes have a DC path to ground Set RELTOL 01 in the OPTIONS statement Example OPTIONS RELT
154. roduce a linear time axis for transient analyses After using the spec command the spectrum can be displayed by plotting the magnitude of the resultant vector For example after a transient analysis resulting in transient vector v 1 the spectrum can be plotted with the following commands Copyright O 2002 2003 Mike Smith 114 16 08 2005 WinSpice3 User Manual linearize spec 10 100000 5000 vil plot mag v l 6 9 51 Status Display breakpoint and trace information General Form status Display all of the traces iplots and breakpoints currently in effect 6 9 52 Step Run a fixed number of time points General Form step number Iterate number times or once and then stop 6 9 53 Stop Set a breakpoint General Form stop after n when value cond value Set a breakpoint The argument after n means stop after n iteration number n and the argument when value cond value means stop when the first value is in the given relation with the second value the possible relations being eq or equal to ne or lt gt not equal to gt or gt greater than It or lt less than ge or gt greater than or equal to le or lt less than or equal to I O redirection is disabled for the stop command since the relational operations conflict with it it doesn t produce any output anyway The values above may be node names in the running circuit or real values If more than one condition is given e g stop after 4 when v
155. rrent per length Diode resistance per length Voltage source ASRC instance parameters output only 1 Current through source Voltage across source neg_node Negative Node 10 3 BJT Bipolar Junction Transistor BJT instance parameters input only 1C Initial condition vector vbe vce Copyright O 2002 2003 Mike Smith 135 16 08 2005 WinSpice3 User Manual BJT instance parameters input output Device initially off Power dissipation Copyright O 2002 2003 Mike Smith 136 16 08 2005 WinSpice3 User Manual BJT model parameters input output NPN type device xtb Forward and reverse beta temp exp Copyright 2002 2003 Mike Smith 137 16 08 2005 WinSpice3 User Manual excessphasefactor Excess phase fact 10 4 BSIM1 Berkeley Short Channel IGFET Model IC Vector of DS GS BS initial voltages BSIMI instance parameters input output Source area Multiplier Initial Bulk Source voltage Copyright 2002 2003 Mike Smith 138 16 08 2005 WinSpice3 User Manual BSIMI instance parameters output only Drain Source voltage Flag to indicate PMOS Copyright 2002 2003 Mike Smith 139 16 08 2005 WinSpice3 User Manual BSIMI model parameters input output Flat band voltage Ix2ul Length dependence of x2ul Copyright 2002 2003 Mike Smith 140 16 08 2005 WinSpice3 User Manual Length reduction of source drain diffusion 10 5 BSIM2 Berkeley Short Channel IG
156. rs any line with leading white space to be a comment 3 3 MODEL Device Models General form MODEL MNAME TYPE PNAME1 PVAL1 PNAME2 PVAL2 Examples MODEL MOD1 NPN BF 50 IS 1E 13 VBF 50 Most simple circuit elements typically require only a few parameter values However some devices semiconductor devices in particular that are included in WinSpice3 require many parameter values Often many devices in a circuit are defined by the same set of device model parameters For these reasons a set of device model parameters is defined on a separate MODEL line and assigned a unique model name The device element lines in WinSpice3 then refer to the model name Copyright 2002 2003 Mike Smith 9 16 08 2005 WinSpice3 User Manual For these more complex device types each device element line contains the device name the nodes to which the device 1s connected and the device model name In addition other optional parameters may be specified for some devices geometric factors and an initial condition see the following section on Transistors and Diodes for more details MNAME in the above 1s the model name and type 1s one of the following types R Semiconductor resistor model C Semiconductor capacitor model SW Voltage controlled switch VSWITCH CSW Current controlled switch IS WITCH URC Uniform distributed RC model LTRA Lossy transmission line model D Diode model NPN NPN BJT model PNP PNP BJT model NJF N channel JFE
157. s 99 6 9 COMUN RE 100 6 9 1 Ac Perform an AC frequency response analysis 100 6 9 2 Alias Create an allas Tor 4 command 36 errant ieee 100 6 9 3 Alter Change a device or model parameter 100 6 9 4 Asciiplot Plot values using old style character plots ccccccccccsssssssseeeseeeeeeeeeees 100 6 9 5 Bo iat DOS Te OM ee SES SR en ne center anon aie 101 6 9 6 Cd Change direclO yasane me nn nee a ee nil astetoweacen octo ln 101 6 9 7 CROSS Create AAA nine nte rte 101 6 9 8 De Performa DC sweep analysis ta a ressens 101 6 9 9 Derme D tine a IMC tO suda ll leia 102 69 10 Delte Removed race Or Dc apta cana 102 GALL Destroy Delete a data Set plo issues to reee 102 69 02 Dirt Compare VECES e 102 6 9 13 Display List known vectors and types ss 102 6 9 14 Disto Perform a distortion analysis 103 0915 ECHO FPI mE PR c 103 6 9 16 Edit Edit the current CCU ds bd 103 09 17 Fourier Performa fourier ANS LOMME traia aisla 103 6 9 18 Hardcopy Save a plot to a file for printing ccccccccncnnnnnnnnnnnnnnoonnnnnnnnnnnnnnnnnnnnnnonnnnos 103 6 9 19 Help Print summaries of WinSpice3 commands ccccccccnnnnnnnnoocnnnnnnnonnnnnnnnnnnnnonnnnnonos 104 6 9 20 History Review previous commands ss 104 0921 Iplot Incremental Pl da a eds A eee 104 07 22 Wet ASSiSma Value tO a VC ClOR vere ccs cake sirio 104 69 23 Lin arize Interpolate toa linear scale ss menti 105 6 9 24 Listing Print a listing of the current circuit 105
158. s or timestep difficulties The user of switches can improve the situation by taking the following steps 1 First it is wise to set ideal switch impedances just high or low enough to be negligible with respect to other circuit elements Using switch impedances that are close to ideal in all cases aggravates the problem of discontinuities mentioned above Of course when modelling real devices such as MOSFETs the on resistance should be adjusted to a realistic level depending on the size of the device being modelled 2 Ifa wide range of ON to OFF resistance must be used in the switches ROFF RON gt le 12 then the tolerance on errors allowed during transient analysis should be decreased by using the OPTIONS control line and specifying TRTOL to be less than the default value of 7 0 When switches are placed around capacitors then the option CHGTOL should also be reduced Suggested values for these two options are Copyright 2002 2003 Mike Smith Zi 16 08 2005 WinSpice3 User Manual 1 0 and le 16 respectively These changes inform WinSpice3 to be more careful around the switch points so that no errors are made due to the rapid change in the circuit 4 1 5 4 PSpice Switch Model ISWITCH VSWITCH General form MODEL MNAME TYPE PNAME1 PVAL1 PNAME2 PVAL2 Examples MODEL SMOD VSWITCH RON 5M ROFF 10E9 VON 1 1 VOFF 0 9 MODEL SMOD ISWITCH RON 5M ROFF 10E9 ION 1 0MA IOFF 0 The VSWITCH and IS WITCH forms of the model show
159. s the number of points per decade OCT stands for octave variation and NO is the number of points per octave LIN stands for linear variation and NP is the number of points FSTART is the starting frequency and FSTOP is the final frequency If this line is included in the input file WinSpice3 performs an AC analysis of the circuit over the specified frequency range Note that in order for this analysis to be meaningful at least one independent source must have been specified with an AC value Copyright O 2002 2003 Mike Smith 12 16 08 2005 WinSpice3 User Manual 5 3 2 DC DC Transfer Function General form DE SRENAM VSTART VSTOP VINCR SREZ STARI2 STOPZ INCR Examples DE VEN 0281550028 DE VDS 10 OS Go Urol DO VCE 0 A0 Zo LB O FOU LU The DC line defines the DC transfer curve source and sweep limits again with capacitors open and inductors shorted SRCNAM is the name of an independent voltage or current source VSTART VSTOP and VINCR are the starting final and incrementing values respectively The first example causes the value of the voltage source VIN to be swept from 0 25 Volts to 5 0 Volts in increments of 0 25 Volts A second source SRC2 may optionally be specified with associated sweep parameters In this case the first source is swept over its range for each value of the second source This option can be useful for obtaining semiconductor device output characteristics See the second example circuit description
160. se in modelling the RC line see the model description for the action taken if this parameter is omitted 4 3 3 1 Uniform Distributed RC Model URC The URC model is derived from a model proposed by L Gertzberrg in 1974 The model is accomplished by a subcircuit type expansion of the URC line into a network of lumped RC segments with internally generated nodes The RC segments are in a geometric progression increasing toward the middle of the URC line with K as proportionality constant The number of lumped segments used if not specified for the URC line device is determined by the following formula Copyright 2002 2003 Mike Smith 46 16 08 2005 WinSpice3 User Manual log F S TIL E D GL K N log K The URC line is made up strictly of resistor and capacitor segments unless the ISPERL parameter is given a non zero value In this case the capacitors are replaced with reverse biased diodes These have a zero bias junction capacitance equivalent to the capacitance replaced and with a saturation current of ISPERL amps per meter of transmission line and an optional series resistance equivalent to RSPERL ohms per meter COM imenom f fe COM e fia CRC CS CONT CS COMP oe CRC CS 4 4 Transistors And Diodes WinSpice3 has built in models for the semiconductor devices and the user need specify only the pertinent model parameter values The model for the BJT 1s based on the integral charge model of Gummel and Poon howeve
161. sed The possible values are lingrid loglog xlog ylog smith smithgrid polar nogrid See the plot command for details hcopydev String If this 1s set when the hardcopy command is run the resulting file is automatically printed on the printer named hcopydev with the command Ipr Phcopydev g file hcopyfont String This variable specifies the font name for hardcopy output plots The value 1s device dependent hcopyfontsize The font size for hardcopy plots hcopyfontscale This 1s a scaling factor for the font used in hardcopy plots hcopydevtype String This variable specifies the type of the printer output to use in the hardcopy command If hcopydevtype is not set plot 5 format is assumed The standard distribution currently recognises postscript as an alternative output format When used in conjunction with hcopydev hcopydevtype should specify a format supported by the printer height The length of the page for asciiplot and print col The number of events to save in the history list ignoreeof Boolean If set causes WinSpice to ignore EOF characters from the keyboard If set outputs a listing batch mode only Iprplots String This is a printf 3s style format string used to specify the command to use for sending plot 5 style plots to a printer or plotter The first parameter supplied is the printer name the second parameter supplied is a file name containing the plot Both parameters are strings It is trivial to caus
162. ses and one can find the poles zeros of functions like input output impedance and voltage gain The input and output ports are specified as two pairs of nodes The pole zero analysis works with resistors capacitors inductors linear controlled sources independent sources BJTs MOSFETs JFETs and diodes Transmission lines are not supported The method used in the analysis 1s a sub optimal numerical search For large circuits it may take a considerable time or fail to find all poles and zeros For some circuits the method becomes lost and finds an excessive number of poles or zeros 2 5 Small Signal Distortion Analysis The distortion analysis portion of WinSpice3 computes steady state harmonic and intermodulation products for small input signal magnitudes If signals of a single frequency are specified as the input to the circuit the complex values of the second and third harmonics are determined at every point in the circuit If there are signals Copyright 2002 2003 Mike Smith 5 16 08 2005 WinSpice3 User Manual of two frequencies input to the circuit the analysis finds out the complex values of the circuit variables at the sum and difference of the input frequencies and at the difference of the smaller frequency from the second harmonic of the larger frequency Distortion analysis is supported for the following non linear devices diodes DIO BJT JFET MOSFETs levels 1 2 3 4 BSIM1 5 BSIM2 and 6 and MESFETs All linea
163. signal models for all of the non linear devices in the circuit The resultant linear circuit is then analysed over a user specified range of frequencies The desired output of an AC small signal analysis is usually a transfer function voltage gain transimpedance etc If the circuit has only one AC input it is convenient to set that input to unity and zero phase so that output variables have the same value as the transfer function of the output variable with respect to the input 2 3 Transient Analysis The transient analysis portion of WinSpice3 computes the transient output variables as a function of time over a user specified time interval The initial conditions are automatically determined by a DC analysis All sources which are not time dependent for example power supplies are set to their DC value The transient time interval is specified on a TRAN control line 2 4 Pole Zero Analysis The pole zero analysis portion of WinSpice3 computes the poles and or zeros in the small signal AC transfer function The program first computes the DC operating point and then determines the linearized small signal models for all the non linear devices in the circuit This circuit is then used to find the poles and zeros of the transfer function Two types of transfer functions are allowed one of the form output voltage input voltage and the other of the form output voltage input current These two types of transfer functions cover all the ca
164. specification using IC VDS VGS is intended for use with the UIC option on the TRAN control line when a transient analysis is desired starting from other than the quiescent operating point See the IC control line for a better way to set initial conditions 4 4 5 Axxxx STAG Device General form Axxxx ND NGf NS NGb NB NT MNAME lt L VAL gt lt W VAL gt lt NRD VAL gt lt NRS VAL gt lt RT VAL gt lt CT VAL gt lt IC VDS VG S VGbS VBS gt lt OFF gt lt TEMP T gt Examples Copyright 2002 2003 Mike Smith 60 16 08 2005 WinSpice3 User Manual MI 242 00 20 TYPE M31 2 17 6 10 MODM L 5U W 2U M1 2 9 3 0 MOD1 L 10U W 5U AD 100P AS 100P PD 40U PS 40U ND NGf NS NGb and NB are the drain front gate source back gate substrate and body contact respectively NT is the thermal node representing the local MOSFET temperature rise and can be used to construct a thermal netlist Both NT and NB can be left floating by specifying dummy node names SPICE3 allows the node names to be alphanumeric so a useful convention may be to have thermal nodes called T1 T2 etc MNAME is the model name L and W are the nominal length and width of the device respectively given in metres If L or W are not given default values are used NRD and NRS are the equivalent number of squares of the drain and source respectively and both default to 1 These are used with RSH in the MODEL card to obtain the drain and source resistances RT
165. ssions and statements to be defined by single keywords These keywords can then be used throughout the netlist to decrease typing time and ease circuit debugging Define statements may be placed anywhere in the netlist and will cause user defined expressions to be substituted for keywords DEFINE may also be used in lower case e g define and can also be written define as shown above DEFINE allows a text string to be replaced with another text string within the netlist This function can be used to easily change model names that are used numerous times or to easily shorten long phrases In the example above every occurrence of the string DUT will be replaced by its substitute text string MPSA42 The expression substitute text string may contain any characters The substituted text is comprised of all the NN 11 characters following the equals sign up until a carriage return is encountered Copyright O 2002 2003 Mike Smith 14 16 08 2005 WinSpice3 User Manual DEFINE statements are erased as they are performed in order to eliminate duplicate substitutions WinSpice3 first scans the netlist for all DEFINE lines and removes them from the netlist It then scans the netlist again and makes the substitutions When using DEFINE the following rules and limitations should be noted e DEFINE statements are only processed in a forward direction Define statements are usually placed at the beginning of the netlist in o
166. sted computing increment TSTOP is the final time and TSTART is the initial time If TSTART is omitted it is assumed to be zero The transient analysis always begins at time zero In the interval lt zero TSTARTS gt the circuit is analysed to reach a steady state but no outputs are stored In the interval lt TSTART TSTOP gt the circuit is analysed and outputs are stored TMAX is the maximum step size that WinSpice3 uses By default the program chooses either TSTEP or TSTOP TSTART 50 0 whichever is smaller TMAX is useful when one wishes to guarantee a computing interval that is smaller than the printer increment TSTEP Copyright 2002 2003 Mike Smith 77 16 08 2005 WinSpice3 User Manual UIC use initial conditions is an optional keyword that indicates that the user does not want WinSpice3 to solve for the quiescent operating point before beginning the transient analysis If this keyword is specified WinSpice3 uses the values specified using IC on the various elements as the initial transient condition and proceeds with the analysis If the IC control line has been specified then the node voltages on the IC line are used to compute the initial conditions for the devices Look at the description on the IC control line for 1ts interpretation when UIC is not specified The keyword SKIPBP can also be used in place of UIC NOTE WinSpice3 uses a dynamic timestep algorithm where the timestep is varied according to the slope of
167. substitution 1s to escape it with a preceding backslash A need not be escaped however if it is followed by whitespace or 6 6 1 Events and Their Specifications WinSpice3 saves each command that you type on a history list provided that the command contains at least one word The commands on the history list are called events The events are numbered with the first command that you issue when you start WinSpice being number one For complex commands such as for that consist of more than one line only the first line makes its way to the history list The history variable specified how many events are retained on the history list You can view the history list with the history command see section 6 9 20 on Page 104 These are the forms of an event in a history substitution The preceding event Typing 1s an easy way to reissue the previous command In Event number n l n The nth previous event For example 1 refers to the immediately preceding event and is equivalent to Istr The unique previous event whose name starts with str str The unique previous event containing the string str The closing can be omitted if it is followed by a newline 6 6 2 Selectors Y ou can select a subset of the words of an event by attaching a selector to the event A history substitution without a selector includes all of the words of the event These are the possible selectors for selecting words of
168. t digits in the rawfile If not defined the number of significant digits 1s 15 Otherwise defines the number of significant digits String Overrides the name used for generating rspice runs default 1s rsh remote_ shell Boolean Stop between each graph plotted and wait for the user to type return before continuing slowplot A list of the directories to search when a source command 1s given The default is the current directory and the standard SPICE library usr local lib spice or whatever LIBPATH is defined to in the WinSpice3 source Boolean Enables stricter checking on numbers String The mfb name of the current terminal Number or If this variable is defined with a numerical value n e g set Boolean ticmarks 5 then every nth point on a plot is marked with a character sourcepath List strictnumparse term ticmarks If defined as a Boolean variable 1 e with no number supplied a ticmark is printed every 10 plot points ticdata 277 TP units String If set to degrees then all the trig functions will use degrees instead of radians This also means that the ph operator for phase also give a phase angle in degrees If this variable is defined the interactive command line will attempt to run a program with the same name unixcom Boolean verbose Boolean Be verbose This is midway between echo and debug cpdebug Number The width of the page for asciiplot and print col Boolean
169. tal frequency is equivalent to cos 2JF1t The distortion component desired 2F1 or 3F1 can be selected using commands in WinSpice3 and then printed or plotted normally one is interested primarily in the magnitude of the harmonic components so the magnitude of the AC distortion value is looked at It should be noted that these are the AC values of the actual harmonic components and are not equal to HD2 and HD3 To obtain HD2 and HD3 one must divide by the corresponding AC values at Fl obtained from a AC line This division can be done using WinSpice3 commands If the optional F2OVERFTI parameter is specified it should be a real number between and not equal to 0 0 and 1 0 in this case DISTO does a spectral analysis It considers the circuit with sinusoidal inputs at two different frequencies Fl and F2 Fl is swept according to the DISTO control line options exactly as in the AC control line F2 is kept fixed at a single frequency as Fl sweeps the value at which it is kept fixed is equal to F2OVERF1I times FSTART Each independent source in the circuit may potentially have two superimposed sinusoidal inputs for distortion at the frequencies F1 and F2 The magnitude and phase of the F1 component are specified by the arguments of the DISTOF1 keyword in the source s input line see the description of independent Copyright 2002 2003 Mike Smith 73 16 08 2005 WinSpice3 User Manual sources the magnitude and phase of the F2 component
170. th Be sure to place a space between each of the values and before and after the and e g alter vin pulse 0 5 10n 10n 10n 50n 100n Lists of alterable parameters for each device model is given in section 10 Only these parameters will be accepted for a given device 6 9 4 Asciiplot Plot values using old style character plots General Form asciiplot plotargs Produce a line printer plot of the vectors The plot is sent to the standard output so you can put it into a file with asciiplot args gt file The set options width height and nobreak determine the width and height of the plot and whether there are page breaks respectively Note that you will have problems if you try to asciiplot something with an X scale that isn t monotonic 1 e something like sin TIME because asciiplot uses a simple minded linear interpolation Copyright 2002 2003 Mike Smith 100 16 08 2005 WinSpice3 User Manual 6 9 5 Bug Mail a bug report General Form bug Send a bug report Please include a short summary of the problem the version number and name of the operating system that you are running the version of SPICE that you are running and the relevant SPICE input file If you have defined BUGADDR the mail is delivered to there NOTE this command does not work yet but it seems too useful to take out Future versions of WinSpice3 will use this command to email bug reports to the author 6 9 6 Cd Change direc
171. the electronic charge N is the acceptor impurity density Ng is the donor impurity density N is the intrinsic carrier concentration and Es is the energy gap Temperature appears explicitly in the value of surface mobility ug or UO for the MOSFET model The temperature dependence is determined by u T n 1 5 Lo The effects of temperature on resistors is modelled by the formula R T R T 1 TC T 1 TC TT where T is the circuit temperature To is the nominal temperature and TC and TC are the first and second order temperature coefficients Copyright 2002 2003 Mike Smith 7 16 08 2005 WinSpice3 User Manual 3 CIRCUIT DESCRIPTION 3 1 General Structure And Conventions The circuit to be analysed is described to WinSpice3 by a set of element lines which define the circuit topology and element values and a set of control lines which define the model parameters and the run controls The first line in the input file must be the title and the last line must be END The order of the remaining lines is arbitrary except of course that continuation lines must immediately follow the line being continued An element line that contains the element name the circuit nodes to which the element is connected and the values of the parameters that determine the electrical characteristics of the element specify each element in the circuit The first letter of the element name specifies the element type The format for the S
172. the event 0 The command name Be The first argument The last argument n The nth argument n gt 1 N N gt Words n through n2 Hg Words 1 through S Words x through X Words x through 1 x Words 0 through x The word matched by the preceding str search The colon preceding a selector can be omitted if the selector does not start with a digit Copyright 2002 2003 Mike Smith 95 16 08 2005 WinSpice3 User Manual 6 6 3 Modifiers You can modify the words of an event by attaching one or more modifiers Each modifier must be preceded by a colon The following modifiers assume that the first selected word is a file name T Removes the trailing str extension from the first selected word h Removes a trailing path name component from the first selected word t Removes all leading path name components from the first selected word For example 1f the command ts L J usr e tss toys txt has just been executed then the command echo HIS RESTE USE CARPE produces the output usr else toys usr elsa toys txt toys The following modifiers enable you to substitute within the selected words of an event If the modifier includes g the substitution applies to the entire event otherwise it applies only to the first modifiable word g s l r Substitutes the string r for the string l The delimiter may be replaced by any other delimiting character Within the substitution
173. the main circuit and to subcircuits e Define and substitute expressions for keywords These syntax extensions are made compatible with IsSpice and other Berkeley compatible SPICE versions by processing the input netlist through a series of pre processors These pre processors are INCLUDE DEFINE and PARAM 3 6 1 INCLUDE General form INCLUDE filename INCLUDE filename with spaces cir Examples INCLUDE c spice common wattmeter cir INCLUDE Vers sbice tilesiwattmeter cir INCLUDE acts as a combination of INCLUDE section 3 5 1 and LIB section 3 5 2 and 1s included in WinSpice for compatibility with commercial SPICE programs If filename has a LIB extension INCLUDE acts like the LIB described earlier It searches stored model library files ASCII for all subcircuits and device models that are not already in your input netlist The appropriate models and subcircuits are automatically appended to the WinSpice3 netlist Otherwise INCLUDE statement acts like INCLUDE also described earlier and causes an entire file to be inserted into the netlist 3 6 2 DEFINE General form DEFINE variable name lt text string gt DEFINE variable name lt text string gt Examples DEFINE DUT MPSA42 The DEFINE feature is similar to the same feature found in commercial SPICE programs like IsSpice and is provided in WinSpice for compatibility as well as being a useful feature It allows complicated expre
174. their natural units For example a 10F capacitance will give unexpected results Nodes names may be arbitrary character strings The datum ground node must be named 0 Note the difference in WinSpice3 where the nodes are treated as character strings and not evaluated as numbers thus 0 and 00 are distinct nodes in WinSpice3 but not in SPICE2 The circuit cannot contain a loop of voltage sources and or inductors and cannot contain a cut set of current sources and or capacitors Each node in the circuit must have a DC path to ground Every node must have at least two connections except for transmission line nodes to permit unterminated transmission lines and MOSFET substrate nodes which have two internal connections anyway 3 2 Title Line Comment Lines And END Line 3 2 1 Title Line Examples POWER AMPLIFIER CIRCUIT TEST OF CAM CELE The title line must be the first in the input file Its contents are printed verbatim as the heading for each section of output 3 2 2 END Line Examples END The End line must always be the last in the input file Note that the period is an integral part of the name 3 2 3 Comments General Form lt any comment gt Examples x RF IK Gain should be 100 Check open loop gain and phase margin The asterisk in the first column indicates that this line is a comment line Comment lines may be placed anywhere in the circuit description Note that WinSpice3 also conside
175. tion see sections 6 2 and 6 3 for details Copyright O 2002 2003 Mike Smith 98 16 08 2005 WinSpice3 User Manual 6 8 5 If Then Else General Form if condition statement else statement end If the condition is non zero then the first set of statements are executed otherwise the second set The else and the second set of statements may be omitted The condition is an expression involving vector and scalar variables see sections 6 5 and 6 5 1 6 8 6 Label General Form label word If a statement of the form goto word is encountered control is transferred to this point otherwise this is a no op 6 8 7 Goto General Form goto word If a statement of the form label word is present in the block or an enclosing block control is transferred there Note that if the label is at the top level it must be before the goto statement 1 e a forward goto may occur only within a block 6 8 8 Continue General Form continue If there is a while dowhile or foreach block enclosing this statement control passes to the test or in the case of foreach the next value 1s taken Otherwise an error results 6 8 9 Break General Form break If there is a while dowhile or foreach block enclosing this statement control passes out of the block Otherwise an error results Of course control structures may be nested When a block is entered and the input is the terminal the prompt becomes a number of gt s corres
176. tly to a file rawfile off restores default operation The output is put in rawfile if it was given in addition to being available interactively The rawfile will be written as ASCII text or in binary form depending upon the value of the filetype variable see section 6 2 Copyright 2002 2003 Mike Smith 107 16 08 2005 WinSpice3 User Manual 6 9 33 Reset Reset an analysis General Form reset Throw out any intermediate data in the circuit e g after a breakpoint or after one or more analyses have been done already and re parse the input file The circuit can then be re run from it s initial state overriding the affect of any set or alter commands In SPICE 3e and earlier versions this was done automatically by the run command 6 9 34 Reshape Alter the dimensionality or dimensions of a vector General Form reshape vector vector Or reshape vector vector dimension dimension ez or reshape vector vector dimension dimension This command changes the dimensions of a vector or a set of vectors The final dimension may be left off and it will be filled in automatically If no dimensions are specified then the dimensions of the first vector are copied to the other vectors An error message of the form dimensions of x were inconsistent can be ignored 6 9 35 Resume Continue a simulation after a stop General Form resume Resume a simulation after a stop or interruption control C 6
177. tory General Form cd directory Change the current working directory to directory If directory is not given displays the current directory If directory is HOME or home WinSpice sets the current directory to the value of the WINSPICE_ HOME SPICE HOME or HOME environment variables checked in the order shown 6 9 7 Cross Create a new vector General Form cross vecname n vectorl vector2 Create a new vector vecname from index n in each of the input vectors n O selects the first item in each vector If any input vector is complex then the output vector will be complex The index value n may be a constant or a vector If n is not scalar only the first value in the vector is used If n is a complex vector only the real part is used This command can be used to get the nth value in a vector e g cross val 5 27033 let index 5 cross val index v 3 Both of the above are equivalent The second example uses scalar vector index to fetch the 6 item in vector v 3 6 9 8 Dc Perform a DC sweep analysis General Form dc Source Name Vstart Vstop Vincr Source2 Vstart2 Vstop2 Vincr2 Do a DC transfer curve analysis See section 5 3 2 of this manual for more details Copyright O 2002 2003 Mike Smith 101 16 08 2005 WinSpice3 User Manual 6 9 9 Define Define a function General Form define function argl arg2 expression Define the user definable function with the name function and
178. trol lines may not appear within a subcircuit definition However subcircuit definitions may contain anything else including other subcircuit definitions device models and subcircuit calls see section 3 4 4 Note that any device models or subcircuit definitions included as part of a subcircuit definition are strictly local 1 e such models and definitions are not known outside the subcircuit definition Also any element nodes not included on the SUBCKT line are strictly local with the exception of O ground which is always global Other nodes can be made global by using the GLOBAL directive see section 3 4 3 3 4 2 ENDS Line General form ENDS lt SUBNAM gt Examples ENDS OPAMP The ENDS line must be the last one for any subcircuit definition The subcircuit name 1f included indicates which subcircuit definition 1s being terminated If omitted all subcircuits being defined are terminated The name 1s needed only when nested subcircuit definitions are being made 3 4 3 GLOBAL Line General form GLOBAL NI lt NZ N3 ria Examples GLOBAL 1 2 3 9 This line defines a set of global nodes These nodes are not affected by subcircuit expansion 3 4 4 Xxxxx Subcircuit Calls General form AYYYYVYYY NI lt N2 NS se SUBNAM Examples XL A SL MULTI Subcircuits are used in SPICE by specifying pseudo elements beginning with the letter X followed by the circuit nodes to be used in expanding the s
179. ubcircuit Copyright O 2002 2003 Mike Smith 11 16 08 2005 WinSpice3 User Manual 3 5 Combining Files 3 5 1 INCLUDE Lines General form INCLUDE filename INCLUDE filename with spaces cir Examples INCLUDE users spice common wattmeter cir INCLUDE users spice fil s wattmeter cir Frequently portions of circuit descriptions will be reused in several input files particularly with common models and subcircuits In any SPICE input file the include line may be used to copy some other file as if that second file appeared in place of the include line in the original file There is no restriction on the file name imposed by SPICE beyond those imposed by the local operating system If the filename or path contain spaces double quote marks must be used 3 5 2 LIB Lines Pspice style General form LIB filename LIB filenamewith spaces Examples LIB users spice common bipolar lib This is an extension not found in the Berkeley version of SPICE3 that provides backward compatibility with PSPICE The LIB line is similar to the INCLUDE line except that the specified file is assumed to contain MODEL and SUBCKT definitions WinSpice3 searches for any undefined models or subcircuits in the specified file and extracts the required definitions and pastes them into the circuit The main difference is that because it only extracts parts of the specified file and does not include the whole file in your
180. ulo operator and the comma operator has two meanings if it is present in the argument list of a user definable function it serves to separate the arguments Otherwise the term x y is synonymous with x j y Also available are the logical operations amp and or not and the relational operations lt gt gt lt and lt gt not equal If used in an algebraic expression they work like they would in C producing values of 0 or 1 The relational operators have the following synonyms gt gt It lt ge gt le lt ne lt gt eq and amp or not These are useful when lt and gt might be confused with IO redirection which is almost always Note that you may not use binary operations on expressions involving wildcards it is not obvious what all all should denote for instance Copyright 2002 2003 Mike Smith 91 16 08 2005 WinSpice3 User Manual Thus some contrived examples of expressions are cos TIME db v 3 sin cos log 1 23 45 67 8 9 10 TIME rnd v 9 15 cos vintbranch 7 9e5 8 Hot aco3cFREOIS2 amp traal TIME LCIOTE GE 3 6 5 2 Vector Functions The following functions are available for use with vectors mag vector The result is a REAL vector with each element containing magnitude vector the magnitude of each element in the COMPLEX vector vector ph vector The result is a REAL vector with each element containing phase vector the phase
181. ure exponent XTB in the new model models base current temperature dependence It is assumed that the values specified were measured at the temperature TNOM which can be specified on the OPTIONS control line or overridden by a specification on the MODEL line The BJT parameters used in the modified Gummel Poon model are listed below The parameter names used in earlier versions of SPICE2 are still accepted Modified Gummel Poon BJT Parameters Copyright 2002 2003 Mike Smith 50 16 08 2005 Cm T a CN mn M infinite WinSpice3 User Manual re CP ER e pee e p fe current where base resistance falls halfway to its infinite min value CE CT CE CE CE CRE CE CT oe Ce CS CE CE CE CS CC CE CE ES CS fon COM TE E CS CE ET CS excess phase at freq 1 0 TF 2PI Hz o EC ro Tas im au CHE y fos os pe remmarna ES CEE fraction of B C depletion capacitance connected pa Eu to internal base node ECON CE CS CE fo ECON Ce fe CS E os CS CS ps CE ae e e forward and reverse beta temperature exponent Copyright O 2002 2003 Mike Smith 51 16 08 2005 WinSpice3 User Manual CE CS CC 1 coefficient for forward bias depletion capacitance formula TNOM Parameter measurement temperature 50 4 4 3 Jxxxx Junction Field Effect Transistors JFETs General form JXXXXXXX ND NG NS MNAME lt AREA gt lt OFF gt lt IC VDS VGS gt lt TEMP T gt Examples JI 7 2 3 JMI OFF ND NG and NS are th
182. ut and input ports and the type of transfer function In interactive mode see section 6 9 30 the command syntax is the same except that the first field is PZ instead of PZ To print the results one should use the command print all 5 3 7 SENS DC or Small Signal AC Sensitivity Analysis General form SENS OUTVAR ENS OUTVAR AC DEC ND FSTART FSTOP SENS OUTVAR AC OCT NO FSTART FSTOE SENS OUTVAR AC LIN NP FSTART ESTOP Examples SENO Vil OUT SENS V OUT AC DEC 10 100 100k SOENS IdAVIEST The sensitivity of OUTVAR to all non zero device parameters is calculated when the SENS analysis is specified OUTVAR is a circuit variable node voltage or voltage source branch current The first form calculates sensitivity of the DC operating point value of OUTVAR The second third and fourth forms calculate sensitivity of the AC values of OUTVAR The parameters listed for AC sensitivity are the same as in an AC analysis see AC above The output values are in dimensions of change in output per unit change of input as opposed to percent change in output or per percent change of input Copyright O 2002 2003 Mike Smith 76 16 08 2005 WinSpice3 User Manual 5 3 8 TEMP Temperature Sweep General form TEMP TEMP1 Examples TEMP L0 50 100 Specifies a list of temperatures in degrees centigrade Subsequent analyses will be repeated at each of the listed temperatures Thre results are concatenated to the pl
183. vely The second and third forms may be combined letter subcircuit or letter subcircuit to select a specific type of device from a subcircuit A device s full name may be specified to list only that device Finally devices may be selected by model by using the form modelname or subcircuit modelname or letter subcircuit modelname If no parameters are specified the values for a standard set of parameters are listed If the list of parameters contains a the default set of parameters is listed along with any other specified parameters For both devices and parameters the word all has the obvious meaning For example show all all shows all output parameters in all devices woe Note there must be spaces separating the that divides the device list from the parameter list 6 9 48 Showmod List model parameter values General Form showmod models parameters The showmod command operates like the show command above but prints out model parameter values The applicable forms for models are a single letter specifying the device type letter letter subckt modelname ssubckt modelname or letter subcircuit modelname Copyright 2002 2003 Mike Smith 113 16 08 2005 WinSpice3 User Manual 6 9 49 Source Read a WinSpice3 input file General Form source file For WinSpice3 Read the WinSpice3 input file WinSpice3 commands may be included in the file and must be enclosed between the lines
184. which remain in extensive use in the SPICE2 program 1 1 Installation WinSpice3 is supplied as a self extracting ZIP file called SPICE3 EXE When executed the setup files for WinSpice are placed in the directory defined by the TEMP environment string by default as shown below Winzip Self Extractor SPICE S EXE To unzip all files in SPICES EXE to the specified folder press the Unzip button Unzip To Folder Aun Winzip Unzip Close M Overvrite Files Without Prompting About Help Pun wirzi cse bib tio Mico Mak Computing Inc WAAL MAZID CONTI If you want to unzip to a different directory edit the folder path Now click on the Unzip button to unpack the setup files Navigate to the folder containing the unzipped files and run setup exe by double clicking on its icon The dialogue shown below should appear Spice3F4 was developed by the Department of Electrical Engineering and Computer Sciences University of California Berkeley Copyright 2002 2003 Mike Smith 1 16 08 2005 WinSpice3 User Manual Welcome to the WinSpices Setup program This program will Install Wind pices on pour computer It is strongly recommended that you esit all Windows programs before running this Setup program Click Cancel to quit Setup and then close any programs you have running Click Nest to continue with the Setup program WARNING This program is protected by copyright law and internationa
185. wing devices Pe ee RC CS R TS er ETS ou te fe ome o niente TS Copyright 2002 2003 Mike Smith 21 16 08 2005 WinSpice3 User Manual 4 1 1 Rxxxx Resistors 4 1 1 1 Simple Resistors General form RXXXXXXX N1 N2 VALUE RXXXXXXX N1 N2 R lt expression gt RXXXXXXX N1 N2 VALUE TC x RXXXXXXX N1 N2 VALUE TC x y RXXXXXXX N1 N2 VALUE TCl x TC2 y Examples RI wt ZOO RCL 12 417 LR RC2 4 5 R 1000 10g v 1 Rbot 8 0 R 1000 1000 sin 2 3 14159 10000 time RS 35701 LOOK ICL R4a 4 0 100k TC 0 001 0 003 Ro 4 0 LOOK PClL 0 2001 TEZ 0 40053 N1 and N2 are the two element nodes VALUE is the resistance in ohms and may be positive or negative but not zero The resistance value can also be defined as an expression as shown in the third example The expression can include voltages and currents from the circuit See section 4 2 4 1 for details about the expression To support Spice2 circuits WinSpice also supports temperature coefficients being defined on the R line Examples 5 and 6 above are Spice2 style definitions These are converted into the form of example 7 when the circuit is loaded Where temperature coefficients are specified on the R line these values override the same values in the model line see section 4 1 1 3 4 1 1 2 Semiconductor Resistors General forms RXXXXXXX N1 N2 lt VALUE gt lt MNAME gt lt L LENGTH gt lt W WIDTH gt lt TEMP T gt RXXXXXXX N1 N2 lt MNAME gt lt L LENGTH gt
186. words that specify that the independent source has distortion inputs at the frequencies Fl and F2 respectively see the description of the DISTO control line An optional magnitude and phase may follow the keywords The default values of the magnitude and phase are 1 0 and 0 0 respectively Any independent source can be assigned a time dependent value for transient If a source 1s assigned a time dependent value the time zero value is used for DC analysis There are five independent source functions pulse PULSE exponential EXP sinusoidal SIN piece wise linear PWL and single frequency FM SFFM If parameters other than source values are omitted or set to zero the default values shown are assumed In the descriptions below TSTEP is the printing increment and TSTOP is the final time see the TRAN control line for explanation section 5 3 10 See sections 10 26 and 10 13 for parameters that can be altered using the alter command see 6 9 3 Copyright O 2002 2003 Mike Smith 31 16 08 2005 WinSpice3 User Manual 4 2 1 1 PULSE Pulse General form PULSE V1 V2 TD TR TF PW PER Examples VEN 3 0 PULSE LL 2NS 2NS 2NS SONS L0O0N S The following table describes a single pulse so specified CA TD TR PW TD TR PW TF TSTOP V Intermediate points are determined by linear interpolation VI VI Cor V2 VI 1 4 2 1 2 SINO Sinusoidal General form SIN VO VA FREQ TD THETA Examples VIN gt
Download Pdf Manuals
Related Search
Related Contents
取扱説明書 Ingersoll-Rand SS3 User's Manual accesorios especiales こちら KENOCHLOR 100 - Lecarrefarago.com American International PSW 15TM User's Manual c3 owners manual_na_tc30209_e-SPA:Layout 1.qxd Technical Comparisons Single Phase REACH-IT Industry User Manual - ECHA cbct tm circuit breaker coil tester user`s manual Copyright © All rights reserved.
Failed to retrieve file