128
PSPICE Electrical Circuit Simulator INVERTING INPUT NON - INVERTING INPUT OFFSET NULL OFFSET NULL V+ V- OUTPUT R6 40K R9 25 R10 50 R7 40K R11 50K R5 39K R3 1K R2 50K R1 1K R4 3K Q1 Q2 Q4 Q3 Q9 Q8 Q6 Q5 Q7 Q10 Q11 Q12 Q19 Q22 Q18 Q16 Q21 Q17 Q23 COMP 30pF R8 50 Q15 (1) (2) (4) (5) (3) (8) (7) (9) (11) (10) (6) (12) (15) (17) (22) Q14 (21) (20) Q20 (24) (23) (25) (13) (14) (18) (26) (27) Q13

Psp Ice

Embed Size (px)

Citation preview

Page 1: Psp Ice

PSPICEElectrical Circuit Simulator

INVERTING INPUT

NON -INVERTING

INPUT

OFFSETNULL

OFFSETNULL

V+

V-

OUTPUT

R640K

R925

R1050

R740K

R1150K

R539K

R31K

R250K

R11K

R43K

Q1 Q2

Q4

Q3

Q9Q8Q6Q5

Q7

Q10 Q11 Q12

Q19

Q22

Q18

Q16

Q21

Q17

Q23

COMP30pF

R850

Q15

(1) (2)

(4) (5)

(3)

(8)(7)

(9)

(11)(10)

(6)

(12)

(15)

(17)

(22)

Q14

(21)

(20)

Q20

(24)

(23)

(25)

(13)(14)

(18)

(26)

(27)

Q13

Page 2: Psp Ice

- 2 -

Page 3: Psp Ice

- 3 -

CONTENTS

1 INTRODUCTION 7

2 INSTALLING PSPICE 82.1 System Requirements 82.2 Doing the Installation 8

2.2.1 If You Have a Fixed Disk 92.2.2 If You Do Not Have A Fixed Disk 9

2.3 Comments 102.4 Using the Backup Copy 10

3 RUNNING PSPICE 123.1 File Name Conventions 123.2 The Extended Display Driver 123.3 Running PSpice With a Fixed Disk 133.4 Running PSpice Without a Fixed Disk 133.5 Creating the Input File 14

4 DATA 144.1 Introduction 154.2 Names 154.3 Nodes 154.4 Values 164.5 Devices 16

4.5.1 Passive 174.5.2 Semiconductor 174.5.3 Voltage and Current Sources 17

4.5.3.1 Controlled 184.5.3.2 Independent 18

4.6 Models 19

5 COMMANDS 205.1 Introduction 205.2 Specifying the Various Analysis 20

5.2.1 DC Sweep 215.2.2 Bias Point 215.2.3 Small Signal Transfer Function 215.2.4 Sensitivities 215.2.5 AC Analysis (Frequency Response) 225.2.6 Noise 225.2.7 Transient (Time) Response 225.2.8 Fourier Components 23

Page 4: Psp Ice

- 4 -

5.3 Temperature 235.4 Format of the Output 24

5.4.1 Description of the Circuit 245.4.2 Direct Output 255.4.3 Print Tables and Plots 25

5.4.3.1 Print Tables 255.4.3.2 Plots 26

5.4.4 Run Statistics 275.5 Options 27

6 REFERENCE 286.1 Introduction 286.2 Notation 286.3 Statements 28

Title 29 C Capacitor 30 D DIODE 31 E Voltage-Controlled Voltage Source 33 F Current-Controlled Current Source 35 G Voltage-Controlled Current Source 37 H Current-Controlled Voltage Source 39 I Independent Current Source 41 J Junction FET 44 K Mutual Inductor (Transformer) 47 L Inductor 48 M MOSFET 49 Q Bipolar Transistor 54 R Resistor 58 T Transmission Line 59 V Independent Voltage Source 60 X Subcircuit Call 63 .AC AC Analysis 64 .DC DC Analysis 65 .END End of Circuit 66 .ENDS End of Subcircuit Definitions 67 .FOUR Fourier Analysis 68 .IC Initial Transient Conditions 69 .MODEL Model 70 .NODESET Nodeset 71 .NOISE Noise Analysis 72 .OP Bias Point 73 .OPTIONS Options 74 .PLOT Plot 76 .PRINT Print 77 .PROBE Probe 78 .SENS Sensitivity Analysis 79 .SUBCKT Subcircuit Definition 80 .TEMP Temperature 81

Page 5: Psp Ice

- 5 -

.TFTransfer Function 82 .TRAN Transient Analysis 83 .WIDTH Width 84 * Comment 85

6.4 Output Variables 866.4.1 DC Sweep and Transient Analysis 866.4.2 AC Analysis 886.4.3 Noise Analysis 89

6.5 Job Statistics Summary 90

7 HINTS 927.1 Large Circuits 927.2 Large Outputs 927.3 Convergence Problems 93

7.3.1 DC Sweep 937.3.2 Bias Point 947.3.3 Transient Analysis 947.3.4 We Want to Know 94

7.4 Negative Component Values 957.5 Multiple Circuits in an Input File 95

8 PROBE 968.1 Introduction 968.2 Installation 96

8.2.1 If You Have a Fixed Disk 968.2.2 If You Do Not Have a Fixed Disk 968.2.3 Setting Up the Device File 96

8.3 Running Probe 988.3.1 If You Have a Fixed Disk 998.3.2 IF You Do Not Have a Fixed Disk 998.3.3 More on Running Probe 998.3.4 Avoiding File Size Limits 100

8.4 An Example 1018.5 Probe Menus and Commands 104

8.5.1 General Comments on the Input 1048.5.2 Start-up Menu 1058.5.3 Plot Menu 1068.5.4 Axis Menu 109

8.6 Suggestions 1108.6.1 Hysteresis Curves 1108.6.2 Curve Families 1128.6.3 Load Lines 1128.6.4 Timing Diagrams113

Appendix A EXAMPLE1 114

Appendix B MORE EXAMPLES 116B.1 Introduction 116

Page 6: Psp Ice

- 6 -

B.2 Non-linear Controlled Source 116B.3 Inductors and Transformers 116B.4 Medium-size Bipolar Circuit 117B.5 Subcircuits 119B.6 Noise 122B.7 Medium-size Mosfet Circuit 123

Appendix C PSPICE vs SPICE 124

Appendix D User Changeable Models 125D.1 Introduction 125D.2 Installation 125

D.2.1 If You Have a Fixed Disk 125D.2.2 If You Do Not Have a Fixed Disk 125D.2.3 Preparing the Program Diskettes 126

D.3 Making Device Model Changes 126D.3.1 Changing a Parameter's Name 126D.3.2 Giving a Parameter an Alias 126D.3.3 Adding a Parameter 127D.3.4 Changing the Device Equations 127

Page 7: Psp Ice

- 7 -

Chapter 1

INTRODUCTION

PSpice allows you to simulate your circuit designs before touching the first piece ofhardware. The response over time to different inputs, the frequency response, the noise,and other information about your circuit are all available. In effect, PSpice allows youto do a "computer breadboard" of the circuit before building anything.

This user's guide is divided into 3 parts: chapters 2-5 are a tutorial on PSpice, chapters6-7 and the appendices are for later reference on PSpice, and chapter 8 is on the Probegraphics post-processor. The best way to become familiar with PSpice is to readchapters 2-5 in order. This will take you, step by step, through: installing PSpice,running an example circuit, and how to use PSpice. Once you are familiar with PSpice,chapters 6 and 7 will become more useful. Chapter 6 contains complete descriptions ofall the PSpice input statements. Chapter 7 gives some help in dealing with less commonsituations.

Familiarity with MSDOS is recommended but not required, to install and run PSpice.

Page 8: Psp Ice

- 8 -

Chapter 2

INSTALLING PSPICE

2.1 System Requirements

PSpice will run on any IBM PC, PC/XT, or PC/AT with 512 kilobytes of memory, thefloating-point co-processor, and the MSDOS 2.0 (or later) operating system. Either themonochrome or the color graphics display may be used. No special brand of printer orspecial printer features are needed.

PSpice will also run on IBM-compatible systems, as long as they meet the aboverequirements. The program has been run on some unusual pieces of hardware and theresult is that, if the system will run MSDOS 2.0, has the memory, and has the floating-point co-processor, then it will run PSpice. Note that PSpice is delivered on IBM-format diskettes. This is not compatible with a few systems, such as the HP 150, whichdo run MSDOS.

2.2 Doing the Installation

In the package which you received, you should find:1) This user's guide2) A diskette labeled "Diskette 1" containing:

CONFIG.SYSPSPICE1.EXEPSPICE.BATPSPICE.FLPREADME.DOCEXAMPLE1.CIREXAMPLE1.OUT

3) A diskette labeled "Backup Copy Diskette 1" containing:

CONFIG.SYSPSPICE1.EXEPSPICE.BATPSPICE.FLPREADME.DOCEXAMPLE1.CIREXAMPLE1.OUT

4) A diskette labeled "Diskette 2" containing:

Page 9: Psp Ice

- 9 -

PSPICE2.EXE

5) If you have bought Option 1 (user-changeable Models), diskettes labeled"Diskette 3", "Diskette 4", and "Diskette 5". See Appendix D for moreinformation on the files on these diskettes.

6) If you have bought Option 2 (Probe), a diskette labeled "Diskette 3"containing:PROBE.BATPROBE.FLPPROBE.DEVPROBE.EXE

After you have completed the instructions in this chapter and in chapter 3, you willwant to follow the installation instructions in chapter 8 to install Probe.

Installing PSpice consists mainly of making working copies of these files.

Before beginning, print and read the file README.DOC. It contains last-minuteinformation which did not make it into (this edition) of the user's guide.

2.2.1 If You Have a Fixed Disk

In this case the installation is simple: just copy PSPICE1.EXE, PSPICE2.EXE, andPSPICE.BAT onto the fixed disk in the directory where you normally keep yourprogram files. If you do not have a CONFIG.SYS file in your root directory, copyCONFIG.SYS from Diskette 1 into your root directory. If you do already have aCONFIG.SYS file, examine the one on Diskette 1 and add any statements which itcontains to yours (DEVICE=\ANDI.SYS, BUFFFERS=10, and FILES=10). CopyEXAMPLE1.CIR from Diskette 1 into a directory where you will normally keep circuitfiles (this will usually be your default directory when you are running PSpice). PrintEXAMPLE1.OUT. Later, you will want to compare it against the result of runningEXAMPLE1.CIR.

The diskettes Diskette 2 and Backup Copy Diskette 1 are your backup copies and shouldbe stored in a safe place. Keep Diskette 1 handy, you will nedd it whenever you run theprogram.

2.2.2 If you Do Not Have a Fixed Disk

In this case, you need to move CONFIG.SYS form Diskette 1 to your system disketteand copy COMMAND.COM from your system diskette to Diskette 1. Before doingthis, print EXAMPLE1.OUT. Later on, you will want to compare it against the result ofrunning EXAMPLE1.CIR.

First, move the file CONFIG.SYS form Diskette 1 to your system diskette. Your systemdiskette is the one you use to boot your system. Assuming that your system diskette isin drive A: and Diskette 1 is in Drive B:, the commands are:

COPY B:CONFIG.SYS A:CONFIG.SYSDEL B:CONFIG.SYS

Page 10: Psp Ice

- 10 -

Next, copy the file COMMAND.COM from your system diskette to Diskette 1:

COPY A:COMMAND.COM B:COMMAND.COM

Next, delete PSPICE.BAT and rename PSPICE.FLP to be PSPICE.BAT:

DEL B:PSPICE.BATREN B:PSPICE.FLP PSPICE.BAT

Also, if your system diskette does not already contain the file ANSY.SYS, copy it therefrom your DOS diskette.

Finally, make a backup copy of Diskette 2. This backup copy and the diskette BackupDiskette 1 you should keep in a safe place.

2.3 Comments

PSpice is composed of 2 programs: PSPICE1.EXE and PSPICE2.EXE whichcommunicate through temporary files. You can put these program (.EXE) files on anydiskette or directory you choose, so long as you arrange that they are run in sequence(first PSPICE1.EXE and then PSPICE2.EXE) and so long as Diskette 1 is in drive A:when PSPICE1.EXE begins execution. The above, very specific, instructions are onlyone way of arranging them. However, it is the way which is assumed in the next chapteron running PSpice, so it is recommended that you follow it until you become familiarwith running the program.

The CONFIG.SYS file configures the system when it is booted. TheDEVICE=\ANSI\SYS statement loads in the extended display driver, the BUFFERS=10statement gives PSpice enough disk buffering to work efficiently, and the FILES=10statent allows PSpice to open all the files that it needs. If the file ANSI.SYS is not inthe root directory, you must change the statement in the CONFIG.SYS file to givecorrect directory, for example:

DEVICE=\DOS\ANSI.SYS

Do not forget to copy EXAMPLE1.CIR. You will be running it in the next chapter.

This finishes the installation procedure for PSpice. If you have purchased Option 1(User-changeable Models) or Option 2 (Probe) you will want to read Appendix D (forOption 1) and Chapter 8 (for Option 2) for instructions on how to install these options.If you wish, you can ignore them for now and go on to chapter 3 and run PSpice.

2.4 Using the Backup Copy

Although the files on Diskette 1 can be copied, the diskette itself cannot be. So, ifDiskette 1 is damaged, send it back to MicroSim and it will be replaced. In themeantime, you will need to use Backup Copy Diskette 1. If you have a PC, you will

Page 11: Psp Ice

- 11 -

want to go through the installation procedure again to put the file COMMAND.COM onBackup Copy diskette 1. If you have an XT, repeating the installation procedure is notnecessary.

Diskette 2 can be copied. So, if it is damaged, just make another copy from yourbackup.

Page 12: Psp Ice

- 12 -

Chapter 3

RUNNING PSPICE

3.1 File Name Conventions

Running PSpice requires you to specify 2 files: an input file and an output file. Youmay default either or both of the files' extensions and you may default the entire outputfile. The input file will default the extension to .CIR. So, these input file names areequivalent:

EXAMPLE1.CIREXAMPLE1

In both cases PSpice will get its input from the file EXAMPLE1.CIR.

The output files' extension will default to .OUT and the entire output file name willdefault to the input file name with extension being replaced by .OUT. So, if the inputfile name is EXAMPLE1 or EXAMPLE1.CIR these output file names are equivalent:

EXAMPLE1.OUTEXAMPLE1<no file name>

In all these cases PSpice will write its output to the file EXAMPLE1.OUT.

You can direct the output to a printer instead of a file. To do this, use the DOSpredefined printer name as the output name. For instance, the norma DOS name for theprimary printer is PRN. To run EXAMPLE1 with output going to the printer, type

PSPICE EXAMPLE1 PRN

If your run will create a lot of output and you are worried about filling up the diskettewith it, directing the output to the printer may be a solution.

It is convenient to have the input and output files in the default directory, but this is notnecessary. You could, for instance, start PSpice with:

PSPICE \PROJ13\SLOWAMP

3.2 The Extended Display Driver

In chapter 2 you put the file CONFIG.SYS on the root directory of your fixed disk orsystem diskette. When your system is booted, this file calls in the extendet CRT driver

Page 13: Psp Ice

- 13 -

(ANSI.SYS) to replace the standard driver. The extende driver allows PSpice to formatthe screen properly. So, if you have not re-booted your system since following theinstructions in chapter 2, do that now.

3.3 Running PSpice With a Fixed Disk

Running PSpice with a fixed disk is straightforward. The command is:

PSPICE <input file> <output file>

Note that the file PSPICE>BAT must be in either the default directory, or a directorywhich was included in an earlier PATH command. The above command will causePSPICE.BAT to call, in turn, PSPICE1>EXE and then PSPICE2.EXE. PSPICE1.EXEcreates 2 temporary files: PSPICEA.TMP and PSPICEB.TMP in the default directory.PSPICE2.EXE reads these temporary files and writes the final result to the output file.Before ending, PSPICE2.EXE deletes the temporary files.

Diskette 1 must be in drive A: when PSpice starts. As soon as PSpice begins drawingthe screen it may be removed. Diskette 1 must not be write protected.

Try this command now with input file EXAMPLE1.CIR. Insert Diskette 1 in drive A:and type:

PSPICE EXAMPLE1

After about 20 seconds, the screen should be cleared and redrawn with a status display.If this does not happen, check that your files are in the proper directories, that you haveset the default directory to the one containing EXAMPLE1.CIR, and that PSPICE.BATis in a directory that DOS will search for programs and commands.

Let EXAMPLE1 run to completion (about 5 minutes) and print EXAMPLE1.OUT onyour printer. Compare it to the EXAMPLE1.OUT from the diskette which you printedout while installing PSpice.

3.4 Running PSpice Without a Fixed Disk

First, put the input file on Diskette 1. Next, place Diskette 1 in drive A:. Then, placeDiskette 2 in drive B:. Finally, start PSpice with the command:

PSPICE <input file> <output file>

Note that PSPICE.BAT must be in a directory searched by DOS for programs andcommands (either the default directory or a directory included in a previous PATHcommand).

PSPICE.BAT will first call PSPICE1.EXE from drive A:. PSPICE1.EXE will readfrom the input file and write 2 temporary files, PSPICEA.TMP and PSPICEB.TMP inthe default directory. Then PSPICE.BAT will call PSPICE2.EXE from drive B:.

Page 14: Psp Ice

- 14 -

PSPICE2.EXE will read the 2 temporary files and write to the output file. Just beforeending, PSPICE2.EXE will delete the 2 temporary files. Note that Diskette 1 must be indrive A:, not B: and that Diskette 1 must not be write protected.

Try this now with the input file EXAMPLE1.CIR. Put the 2 diskettes into the drivesand type:

PSPICE EXAMPLE1

After about 45 seconds you should see the screen cleared and redrawn as a statusdisplay. If not, go back and check that all your files are where they should be.

Let this run go to completion (about 5 minutes). When it is done printEXAMPLE1.OUT on your printer. Compare it to the EXAMPLE1.COUT which youprinted out earlier while installing PSpice.

3.5 Creating the Input File

In the run which you just did, the input file (EXAMPLE1.CIR) already existed onDiskette 1. Creating your own input files is done with a text editor. The text editor(s)available to you depends on your system and the software it has. One text editor whichwill always do to you is EDLIN. It comes with DOS and is described in the DOS user'sguide.

Although EDILIN allows you to create a text file, there exist other editors which areeasier to use. One which we use and recommend es P-Edit (no relation to PSpice). It issimilar to EDT from DEC and is available for $100 from:

Satellite Software288 W. Center Dr.Orem, UT 84057

You can also use most word processing programs (such as WordStar) to create the inputfile, but it is not as straightforward. The file which a word processor creates is not a textfile. It contains embedded control characters which determine things such as margins,paragraph bondaries, paging, etc. However, most word processors have a commandwhich allows you to produce a text file without the control characters. In effect, you are"printing" to a file instead of a printer. The details of the command depend on theparticular word processor which you have.

Page 15: Psp Ice

- 15 -

Chapter 4

DATA

4.1 Introduction

In this chapter we will show how to describe your circuit to Pspice. We will be referringto the circuit in the file EXAMPLE1.CIR which came with the program. If you have notrun this circuit, go back to chapter 3. Also, if you have not printed a copy ofEXAMPLE1.CIR itself, do that now.

EXAMPLE1.CIR shows an example of the input to Pspice. Here are some generalobservations:

1) Pspice distinguishes between upper and lower case. All keywords are defined inupper case, so it is best to have the whole file (except possibly comments and thetitle line) in upper case.

2) The first line is the title line and may contain any text whatsoever. Look at thebeginning of the output and see how it appears in the banner.

3) The last line must be “.END”.4) Comment lines are marked by “*” in the first column and may contain any text.5) Continuation lines are marked by “+” in the first column.6) Except for the title line, subcircuit definitions, and the .END lines, the order of the

lines does not matter.7) The number of blanks between items is not significant (except in the title line) and

commas are equivalent to blanks. So, “ “ and “ “ and “,” and “ , “ are allequivalent.

The rest of this chapter will go over the different elements of the input which describe acircuit. Chapter 5 will go over the elements (commands) which tell PSpice what to dowith the circuit.

4.2 Names

Find resistor RS1 in the input. It is the line which starts with “RS1”. The first item onthe line is “RS1”, which is the resistor’s name. Names must start with a letter, but afterthat can contain either letters or numbers. Names can be up to 8 characters long.

4.3 Nodes

Look at resistor RS1 again. The 2 items after the name, “1” and “2”, are the nodes towich the resistor is attached. Nodes must be integers from 0 to 9999. Node 0 ispredefined to mean ground. The node numbers need not be sequential: look at the

Page 16: Psp Ice

- 16 -

ELEMENT NODE TABLE section of the output. The nodes 100, 101, and 102 appearfor the supplies (VIN, VCC, and VEE) but nodes 8 through 99 are missing.

4.4 Values

Look at resistor RS1 again. The last item on that line is 1K, which is the resistor’svalue. Values are written in standard floating-point notation, with optional scale andunits suffixes. Here are some legal values with no suffixes:

1 1. 1.0 -1.0 1E2 1.21E-5

The scale suffixes follow standard scientific convention and multiply the number whichthey follow. These are the scale suffixes recognized by PSpice:

F = 1E-15P = 1E-12N = 1E-9U = 1E-6MIL = 25.4E-6M = 1E-3K = 1E3MEG = 1E6G = 1E9T = 1E12

Thus, these values are all equivalent:

1.05E6 1.05MEG 1.05E3K .00105G

Note that the scale suffixes are all in upper case. Note also that “M” by itself meansmilli, not mega.

Besides the scale suffixes, units suffixes are also allowed. These are ignored by PSpice.Any letter which is not a scale suffix may be used as a units suffix. Thus, these valuesare all equivalent:

10E-3 10E-3V 10MV

Look at capacitor CLOAD for an example of the use of units suffixes.

4.5 Devices

Each device in the circuit is represented in the input by one line, which does not beginwith “.”. These lines all have a similar format:

the device name, followed by2 or more nodes, followed bya model name (not all devices have this), followed by 0 or more values

Page 17: Psp Ice

- 17 -

Note: devices are the only lines in the input (except possibly the title line) which do notbegin with a period.

The first letter of the device name determines what kind of device it is: resistors muststart with “R”, diodes must start with “D”, etc. The type of the device then determinesthe rest of the line: how many nodes it has, whether it needs a model name, and whatvalues are needed at the end.

Some devices allow (or require) model names. A model is a way of specifying, in oneplace, identical parameters for a set of devices. For instance, all 4 transistors (Q1, Q2,Q3, Q4) have the same beta (80). They all refer to the model QNL which specifies thebeta with the parameter BF=80.

The order of the devices in the input does not matter. The connections between devicesare determined by the nodes: all device terminals with the same node number areconnected. For instance, look at the ELEMENT NODE TABLE section of the output.Node 1 connects RS1 to VIN.

The rest of this section gives an overview of the available devices. See chapter 6 for anexact description of any particular device.

4.5.1 Passive

The passive devices available are: resistors, capacitors, inductors, transformers, andtransmission lines. These begin with the letters R, C, L, K, and T respectively.Although resistors may have temperature coefficients, none of these devices may havevoltage or current-dependent values (i.e., they are all linear).

Resistors are allowed a model name, although it is not required. Having a set ofresistors refer to one model is handy in that it allows you to easily scale them, forinstance in doing worst-case analysis. See the CIRCUITI ELEMENT SUMMARYsection of the output for a list of all the resistors in EXAMPLE1 and their values.

4.5.2 Semiconductor

The semiconductor devices available are: diodes, bipolar transistors, junction field effecttransistors (JFET’s), and metal-oxide-silicon field effect transistors (MOSFET’s).These begin with the letters D, Q, J, and M respectively. All of these devices requiremodels. In addition, they allow size information to be specified independently for eachdevice. Diodes, bipolar transistors, and JFET’s allow a scale. MOSFET’s allow lengthand width as well as source and drain areas and perimeters to be specified for eachdevice.

In EXAMPLE1, note that transistors Q1 and Q2 (the output transistors) are scaled up by1.5. This means that they have 1.5 times the area of Q3 and Q4 (1.5 times the junctioncapacitance, 1.5 times the base-emitter conductance, etc.).

Page 18: Psp Ice

- 18 -

4.5.3 Voltage and Current Sources

Voltage and current sources are the only devices which can generate power. Sourcescan be controlled or independent.

4.5.3.1 Controlled

All 4 controlled sources are available: current-controlled current sources, voltage-controlled current sources, current-controlled voltage sources, and voltage-controlledvoltage sources. These begin with the letters E, F, G, and H respectively. Thecontrolled sources can be linear or polynomial functions of their controls. Linearcontrolled sources are the most common. For instance, linear voltage-controlled voltagesources are often used in RLC filter designs. Non-linear sources are also usedoccasionally. For instance, a non-linear voltage-controlled current source can be used torepresent a voltage-dependent resistor.

4.5.3.2 Independent

Independent voltage and current sources are the only devices which can have differentspecifications during the various analysis modes. Each source can be specifiedseparately for the DC, AC, and transient analysis modes. The DC specification ismarked by the keyword “DC”, the AC specification is marked by the keyword “AC” andthe transient specification is marked by one of the transient keywords (PWL, SIN, EXP,PULSE, SFFM).

Find VIN, VCC, and VEE in EXAMPLE1. Look at the CIRCUIT ELEMENTSUMMARY section of the output (INDEPENDENT SOURCES sub-section) VCC hasonly a DC value. It means that during the DC analysis phase, it will have the value of12 volts. VEE is similar. If only a DC value is given, the keyword “DC” can beomitted. VIN has no DC value. It will have the value 0 volts during the DC analysisphase.

VIN does have an AC value, however, (1 volt) which VCC and VEE lack. During ACanalysis, VIN will have the value 1 volt (and 0 degrees phase) and VCC and VEE willhave the values 0 volts.

VIN also has a transient value: during transient analysis it will be a sine wave with anamplitude of 0.1 volts and a frequency of 5 megahertz. VCC and VEE have no transientvalue. During transient analysis they will have their DC value.

In summary, each source may have its DC, AC, and Transient values specifiedindependently. DC and AC values default to 0. Transient values default to the DCvalue.

Independent sources have 3 general uses:

1) Power supplies, such as VCC and VEE. These are conveniently written with “DC”omitted (such as VEE).

Page 19: Psp Ice

- 19 -

2) Stimuli, such as VIN. This includes input waveforms, clocks, and ramps. It alsoincludes AC values for frequency response.

3) Current meters (voltage sources only). Voltage sources with no specifications areallowed. They have the value 0 volts for all analysis. You can print and plot thecurrent going through such a voltage source. Thus, you can insert one of thesewherever you need a current meter.

4.6 Models

Many devices use models to assign values to various parameters wich describe thedevice. Model statements have the form:

.MODEL name type (parameter=value parameter=value . . .)

Find the model CRES in EXAMPLE1. It is referenced by the collector resistors RC1and RC2. The model sets R=1 (R is the resistance multiplier) and sets the 2 temperaturecoefficients. Look at the RESISTOR MODEL PARAMETERS section of the output fora listing of the model CRES. Look also at the resistors RC1 and RC2 in the CIRCUITELEMENT SUMMARY section and note the values for TC1 and TC2. This is a typicaluse for a model. Note that you can now tolerance the values of RC1 and RC2 bychanging R in CRES instead of having to change each of their values directly.

The available model types are: RES, CAP, IND, D, NPN, PNP, NJF, PJF, NMOS,PMOS which correspond to resistor, capacitor, inductor, diode, npn bipolar, pnp bipolar,n-channel JFET, p-channel JFET, n-channel MOSFET, and p-channel MOSFET. Eachmodel type has its own set of parameters (ignoring polarity - e.g., NPN and PNP havethe same parameters).

You can set the values of none, any, or all of the parameters for a model. All parametershave default values. This means that you could even say:

.MODEL NOPARAM R ()

if you wanted. For a full list of the parameters and their defaults for each model, lookup that model in chapter 6.

Page 20: Psp Ice

- 20 -

Chapter 5

COMMANDS

5.1 Introduction

This chapter covers the various analysis PSpice will perform and the commandsavailable which control these analysis. All the general comments at the beginning ofchapter 4 about the format of numeric values, continuation lines, etc. apply here, too. Inaddition, the following apply:

1) All commands are contained in statements which start with “.”2) You are allowed to specify a command or option more than once. If you do, the last

value is used. For instance, if you say

.WIDTH OUT=80

and then later say

.WIDTH OUT=132

then the output width will be 132 colums. Other than this, the order of commandsdoes not matter.

5.2 Specifying the Various Analysis

There are 8 analysis available for a circuit. These are:

1) .DC - DC sweep of an input voltage or current source.2) .OP - Calculation of the bias (quiescent) point of the circuit. Using the bias

point, these analysis are available:

2.1) .TF - DC transfer (Thevenin equivalent) calculation.2.2) .SENS - DC sensitivity.2.3) .NOISE - Calculation of total and individual noise.2.4) .AC - Frequency response

3) .TRAN - Transient response (behavior over time). Using the transient response, this analysis is available:

3.1) .FOUR - Calculation of the fourier components of the transient response.

Each analysis is invoked by including its statement in the input. For example, having astatement beginning with .DC will cause the DC sweep to be done. Any analysis

Page 21: Psp Ice

- 21 -

selected will be done in the same order as shown above. Note that this means that anyanalysis is done at most once per run. If you try to do an analysis twice by having 2statements for it (e.g., 2 .DC statements), only the last statement counts. The others areignored.

5.2.1 DC Sweep

The DC sweep allows you to sweep one voltage or current source through a range ofvalues. The bias point of the circuit is calculated for each value of the source. This isuseful for finding the transfer function of an amplifier, the high and low thresholds of alogic gate, and so on.

Find the .DC statement in EXAMPLE1. It specifies that the voltage source VIN is to beswept from -0.25 volts to 0.25 volts by steps of .005 volts. This means that the outputwill have (0.25+0.25)/0.005+1=101 lines. In effect, the DC value of VIN (0, by default)is overriden during the .DC analysis and is made to be the swept value. All the othersources ratain their DC values. Find the print table and the plot labeled DCTRANSFER CURVE in EXAMPLE1.

5.2.2 Bias Point

The .OP statement causes the bias point to be calculated and the bias values of thesources and devices to be printed. Find the section in EXAMPLE1 just after the DCTRANSFER CURVE plot labeled SMALL SIGNAL BIAS SOLUTION. It consists of 3sub-sections:

1) A list of all the node voltages2) The currents of all the voltage sources, and their total power3) A list of the small-signal parameters for all the devices

Actually, the bias point is calculated whether or not .OP is in the input. This is becauseother analysis, such as .AC, need the bias point. If .OP is omitted the first sub-section (alist of all the node voltages) is printed, but the 2nd and 3rd sub-sections are not.

5.2.3 Small Signal Transfer Function

The .TF statement causes the small-signal gain, input resistance, and output resistance tobe printed. These are calculated by linearizing the circuit around the bias point. Findthe .TF statement and the resulting output in EXAMPLE1. The output is labeledSMALL-SIGNAL CHARACTERISTICS.

5.2.4 Sensitivities

The .SENS statement calculates and prints the sensitivity of one node voltage to eachdevice parameter. The sensitivity is calculated by linearizing all devices around the biaspoint. Find the .SENS statement and its resulting output in EXAMPLE1. The outpoutis labeled DC SENSITIVITY ANALYSIS. Note that for a large circuit, a tremendousamount of output would be generated.

Page 22: Psp Ice

- 22 -

5.2.5 AC Analysis (Frequency Response)

Although the noise analysis comes before the AC analysis in the output, anunderstanding of the AC analysis is nedded first. The AC analysis calculates the small-signal response of the circuit (linearized around the bias point) to a combination ofinputs. Find the .AC statement in EXAMPLE1. It specifies that the frequency is to beswept from 1hz to 10Ghz by decades, with 10 points per decade.

Unlike the .DC statement, it does not specify an input source. Instead, each independentsource contains its own specification. Find VIN. It has an AC spec for 1 volt with 0degrees (by default) of relative phase. Any and all sources can have an AC magnitudeand phase. During the analysis, the contributions from all sources are propagatedthroughout the circuit and summed at all the nodes. In EXAMPLE1, VIN is the onlyinput to an amplifier, so it is the only source to have a (non-zero) AC value. Find theprint table and the plot labeled AC ANALYSIS. Note that both the magnitude andphase are available.

5.2.6 Noise

The noise analysis calculates the noise contributions from each device and does an RMSsum at one output node. Find the .NOISE statement in EXAMPLE1. It specifies thatnode 5 is to be the output node and tha VIN is to be the input. This does not mean thatVIN is the noise source, but rather that VIN is the place at which an equivalent inputnoise is calculated. In other words, the noises are summed at node 5. This value is thendivided by the gain from VIN to 5 to get the amount of noise which, if injected at VIMinto a noise-less circuit, would cause the previously calculated amount of noise at 5.

This calculation is done for all the frequencies specified in the .AC statement. So, youmust do an AC analysis to do a noise analysis.

There are 2 kinds of printout from the noise analysis: detailed tables, and summarytables and plots. The detailed tables are specified by the 3rd value in the .NOISEstatement. In EXAMPLE1, it specifies that every 20th frequency of the AC analysis, adetailed table is to be printed. Find these tables in EXAMPLE1. They are labeledNOISE ANALYSIS. Also find the print table and the plot labeled AC ANALYSIS withcolumn headings INOISE and ONOISE. These are summary outputs, showing the RMSsummed noise at node 5 (ONOISE) and the equivalent input noise at VIN (INOISE).

5.2.7 Transient (Time) Response

The .TRAN statement causes the response of the circuit to be calculated from time 0 toa specified time. Find the .TRAN/OP statement in EXAMPLE1. It specifies that theanalysis is to go from 0 to 500 nanoseconds and that values should be printed every 5nanoseconds.

During a transient analysis, any or all of the independent sources may have time-varyingvalues. In EXAMPLE1, the only source which has a time-varying value is VIN, the

Page 23: Psp Ice

- 23 -

input. It is given a 5 megahertz sine wave. In general, more than one source are oftengiven time-varying values. For instance, 2 or more clocks in a digital circuit.

During the analysis, PSpice maintains an internal time step which is continuouslyadjusted to maintain accuracy while not perforing unnecessary steps. During periods ofinactivity, the internal time step is increased (although never to more than the print stepspecified in the .TRAN statement) and during active regions, it is decreased. The timesteps which were used may not correspond to the print time steps. The values at theprint time steps are obtained by 2nd order polynomial interpolation from values at theinternal steps.

The transient analysis does its own calculation of a bias point to start with. This isnecessary because the initial values of the sources can be different from their DC values.If you want to see the small-signal parameters for the transient bias point, you shoulduse the .TRAN/OP statement, as is done in EXAMPLE1. Otherwise, if all you want isthe result of the transient run itself, you should use the .TRAN statement. Find the biaspoint printout for the transient bias point in EXAMPLE1. It is labeled INITIALTRANSIENT SOLUTION. Note that it has the same format as the output from the .OPstatement.

Find the print table and the plot for the transient analysis. They are labeledTRANSIENT ANALYSIS.

5.2.8 Fourier Components

The fourier analysis calculates the DC and 1st through 9th fourier components of theresult of a transient analysis. So, you must do a transient analysis in order to do afourier analysis.

Find the .FOUR statement in EXAMPLE1. It specifies that the voltage waveform atnode 5 from the transient analysis is to be used and that the fundamental frequency is tobe 5 megahertz. The period of the fundamental frequency is 200 nanoseconds. Only thelast 200 nanoseconds of the transient analysis are used, and that portion is assumed torepeat indefinitely. Since the sine wave in EXAMPLE1 does indeed repeat at every 200nanoseconds this is all right. In general, however, you must make sure that thefundamental fourier period fits the waveform in the transient analysis.

Find the output from the fourier analysis. It is labeled FOURIER ANALYSIS. Notethat it calculates the harmonic distortion as well as the fourier components.

5.3 Temperature

PSpice allows you to analyze your circuit at any temperature. The default temperature is27 degreees centigrade. You can change this with the .TEMP statement. Find the.TEMP in EXAMPLE1. It sets the temperature for all analysis to 35 (deg. centigrade).

The temperature is changed from the default just before the first analysis. Find thesection of EXAMPLE1 labeled TEMPERATURE ADJUSTED VALUES. Note that the

Page 24: Psp Ice

- 24 -

values of the resistors have been updated according to the temperature coefficients in theresistor model CRES. Note also that some of the bipolar model parameters have alsobeen adjusted. From here to the end of the run the temperature stays at 35.

You can specify more than one temperature in the .TEMP statement. If you do, then justbefore the first analysis the temperature is set to the first one in the .TEMP statement.Then, all the analysis are done. Then, the temperature is set to the second one in the.TEMP statement. Now all the analysis are done again. Then, the temperature is set tothe third one in the .TEMP statement. And so on, for all the temperatures. The effect isthe same as if you ran the circuit several times, once for each temperature. This can beconvenient if you want to check the low, nominal, and high temperature behaviour of acircuit all in one run. On the other hand, for many temperatures a large amount ofoutput will be generared.

5.4 Format of the Output

The output of PSpice falls into 4 groups:

1) Descriptions of the circuit itself. This includes the net list, the device list, the modelparameter list, etc.

2) Direct output from some of the analysis. This includes the output from the .SENSand .TF analysis.

3) Print tables and plots. This includes the output from the .DC, .AC, and .TRANanalysis.

4) Run statistics. This includes the run time and amount of memory used.

You have control over which outputs appear. EXAMPLE1 has them all enabled, butnormally only a few woud be selected. An overview of each group of outputs follows.

5.4.1 Descriptions of the Circuit

These are different ways of reflecting the circuit topology and device values. If selectedthese outputs come before the results of any of the analysis. There are 5 possibleoutputs which appear in this order:

1) The input file can be echoed (listed). This section is labeled CIRCUITDESCRIPTION. It always appears unless you include the NOECHO option onan .OPTIONS statement.

2) You can get a wiring (net) list. This section is labeled ELEMENT NODETABLE. It only appears if you include the NODE option on an >OPTIONSstatement.

3) The model parameters can be echoed. This section is labeled BJT MODELPARAMETERS, and also RESISTOR MODEL PARAMETERS, and so on foreach model type. It always appears unless you include the NOMOD option onan .OPTIONS statement.

4) A detailed listing of all the devices in the circuit is available. It is labeledCIRCUIT ELEMENT SUMMARY. It only appears if you include the LISToption on an .OPTIONS statement.

Page 25: Psp Ice

- 25 -

5) The values of all options (which have numerical values) may be printed. Theseare labeled OPTION SUMMARY. They only appear if you include the OPTSoption on an .OPTIONS statement.

So, the 5 outputs are controlled by various options using the .OPTIONS statement. Youcan only control whether or not any of the 5 appear. The formatting of each output isfixed.

5.4.2 Direct Output

The bias point calculation (.OP), small-signal transfer function (.TF), sensitivity analysis(.SENS), noise analysis (.NOIS), and fourier analysis (.FOUR) all provide outputdirectly from the analysis. “Directly” means that a .PRINT or .PLOT statement (seesection 5.4.3 below) is not used to get output. The format of the output is different foreach analysis, depending on details of what is being calculated.

The noise analysis is a special case. It provides direct output, and print table and printtable and plot output. The direct output is the detailed breakdown of all the noisesources produced every nth frequency. In EXAMPLE1 this is output produced every20th frequency. It is labeled NOISE ANALYSIS.

The direct outputs are of fixed format and are enabled simply by including the analysisin the run. If the input has a .SENS statement, then the section labeled DCSENSITIVITY ANALYSIS will appear. If the analysis is not included, then it is notdone and produces no output.

In the case of noise analysis, the direct output is controlled by whether or not there is anumber after the input and output specifications. In EXAMPLE1 the . NOISE statementhas a 20 at the end. This causes printing of the noise source breakdown every 20thfrequency. If that number were omitted, or were 0, then there would be no sectionlabeled NOISE ANALYSIS on the output.

5.4.3 Print Tables and Plots

The most common forms of output are print tables and plots. The DC-sweep (.DC),frequency response (.AC), noise (.NOIS), and time response (.TRAN) analysis produceoutput in the form of print tables and plots.

5.4.3.1 Print Tables

Find the statement in EXAMPLE1 which begins with .PRINT DC. This statementcauses the print table labeled DC TRANSFER CURVES to appear. The DC after.PRINT says that this print table is to be created from the results of the .DC analysis.The statement specifies that the voltages at nodes 4 and 5 are to be printed. Find theprint table labeled DC TRANSFER CURVES in EXAMPLE1. The first column islabeled VIN. This is the voltage source which was swept during the DC sweep. This istrue in general: the first column of print tables is always the value being swept. For DCit is the source’s value, for AC the frequency, and for transient it is the time. The 2nd

Page 26: Psp Ice

- 26 -

and 3rd columns are the voltages at nodes 4 and 5, as was specified in the .PRINTstatement.

Each of the items in the .PRINT statement after the analysis name can be one of:

1) A node voltage, for instance V(4), or2) A voltage between 2 nodes, for instance V(4,5), or3) A voltage across a 2-terminal device, for instance, V(RC1), or4) A voltage at a device’s terminal, for instance, VC(Q2), or5) A voltage across 2 terminals of a device, for instance VBE(Q2), or6) A current through a 2-terminal device, for instance I(CLOAD), or7) a current into a device’s terminal, for instance IC(Q2).

For AC analysis the V or I can be modified with a suffix:

1) Magnitude, for instance VM(5) and VCM(5), or2) Magnitude in decibels, for instance VDB(4,5), or3) Phase, for instance IP(VIN), or4) Group delay, for instance VG(5), or5) Real part, for instance IR(VIN), or6) Imaginary part, for instance VI(4).

No suffix is the same as a suffix of M.

Noise is once again a special case. The output items for noise are none of the above but,instead, are INOISE and ONOISE, for input equivalent noise and output noise,respectively.

Many of these forms are shown in the .PRINT statements in EXAMPLE1. For a fulldescription of all the output forms, see section 6.4.

Each .PRINT statement is limited to 8 output items, not counting the implied one (theone which goes in the 1st column). However, you may have as many .PRINTstatements for each analysis as you like. For instance, if you wanted to list the voltageson all 27 nodes of a circuit during a DC sweep, you could do this by having 4 .PRINTstatements, all with an analysis of DC. The firs 3 could specify 8 node voltages eachand the 4th could have the remaining 3.

5.4.3.2 Plots

Plots are caused by .PLOT statements. The rules for plot statements are the same as therules for .PRINT statements.

Find the plot labeled TRANSIENT ANALYSIS in EXAMPLE1. Note that there are 2columns printed, just like a print table. This is true for all plots: the implied output andthe 1st specified output item are printed to the left of the plot. The plot has 3 differentscales. When outputs have widely differing magnitudes, they are given different scalesto avoid having the smaller ones compressed into a straight line. You can avoid this by

Page 27: Psp Ice

- 27 -

specifying a y-axis range (see .PLOT in chapter 6 for details). This will force all outputitems onto the same scale.

5.4.4 Run Statistics

Find the section at the end of EXAMPLE1 labeled JOB STATISTICS SUMMARY.This section lists various kinds of summary information about the whole run includingthe times required by the various analysis. Besides the times, the values of MAXMEMand MEMUSE are also of interest. MEMUSE is the maximum of amount of memoryrequired during this run and MAXMEM is the amount available. For larger circuitsthese values can provide guidelines for which circuits are or are not too large for PSpiceto handle.

The run statistics only appear if the option ACCT is included in an .OPTIONSstatement. In that case, they appear at very end of the output. Section 6.5 contains a listof all the statistics and the meaning of each one.

5.5 Options

There is a number of options available which control various aspects of a PSpice run.Some of these have already been mentioned above associated with various kinds ofoutput. There are 2 statements which allow you to set options: .OPTIONS and.WIDTH.

Not surprisingly, the .WIDTH statement lets you to set the width of the output. Find the.WIDTH statement in EXAMPLE1. It sets the output width to 80 columns. Thiscontrols the formatting of the various tables, such as the printout of the modelparameters, and also the width of the plots. There are only 2 values available: 80 and132.

The .OPTIONS statement handles all the other options. There are 2 kinds: options withvalues and options without values. Find the .OPTIONS statement in EXAMPLE1.Options such ACCT and LIST are without values. Options such as RELTOL havevalues. The various options are simply listed, with values assigned to those which needthem. The order follows the same rule as for command statements in general: if anoptions is specified more than once, only the last time counts. Further, if there is morethan one .OPTIONS statement, it works the same as if they are combined into one. Forinstance,

.OPTIONS ACCT LIST

.OPTIONS RELTOL=.001

is equivalent to

.OPTIONS ACCT LIST RELTOL=.001

For a list of all the available options and their meanings, see the description of the.OPTIONS statement in chapter 6.

Page 28: Psp Ice

- 28 -

Chapter 6

REFERENCE

6.1 Introduction

This chapter is a list of all Pspice statements in alphabetical order. A completedescription is given for each statement. Unlike previous chapters, the style of thischapter is terse. The emphasis is on giving a complete and accurate description insteadof ease of understanding.

6.2 Notation

Item Example Explanationname C23 Alphanumeric string of no

more than 7 charactersnode 15 Integer in the range 0-9999scale suffix P One of A, F, N, U, M, MIL,

K, MEG, G, Tunits suffix F Any letter which is not a

scale suffix or any letter(s)at all which follows a scalesuffix

upper case text .WIDTH Required literal text stringvalue 1.2E-6 Floating-point number with

optional scale and/or unitssuffixes

(text) (model) Comment[item] [value] Optional item[item]* [<value>,]* Zero or more of item<item> <name> Required item<item>* <<node> >* One or more of item

6.3 Statements

This section contains a description of each type of input statement. The statements arearranged in alphabetical order.

Page 29: Psp Ice

- 29 -

TITLE

General Forms

(any text)

Examples

LOW-NOISE OPAMP 12B - WORST CASE

Unlike all other statements, the title statement is identified by its position instead of akeyword. It can contain any text, but is restricted to one line. The title statement is thefirst statement of the circuit. If there is more than one circuit in an input file, then eachcircuit has its own title statement.

Page 30: Psp Ice

- 30 -

CAPACITOR

General Forms

C<name> <(+)node> <(-)node> [(model) name] <value>

Examples

CLOAD 15 0 20PFC2 1 2 .2E-12

Model Parameters Units Default

C capacitance multiplier 1

The + and nodes define the polarity meant when the capacitor has a positive voltageacross it. Positive current flows from the (+) node through the capacitor to the (-) node.

If the [(model) name] is left out then <value> is the capacitance in farads.

If [(model) name] is specified, then <value> is multiplied by the value of the parameterC in the model to get the capacitance.

<value> is normally positive, though it can be made negative. It must not be zero.

Page 31: Psp Ice

- 31 -

DIODE

General Forms

D<name> <(+)node> <(-)node> <(model) name> [(area) value]

Examples

DCLAMP 14 0 DMODD13 15 17 SWITCH 1.5

Model Parameters Units Default

IS saturation current Amp 1E-14KS parasitic (ohmic) resistance Ohm 0N emission coefficient 1TT transit time Sec 0CJO zero bias junction capacitance Farad 0VJ junction potential Volt 1M grading coefficient .5EG activation energy e-Volt 1.11XTI saturation current temp. exponent 3.0KF flicker noise coefficient 0AF flicker noise exponent 1FC coeff. for forward-bias depl. cap. .5BV reverse breakdown voltage Volt infiniteIBV reverse current at breakdown volt. Amp 1E-10

<(+)node> is the anode and <(-)node> is the cathode. Positive current is current flowingfrom the (+) node through the diode to the (-) node. [(area) value] scales IS, RS, CJO,and IBV and defaults to 1. IBV and BV are both specified as positive values.

The diode is modeled as an ohmic resistance (value = RS/area) in series with an intrinsicdiode. The resistance is attached between the (+) node and an internal(+’) node. In thefollowing equations

V = voltage across the intrinsic diode onlyVt = thermal voltageT0 = nominal temperature (set with TNOM = . . . option)q = electron chargek = Boltzmann’s constant

Other variables are from the model parameter list.

DC Current

I = area * ( In + Ib)

Page 32: Psp Ice

- 32 -

In = normal current = IS * (e(V/N * Vt)-1)Ib = breakdown current = IBV * e(- BV - V)/Vt

Capacitance

C = area * (Ct + Cj)Ct = transit time capacitance = TT * G

G = dc conductance = dI/dVCj = junction capacitance

For V <= FC * VJCj = CJO * (1-V/VJ)-M

For V > FC * VJCj = CJO * (1-FC)-(1+M) * (1-FC * (1+M) + M * V/VJ)

Temperature Effects

IS(T) = IS * e(EG/N * Vt) * (T/T0-1) * (T/T0)(XTI/N)

VJ(T) = VJ * (T/T0) - 2 * Vt * (1.5 * ln(T/T0) - Eg/(2 * Vt-1.1150877 * Vt0))where Eg = bandgap in silicon at T

Vt0 = thermal voltage at T0CJO(T) = CJO * [1 + M * (.0004 * (T-T0) + (1-VJ(T)/VJ))]KF(T) = KF * (PB[T]/PB)AF(T) = AF * (PB[T]/PB)RS has no temperature dependence

Noise

The parasitic resistance, RS, generates thermal noise.In2 = 4 * k * T/(RS/area)

The intrinsic diode generates shot and flicker noise:In2 = 2 * q * I + KF * IAF/f

Page 33: Psp Ice

- 33 -

VOLTAGE-CONTROLLED VOLTAGE SOURCE

General Forms

E<name> <(+)node> <(-)node> <(+ controlling) node>+ <(- controlling) node> <gain>E<name> <(+)node> <(-)node> [POLY(<value>)]+ <<(+ contr.) node> <(-contr.) node>>*+ <<(poly. coeff.) value>>*

Examples

EBUFF 1 2 10 11 1.0EAMP 13 0 26 0 500ENONLIN 100 101 POLY(2) 3 0 4 0+ 0.0 13.6 .2 .005

The first form and the first 2 examples apply to the linear case. The 2nd form and thelast example are for the non-linear case. POLY(n) specifies the number of dimensionsof the polynomial. The number of controlling nodes must be twice the number ofdimensions.

The (-) and (+) nodes are the output nodes. Positive current flows from the (+) nodethrough the source to the (-) node. The (+ controlling) and (- controlling) nodes are inpairs and define a set of voltages. A particular node may appear more than once, and theoutput and controlling node need not be different. Caution should be exercised with thenon-linear form. For instance,

EWRONG 1 0 POLY(1) 1 0 .5

tries to set node 1 to .5 volts greater than node 1. In this case, any analysis which youspecify will fail to calculate a result. In particular, PSpice will not be able to calculatethe bias point for a circuit containing EWRONG.

The number of dimensions (default=1) determines the number of controlling nodes.After the controlling nodes come the coefficients of the polynomial. For the linear case,there is only one and that is the gain. For the non-linear case, call the controllingvoltages V1, V2, . . . Vn.

Then the output voltage is given by:

Vout = P0 + P1 * V1 + P2 * V2 + . . . + Pn * Vn +Pn+1* V1 * V1 + Pn+2 * V1 * V2 + . . . + Pn+n * V1 * Vn +P2n+1 * V2 * V2 + P2n+2 * V2 * V3 + . . . + P2n+n-1 * V2 * Vn +..

Page 34: Psp Ice

- 34 -

.P(n * n+n)/2 * Vn * Vn +P(n * n+n)/2+1 * V1 * V1* V1 + P(n * n+n)/2+2 * V1 * V1 * V2 + . . ....

It is not necessary to enter all the coefficients, but none may be skipped over. Forinstance, this is a voltage summer:

ESUM 100 101 POLY(4) 1 0 2 0 3 0+ 4 0 0.0 1.0 1.0 1.0 1.0

For the one-dimensional polynomial, the general case reduces to:

Vout = P0 + P1 * V + P2 * V2 + . . . + Pn * Vn

Page 35: Psp Ice

- 35 -

CURRENT-CONTROLLED CURRENT SOURCE

General Forms

F<name> <(+)node> <(-)node>+ <(- controlling voltage source) name> <gain>F<name> <(+)node> <(-)node> [POLY(<value>)]+ <(+ controlling voltage source) name>*+ <<(poly. coeff.) value>>*

Examples

FSENSE 1 2 VSENSE 30.0FAMP 13 0 VIN 500FNONLIN 100 101 POLY(2) VCNTRL1 VCNTRL2+ 0.0 13.6 .2 .005

The first form and the first 2 examples apply to the linear case. The 2nd form and thelast example are for the non-linear case. POLY(n) specifies the number of dimensionsof the polynomial. The number of controlling voltage sources must be equal to thenumber of dimensions.

The (-) and (+) nodes are the output nodes. A positive current will flow from the (+)node through the source to the (-) node. The current(s) through the controlling voltagesource(s) determine(s) the output current. The controlling sources(s) must beindependent voltage source(s) (V<name> elements), although they need not have a zeroDC value.

Caution should be exercised with the non-linear form. For instance,

FWRONG 1 0 POLY(1) VWRONG .5VWRONG 2 1

with nothing else connected to node 1, tries to set FWRONG's current to .5 amps morethan the current flowing through VWRONG. Since all the current through VWRONGis the same as FWRONG's current, it tries to set FWRONG's current to .5 amps morethan itself. In this case, any analysis which you specify will fail to calculate a result. Inparticular, PSpice will not be able to calculate the bias point for a circuit containingFWRONG.

The number of dimensions (default = 1) determines the number of controlling voltagesources. After the controlling voltage source names come the coefficients of thepolynomial. For the linear case, there is only one and that is the gain. For the non-linearcase, call the controlling currents I1, I2, . . . In.

Then the output current is given by:

Page 36: Psp Ice

- 36 -

Iout = P0 + P1 * I1 + P2 * I2 + . . . + Pn * In +Pn+1 * I1 * I1 + Pn+2 *I1 *I2 + . . . + Pn+n * I1* In +P2n+1 * I2 *I2 + P2n+2 * I2 * I3 + . . . + P2n+n-1 * I2 * In +...P(n * n+n)/2 * In * In +P(n * n+n)/2+1 * I1 * I1 * I1 + P(n*n+n)/2+2 * I1 * I1* I2 + . . ....

It is not necessary to enter all the coefficients, but none may be skipped over. Forinstance, this is a current summer:

FSUM 100 101 POLY(4) VSRC1 VSRC2 VSRC3+ VSRC4 0.0 1.0 1.0 1.0 1.0

For the one-dimensional polynomial, the general case reduces to:

Iout = P0 + P1 * I + P2 * I2 + . . . + Pn * In

Page 37: Psp Ice

- 37 -

VOLTAGE-CONTROLLED CURRENT SOURCE

General Forms

G<name> <(+)node> <(-)node> <(+ controlling) node>+ <(- controlling) node> <transconductance>G<name> <(+)node> <(-)node> [POLY(<value>)]+ <<(+ contr.) node> <(-contr.) node>>*+ <<(poly. coeff.) value>>*

Examples

GBUFF 1 2 10 11 1.0GAMP 13 0 26 0 500GNONLIN 100 101 POLY(2) 3 0 4 0+ 0.0 13.6 .2 .005

The first form and the first 2 examples apply to the linear case. The 2nd form and thelast example are for the non-linear case. POLY(n) specifies the number of dimensionsof the polynomial. The number of controlling nodes must be twice the number ofdimensions.

The (-) and (+) nodes are the output nodes. Positive current flows from the (+) nodethrough the source to the (-) node. The (+ controlling) and (- controlling) nodes are inpairs and define a set of voltages. A particular node may appear more than once, and theoutput and controlling nodes need not be different.

The number of dimensions (default=1) determines the number of controlling nodes.After the controlling nodes come the coefficients of the polynomial. For the linear case,there is only one and that is the transconductance. For the non-linear case, call thecontrolling voltages V1, V2, . . . Vn. Then the output current is given by:

Iout = P0 + P1 * V1 + P2 * V2 + . . . + Pn * Vn +Pn+1 * V1 * V1 + Pn+2 * V1 * V2 + . . . + Pn+n * V1 * Vn +P2n+1 * V2 * V2 + P2n+2 * V2 * V3 + . . . + P2n+n-1 * V2 * Vn +...P(n * n+n)/2 * Vn * Vn +P(n * n+n)/2+1 * V1 * V1 * V1 + P(n * n+n)/2+2 * V1 * V1 * V2 + . . ....

It is not necessary to enter all the coefficients, but none may be skipped over. Forinstance, this is a voltage summer:

Page 38: Psp Ice

- 38 -

GSUM 100 101 POLY(4) 1 0 2 0 3 0+ 4 0 0.0 1.0 1.0 1.0 1.0

For the one-dimensional polynomial, the general case reduces to:

Iout = P0 + P1 * V + P2 * V2 + . . . + Pn * Vn

If the controlling nodes are the same as the output nodes, then this is a non-linearresistor.

Page 39: Psp Ice

- 39 -

CURRENT-CONTROLLED VOLTAGE SOURCE

General forms

H<name> <(+)node> <(-)node>+ <(- controlling voltage source) name>+ <transresistance>H<name> <(+)node> <(-)node> [POLY(<value>)]+ <(+ controlling voltage source) name>*+ <<(poly. coeff.) value>>*

Examples

HSENSE 1 2 VSENSE 10.0FAMP 13 0 VIN 500HNONLIN 100 101 POLY(2) VCNTRL1 VCNTRL2+ 0.0 13.6 .2 .005

The first form and the first 2 examples apply to the linear case. The 2nd form and thelast example are for the non-linear case. POLY(n) specifies the number of dimensionsof the polynomial. The number of controlling voltage sources must be equal to thenumber of dimensions.

The (-) and (+) nodes are the output nodes. Positive current will flow from the (+) nodethrough the source to the (-) node. The current(s) through the controlling voltagesource(s) determine(s) the output voltage. The controlling sources(s) must beindependent voltage source(s) (V<name> elements), although they need not have a zeroDC value.

The number of dimensions (default = 1) determines the number of controlling voltagesources. After the controlling voltage source names come the coefficients of thepolynomial. For the linear case, there is only one and that is the transresistance. For thenon-linear case, call the controlling currents I1, I2, . . . In.

Then the output voltage is given by:

Vout = P0 + P1 * I1 + P2 * I2 + . . . + Pn * In +Pn+1 * I1 * I1 + Pn+2 * I1 * I2 + . . . + Pn+n * I1 * In +P2n+1 * I2 * I2 + P2n+2 * I2 * I3 + . . . + P2n+n-1 * I2 * In +...P(n * n+n)/2 * In * In +P(n * n+n)/2+1 * I1 * I1 * I1 + P(n * n+n)/2+2 * I1 * I1 * I2 + . . ...

Page 40: Psp Ice

- 40 -

.

It is not necessary to enter all the coefficients, but none may be skipped over. Forinstance, this is a current summer:

HSUM 100 101 POLY(4) VSRC1 VSRC2 VSRC3+ VSRC4 0.0 1.0 1.0 1.0 1.0

For the one-dimensional polynomial, the general case reduces to:

Vout = P0 + P1 * I + P2 * I2 + . . . + Pn * In

Page 41: Psp Ice

- 41 -

INDEPENDENT CURRENT SOURCE

General Forms

I<name> <(+)node> <(-)node> [[DC] <value>]+ [AC <(magnitude) value> [(phase) value]+ [(transient specification) [PULSE][SIN][EXP][PWL]+ [SFFM]([value]*)]

Examples

IBIAS 13 0 2.3MAIAC 2 3 AC .001IACPHS 2 3 AC .001 90IPULSE 1 0 PULSE (-1V 1V 2NS 2NS 2NS 50NS 100NS)I3 26 77 DC .002 AC 1 SIN(.002 .002 1.5MEG)

Positive current flows from the (+) node through the source to the (-) node. The defaultvalue is zero for the DC, AC, and transient values. None, any, or all of DC, AC, andtransient values may be specified. The AC phase value is in degrees.

If present, the transient specification must be one of:

General form

EXP(ioff ipeak td tcr tr tfr)

Example

EXP(0 .2 1US 2US 40US 20US)

Parameters

name meaning default unitsioff initial current none Ampsipeak peak current none Ampstd delay 0 sectcr rise time constant TSTEP sectr rise time td + TSTEP sectfr fall time constant TSTEP sec

The EXP form causes the current to be ioff for the first td seconds. Then, the currentdecays exponentially from ioff to ipeak with a time constant of tcr. The decay lasts tr

seconds. Then the current decays from ipeak back to ioff with a time constant tfr.

General Form

Page 42: Psp Ice

- 42 -

PULSE(i1 i2 td tr tf pw per)

Example

PULSE(-1MA 1MA 50US .1US .1US 2US 10US)

Parameters

name meaning default unitsi1 initial current none Ampsi2 pulsed current none Ampstd delay 0 sectr rise time TSTEP sectf fall time TSTEP secpw pulse width TSTOP secper period TSTOP sec

The PULSE form cause the current to start at i1 and stay there for td seconds. Then, thecurrent goes linearly from i1 to i2 during the next tr seconds. Then, the current stays at i2

for pw seconds. Then, it goes linearly from i2 back to i1 during the next tf seconds. Itstays at i2 for per-(tr + pw + tf) seconds, and then the cycle is repeated except for theinitial delay of td seconds.

General Form

PWL(t1 i1 t2 i2 . . . tn in)

Example

PWL(0 -1MA 1US 0MA 10US 0MA 10.1US 10MA 20US 10MA 20.1US20MA)

Parameters

name meaning default unitsti time at corner none secii current at corner none Amps

The PWL form describes a piece-wise linear waveform. Each pair of time-currentvalues specifies a corner of the waveform. The current at times between corners is thelinear interpolation of the currents at the corners.

General Form

SFFM(ioff iampl fc mod fm)

Example

Page 43: Psp Ice

- 43 -

SFFM(0 2MA 10.1MEGH 5 4KH)

Parameters

name meaning default unitsioff offset current none Ampsiampl ampl current none Ampsfc carrier frequency 1/TSTOP Hertzmod modulation index 0fm signal frequency 1/TSTOP Hertz

The SFFM (Single-Frequency FM) form causes the current to follow this equation:

I = ioff + iampl * sine((2 * pi * fc * time) + mod * sine(2 * pi * fm * time))

General Form

SIN(ioff iampl freq td df)

Example

SIN(0 .01 100KHZ 1MS 1E4)

Parameters

name meaning default unitsioff offset current none Ampsiampl pulsed current none Ampsfreq frequency 1/TSTOP Hertztd delay 0 secdf damping factor 0 1/sec

The SIN form causes the current to start at 0 and stay there for td seconds. Then, thecurrent becomes an exponentially damped sine wave described by this equation:

I = ioff + iampl * exp(- (time - td) * df) * sine(2 * pi * freq* (time - td))

Page 44: Psp Ice

- 44 -

JUNCTION FET

General Forms

J<name> <(drain) node> <(gate) node> <(source) node>+ <(model) name> [(area) value]

Examples

JIN 100 1 0 JFASTJ13 22 14 23 JNOM 2.0

Model Parameters Units Default

VTO threshold voltage Volt -2.0BETA transconductance parameter A/V**2 1E-4LAMBDA channel length modulation 1/Volt 0RD drain parasitic resistance Ohm 0RS source parasitic resistance Ohm 0CGD zero-bias G-D junction cap. F 0CGS zero-bias G-S junction cap. F 0FC coefficient for forward-bias .5

depletion capacitancePB gate junction potential Volt 1.0IS gate junction sat. current Amp 1E-14KF flicker noise coefficient 0AF flicker noise exponent 1

Positive current is current flowing into a terminal. [(area) value] is the relative devicearea and defaults to 1.0.

The JFET is modeled as an intrinsic JFET with an ohmic resistance (value = RD/area) inseries with the drain and with another ohmic resistance (value = RS/area) in serier withthe source. In the following equations

Vgs gate-intrinsic source voltageVgd gate-intrinsic drain voltageVds intrinsic drain-intrinsic source voltageVt thermal voltageT0 nominal temperature (set with TNOM = . . . option)q electron chargek Boltzmann's constant

Other variables are from the model parameter list. These equations describe an n-channel JFET. For p-channel devices, reverse the signal of all voltages and currents.

Page 45: Psp Ice

- 45 -

Ig = gate current = area * (Igs + Igd)Igs = gate-source leakage current = IS * (e(Vgs/Vt)-1)Igd = gate-drain leakage current = IS * (e(Vgd/Vt)-1)

Id = drain current = area * (- Idrain - Igd)Is = source current = area * (Idrain - Igs)

For Vds >= 0 (normal mode) For Vgs - VTO < 0 (cuttof region)

Idrain = 0For 0 <= Vgs - VTO <= Vds (saturation region)

Idrain = BETA * (1 + LAMBDA * Vds) * (Vgs - VTO)2

For Vds < Vgs - VTO (linear region)Idrain = BETA * (1 + LAMBDA * Vds) *

Vds * (2 * [Vgs -VTO] - Vds)

Capacitance

Note: all capacitances are between terminal of the intrinsic JFET. That is, to theinside of the ohmic drain and source resistances.

Cgs = gate-source depletion capacitanceFor Vgs <= FC * PB

Cgs = area * CGS * (1 - Vgs/PB)-M

For Vgs > FC * PBCgs = area * CGS * (1 - FC)-(1 + M) * (1 - FC * (1 + M) + M * Vgs/PB)

where M = 0.5

Cgd = gate-drain depletion capacitanceFor Vgd <= FC * PB

Cgd = area * CGD * (1 - Vgd/PB)-M

For Vgs > FC * PBCgd = area * CGD * (1 - FC)-(1 + M) * (1 - FC * (1 + M) + M * Vgd/PB)

where M = 0.5

Temperature Effects

IS(T) = IS * e(EG/N * Vt) * (T/T0-1) * (T/T0)(XTI/N)

where EG = 1.11N = 1XTI = 0

PB(T) = PB * (T/T0) - 2 * Vt * (1.5 * ln(T/T0) - Eg/(2 * Vt - 1.1150877 * Vt0))where Eg = bandgap in silicon at T

Vt0 = thermal voltage at T0

CGS(T) = CGS * [1 + M * (.0004 * (T-T0) + [1-PB(T)/PB])]

CGD(T) = CGD * [1 + M * (.0004 * (T-T0) + [1-PB(T)/PB])]

Page 46: Psp Ice

- 46 -

where M = 0.5

KF(T) = KF * (PB[T]/PB)AF(T) = AF*(PB[T]/PB)

The drain and source ohmic (parasitic) resistances have no temperature dependence.

Noise

The parasitic resistances, Rs and Rd, generate thermal noise.

Is2 = 4 * k * T/(RS/area)

Id2 = 4 * k * T/(RD/area)

The intrinsic JFET generates shot and flicker noise:

Ic2 = 4 * q * Vt * 2/3 * I + KF * IAF/f

Page 47: Psp Ice

- 47 -

MUTUAL INDUCTOR (TRANSFORMER)

General Forms

K<name> L<(1st ind.) name> L<(2nd ind.) name> <value>

Examples

KTUNED L3OUT L4INKTRNSFRM LPRIMARY LSECNDRY

K<name> couples the 1st and 2nd inductors. Using the 'dot' convention, place a 'dot' onthe first node of each inductor. In other words, given:

I1 1 0 AC 1MAL1 1 0 10UHL2 2 0 10UHR2 2 0 .1K12 L1 L2 .9999

the current through L2 will be in the opposite direction as the current through L1. Thepolarity is determined by the order of the nodes in the L . . . statement and not by theorder of inductors in the K . . . statement.

<value> is the coefficient of coupling which must be between 0 and 1. Note that iron-core transformers have a very high coefficient of coupling, greater than .999 in manycases. If there are several coils on a transformer, then there must be K . . . statementscoupling all pairs. For instance, a transformer with a center-tapped primary and 2secondaries would be written:

* PRIMARYL1 1 2 10UHL2 2 3 10UH* SECONDARYL3 11 12 10UHL4 13 14 10UH* MAGNETIC COUPLINGK12 L1 L2 .9999K13 L1 L3 .9999K14 L1 L4 .9999K23 L2 L3 .9999K24 L2 L4 .9999K34 L3 L4 .9999

The name, Kxx, need not be related to the names of the inductors it is coupling.However, this is good practice.

Page 48: Psp Ice

- 48 -

INDUCTOR

General Forms

L<name> <(+) node> <(-) node> [(model) name] <value>

Examples

LLOAD 15 0 20MHL2 1 2 .2E-6

Model Parameters Units Default

L inductance multiplier 1

The + and - nodes define the polarity meant when the inductor has a positive voltageacross it. Also, positive current flows from the (+) node through the inductor to the (-)node.

If [(model) name] is left out then <value> is the inductance in henries.

If [(model) name] is specified, the <value> is multiplied by the value of the parameter Lin the model to get the inductance.

<value> is normally positive. It can be set negative, but not to zero.

Page 49: Psp Ice

- 49 -

MOSFET

General Forms

M<name> <(drain) node> <(gate) node> <(source) node>+ <(bulk/substrate) node> <(model) name>+ [L = <value>] [W = <value>]+ [AD = <value>] [AS = <value>]+ [PD = <value>] [PS = <value>]+ [NRD = <value>] [NRS = <value>]

Examples

M1 14 2 13 0 PNOM L=25U W=12UM13 15 3 0 0 PSTRONGM2A 0 2 100 100 NWEAK L=33U W=12U+ AD=288P AS=288P PD=60U PS=60U+ NRD=14 NRS=14

Model Parameters Units Default

LEVEL model type (1, 2, or 3) 1LD lateral diffusion (channel length) meter 0WD lateral diffusion (channel width) meter 0VTO zero bias threshold voltage Volt 0.0KP transconductance parameter A/V**2 2.0E-5GAMA bulk threshold parameter SQRT(V) 0PHI surface potential Volt 0.6LAMBDA channel-length modulation 1/Volt 0

(level = 1 or 2 only)RD drain parasitic resistance Ohm 0RS source parasitic resistance Ohm 0RSH drain/source diffusion Ohm/sqr. 0

sheet resistanceIS bulk junction saturation current Amp. 1.0E-14JS bulk junc. sat. cur. per area Amp/m**2 0PB bulk junction potential Volt 0.8CBD zero-bias bulk-drain cap. F 0CBS zero-bias bulk-source cap. F 0CJ zero-bias bulk-drain/source F/m**2 0

bottom cap. per areaCJSW zero-bias bulk-drain/source F/m 0

sidewall cap. per perimeterMJ bulk junction bottom grading 0.5MJSW bulk junc. sidewall grading 0.3FC bulk junction forward-biased 0.5

Page 50: Psp Ice

- 50 -

capacitance coefficientCGSO gate-source overlap cap. F/m 0

per channel widthCGDO gate-drain overlap cap. F/m 0

per channel widthCGBO gate-bulk overlap cap. F/m 0

per channel lengthNSUB substrate doping 1/cm***3 0NSS surface state density 1/cm**2 0NFS fast surface state density 1/cm**2 0TOX oxide thickness meter infiniteTPG gate material, 1

+1 = opposite of substrate-1 = same as substrate 0 = aluminum

XJ metallurgical junction depth meter 0UO surface mobility cm**2/V-s 600.0UCRIT critical field for mobility Volt/cm 1.0E4

degradation (level 2 only)UEXP mob. degr. exponent (LEVEL=2) 0UTRA transverse field coefficient 0

for mob. degr. (LEVEL=2)VMAX maximum drift velocity m/sec 0NEFF channel charge coeff. (LEV=2) 1.0XQC fraction of channel charge 0

attributed to drainDELTA width effect on threshold 0THETA mobility modulation 1/Volt 0ETA static feedback (LEVEL=3) 0KAPPA sat. field factor (LEVEL=3) 0.2KF flicker noise coefficient 0AF flicker noise exponent 1.0

Positive current is current flowing into a terminal. In particular, positive drain currentflows from the drain through the channel to the source.

L and W are the channel length and width in meters. L is decreased by twice LD to getthe effective channel length. W is decreased by twice WD to get the effective channelwidth.

AD and AS are the drain and source diffusion areas in square meters. PD and PS are thedrain and source diffusion perimeters in meters. The drain-bulk and source-bulksaturation currents can be specified either by JS, which is multiplied by AD and AS, orby IS, which is an absolute value. The zero-bias depletion capacitances can be specifiedby CJ, which is multiplied by AD and AS, and by CJSW, which is multiplied by PD andPS. Or they can be set to CBD and CBS which are absolute values.

Page 51: Psp Ice

- 51 -

NRD and NRS are the relative resistivities of the drain and source diffusion in squares.The drain and source parasitic (ohmic) resistances can be specified either by RSH,which is multiplied by NRD and NRS, or by RD and RS which are absolute values.

PD and PS default to 0. NRD and NRS default to 1. Defaults for L, W, AD, and ASmay be set in the .OPTIONS statement. If AD or AS defaults are not set, they alsodefault to 0. If L or W defaults are not set, they default to 100u.

The MOSFET is modeled as an intrinsic MOSFET with an ohmic resistance (value =RD) in series with the drain and with another ohmic resistance (value = RS) in serieswith the source. In the following equations

Vgs = gate-intrinsic source voltageVgd = gate-intrinsic drain voltageVds = intrinsic drain-intrinsic source voltageVbs = substrate-intrinsic source voltageVbd = substrate-intrinsic drain voltageVt = thermal voltageT0 = nominal temperature (set with TNOM = . . . option)q = electron chargek = Boltzmann's constant

Other variables are from the model parameter list. These equations describe an n-channel MOSFET. For p-channel devices, reverse the signs of all voltages and currents.

DC CurrentsIg = gate current = 0Ib = substrate current = Ibs + Ibd

Ibs = substrate-source leakage current= Iss * (e(Vbs/Vt)-1)

Ibd = substrate-drain leakage current= Ids * (e(Vbd/Vt)-1)For IS > 0

Iss = ISIds = IS

For IS = 0 (IS defaulted)Iss = AS * JSIds = AD * JS

Id = drain current = -Idrain + Ibd

Is = source current = Idrain + Ids

For LEVEL = 1For Vds => 0 (normal mode)

For Vgs-Vt0 < 0 (cutoff region)Idrain = 0

For 0 <= Vgs-Vt0 <= Vds (saturation region)Idrain = (W/L) * KP * (1 + LAMBDA * Vds) * (Vgs - Vt0)

2

For Vds < Vgs -Vt0 (linear region)Idrain = (W/L) * KP * (1 + LAMBDA * Vds) *

Page 52: Psp Ice

- 52 -

Vds * (2 * [Vgs - Vt0] - Vds)Vt0 = VTO + GAMMA * (sqrt[PHI - Vbs] - sqrt[PHI])

For Vds < 0 (inverted mode) switch the source and drainFor LEVEL = 2 or LEVEL = 3 see Reference [1] below for the equationsdescribing Idrain.

Capacitance

Note: all capacitances are between terminal of the intrinsic MOSFET. Thatis, to the inside of the ohmic drain and source resistances.

Cbs = substrate-source depletion capacitance= junction + sidewall capacitances

Cbd = substrate-drain depletion capacitance= junction + sidewall capacitances

For CGS = 0 and CGD = 0Cbs = AS * CJ * Cbsj + PS * CJSW * Cbss

Cbd = AD * CJ * Cbdj + PS * CJSW * Cbds

OtherwiseCbs = CBS * Cbsj + PS * CJSW * Cbss

Cbd = CBD * Cbdj + PS * CJSW * Cbds

For Vbs <= FC * PBCbsj = (1 - Vbs / PB)-MJ

Cbss = (1 - Vbs / PB)-MJSW

For Vbs > FC * PBCbsj = (1 - FC)-(1+MJ) * (1 - FC * (1 + MJ) + MJ * Vbs / PB)Cbss = (1 - FC)-(1+MJSW) * (1 - FC * (1 + MJ) + MJ * Vbs / PB)

For Vbd <= FC * PBCbdj = (1 - Vbd / PB)-MJ

Cbds = (1 - Vbd / PB)-MJSW

For Vbd > FC * PBCbdj = (1 - FC)-(1+MJ) * (1 - FC * (1 + MJ) + MJ * Vbd / PB)Cbds = (1 - FC)-(1+MJSW) * (1 - FC * (1 + MJ) + MJ * Vbd / PB)

Cgs = gate-source overlap capacitance = CGSO * WCgd = gate-drain overlap capacitance = CGDO * WCgb = gate-substrate overlap capacitance = CGBO * LSee Reference [1] for the equations describing the capacitances due to the channelcharge.

Temperature Effects

IS(T) = IS * e(EG/Vt)

JS(T) = JS * e(EG/Vt)

PB(T) = PB * (T/T0) - 2 * Vt * (1.5 * ln(T/T0) - (EG/(2 * Vt - 1.1150877 * Vt0))where EG = 1.16 - (.000702 * T2) / (T + 1108)

Vt0 = thermal voltage at T0

CBD(T) = CBD * [1 + MJ * (.0004 * (T-T0) + [1-PB(T)/PB])]

Page 53: Psp Ice

- 53 -

CBS(T) = CBS * [1 + MJ * (.0004 * (T-T0) + [1-PB(T)/PB])]CJ(T) = CJ * [1 + MJ * (.0004 * (T-T0) + [1-PB(T)/PB])]CJSW(T) = CJSW * [1 + MJSW * (.0004 * (T-T0) + [1-PB(T)/PB])]KP(T) = KP * (T / T0)-1.5

UO(T) = UO * (T / T0) -1.5

KF(T) = KF * (PB[T] / PB)AF(T) = AF * (PB[T] / PB)

The drain and source ohmic (parasitic) resistances have no temperature dependence.

Noise

The parasitic resistances, RS and RD, generate thermal noise.

Is2 = 4 * k * T/(RS/area)

Id2 = 4 * K * T/(RD/area)

The intrinsic MOSFET generates shot and flicker noise:

Ic2 = 4 * q * Vt * 2/3 * gm + KF * (Idrain)

AF / fwhere gm = DIdrain/dVgs at the dc bias point

Reference 1

For a more complete description of the MOSFET, see

"The Simulation of MOS Integrated Circuits Using Spice2"by Andrei Vladimirescu and Sally Liu, MemorandumNo. ERL-M80/7

this document is available by sending a check for $7.50made out to

Regents of the University of California

to this address:

Ms. Deborah DunsterEECS Industrial Liaison Program457 CoryUniversity of CaliforniaBerkeley, CA 94720

Page 54: Psp Ice

- 54 -

BIPOLAR TRANSISTOR

General Forms

Q<name> <(collector) node> <(base) node>+ <(emitter) node> [(substrate) node]+ <(model) name> [(area) value]

Examples

Q1 14 2 13 PNPOMQ13 15 3 0 1 NPNSTRONG 1.5

Model Parameters Units Default

IS saturation current Amp. 1.0E-16EG Is temp. effect energy gap e-Volt 1.11XTI, PT Is temp. effect exponent 3BF ideal max. forward beta 100NF fwd. current emission coeff. 1.0VAF, VA forward Early voltage Volt infiniteIKF, IK corner for forward beta Amp infinite

high current roll-offISE, C2 B-E leakage sat. current Amp 0NE B-E leakage emission coeff. 1.5BR ideal max. reverse beta 1.0NR rvs current emission coeff. 1.0VAR, VB reverse Early voltage Volt infiniteIKR corner for reverse beta Amp infinite

high current roll-offISC, C4 B-C leakage sat. current Amp 0NC B-C leakage emission coeff. 2.0RB zero bias base resistance Ohm 0IRB current where base resistance Amp infinite

falls halfway to min. valueRBM min. base resistance Ohm RBRE emitter parasitic resistance Ohm 0RC collector parasitic resistance Ohm 0CJE B-E zero-bias depl. cap. F 0VJE, PE B-E built-in potential Volt 0.75MJE, ME B-E junction exponential fact. 0.33CJC B-C zero-bias depl. cap. F 0VJC, PC B-C built-in potential Volt 0.75MJC, MC B-C junction exponential fact. 0.33XCJC fraction of B-C depl. cap. 1

connected internal to rb

Page 55: Psp Ice

- 55 -

CJS, CCS C-S zero-bias depl. cap. F 0VJS, PS C-S built-in potential Volt 0.75MJS, MS C-S junction exponential fact. 0FC depl. cap. forward-bias coeff. 0.5TF ideal forward transit time sec 0XTF coeff. for tf bias dependence 0VTF voltage of tf Vbc dependence Volt infiniteITFhigh-current param. for tf Amp 0PTF excess phase @ 1/(tf * 2 * pi) hz degrees 0TR ideal reverse transit time sec 0XTB fwd/rvs beta temp. coeff. 0KF flicker noise coefficient 0AF flicker noise exponent 1.0

The substrate node is optional. If not specified it defaults to ground. Positive current iscurrent flowing into a terminal. [(area) value] is the relative device area and defaults to1.0. For those model parameters which have 2 names, such as VAF and VA, eithername may be used.

The transistor is modeled as an intrinsic transistor with ohmic resistances in series withthe collector (value = RC / area), the base (value varies with current, see equationsbelow), and with the emitter (value = RE / area). In the following equations

Vbe = intrinsic base-intrinsic emitter voltageVbc = intrinsic base-intrinsic collector voltageVbx = extrinsic base-intrinsic collector voltageVce = intrinsic collector-intrinsic emitter voltageVcs = intrinsic collector-substrate voltageVt = thermal voltageT0 = nominal temperature (set with TNOM = . . . option)q = electron chargek = Boltzmann's constant

Other variables are from the model parameter list. These equations describe an npntransistor. For pnp devices, reverse the signs of all voltages and currents.

DC CurrentsIb = base current = area * (Ibe1 / BF + Ibe2 + Ibc1 / BR + Ibc2)Ic = collector current

= area * (Ibe1 / Kqb - Ibc1 / Kqb - Ibc1 / BR - Ibc2)Ibe1 = ideal b-e current = IS * (e(Vbe / NF*Vt) - 1)Ibe2 = non-ideal b-e current = ISE * (e(Vbe / NE*Vt) - 1)Ibc1 = ideal b-c current = IS * (e(Vbc / NR*Vt) - 1)Ibc2 = non-ideal b-c current = ISC * (e(Vbc / NC*Vt) - 1)

Kqb = (base majority-carrier charge) / (base majority-charge at zero bias)= Kq1 * (1 + sqrt[1 + 4 * Kq2]) / 2

Kq1 = (1 - Vbc / VA - Vbe / VB)-1

Page 56: Psp Ice

- 56 -

Kq2 = Ibe1 / IKF + Ibc1 / IKR

Rb = actual base parasitic resistanceFor IRB = 0

Rb = (RB + (RB - RBM) / Kqb) / areaFor IRB > 0

Rb = RB + (3 * RBM * tan[x] - x) / (tan2[x] * x)) / areax = (-1 + sqrt[1 + 14.59025 * Ib / IRB])/

(2.4317 * sqrt[Ib / IRB])

Capacitances

Note: all capacitances, except Cbx, are between terminals of the intrinsic transistor.That is, to the inside of the collector, base and emitter parasitic resistances.Cbx is between the intrinsic collector and the extrinsic base.

Cbe = base-emitter capacitance = area * (Cbet + Cbej)Cbet = transit time capacitance = tf * Gbe

tf = effective tf

= TF * (1+ XTF * e Vbc / (1.44 * VTF) * (1 + ITF / Ibe1)Gbe = dc b-e conductance = dIbe1/dVbe

For Vbe <= FC * VJECbej = CJE * (1 - Vbe/VJE)-MJE

For Vbe > FC * VJECbej = CJE * (1 - FC)-(1+MJE)

* (1 - FC * (1 + MJE) + MJE * Vbe / VJE)Cbc = base-collector capacitance = area * (Cbct + XCJC * Cbcj)

Cbct = transit time capacitance = TR * Gbc

Gbc = dc b-e conductance = dIbc1/dVbc

For Vbc <= FC * VJCCbcj = CJC * (1 - Vbc/VJC)-MJC

For Vbc > FC * VJCCbcj = CJC * (1 - FC)-(1+MJC)

* (1 - FC * (1 + MJC) + MJC * Vbc / VJC)Cbx = extrinsic base-intrinsic collector capacitance

For Vbx <= FC * VJCCbx = (1 - XCJC) * CJC * (1 - Vbx / VJC)-MJC

For Vbx > FC * VJCCbx = (1 - XCJC) * CJC * (1 - FC)-(1 + MJC) *

(1 - FC * (1 + MJC) + MJC * Vbx / VJC)Ccs = base-substrate capacitance

For Vcs <= FC * VJSCcs = CJS * (1 - Vcs/VJS)-MJS

For Vcs > FC * VJSCcs = CJS * (1 - FC)-(1+MJS)

* (1 - FC * (1 + MJS) + MJS * Vcs / VJS)

Temperature effects

IS(T) = IS * e(EG / N * Vt) * (T / To - 1) * (T / T0)(XTI / N)

N = 1

Page 57: Psp Ice

- 57 -

ISE(T) = ISE * e(EG / [NE * bf ] * Vt) * (T/To -1) * (T/T0)(XTI / [NE * bf])

ISC(T) = ISC * e(EG / [NC * bf ] * Vt) * (T/To -1) * (T/T0)(XTI / [NC * bf])

BF(T) = BF * bfBR(T) = BR * bf

bf = (T / T0)XTB

VJE(T) = VJE * (T/T0) - 2 * Vt * (1.5 * ln(T/T0) - (Eg/(2 * Vt -1.1150877 * Vt0))VJC(T) = VJC * (T/T0) - 2 * Vt * (1.5 * ln(T/T0) - (Eg/(2 * Vt -1.1150877 * Vt0))VJS(T) = VJS * (T/T0) - 2 * Vt * (1.5 * ln(T/T0) - (Eg/(2 * Vt -1.1150877 * Vt0))

where Eg = bandgap in silicon at TVt0 = thermal voltage at T0

CJE(T) = CJE * [1 + MJE * (.0004 * (T - T0) + [1 - VJE(T) / VJE])]CJC(T) = CJC * [1 + MJC * (.0004 * (T - T0) + [1 - VJC(T) / VJC])]CJS(T) = CJS * [1 + MJS * (.0004 * (T - T0) + [1 - VJS(T) / VJS])]KF(T) = KF * (PB[T] / PB)AF(T) = AF * (PB[T] / PB)The collector, base, and emitter parasitic resistances have no temperaturedependence.

Noise

The parasitic resistances generate thermal noise.

Ic2 = 4 * k * T/(RC /area)

Ib2 = 4 * k * T/Rb

Ie2 = 4 * k * T/(RE /area)

The base and collector currents generate shot and flicker noise:

Ib2 = 2 * q * Ib + KF * Ib

AF / fIc

2 = 2 * q * Ic + KF * IcAF / f

Page 58: Psp Ice

- 58 -

RESISTOR

General Forms

R<name> <(+)node> <(-)node> [(model) name] <value>

Examples

RLOAD 15 0 2KR2 1 2 2.4E4

Model Parameters Units Default

R resistance multiplier 1TC1 linear temperature coeff. /deg 0TC2 quadratic temp. coeff. /deg**2 0

The + and nodes define the polarity meant when the resistor has a positive voltageacross it. Positive current flows from the (+) node through the resistor to the (-) node.

If the [(model) name] is left out then <value> is the resistance in ohms.

If [(model) name] is specified, then <value> is multiplied by the value of the parameterR in the model to get the resistance.

<value> is normally positive, but can be set negative. It must not be set to zero.

Page 59: Psp Ice

- 59 -

TRANSMISSION LINE

General Forms

T<name> <(Port A +) node> <(Port A -) node>+ <(Port B +) node> <(Port B -) node>+ Z0 = <value> [TD = <value]+ [F = <value> [NL = <value>]]

Examples

TDELAY 15 0 30 40 Z0=50OHM 16T2 1 2 3 4 Z0=220 TD=111NST3 1 2 3 4 Z0=220 F=2.25MEGHZT4 1 2 3 4 Z0=220 F=4.5MEGHZ NL=0.5

The transmission line has 2 ports, A and B. The + and - nodes define the polarity of apositive voltage at a port. Positive current flows from the + node through the port to the- node.

Z0 is the characteristic impedance. The transmission line's length can be specifiedeither by TD, a delay in seconds, or by F and NL, a frequency and a relative wavelengthat F. NL defaults to 0.25 (F is then the quarter-wave frequency). Although TD and Fare both shown as optional, one of the 2 must be specified. Examples T2, T3, and T4 allspecify the same transmission line.

During transient (.TRAN) analysis the internal time step is limited to be no more than1/2 the smallest transmission delay, so short transmission lines will cause long runtimes.

Page 60: Psp Ice

- 60 -

INDEPENDENT VOLTAGE SOURCE

General Forms

V<name> <(+)node> <(-)node> [[DC] <value>]+ [AC <(magnitude) value> [(phase) value]+ [(transient specification) [PULSE][SIN][EXP]+ [PWL][SFFM]([value]*)]

ExamplesVBIAS 13 0 2.3VVAC 2 3 AC .001VACPHS 2 3 AC .001 90VPULSE 1 0 PULSE (-1V 1V 2NS 2NS 2NS 50NS 100NS)V3 26 77 DC .002 AC 1 SIN(.002 .002 1.5MEG)

Positive current flows from the (+) node through the source to the (-) node. The defaultvalue is zero for the DC, AC, and transient values. None, any, or all of DC, AC, andtransient values may be specified. The AC phase value is in degrees.

In the following descriptions of the available transient specifications TSTEP andTSTOP are the transient print step interval and the total analysis interval. They are setby the .TRAN statement. If present, the transient specification must be one of:

General Form

EXP(voff vpeak td tcr tr tfr)

Example

EXP(0 .2 1US 2US 40US 20US)

Parameters

name meaning default unitsvoff initial voltage none Voltsvpeak peak voltage none Voltstd delay 0 sectcr rise time constant TSTEP sectr rise time td + TSTEP sectfr fall time constant TSTEP sec

The EXP form causes the voltage to be voff for the first td seconds. Then, the voltagedecays exponentially from voff to vpeak with a time constant of tcr. The decay lasts tr

seconds. Then the voltage decays from vpeak back voff with a time constant tfr.

General Form

Page 61: Psp Ice

- 61 -

PULSE(v1 v2 vpeak td tr tf pw per)

Example

PULSE(-1V 1V 50US .1US .1US 2US 10US)

Parameters

name meaning default unitsv1 initial voltage none Voltsv2 pulsed voltage none Voltstd delay 0 sectr rise time TSTEP sectf fall time TSTEP secpw fall time constant TSTOP secper period TSTOP sec

The PULSE form causes the voltage to start at v1 and stay there for td seconds. Then,the voltage goes linearly from v1 to v2 during the next tr seconds. Then, the voltage staysat v2 for pw seconds. Then, it goes linearly from v2 back to v1 during the next tf

seconds. It stays at v2 for per-(tr + pw + tf) seconds, and then the cycle is repeatedexcept for the initial delay of td seconds.

General Form

PWL(t1 v1 t2 v2 . . . tn vn)

Example

PWL(0 -1V 1US 0V 10.1US 10V 20US 10V 20.1US 20V)

Parameters

name meaning default unitsti time at corner none secvi voltage at corner none Volts

The PWL form describes a piece-wise linear waveform. Each pair of time-voltagevalues specifies a corner of the waveform. The voltage at times between corners is thelinear interpolation of the voltages at the corners.

General Form

SFFM(voff vampl fc mod fm)

Example

Page 62: Psp Ice

- 62 -

SFFM(0 2V 10.1MEGH 5 4KH)

Parameters

name meaning default unitsvoff offset voltage none Voltsvampl ampl voltage none Voltsfc carrier frequency 1/TSTOP Hertzmod modulation index 0fm signal frequency 1/TSTOP Hertz

The SFFM (Single-Frequency FM) form causes the voltage to follow this equation:

V = voff + vampl * sine((2 * pi * fc * time) + mod * sine(2 * pi * fm * time))

General Form

SIN(voff vampl freq td df)

Example

SIN(0 .01 100KHZ 1MS 1E4)

Parameters

name meaning default unitsvoff offset voltage none Voltsvampl pulsed voltage none Voltsfreq frequency 1/TSTOP Hertztd delay 0 secdf damping factor 0 1/sec

The SIN form causes the voltage to start at 0 and stay there for td seconds. Then, thevoltage becomes an exponentially damped sine wave described by this equation:

V = voff + vampl * exp(- time - td) * df) * sine(2 * pi * freq* (time - td))

Page 63: Psp Ice

- 63 -

SUBCIRCUIT CALL

General Forms

X<name> [node]* <(subcircuit) name>

Examples

X12 100 101 200 201 DIFFAMPXBUFF 13 15 UNITAMP

<(subcircuit) name> is the name of the subcircuit's definition (see .SUBCKT statement).There must be the same number of nodes in the call as in the subcircuit's definition.

This statement causes the referenced subcircuit to be inserted into the circuit with thegiven nodes replacing the argument nodes in the definition. It allows you to define ablock of circuitry once and then use that block in several places.

Subcircuit calls may be nested. That is, you may have a call to a subcircuit A, whosedefinition contains a call to subcircuit B. The nesting may be to any level, but must notbe circular. For instance, if subcircuit A's definition contains a call to subcircuit B, thensubcircuit B's difinition must not contain a call to subcircuit A.

Page 64: Psp Ice

- 64 -

AC ANALYSIS

General Forms

.AC [LIN][OCT][DEC] <(points) value>+ <(start freq.) value> <(end freq.) value>

Examples

.AC LIN 101 100HZ 200HZ

.AC OCT 10 1KHZ 16KHZ

.AC DEC 20 1MEG 100MEG

The AC analysis calculates the frequency response of a circuit over a range offrequencies. [LIN], [OCT], or [DEC} specify the type of sweep and <(points) value>the number of points in the sweep:

1) [LIN] Linear sweep. The frequency is sweept linearly from the starting to theending frequency. (points) is the total number of points in the sweep.

2) [OCT] Sweep by octaves. The frequency is swept logarithmically by octaves.(points) is the number of points per octave.

3) [DEC] Sweep by decades. The frequency is swept logarithmically by decades.(points) is the number of points per decade.

Exactly one of [LIN], [OCT], [DEC] must be specified.

<(end freq.) value> must not be less than <(start freq.) value> which in turn must begreater than (and not equal to) 0. The whole sweep may specify only one point if youwish.

The frequency response is calculated by linearizing the circuit around the bias point. Allindependent voltage and current sources which have AC values are inputs to the circuit..PRINT and .PLOT statements must be used to output the results.

If you specify group delay ("G" suffix) as an output you must be sure that the frequencysteps are close enough together that the phase of that output changes smoothly from onefrequency to the next. Group delay is calculated by subtracting the phases of successiveoutputs and dividing by the frequency increment.

Page 65: Psp Ice

- 65 -

DC ANALYSIS

General Forms

.DC <(SOURCE) name> <(start) value> <(end) value>+ <(increment) value+ [(source) name] [(start) value] [(end) value]+ [(increment) value]

Examples

.DC VIN -0.25 0.25 0.05

.DC I2 5MA -2MA .1MA

.DC VCE 0 10 .5 IB 0 1MA 50UA

The .DC statement causes a DC sweep analysis to be performed on the circuit. The DCsweep analysis calculates the circuit's bias point over a range of source input values.<(source) name> can be any independent voltage or current source. During the DCsweep the source's value is set by the sweep, overrinding its DC value.

<(start) value> may be greater or less than <(end) value>. That is, the sweep may go ineither direction. <(increment) value> must not be 0 or negative.

A nested sweep is available. A 2nd source, start, end, and increment values may beplaced after the 1st sweep. In this case the first sweep will be the "inner" loop. The firstsweep will be done for each value of the second sweep. The rules for the values in thesecond sweep are the same as for the first. The second sweep generates an entire printtable or plot for each value of the sweep.

.PRINT and .PLOT statements must be used to get the results of the DC sweep analysis.

Page 66: Psp Ice

- 66 -

END OF CIRCUIT

General Forms

.END

Examples

.END

The .END statement marks the end of the circuit. All the data and commands mustcome before it. When the .END statement is reached, PSpice does all the specifiedanalysis on the circuit.

There may be more than one circuit in an input file. Each circuit and its commands aremarked by a .END statement. PSpice processes all the analysis for each circuit beforegoing on to the next one. Everything is reset at the beginning of each circuit. Havingseveral circuits in one file gives the same results as having then in separate files andrunning each one separately. This is a convenient way to arrange a set of runs to bedone overnight.

The last statement in an input file must be a .END statement.

Page 67: Psp Ice

- 67 -

END OF SUBCIRCUIT DEFINITION

General Forms

.ENDS [(subcircuit) name]

Examples

.ENDS

.ENDS OPAMP

The .ENDS statement marks the end of a subcircuit definition (started by a .SUBCKTstatement). It is good practice to repeat the subcircuit name although this is notrequired.

Page 68: Psp Ice

- 68 -

FOURIER ANALYSIS

General Forms

.FOUR <(freq.) value> <(output variable)>*

Examples

.FOUR 100KHZ V(5) V(6,7) I(VSENS3)

The fourier analysis performs a decomposition into fourier components the result(s) of atransient analysis. A .FOUR statement requires a .TRAN statement.

<(output) variable> is an output variable of the same form as in a .PRINT or .PLOTstatement for a transient analysis. The fourier analysis is done by starting with the resultsof the transient analysis for the specified output variables. From these voltages/currentsthe dc component, the fundamental, and the 2nd through 8th harmonics are calculated.The fundamental frequency is <(freq.) value>. Not all of the transient results are used,only the interval from the end back to 1/<(freq.) value> before the end is used. Thismeans that the transient analysis must be at least 1/<(freq.) value> seconds long.

The .FOUR analysis does not require .PRINT or .PLOT statements. The results areoutput as the analysis is done.

Page 69: Psp Ice

- 69 -

INITIAL TRANSIENT CONDITIONS

General Forms

.IC <V(<node>)=<value>>*

Examples

.IC V(2)=3.4 V(102)=0 V(3)=-1V

The .IC statement is used to set initial conditions for transient analysis. Each <value> isa voltage which is assigned to <node> for the duration of the bias point calculation forthe transient analysis. After the bias point has been calculated and the transient analysisstarted, the node is "released".

The .IC sets initial conditions for the transient analysis only. It does not affect theregular bias point calculation or the DC sweep.

Page 70: Psp Ice

- 70 -

MODEL

General Forms

.MODEL <name> <(type) name>+ ([<(parameter) name>=<value>]*)

Examples

.MODEL RMAX RES (R=1.5 TC1=.02 TC2=.005)

.MODEL DNOM D (IS=1E-9)

.MODEL DRIV NPN (IS=1E-7 BF=30)

.MODEL DLOAD NMOS (LEVEL=1 VTO=.7 CJ=.02PF)

The .MODEL statement defines a set of device parameters which can be referenced bydevices in the circuit. <name> is the model name which devices use to reference aparticular model. <name> must start with a letter. It is good practice to make this thesame letter as the device name (e. g., D for diode, Q for bipolar transistor) but this is notrequired.

<(type) name> is the device type and must be one of:RES resistorCAP capacitorIND inductorD diodeNPN npn bipolar transistorPNP bipolar transistorNJF n-channel junction FETPJF p-channel junction FETNMOS n-channel MOSFETPMOS p-channel MOSFET

Devices can only reference models of the correct type. A JFET can reference a model oftypes NJF or PJF but not of type NPN. There can be more than one model of the sametype in a circuit, although they must have different names.

Following <(type) name> is a list of parameter values enclosed by parenthesis. None,any, or all parameters may be assigned values. Default values are used for allunassigned parameters. The lists of parameter names, meanings, and default values arelocated in the individual device descriptions.

Page 71: Psp Ice

- 71 -

NODESET

General Forms

.NODESET <V(<node>)=<value>>*

Examples

.NODESET V(2)=3.4 V(102)=0 V(3)=-1V

The .NODESET statement helps calculate the bias point by providing initial guesses forsome nodes. Some or all of the circuit's nodes may be given initial guesses. It iseffective for the regular bias point and the bias point for transient analysis. It has noeffect during the DC sweep or during the transient analysis itself.

Unlike the .IC statement, .NODESET only provides an initial guess for some nodevoltages. It does not clamp those nodes to the specified voltages. However, byproviding an initial guess, .NODESET may be used to "break the tie" in, for instance, aflip-flop, and make it come up in a desired state.

Page 72: Psp Ice

- 72 -

NOISE ANALYSIS

General Forms

.NOISE V(<node>[,<node>]) <name> [(interval) value]

Examples

.NOISE V(5) VIN

.NOISE V(10) VSRC 20

The .NOISE statement causes a noise analysis of the circuit to be done. Noise analysisis done in conjunction with AC analysis and requires there to be a .AC statement.

V(<node>[,<node>]) is an output voltage. It has a form such as V(5), which is thevoltage at an output node, or a form such as V(4,5), which is the output voltage across 2nodes. <name> is the name of an independent voltage source at which the equivalentinput noise will be calculated. <name> is not itself a noise generator, but only a place atwhich to calculate the equivalent input noise.

The noise-generating devices in a circuit are the resistors and the semiconductordevices. For each frequency of the AC analysis each noise generator's contribution iscalculated and propagated to the output voltage. There, all the propagated noise valuesare rms-summed. The gain from the input source to the output voltage is also computedand from it and the total output noise an equivalent input noise is calculated.

If [(interval) value] is present, then it is the print interval. Every nth frequency, where nis the print interval, a detailed table is printed showing the individual contributions of allthe circuit's noise generators to the total noise at the output. If [(interval) value] is notpresent, then no detailed table is printed.

The detailed table is printed while the analysis is being done, and does not need .PRINTor .PLOT statements. The output noise and equivalent input noise may be output with.PRINT or .PLOT statements if desired. Noise analysis is the only analysis for whichyou have a choice about using the .PRINT or .PLOT statements.

Page 73: Psp Ice

- 73 -

BIAS POINT

General Forms

.OP

Examples

.OP

The .OP statement causes detailed information about the bias point to be printed. Thebias point is calculated whether or not there is a .OP statement. Without a .OPstatement the only information about the bias point which is output is a list of the nodevoltages.

With a .OP statement the currents and power dissipation of all the voltage sources areprinted. Also the small signal (linearizad) parameters of all the non-linear controlledsources and all the semiconductor devices are output.

The .OP statement controls output for the regular bias point only. The .TRAN statementcontrols output for the transient analysis bias point.

Page 74: Psp Ice

- 74 -

OPTIONS

General Forms

.OPTIONS [(option) name]* [<(option) name>=<value>]*

Examples

.OPTIONS NOECHO NOMODE DEFL=12U DEFW=8U+ DEFAD=150P DEFAS=150P.OPTIONS ACCT RELTOL=.01

The .OPTIONS statement is used to set all the options, limits, and control parametersfor the various analysis except for the output width (see the .WIDTH statement).

The options are simply listed in any order. There are 2 kinds of options: those withvalues and those without. The options without values are flags of various kinds andsimply listing the option name is sufficient.

The table below lists the flag options. The default for any flag option is "off" (i.e., theopposite of specifying the option).

Option Meaning

NOPAGE suppresses paging and printing of a banner for each major section ofoutput

NOECHO suppresses listing of the input fileNODE causes output of net list (node table)NOMOD suppresses listing of model parametersLIST causes summary of all circuit elements (devices) to be outputOPTS causes values for all options to be outputACCT summary and accounting information is output at the end of all the

analysis

The table below lists the options with values and their defaults.

Option Meanining Units Default

DEFL default length (L) for MOSFET's meter 100uDEFW default width (W) for MOSFET's meter 100uDEPAD default drain area (AD) for MOSFET's m**2 0DEFAS default source area (AS) for MOSFET's m**2 0TONOM default temperature; also temperature deg. C 27

at which model parameters are assumedto have been measured

NUMDGT no. digits output in print tables 4CPTIME cpu time allowed for this circuit sec 1E6

Page 75: Psp Ice

- 75 -

LIMPTS max. points allowed for any print table 201or plot

ITL1 DC and bias point "blind" iteration limit 40ITL2 DC and bias point "educated guess" 20

iteration limitITL4 iteration limit at any point in 10

transient analysisITL5 total iteration limit for all points in 5000

transient analysis (ITL5=0 is thesame as ITL5=infinite)

RELTOL relative accuracy of voltages and currents .001TRTOL transient analysis accuracy adjustment 7.0ABSTOL best accuracy of currents Amp 1pACHGTOL best accuracy of charges Coulomb .01pCVNTOL best accuracy of voltages Volt 1uVPIVREL relative magnitude required for pivot 1E-3

in matrix solutionPIVTOL absolute magnitude required for pivot 1E-13GMIN minimum conductance used for 1/Ohm 1E-12

branch

Page 76: Psp Ice

- 76 -

PLOT

General Forms

.PLOT [DC][AC][NOISE][TRAN] [[(output variable)]*+ ([(lower limit) <value>,<(upper limit) value>]]*

Examples

.PLOT DC V(3) V(2,3) V(R1) I(VIN) I(R2) IB(Q13) VBE(Q13)

.PLOT AC VM(2) VP(2) VM(3,4) VG(5) VDB(5) IR(6) II(7)

.PLOT NOISE INOISE ONOISE DB(INOISE) DB(ONOISE)

.PLOT TRAN V(3) V(2,3) (0,5V) ID(M2) I(VCC) (-50MA,50MA)

The .PLOT statement allows results from DC, AC, noise, and transient analysis to beoutput in the form of "line printer" plots. These plots are made by using characters todraw the plot, hence will work with any kind of printer.

[DC], [AC], [NOISE], and [TRAN] are the analysis types which can be output with.PLOT statements. Exactly one analysis type must be specified.

Following the analysis type is a list of the output variables and (possibly) y-axis scales.A maximum of 8 output variables are allowed on the .PLOT statement. However, ananalysis may have any number of .PLOT statements. See section 6.4 for a description ofthe possible output variables.

The range and increment of the x-axis is fixed by the analysis being plotted. The y-axixdefaults to a "nice" range determined by the ranges of the output variables. If differentoutput variables differ considerably in their output ranges, then the plot is given morethan one y-axis with ranges corresponding to the different output variables. The rangeof the y-axis can be set by adding (<(lower limit) value>,<(upper limit) value>) at theend of the .PLOT statement. This will force all output variables onto the same y-axixwith the specified range. The same form, (<(lower limit) value>,<(upper limit) value>),can also be inserted one or more times in the middle of a set of output variables. Eachoccurrence defines one y-axis with the specified range. All the output variables whichcome between it and the next range to the left in the .PLOT statement are put on itscorresponding y-axis. In example 4 the 2 voltage outputs go on the y-axis with range(0,5V) and the 2 current outputs go on the y-axis with range (-50MA,50MA).

Page 77: Psp Ice

- 77 -

PRINT

General Forms

.PRINT [DC][AC][NOISE][TRAN] [[(output variable)]*

Examples

.PRINT DC V(3) V(2,3) V(R1) I(VIN) I(R2) IB(Q13) VBE(Q13)

.PRINT AC VM(2) VP(2) VG(5) VDB(5) IR(6) II(7)

.PRINT NOISE INOISE ONOISE DB(INOISE) DB(ONOISE)

.PRINT TRAN V(3) V(2,3) ID(M2) I(VCC)

The .PRINT statement allows results from DC, AC, noise, and transient analysis to beoutput in the form of tables, referred to as print tables.

[DC], [AC], [NOISE], and [TRAN] are the analysis types wich can be output with.PRINT statements. Exactly one analysis type must be specified.

Following the analysis type is a list of the output variables. A maximum of 8 outputvariables are allowed on one .PRINT statement. However, an analysis may have anynumber of .PRINT statements. See section 6.4 for a description of the possible outputvariables.

The values of the output variables are printed as a table with each column correspondingto one output variable. The number of digits which are printed for each value can bechanged by the NUMDGT on the .OPTIONS statement.

Page 78: Psp Ice

- 78 -

PROBE

General Forms

.PROBE

.PROBE [(output variables)]*

Examples

.PROBE

.PROBE V(3) V(2,3) V(R1) VM(2) VP(2) I(VIN) I(R2)+ IB(Q13) VBE(Q13) VDB(5)

The .PROBE statement writes the results from DC, AC, and transient analysis to a datafile named PROBE.DAT for use by the Probe graphics post-processor. See chapter 8for a description of Probe and its use of the PROBE.DAT file.

The first form (with no output variables) writes all the node voltages and all the devicecurrents to the data file. The list of device currents written is the same as the devicecurrents allowed as output variables as described in section 6.4 (e.g., ID(M1) is allowedfor transient analysis but not for AC analysis).

The second form writes only those output variables specified to the data file. Note thatunlike the .PRINT and .PLOT statements there is no analysis name before the outputvariables. Also, the number of output variables is not restricted to 8. See section 6.4 fora description of the possible output variables. This form is intended for users without afixed disk who need to limit the size of the PROBE.DAT file written.

Page 79: Psp Ice

- 79 -

SENSITIVITY ANALYSIS

General Forms

.SENS <(output variables)>*

Examples

.SENS V(9) V(4,3) V(17) I(VCC)

The .SENS statement causes a DC sensitivity analysis to be performed. <(outputvariable)> has the same format and meaning as in the .PRINT statement for DC andtransient analysis. However, in the case of <(output variable)> being a current, it isrestricted to be the current through a voltage source. By linearizing the circuit about thebias point, the sensitivities of each of the output variables to all the device values andmodel parameters will be calculated and output. This can easily generate huge amountsof output.

Page 80: Psp Ice

- 80 -

SUBCIRCUIT DEFINITION

General Forms

.SUBCKT <name> [node]*

Examples

.SUBCKT OPAMP 1 2 101 102

The .SUBCKT statement begins the definition of a subcircuit. The definition is endedwith a .ENDS statement. All the statements between .SUBCKT and .ENDS areincluded in the definition. Whenever the subcircuit is called, by a X . . . statement, allthe statements in the definition replace the calling statement.

<name> is the subcircuit's name and is used by a X . . . statement to reference thesubcircuit. It must start with a letter.

[node]* is an optional list of nodes. There must be the same number of nodes in thesubcircuit calling statements an in its definition. When the subcircuit is called, theactual nodes (the ones in the calling statement) replace the argument nodes (the ones inthe defining statement).

Subcircuit definitions may be nested. That is, a .SUBCKT statement may appear in thestatements between a .SUBCKT and a .ENDS. However, this is not recommended.Subcircuit calls may also be nested. That is, a X . . . statement may appear between a.SUBCKT and a .ENDS. This is recommended.

Subcircuit definitions should only contain device statements (statements without aleading ".") and possibly .MODEL statements. Models are available within thesubcircuit definition in which they appear and any nested subcircuit definitions. So, if a.MODEL statement appears in the main circuit, that model is available in the maincircuit an all subcircuits.

Page 81: Psp Ice

- 81 -

TEMPERATURE

General Forms

.TEMP <(temperature) value>*

Examples

.TEMP 125

.TEMP 0 27 125

The .TEMP statement sets the temperature at which all analysis are done. Thetemperatures are in degrees centigrade. If more than one temperature is given, then allanalysis are done for each temperature.

It is assumed that the model parameters were measured or derived at the nominaltemperature. The nominal temperature is 27 deg. C unless set otherwise by the TNOMoption in the .OPTIONS statement.

Page 82: Psp Ice

- 82 -

TRANSFER FUNCTION

General Forms

.TF <(output variable)> <(input voltage source) name>

Examples

.TF V(5) VIN

.TF V(15,14) I(VDRIV)

The .TF causes the small-signal transfer function to be calculated by linearizing thecircuit around the bias point. <(output variable)> has the same format and meaning asin the .PRINT statement. However, in the case of <(output variable)> being a current, itis restricted to be the current through a voltage source. The gain from <(input voltagesource) name> to <(output variable)> will be output along with the input and outputresistances. The output is done as soon these quantities are calculated and does notrequire .PRINT or .PLOT statements.

Page 83: Psp Ice

- 83 -

TRANSIENT ANALYSIS

General Forms

.TRAN[/OP] <(print step) value> <(final time) value>+ [(noprint) value [(step ceiling) value]]

Examples

.TRAN 1NS 100NS

.TRAN/OP 1NS 100NS 20NS

.TRAN 1NS 100NS 0NS .1NS

The .TRAN statement causes a transient analysis to be performed on the circuit. Thetransient analysis calculates the circuit's behaviour over time, starting at time 0 andgoing to <(final time) value>.

The transient analysis uses an internal time step which is adjusted as the analysisproceeds. Over intervals where there is little activity, the internal time step is increasedand during busy intervals it is decreased. <(print step) value> is the time interval usedfor printing or plotting the results of the transient analysis. It is also a ceiling on theinternal time step. Since the results are computed at different times than they areprinted, a second-order polynomial interpolation is used to obtain the printed values.

The transient analysis always starts at time 0. However it is possible to suppressprinting of a portion of the analysis. [(noprint) value] is the amount of time from time 0which is not printed.

Sometimes one is concerned about the size of the internal time step. [(step ceiling)value] allows a ceiling smaller than the print interval to be put on the internal time step.If [(step ceiling) value] is larger than the print interval, it is ignored.

Prior to doing the transient analysis, PSpice computes a bias point for the circuitseparate from the regular bias point. This is done because the independent sources canhave different values at the start of a transient analysis than their DC value. Normallyonly the node voltages are printed for the transient analysis bias point. However, the/OP suffix on the .TRAN keyword will cause the same detailed printing of the bias pointthat the .OP statement causes for the regular bias point.

.PRINT and .PLOT statements must be used to get the results of the transient analysis.

Page 84: Psp Ice

- 84 -

WIDTH

General Forms

.WIDTH OUT=<value>

Examples

.WIDTH OUT=80

.WIDTH OUT=132

The .WIDTH statement sets the width of the output. <value> is in columns and must beeither 80 (the default) or 132.

Page 85: Psp Ice

- 85 -

COMMENT

General Forms

*(text)Examples

* This is an example of a comment

A statement beginning with "*" is a comment and has no effect. The use of commentstatements throughout the input is recommended. For instance, it is good practice toplace a comment just before a subcircuit definition to identify the nodes:

* +IN -IN V+ V- +OUT -OUT.SUBCKT OPAMP 100 101 1 2 200 201

Page 86: Psp Ice

- 86 -

6.4 Output Variables

This section describes the types of output variables allowed in .PRINT and .PLOTstatements. Each .PRINT or .PLOT statement may have up to 8 output variables.

6.4.1 DC Sweep and Transient Analysis

For the DC sweep and transient analysis these are the available output variables:

General form Meaning

V(<node>) voltage at nodeV(<(+)node>,<(-)node>) voltage across (+) and (-) nodesV(<name>) voltage across 2-terminal deviceVx(<name>) voltage at a terminalVxy(<name>) voltage across a pair of terminalsVz(<name>) voltage at one end of a transmission lineI(<name>) current through <name>Ix(<name>) current into a terminalIz(<name>) current at one end of a transmission line

Examples Meaning

V(3) voltage between node 3 and groundV(3,2) voltage between nodes 3 and 2V(R1) voltage across resistor R1VB(Q3) voltage between base of transistor

Q3 and groundVGS(M13) gate-sourse voltage of M13VA(T2) voltage at port A of T2I(D5) current through diode D5IG(J10) current into gate of J10

Page 87: Psp Ice

- 87 -

For the V(<name>) and I(<name>) forms, <name> must be a 2-terminal device. Theseare the 2-terminal devices:

1st Letter Device

C CapacitorD DiodeE Voltage-controlled voltage sourceF Current-controlled current sourceG Voltage-controlled current sourceH Current-controlled voltage sourceI Independent current sourceL InductorR ResistorV Independent voltage source

For the Vx(<name>), Vxy(<name>) and Ix(<name>) forms, <name> must be a 3 or 4-terminal device name and x and y must each be a terminal abbreviation. These are thedevices and the terminals:

1st Letter Device Terminals

J Junction FET D (drain)G (gate)S (source)

M MOSFET D (drain)G (gate)S (source)B (bulk, substrate)

Q Bipolar transistor C (collector)B (base)E (emitter)S (substrate)

For the Vz(<name>) and Iz(<name>) forms, <name> must be the name of atransmission line (begins with "T") and z must be "A" or "B". "A" means port A (thefirst 2 nodes) and "B" means port B (last 2 nodes).

Page 88: Psp Ice

- 88 -

6.4.2 AC Analysis

For AC analysis, the output variables listed in section 6.4.1 are augmented by adding asuffix. These are the available suffixes:

Suffix Meaning

(none) magnitudeM magnitudeDB magnitude in decibelsP phaseG group delay (-d[phase]/d[frequency])R real partI imaginary part

Examples Meaning

V(2,3) magnitude of voltage across nodes 2 & 3VM(2) magnitude of voltage at node 2VDB(R1) db magnitude of voltage across R1VBEP(Q3) phase of base-emitter voltage at Q3IAG(T2) group delay of current at port A of T2IR(VIN) real part of current through VINII(R13) imaginary part of current through R13

Not as many types of current outputs are available as for DC and transient analysis.Specifically, currents through these devices only are availablle:

1st Letter Device

R ResistorC CapacitorI Independent current sourceL InductorT Transmission lineV Independent voltage source

For the other devices, you must put a zero-valued voltage source in series with thedevice (or terminal) of interest. Then, print (or plot) the current through this voltagesource.

Page 89: Psp Ice

- 89 -

6.4.3 Noise Analysis

For noise analysis, the output variables are predefined.

Output variable Meaning

INOISE ONOISE equivalent at input nodeONOISE total rms summed noise at output nodeDB(INOISE) INOISE in decibelsDB(ONOISE) ONOISE in decibels

The noise from any one device cannot be .PRINT'd or .PLOT'd. However, you can usethe print interval on the .NOISE statement to output this information.

Page 90: Psp Ice

- 90 -

6.5 Job Statistics Summary

If you specify the ACCT option on the .OPTIONS statement, PSpice will print variousstatistics about the run at its end. This section lists the items printed and theirmeanings. The list follows the format of the output, going from left to right and thendown to the next line.

Item's Name Meaning

NUNODS Number of distinct nodes in circuit beforesubcircuit expansion.

NCNODS Number of distinct nodes in circuit afersubcircuit expansion. If there are no subcircuitsthen NCNODES will be the same as NUNODES.

NUMNOD Total number of distinct nodes in circuit.This is NCNODS plus the internal nodes generatedby parasitic resistances. If no device hasparasitic resistances then NUMNOD=NCNODS.

NUMEL Total number of devices (elements) in circuitafter subcircuit expansion. This includesall statements which do not begin with "."or "X".

DIODES Number of diodes after subcircuit expansion.BJTS Number of bipolar transistors after subcircuit

expansion.JFETS Number of junction FET's after subcircuit

expansion.MFETS Number of MOSFET's after subcircuit expansion.NUMTEM Number of different temperatures.ICVFLG Number of steps of DC sweep.JTRFLG Number of print steps of transient analysis.JACFLG Number of steps of AC analysis.INOISE 1/0: noise analysis was/was not done.NOGO 1/0: run had/had not have an error.NSTOP The circuit matrix is conceptually (not

physically) of dimension NSTOP x NSTOP.NTTAR Actual number of entries in circuit matrix

at beginning of run.NTTBR Actual number of entries in circuit matrix

at end of run.NTTOV Number of terms in circuit matrix which

come from more than 1 device.IFILL Difference between NTTAR and NTTBR.IOPS Number of floating-point operations needed

to do one solution of circuit matrix.PERSPA Percent sparsity of circuit matrix.NUMTTP Number of internal time steps in transient

analysis.

Page 91: Psp Ice

- 91 -

NUMRTP Number of times in transient analysis thata time step was too large and had to becut back.

NUMNIT Total number of iterations for transientanalysis.

MEMUSE/MAXMEM Amount of circuit memory used/availablein bytes. There are 2 memory pools. Exceedingeither one will abort the run.

COPYKNT Number of bytes which were copied in thecourse of doing memory management for this run.

READIN Time spent reading and error checking theinput file.

SETUP Time spent setting up the circuit matrixpointer structure.

DCSWEEP Time spent and iteration count for calculatingDC sweep.

BIASPNT Time spent and iteration count for calculatingbias point and bias point for transientanalysis.

MATSOL Time spent solving circuit matrix (thistime is also included in each analysis'time). The iteration count is the numberof times the rows or columns were swappedin the course of solving it.

ACAN Time spent and iteration count for AC analysis.TRANAN Time spent and iteration count for transient

analysis.OUTPUT Time spent preparing .PRINT tables and .PLOT

plots.LOAD Time spent evaluating device equations (this

time is also included en each analysis' time).OVERHEAD Other time spent during run.TOTAL JOB TIME Total run time excluding the time to load

the files PSPICE1.EXE and PSPICE2.EXE intomemory.

Page 92: Psp Ice

- 92 -

Chapter 7

HINTS

7.1 Large Circuits

The entire description of a circuit must fit into RAM during all the analysis. However,none of the results of any analysis are stored in RAM. All results, includingintermediate results for .PRINT's and .PLOT's, go to the output file or one of thetemporary files. So, whether your run will fit into RAM depends only on how big it is,not on how long your analysis are.

You can get an idea of sizes by using ACCT option on the .OPTIONS statement andlooking at the MAXMEM and MEMUSE numbers printed at the end of runs which ransuccessfully. MAXMEM is the amount of memory available and MEMUSE is the peakmemory usage of that circuit. There are 2 memory pools. The size of the first pool isfixed; the size of the 2nd pool depends on how much available memory your system has.If either pool is exceeded then your circuit will not run.

If your circuit does not fit there are several possible remedies:

1) Break it up into pieces and run the peces separately.2) Reduce the amount memory taken up by DOS and other resident software. This

might mean deleting a print spooler and/or reducing the buffer count in theCONFIG.SYS file from 10 to 4.

3) Buying more memory.

Remedies (2) and (3) are only effective if the 2nd memory pools is the one beingexceeded. Since the size of the first memory pool is fixed, increasing the amount ofavailable memory will not expand it any.

7.2 Large Outputs

If you have a run with several circuits, or for several temperatures, or one which uses thesensitivity analysis, it is possible for it to generate a large output file. If you have an XTthis will not be a problem. If you have a PC, however, it is possible to fill up thediskette containing the output file.

The best solution for this is to direct the output to the printer instead of a file. If this isnot feasible, then it is still possible to improve the situation by directing the output to amempty diskette instead of the one containing PSPICE1.EXE. To do this, you mustexecute PSPICE1.EXE and PSPICE2.EXE manually instead of using PSPICE.BAT.You will want to put the input file on Diskette 1, but direct the output to drive B:. Forinstance:

Page 93: Psp Ice

- 93 -

B:A:PSPICE1 A:FF12 B:FF12

while Diskette 1 (with FF12.CIR) is in drive A: and an empty diskette is in drive B:.When PSPICE1.EXE is done it will come back with the DOS prompt. Now removeDiskette 1 from drive A: and replace it with Diskette 2 and type:

A:PSPICE2

PSPICE2.EXE will continue to write output to B:FF12.OUT.

The purpose of the command "B:" is to change the default diskette from A: to B:. Thiswill make PSpice put its temporary files on the diskette in drive B: instead of A:. Thetemporary files cannot be on drive A: since you change diskettes there in the middle ofthe run.

7.3 Convergence Problems

The DC sweep, bias point calculation, and transient analysis all use iterative algorithms.These algorithms start with a set of node voltages and, each iteration, calculate a new setwhich, hopefully, will be closer to a solution of Kirchoff's voltage and current laws. Inother words, an ititial guess is used and successive iterations are supposed to convergeto the solution.

If the iterations do not converge onto a solution, then the analysis fails. The DC sweepskips the remaining points in the sweep. Failure of the bias point calculation preventsthe analysis (e.g., AC, sensitivity, etc.) which depend on it from being done. Thetransient analysis skips the remaining time.

PSpice will succesfully analyse most circuits. Considerable effort has gone intoremoving problems which prevented analysis of known problem circuits. However,there are no guarantees.

If an analysis fails for your circuit, what to do?

7.3.1 DC Sweep

The most common cause of failure of the DC sweep analysis is an attempt to analyse acircuit with regenerative feedback, for instance a Schmidt trigger. There is an easysolution for this problem: don't do this. The DC sweep is not appropriate for calculatingthe hysteresis of such circuits because it is required to jump discontinuously from onesolution to another at the crossover point.

Instead, use transient analysis. Use PWL to generate a very slow ramp, say 1 second.There is no cpu-time penalty for this because PSpice will adjust the internal time step tobe large away from the crossover point and small in that region. By using a very slowramp, you are assured that the switching time of the circuit will not affect hysteresis

Page 94: Psp Ice

- 94 -

levels. In effect, you are doing the same as you would in the lab: slowly changing theinput voltage until the circuit switches.

There is a fringe benefit: for hysteresis measurements you normally want both theupward and downward switching levels. With DC sweep, you must do 2 runs: onesweeping upward and one downward. But with a PWL source in transient analysis, youcan sweep it upward and then back down again in one analysis.

7.3.2 Bias Point

The best aid for problems in calculating the bias point is the .NODESET statement. Bygiving PSpice "hints" in the form of initial guesses for node voltages, it starts out thatmuch closer to the solution. A little judgement must be used in assigning node voltages.If you know the correct voltages to within, say, 1/2 volt, then assigning the input node toan opamp would be useless, whereas assigning its output node would help.

It is rare to have a convergence problem in the bias point calculation. This is becausePSpice contains an algorithm for automatically scaling the power supplies if it is havingtrouble finding a solution. This algorithm first tries to find a bias point with the powersupplies at full scale. If there is no convergence, then the power supplies are cut back tohalf strength and the program tries again. If there is still no convergence, then thesupplies are cut by another factor of 2 to quarter strength, and so on. Since, at powersupplies = 0, the circuit definitely has a solution (all nodes at 0 volts), the program willfind a solution for some value of the supplies scaled far enough back. It then uses thatsolution to help it work its way back up to a solution with the power supplies at fullstrength.

You can see on the CRT when this algorithm is in effect. If the message:

Power supplies cut back to 50%

(or some other percentage) appears on the CRT while the program is calculating the biaspoint, then it is using this algorithm to find the bias point of a stubborn circuit.

7.3.3 Transient Analysis

There are only a few remedies available for this one. Try setting ITL4=40 in an.OPTIONS statement. Try also relaxing RELTOL from .001 to .01.

7.3.4 We Want to Know

Much effort has already gone into weeding out sources of convergence problems andthat effort will continue. If you run into a problem, we would like to know about it.Without examples of convergence problems, no progress can be made.

To help us in this effort, please copy the input and output files of a problem run onto adiskette and mail it to MicroSim. Your diskette will be returned immediately. It willalso help if you can accompany the diskette with a schematic of the circuit. All

Page 95: Psp Ice

- 95 -

problems examples received will be considered proprietary to the sender andconfidential. Unfortunately, it takes a lot of time to track down and fix the source of aconvergence problem. In general, it will not be solved in time to help the design of thecircuit which shows the problem.

7.4 Negative Component Values

In general, resistors, capacitors, and indutctors should have positive values. However,there are cases when negative component values are desired. This occurs most often infilter design when one analyses an RLC circuit which is equivalent to a real circuit. Inthe transformation from the real to the RLC equivalent, one can end up with negativecomponents.

PSpice allows you to specify negative values for resistors, capacitors, and inductors. Ithas no special difficulty finding a bias point for such a circuit, or for doing a dc sweep.The .AC and .NOISE analysis are also happy with negative components. In the case ofresistors, their noise contribution comes from the absolute value of their value(components are not allowed to generate negative noise).

However, the transient analysis may fail for a circuit with negative components. Theymay create instabilities in time, specially negative capacitors and inductors, which theanalysis cannot handle. For transient analysis: caveat emptor.

In all cases, components must not be given a value of zero.

7.5 Multiple Circuits in an Input File

Sometimes it is desired to set up a job which will do more than one circuit without yourintervention. For instance, you might like to run a set of circuits overnight.

This can be done by putting more than one circuit into one input file. Each circuit endswith a .END statement and begins with a title statement, just as usual. PSPICE1.EXEwill read through all the circuits in the input file and then PSPICE2.EXE will processeach one in sequence. The output file will contain the outputs from each circuit in thesame order as they appeared in the input file. The effect is the same as if you had runeach circuit separately and then concatenated all the outputs.

Page 96: Psp Ice

- 96 -

Chapter 8

PROBE

8.1 Introduction

Probe is the graphics post-processor for PSpice. Probe lets you look at various results ofa simulation using graphics, both on the display and on hard copy. In effect, Probe is a"software oscilloscope". Running PSpice corresponds to building or changing abreadboard, and running Probe corresponds to looking at the breadboard with anoscilloscope.

8.2 Installation

If you purchased Probe, then you received a diskette labeled "Diskette 3" or "Diskette 4"which contains these files:

PROBE.BATPROBE.FLPPROBE.DEVPROBE.EXE

Installing Probe consists of steps similar to those in chapter 2 for installing PSpice.

8.2.1 If You Have a Fixed Disk

Copy PROBE.EXE into the same directory which contains PSPICE1.EXE andPSPICE2.EXE. Copy PROBE.DEV into the same directory which contains the circuit(.CIR) file that you are running on PSpice. Also, replace the contents of PSPICE.BATon your fixed disk with the contents of PROBE.BAT:

COPY A:PROBE.BAT PSPICE.BAT

8.2.2 If You Do Not Have a Fixed Disk

Make a backup copy of Diskette 3 or 4. Place Diskette 1 in drive A: and Diskette 3 indrive B:. Copy PROBE.DEV onto Diskette 1 and replace the contents of PSPICE.BATon Diskette 1 with the contents of PROBE.FLP:

COPY B:PROBE.DEV A:PROBE.DEVCOPY B:PROBE.FLP A:PSPICE.BAT

8.2.3 Setting up the Device File

Page 97: Psp Ice

- 97 -

Since graphics is very device-dependent, Probe needs to know what devices are attachedto your system. Probe finds this information by looking in the device file, which isnamed PROBE.DEV.

Before runnning Probe, you will need to change PROBE.DEV to reflect the hardwarewhich is attached to your system. You can make these changes with any text editor,including the EDLIN text editor which comes with DOS (for instructions on how to runthe EDLIN, see the EDLIN chapter in your DOS User's Guide).

Look at the device file as it is shipped for an example of the format. You will see thelines:

Display = TextHard-copy = PRN:,Text

There need not be 2 lines, and their order is not important. Also, whether the text isupper or lower case does no matter. However, there must be one line (and no more thanone) which specifies the type of display. This line has the format:

Display = <display name>

where <display name> can be one of:

TextIBMHercules

"Text" means that the display is non-graphic (e. g., the IBM monochrome display). Inthis case, Probe will produce graphs using characters as dots (similar to the line-printerstyle plots that PSpice produces). These do not offer much resolution, but "Text" ishardware-independent: it can be used with any display.

"IBM" is the IBM color-graphics 640x200 display. It is not the new ProfessionalGraphics Controller 640x480 display. We plan to add the Professinal GraphicsController in the future under a different name than "IBM".

"Hercules" is the Hercules Graphics Card 720x348 display.

To specify hard-copy devices, use a line with the format:

Hard-copy = <port name>, <device name>

There do not have to be any lines of this form in the device file (in which case Probecannot produce hard-copy output). Or, you can have more than one (if your system hasmore than one printer). The port name must be:

PRN, LPT1, LPT2, LPT3, COM1, or COM2

Page 98: Psp Ice

- 98 -

depending on which port your device is connected to. A trailing ":" is optional.Normally, PRN is the port name of the primary printer. Serial devices are normallyconnected to COM1. If you have any doubt about the port name, try to copy a text file(such as PROBE.DEV) to that port and see what happens. For instance:

COPY PROBE.DEV LPT1:

If the text of PROBE.DEV is correctly copied to the device, then LPT1 is the correctport name. If you get the message:

1 file(s) copied

but nothing is copied, then that is not the right port name.

For the hard-copy devices, the device name can be one of:

TextText132OkidataOkidata132EpsonEpson132EpsonMXEpsonMX132

As with the display, "Text" denotes a non-graphic device. In this case Probe willproduce character-type plots, similar to the ones produced by PSpice. "Text132" issimilar to "Text" except that the plots will be 132 characters wide instead of 80.

"Okidata" is the Okidata ML92 or ML93 dot-matrix printer. "Okidata132" is the sameas "Okidata" except that 13.2-inch wide plots are produced instead of 8.

"Epson" is the Epson FX80 or FX100 dot-matrix printer. "Epson132" is the same as"Epson" except that 13.2-inch wide plots are produced instead of 8.

"EpsonMX" is the Epson MX80 or MX100 printer with Graftrax. "EpsonMX132" isthe same as "EpsonMX" except that 13.2-inch wide plots are produced instead of 8.

8.3 Running Probe

Probe gets the simulation data by reading a data file named PROBE.DAT. This file isproduced by PSPICE if you have the statement:

.PROBE

in the PSpice input file. The command files which come with Probe (PROBE.BAT andPROBE.FLP) are set up to automatically run Probe right after PSpice, if PSpiceproduces the PROBE.DAT file.

Page 99: Psp Ice

- 99 -

8.3.1 If You Have a Fixed Disk

You need do nothing special to run Probe. It will be run automatically if you haveincluded a .PROBE statement in the PSpice input file.

8.3.2 If You Do Not Have a Fixed Disk

You will need to switch diskettes after PSPICE2.EXE has started. If you have includeda .PROBE statement in the PSpice input file then, after PSpice has started, you will seethe message:

Reading and Checking Circuit

This indicates that PSPICE1.EXE has loaded from drive A: and is running. After ashort while you will see the additional message:

Circuit Read and Checked

and PSPICE2.EXE will begin loading from drive B: (drive B:'s light will come on andthe drive will make noise). When PSPICE2.EXE has finished loading (the drive's lightgoes off), remove Diskette 2 from drive B:, insert the diskette which containsPROBE.EXE. Then you can leave the machine. When you come back Probe will havestarted.

If you have not included a .PROBE statement in the PSpice input file, then Probe willnot be run and no diskette switching is necessary.

PSpice puts the PROBE.DAT file on Diskette 1 (in drive A:). The PROBE.DEV filemust also be on Diskette 1 before starting the run.

8.3.3 More on Running Probe

This section can be skipped on your first time through. It contains information on otherways to run Probe.

You can run Probe by itself, assuming that a data file has already been created. Thecommand for running Probe is the same as in the PROBE.BAT file:

PROBE <data file> <device file>

If you do not specify a device file, it defaults to PROBE.DEV. If you do not specify adata file, it defaults to PROBE.DAT. So,

PROBEPROBE PROBE.DATPROBE PROBE.DAT PROBE.DEV

Page 100: Psp Ice

- 100 -

are all equivalent.

When PSpice runs it will overwrite the data file. If you want to save a data file, give it adifferent name before your next PSpice run. For instance:

RENAME PROBE.DAT OPAMP13.DAT

Then later you can re-examine that data with:

PROBE OPAMP13.DAT

If you have a fixed disk it may be more convenient to have the PROBE.DEV file in thedirectory which contains the PROBE.EXE file than in the directory which contains yourcircuit files. For instance, if you would like to set things up so that Probe looks forPROBE.DEV in the directory \PROGRAMS, use a text editor to change PSPICE.BATso that:

IF EXIST PROBE.DAT PROBE

becomes:

IF EXIST PROBE.DAT PROBE PROBE.DAT \PROGRAMS\PROBE.DEV

8.3.4 Avoiding File Size Limits

This section can be skipped on your first time through. It contains some information onavoiding file size limitations when running with floppy diskettes.

When PSpice and Probe are run there are 7 working files which reside on Diskette 1 indrive A:. These are:

1) The input circuit file (.CIR)2) The PSpice output file (.OUT)3) The Probe data file (PROBE.DAT)4) PSpice temporary file PSPICEA.TMP5) PSpice temporary file PSPICEB.TMP6) PSpice temporary file T3.TMP7) PSpice temporary file T4.TMP

PSPICEA.TMP is about the same size as the circuit file. PSPICEB.TMP is between 30and 60kbytes, depending on the size of the circuit (but not on the amount of output yourequested). T3.TMP stores the analysis results as they are calculated for .PRINT and.PLOT statements only. T4.TMP is less than 10kbytes.

One approach to saving diskette space when using Probe is not to request .PRINT ou.PLOT output from PSpice. This is reasonable since you will be looking at thesimulation results with Probe anyway.

Page 101: Psp Ice

- 101 -

This leaves us with the PROBE.DAT file. The size of this file for transient analysis isroughly = (no. transistors) x (no. print steps) x 20 bytes. The size for the other analysisis about 2.5 times smaller. For even a medium-size circuit this can easily get to be100kbytes or larger, which will overflow Diskette 1.

The reason for PROBE.DAT's large size is that all node voltages and device currents arestored at each internal time (or frequency or . . .) step. To avoid this, there is analternate form of the .PROBE statement which lets you specify which voltages andcurrents you would like stored. It is:

.PROBE <output valiable 1>, <output variable 2>, . . .

This has a form similar to the .PLOT and .PRINT statements. The difference is that theanalysis type (TRAN, AC, DC) is not included. Also, there is no limit on the number ofvariables which can be put on one .PROBE statement. With this form, only the outputvariables specified are stored in the PROBE.DAT file.

By using this form of the .PROBE statement in the circuit file, you can make thePROBE.DAT file as small as you like.

8.4 An Example

This section steps you through a simple use of Probe. It is intended to be tutorial,instead of comprehensive. It is assumed that you have followed instructions in section8.2 on installing Probe. We will be using EXAMPLE1 as our circuit.

To get started, go into EXAMPLE1.CIR with a text editor and add (before the .ENDstatement) the statement:

.PROBE

Then, run EXAMPLE1 with the command:

PSPICE EXAMPLE1

After PSPICE has run, Probe will start. After examining the data file and the devicefile, Probe will put up this screen:

Page 102: Psp Ice

- 102 -

Probe Graphics-ProcessorVersion 1.00 Dec. 1984

(C) Copyright 1984 by MicroSim CorporationUnauthorized copying of this program is prohibited

Circuit: EXAMPLE1 - AN ILLUSTRATION OF ALL COMMANDS Date/Time run: 11/28/84 17:13:40 Temperature: 35.0

0)Exit Program 1)DC Sweep 2)AC Analysis 3)Transient Analysis: 1

Underneath the Probe logo message, there is some information about the circuit whichwas simulated. The date and time refers to when the simulation (not Probe) was run.

At the bottom is a menu. All Probe commands are activated through a menu. Eachmenu has a set of commands following a number or, if there are more than 10, followinga letter. After the last command there is a suggested command. This is the default. Ifyou hit the carriage return key instead of a number you will activate the defaultcommand. In this case, hittting "1" or carriage return will get you the same command.

A menu does not always have all its comands listed. For instance, if you look at section8.5.2 you will find that there are 2 more commands in this menu. These commands onlyapply if the data file contains data for more than one temperature or circuit. Since that isnot the case for EXAMPLE1, these commands are no displayed.

This menu lists the analysis as its commands. EXAMPLE1 did all 3 analysis, so all 3are listed. Hit "1" without a carriage return (or just carriage return, since "1" is thedefault command) and we will look at the DC sweep. After the command, the screenwill show:

Page 103: Psp Ice

- 103 -

All voltages and currents are available

-300mV -200mV .0mV 100mV 200mV 300mV-100mV

0) Exit 1) Add Trace 2) X Axis 3) Y Axis 4) Add Plot 5) Hard Copy : 1

VIN

Going into an analysis puts the screen into graphics mode and puts up a plot. It alsoputs up the plot menu. It also defaults the x-axis to the DC sweep variable (VIN in thiscase) and autoranges the x-axis.

After going into an analysis, one normally wants to look at one or more voltages orcurrents. We call these "traces", analogous to an oscilloscope trace, and have the AddTrace command as the default. Hit "1" or carriage return.

You may enter an output variable in the same format as in a .PLOT or .PRINT statementin PSpice. You may also enter arithmetic expressions of output variables. For now, let'skeep it simple; enter "V(5)" and hit carriage return. The screen will show:

Page 104: Psp Ice

- 104 -

-300mV -200mV .0mV 100mV 200mV 300mV-100mV

0) Exit 1) Add Trace 2) Remove Trace 3) X Axis 4) Y Axis 5) Add Plot6) Hard Copy : 1

VIN

The first command in all the menus is always the exit command. This command exitsthat menu and goes back to the previous menu. Type "0".

Now you are back to the original screen and menu. Type "0" again and you will be backto DOS.

8.5 Probe Menus and Commands

This section is intended for reference. It is a complete list of Probe menus and theircommands.

8.5.1 General Comments on the Input

With one exception, Probe disregards upper/lower case: "V(5)" and "v(5)" areequivalent. The exception is the "m" scale suffix for numbers. "m" means milli (1E-3)whereas "M" means mega (1E+6).

Values are input in the same form as discussed in section 4.4, except that suffixes"MEG" and "MIL" are not available. Also, Probe makes some use of the unitsfollowing a number. So,

2e-32mV.002v

Page 105: Psp Ice

- 105 -

are all the same number, but Probe notes that the 2nd and 3rd forms are volts whereasthe firs is dimensionless. The units are only used to label the axis, they never affect thenumerical results. So, it is always safe to leave off units suffixes.

The units which Probe recognizes are:

V VoltsA ÀmperesW Wattsd Degrees (of phase)s SecondsH Hertz

Probe also knows that W=V*A, V=W/A, and A=W/V. So, if you add a trace which is:

V(5)*ID(M13)

The axis values will be labeled with "W".

Menu commands are selected by typing the command's number (or letter) without acarriage return. Inputs requiring more than one character, such as "V(5)" after the AddTrace command, do require a carriage return to terminate them.

8.5.2 Start-up Menu

This menu appears when Probe is started. It allows you to select a section of thesimulation results. When PSpice runs, it writes the results of each analysis out to thedata file (PROBE.DAT) as a section. So, there is one section for each simulation (DCsweep, AC analysis, transient analysis) which was done, for each temperature, and foreach circuit which was in the input file. For example, if the PSpice input file contained2 circuits, one running DC sweep and AC analysis at 2 temperatures and the otherrunning DC sweep and AC analysis at 1 temperature, then the data file would contain 4sections.

Note: If the data file has only one section, then this menu is skipped when Probe startsand you are put directly into the plot menu.

Exit Program

Exits Probe and returns control to DOS. The data file is left unchanged.

DC Sweep

Selects the DC sweep section of the data file and then transfers control to the plot menu.This command only appears if the circuit selected has a DC sweep section (i.e, if thePSpice circuit contained a .DC statement).

AC Analysis

Page 106: Psp Ice

- 106 -

Selects the AC analysis section of the data file and then transfers control to the plotmenu. This command only appears if the circuit selected has an AC analysis section(i.e, if the PSpice circuit contained a .AC statement).

Transient Analysis

Selects the transient analysis section of the data file and then transfers control to the plotmenu. This command only appears if the circuit selected has a transient analysis section(i.e, if the PSpice circuit contained a .TRAN statement).

Next Temperature or Circuit

Selects the next temperature or, if we are at the last temperature already, the next circuit.this command does not appear if we are at the last temperature of the last circuit in thedata file.

Previous Temperature or Circuit

Selects the previous temperature or, if we are at the first temperature already, theprevious circuit. This command does not appear if we are at the first (or only)temperature of the first (or only) circuit in the data file.

8.5.3 Plot Menu

This menu appears after an analysis is selected from the start-up menu. The plot menuis the main menu in Probe: most of your time will be spent in it.

If the data file contains only 1 section - 1 circuit run at 1 temperature with only 1analysis - then the start-up menu is skipped and Probe goes directly to the plot menu. Inthis case, you do not have a chance to see the circuit title which the start-up menudisplays. That is easily fixed by exiting the Plot menu back to the start-up menu,looking at the circuit title, and then re-entering the plot menu.

While you are in the plot menu, 1 or more plots are displayed on the screen. If there aremore than one, one of these is marked as selected by the characters "SEL>>". Someplot commands, such as Add Trace and Remove Trace, work on only 1 plot. This isalways the selected plot.

Exit

Exits the plot menu and returns to the start-up menu.

Add Trace

Adds a trace to the selected plot. The trace can be any output variable in the data file, oran arithmetic expression involving output variables. A plot can have up to 8 traces. Ifthe selected plot already has 8 traces, this command does no appear.

Page 107: Psp Ice

- 107 -

The format and meaning of output variables are the same as in PSpice (see section 6.4),with these differences:

1) The V(<name>), Vx(<name>), and Vxx(<name>) forms are not available.These are, for instance, V(R3), VG(M2), or VCE(Q13). The reason for thisis that the data file does not contain the information on wich nodes eachdevice is connected to. You must use the node number form: V(5), V(13,2),etc. We plan to correct this in a future release.

2) The noise variables are not available. The output of the noise analysiscannot be examined with Probe.

3) In AC analysis, group delay is not available for both voltages and currents.We plan to correct this in a future release.

4) The sweep variable is available, in addition to the voltages and currents. Forthe DC sweep, the sweep variable's name is the name of the voltage orcurrent source being swept. For the AC analysis the sweep variable's name is"Frequency". For transient analysis the name is "Time".

Currents through devices are available, just as they are in PSpice.

Arithmetic expressions of output variables are allowed. The available operators are:"+", "-", "*", "/", along with parenthesis. The available functions are:

ABS(x) Absolute value of xSGN(x) +1 if x > 0

0 if x = 0-1 if x < 0

DB(x) 20 * log(ABS(x)) (log base 10)

For instance, assume that we are in the DC sweep, that the sweep variable is namedVCE, that it runs from 0 to 5 V and that we wish to add a 10K resistor's load line to theplot. After selecting the Add Trace command, the correct expression would be:

(5V - VCE) / 10K

This will add a line to the plot running from .5mA at the left to 0mA at the right.

As another example, assume that Q13 has its collector connected to node 25 and theemitter to node 3. Then, to plot the power dissipated in the transistor by the collectorcurrent, the correct expression would be:

V(13,3) * IC(Q13)

Remove Trace

Removes one or all traces from the selected plot. The traces are listed using the textwhich you typed in when adding them to the plot with the Add Trace command. If theselected plot has no traces this command does not appear.

Page 108: Psp Ice

- 108 -

X Axis

Enters the axis menu and applies those commands to the x-axis. Since all plots on thedisplay share the same x-axis, these commands affect every plot.

Y Axis

Enters the axis menu and applies those commands to the y-axis of the selected plot.

Add Plot

Adds a plot to the display. The new plot becomes the selected plot. The display cancontain up to 20 plots. If it already contains that many, this command does not appear.

The new plot is added at the top of the display. The other plots are squeezed down tomake room for it. All the plots share the same x-axis, but each has its own y-axis.

Select Plot

Allows you to change which plot is selected. If the display has only one plot, thiscommand does not appear.

After you choose this command the plots are listed from bottom-most to top-most. Theone you choose becomes the selected plot and the selected characters "SEL>>", aremoved to it.

Remove Plot

Removes the selected plot from the display. If the display has only one plot thiscommand does not appear. After the plot is removed the other plots are stretched to fillthe display. The top-most plot becomes the selected plot.

Hard Copy

Prints or plots the display onto a hard copy device. The hard copy devices available aredetermined by the information in the device file.

Hard Copy will list the devices specified in PROBE.DEV and ask you to choose one. Ifonly one device was specified in PROBE.DEV then this step will be skipped.

Next, you are asked to choose the length of the plot. The plot will have the x-axisrunning the long way on the paper (the same as the PSpice plots). You may choose alength of 1 page (11 inches), 2 pages (22 inches), or "Other" which lets you enter anynumber of inches.

Then the plot is made. During this time the keyboard is dead. Once the plot is finished,you are returned to the plot menu.

Page 109: Psp Ice

- 109 -

Note: If you do not get a plot on your hard copy device, use Ctrl-Break to abort Probeand then try to copy a text file to the device. For example:

COPY PROBE.DEV PRN:

If the copy is successful, double check that you have correctly listed the deviceand its port name in the device file (PROBE.DEV).

8.5.4 Axis Menu

This menu appears after the "X Axis" or "Y Axis" command is chosen from the plotmenu. If it is entered via the "Y Axis" command, the y-axis of the selected plot is theone that will be affected.

Exit

Returns to the plot menu.

Log

Sets the axis to be logarithmic. If the axis is already logarithmic this command does notappear. You cannot execute this command if either end of the axis' range is zero ornegative.

For AC analysis, the x-axis starts out as logarithmic, Otherwise, all axis start out aslinear.

Linear

Sets the axis to be linear. If the axis is already linear this command does not appear.

For AC analysis, the x-axis starts out as logarithmic. Otherwise, all axis start out aslinear.

Auto-range

Sets the range of the axis to be the range of its variable/traces, rounded to a "nice" value.The range of the axis will be automatically adjusted as its variable/traces are changed. Ifthe axis is already auto-ranging this command does not appear.

For the x-axis, the range is determined by the x variable. For a y-axis, the range isdetermined by the combined ranges of all the traces on that plot.

All axis start out as auto-ranging.

Set range

Page 110: Psp Ice

- 110 -

Sets the range of the axis to your specification. Once set, the range is not affected bychanges in the axis' variable/traces. It can only be changed by an "Auto-range" oranother "Set range" command.

After you choose this command you will be propted to enter a range. This has theformat:

<value>, <value> or<value> <value> or(<value>, <value>)

For instance,

0V, 5V0 5(0, 5V)

are all correct formats for a range. The first is better, though. By specifying the correctunits, you assure that the units will appear on the numbers labeling the axis' tick marks.

This command may be used to invert an axis. For instance, instead of having a range of(0V, 5V), one can set the range (5V, 0V). All the traces on that axis are then inverted.

X variable

Sets the variable for the x-axis. the x variable starts out as the sweep variable of theanalysis: voltage or current for DC sweep, frequency for AC analysis, or time fortransient analysis. But you can set it to any variable or expression you choose. If theaxis is a y-axis this command does not appear.

After you choose this command, you will be prompeted to enter a variable orexpression. The format for this is the same as for the Add Trace command in the plotmenu.

This command can be very useful since it allows you to plot any variable versus anyother over the course of the analysis. See section 8.6.1 for an example of using it to getthe hysteresis curve of a Schmidt trigger.

8.6 Suggestions

This section contains some suggestions for making more effective use of Probe.

8.6.1 Hysteresis Curves

Using the "X variable" command of the axis menu, it is possible to get a good look at acircuit's hysteresis. Consider, for instance, the following circuit:

Shimidt Trigger Example

Page 111: Psp Ice

- 111 -

*VIN 20 0 PLW(0, 0.8V 1, 2.0V 2, 0.8V)* IN OUTX1 20 2 SCHIMIDT*.TRAN .01 2.PROBE*(definition of subcircuit SCHMIDT)*.END

where the subcircuit SCHMIDT is a schmidt trigger.

Instead of using the DC sweep to look at the hysteresis, we use the transient analysis,sweeping VIN from .8V to 2V and back down to .8V very slowly. This has 2advantages:

1) It avoids convergence problems (see section 7.3.1).2) It covers both the upward and downward transitions in one analysis.

After the simulation, when we are in Probe, the x-axis variable is initially set to be"Time". By using the "X variable" command in the axis menu, we can set the x-axisvariable to be V(20). Then, we can use the "Add Trace" command to put V(2) on theplot. This plots the output of the schmidt trigger against its input, which is what wewant. The result looks like this:

0.8V 1.0V 1.4V 1.6V 1.8V 2.0V1.2V

0) Exit 1) Add Trace 2) Remove Trace 3) X Axis 4) Y Axis 5) Add Plot6) Hard Copy : 1

V(20)

0.0V

2.0V

4.0V

6.0V

V(2)

Page 112: Psp Ice

- 112 -

8.6.2 Curve Families

The DC sweep in PSpice allows nested sweeps. That is, you can sweep one sourcerepeatedly while a second is also stepped through a range of values. Look up the .DCcommand in chapter 6 for the exact syntax. Consider the following example:

Curve Family Example*.OPTIONS NOPAGE NOMODE LIMPTS=1000VD 1 0 DC 5VVG 2 0 DC 0VM1 1 2 0 0 M W=88.9U L=25.4U.MODEL M NMOS( . . . model parameters . . .)*DC VD 0V 5V .1V VG 0V 2V .5V.PROBE*.END

When this circuit is run and we add the trace "ID(M1)" (M1's drain current), the resultlooks like this:

0.0V 1.0V 3.0V 4.0V 5.0V2.0V

0) Exit 1) Add Trace 2) Remove Trace 3) X Axis 4) Y Axis 5) Add Plot6) Hard Copy : 1

VD

0uA

50uA

100uA

ID(M1)

8.6.3 Load Lines

In the DC sweep, we can add the load line for a resistor by adding a trace whichcomputes the load line from the sweep voltage. Assume that the x-axis variable is the

Page 113: Psp Ice

- 113 -

sweep voltage VC which runs from 0 to 5V. The expression which will add a trace thatis the load line for a 10K resistor is:

(5V - VC) / 10K

This can be useful in conjuntction with a curve family such as discussed in section 8.6.2.

8.6.4 Timing Diagrams

Timing diagrams are done using the Add Plot command, putting one trace on each plot.Multiple plots on the display share the same x-axis. For transient analysis this isnormally time.

Note that you can use the Set range command of the axis menu to invert any plot's y-axis. For instance, instead of (0V, 5V) you could set the range to be (5V, 0V). Thismay be used to put active-low signals "right-side up".

Page 114: Psp Ice

- 114 -

Appendix A

EXAMPLE1

VIN

VEE

VCC

RC1

CLOAD

RC2

RS2RS1

RBIAS

Q4 Q3

Q2Q1

20K

1K1K

10K10K

5PF2 3

4 5

100

101

0

7

102

6

EXAMPLE1

EXAMPLE1 - AN ILLUSTRATION OF ALL COMMANDS** THIS CIRCUIT USES ALL POSSIBLE COMMANDS TO CREATE THE MAXIMUM* AMOUNT OF OUTPUT POSSIBLE FROM SUCH A SMALL CIRCUIT.* NORMALLY, ONLY A FEW KINDS OF OUTPUT (SUCH AS TRANSIENT ANALYSIS)* WOULD BE RUN.*.OPT ACCT LIST NODE OPTS NOPAGE RELTOL=.001.WIDTH OUT=80.TEMP 35.TF V(5) VIN.DC VIN -0.25 0.25 0.005

Page 115: Psp Ice

- 115 -

.AC DEC 10 1 10GHZ

.TRAN/OP 5NS 500NS

.SENS V(5)

.NOISE V(5) VIN 20

.FOUR 5MEG V(5)VIN 100 0 AC 1 SIN(0 0.1 5MEG)VCC 101 0 DC 12VEE 102 0 -12Q1 4 2 6 QNLQ2 5 3 6 QNLRS1 100 2 1KRS2 3 0 1KRC1 4 101 CRES 10KRC2 5 101 CRES 10KQ3 6 7 102 QNLQ4 7 7 102 QNLRBIAS 7 101 20KCLOAD 4 5 5PF.MODEL CRES RES (R=1 TC1=.02 TC2=.0045).MODEL QNL NPN (BF=80 RB=100 CCS=2PF TF=0.3NS TR=6NS CJE=3PF CJC=2PF+ VA=50).PRINT DC V(4) V(5).PLOT DC IC(Q2).PRINT AC VM(5) VP(5).PLOT AC VCM(Q2) VCP(Q2).PRINT NOISE INOISE ONOISE.PLOT NOISE INOISE ONOISE.PRINT TRAN V(4) V(5).PLOT TRAN V(4) V(5) I(CLOAD).PROBE.END

Page 116: Psp Ice

- 116 -

Appendix B

MORE EXAMPLES

B.1 Introduction

The following examples illustrate many of the features of PSpice.

B.2 Non-linear Controlled Source

TD0 - TUNNEL DIODE OSCILLATORVBIAS 0 2 -120MVLS 2 1 2.5UHCS 1 0 100PFGTD 1 0 POLY(1) 1 0+ -3.95510115972848E-17 +1.80727308405845E-01+ -2.93646217292003E+00+ +4.12669748472374E+01 -6.09649516869413E+02+ +6.08207899870511E+03+ -3.73459336478768E+04 +1.44146702315112E+05+ -3.53021176453665E+05+ +5.34093436084762E+05 -4.56234076434067E+05+ +1.68527934888894E+05.DC VBIAS 0 -600MV -5MV.PLOT DC I(VBIAS) (0,5MA).TRAN 5NS 500NS 0 5NS.PLOT TRAN(1) V(1).OPT ACCT LIST NODE OPTS NOPAGE.WIDTH IN=80 OUT=80.END

B.3 Inductors and Transformers

KTEST - MUTUAL INDUCTANCE TEST.OPT ACCT LIST NODE OPTS NOPAGE.WIDTH IN=80 OUT=80.AC DEC 10 1 1GHZ.TRAN 20NS 2000NSISRC 1 0 SIN(0 1 1MEG) AC 1L1 1 0 1MHL2 2 0 1MHL3 3 0 10MHL4 4 0 100MHK12 L1 L2 0.99K13 L1 L3 0.995K14 L1 L4 0.99K23 L2 L3 0.995K24 L2 L4 0.99K34 L3 L4 0.995R1 1 0 1KR2 2 0 1KR3 3 0 1KR4 4 0 1K.PLOT AC VM(1) VP(1) VM(2) VP(2) VM(3) VP(3) VM(4) VP(4).PLOT TRAN V(1) V(2) V(3) V(4)

Page 117: Psp Ice

- 117 -

.END

B.4 Medium-size Bipolar Circuit

UA741 CKT - UA 741 OPERATIONAL AMPLIFIER.OPT ACCT LIST NODE OPTS ITL4=20 NOPAGE.OPT.WIDTH IN=80 OUT=80.DC VIN -0.25 0.25 0.005.AC DEC 10 1 10GHZ.TRAN 2.5US 250USVCC 27 0 15VEE 26 0 -15VIN 30 0 SIN(0 0.1 10KHZ) AC 1RS1 2 30 1KRS2 1 0 1KRF 24 2 100KR1 10 26 1KR2 9 26 50KR3 11 26 1KR4 12 26 3KR5 15 17 39KR6 21 20 40KR7 14 26 50KR8 18 26 50R9 24 25 25R10 23 24 50R11 13 26 50KCOMP 22 8 30PFQ1 3 1 4 QNLQ2 3 2 5 QNLQ3 7 6 4 QPLQ4 8 6 5 QPLQ5 7 9 10 QNLQ6 8 9 11 QNLQ7 27 7 9 QNLQ8 6 15 12 QNLQ9 15 15 26 QNLQ10 3 3 27 QPLQ11 6 3 27 QPLQ12 17 17 27 QPLQ14 22 17 27 QPLQ15 22 22 21 QNLQ16 22 21 20 QNLQ17 13 13 26 QNLQ18 27 8 14 QNLQ19 20 14 18 QNLQ20 22 23 24 QNLQ21 13 25 24 QPLQ22 27 22 23 QNLQ23 26 20 25 QPL.MODEL QNL NPN(BF=80 RB=100 CCS=2PF TF=0.3NS TR=6NS CJE=3PF+ CJC=2PF VA=50).MODEL QPL PNP(BF=10 RB=20 TF=1NS TR=20NS CJE=6PF CJC=4PF VA=50).PRINT DC V(8) V(24).PLOT DC V(24).PRINT AC VM(24) VP(24).PLOT AC VM(24) VP(24).PRINT TRAN V(8) V(24).PLOT TRAN V(24) V(8).END

Page 118: Psp Ice

- 118 -

INV

ER

TIN

G I

NP

UT

NO

N -

INV

ER

TIN

G I

NP

UT

OF

FS

ET

NU

LL

OF

FS

ET

NU

LL

V+ V-

OU

TP

UT

R6

40K

R9

25R10 50

R7

40K

R11

50K

R5

39K

R3

1KR

250

KR

11K

R4

3K

Q1

Q2

Q4

Q3

Q9

Q8

Q6

Q5

Q7

Q10

Q11

Q12

Q19

Q22

Q18

Q16

Q21

Q17

Q23

CO

MP

30

pF

R8

50

Q15

(1)

(2)

(4)

(5)(3)

(8)

(7)

(9)

(11

)(1

0)

(6)

(12

)

(15

)

(17

)

(22

)

Q14

(21

)

(20

)

Q20

(24

)

(23

)

(25

)

(13

)(1

4)

(18

)

(26

)

(27

)

Q13

UA

74

1 S

che

ma

tics

for

Exa

mp

les

in A

pp

en

dix

B

Page 119: Psp Ice

- 119 -

B.5 Subcircuits

BUSCKT BUS CONTENTION CIRCUIT.WIDTH OUT=80.OPT ACCT NODE LIST ITL5=30000 NOPAGE ABSTOL=1E-9*VCC 7 0 DC 5VIN1 11 0 PULSE(0.4 4.0 5NS 0 0 1 10)*VIN2 12 0 PULSE(0.4 4.0 10NS 0 0 1 10)*X1 11 2 3 21 BUSCON*X2 12 2 3 22 BUSCON*C2 2 0 1PFC3 3 0 1PF*R2 2 7 1KR3 3 7 250**.PLOT TRAN V(21) V(22) V(2) V(3).PLOT TRAN V(21) V(2) V(3).TRAN 1NS 150NS*.SUBCKT BUSCON 1 2 3 5*X1 1 2 4 NAND2X2 4 6 5 NAND2X3 5 1 3 6 NAND3X4 6 3 OCBUF3X5 6 2 OCBUF2.ENDS*.SUBCKT OCBUF2 1 2*VCC 5 0 DC 5*R1 5 6 6KR2 5 7 3.4KR3 5 8 1.6KR4 10 9 100R5 9 0 1K*D1 0 1 DIODE*Q1 11 6 1 TRANQ2 7 11 10 TRANQ3 8 9 0 TRANQ4 2 8 0 TRAN.ENDS*.SUBCKT OCBUF3 1 2*VCC 8 0 DC 5*R1 8 3 420R2 1 4 1KR3 5 0 .7KR4 6 0 10R5 7 0 10*D1 4 5 DIODE*

Page 120: Psp Ice

- 120 -

Q1 3 3 6 TRAN 5Q2 2 3 7 TRAN 5Q3 3 5 0 TRAN.ENDS*.SUBCKT NAND2 11 12 3*VCC 7 0 DC 5*R1 7 21 4KR2 7 5 1.6KR3 7 1 130R4 4 0 1K*D1 2 3 DIODE*Q1 1 5 2 TRANQ2 3 4 0 TRANQ3 5 6 4 TRAN*D11 0 11 DIODED12 0 12 DIODEQ11 6 21 11 TRANQ12 6 21 12 TRAN.ENDS*.SUBCKT NAND3 11 12 13 3*VCC 7 0 DC 5*R1 7 21 4KR2 7 5 1.6KR3 7 1 130R4 4 0 1K*D1 2 3 DIODE*Q1 1 5 2 TRANQ2 3 4 0 TRANQ3 5 6 4 TRAN*D11 0 11 DIODED12 0 12 DIODED13 0 13 DIODEQ11 6 21 11 TRANQ12 6 21 12 TRANQ13 6 21 13 TRAN.ENDS*.MODEL DIODE D(RS=40 TT=0.1NS CJO=0.9PF).MODEL TRAN NPN(BF=50 RB=70 RC=40 CCS=2PF TF=0.1NS TR=10NS CJE=0.9PF+ CJC=1.5PF PC=0.85 VA=50).END

Page 121: Psp Ice

- 121 -

B.6 Noise

NOISE EXAMPLE - UA 741 OP AMP W/ FLICKER NOISE.WIDTH OUT=80.OPT ACCT LIST NODE OPTS NOPAGE.OPT.AC DEC 10 10 100K.NOISE V(24) VIN 10.PLOT NOISE ONOISE INOISEVCC 27 0 DC 15VEE 26 0 DC -15VIN 30 0 AC 1RS1 2 0 100RS2 30 1 100RF 2 24 4KR1 10 26 1KR2 9 26 50KR3 11 26 1KR4 12 26 3KR5 15 17 39KR6 21 20 40KR7 14 26 50KR8 18 26 50R9 24 25 25R10 23 24 50R11 13 26 50COMP 22 8 30PFQ1 3 1 4 QNLQ2 3 2 5 QNLQ3 7 6 4 QPLQ4 8 6 5 QPLQ5 7 9 10 QNLQ6 8 9 11 QNLQ7 27 7 9 QNLQ8 6 15 12 QNLQ9 15 15 26 QNLQ10 3 3 27 QPLQ11 6 3 27 QPLQ12 17 17 27 QPLQ14 22 17 27 QPLQ15 22 22 21 QNLQ16 22 21 20 QNLQ17 13 13 26 QNLQ18 27 8 14 QNLQ19 20 14 18 QNLQ20 22 23 24 QNLQ21 13 25 24 QPLQ22 27 22 23 QNLQ23 26 20 25 QPL.MODEL QNL NPN(BF=200 RB=100 CCS=2PF TF=0.3NS TR=6NS CJE=3PF+ CJC=2PF VA=50 KF=6.6E-16 AF=1.0).MODEL QPL PNP(BF=50 RB=20 TF=1NS TR=20NS CJE=6PF CJC=4PF VA=50+ KF=6.3E-13 AF=1.5).END

Page 122: Psp Ice

- 122 -

B.7 Medium-size Mosfet Circuit

MOSAMP1 - MOS AMPLIFIER - DC/AC.OPTIONS ACCT ABSTOL=10N VNTOL=10N NOPAGE.WIDTH OUT=80.DC VIN -60MV +6MV 0.66MV.OP.AC DEC 10 100 10MEGM1 15 15 1 32 M W=88.9U L=25.4UM2 1 1 2 32 M W=12.7U L=266.7UM3 2 2 30 32 M W=88.9U L=25.4UM4 15 5 4 32 M W=12.7U L=106.7UM5 4 4 30 32 M W=88.9U L=12.7UM6 15 15 5 32 M W=44.5U L=25.4UM7 5 0 8 32 M W=482.6U L=12.7UM8 8 2 30 32 M W=88.9U L=25.4UM9 15 15 6 32 M W=44.5U L=25.4UM10 6 21 8 32 M W=482.6U L=12.7UM11 15 6 7 32 M W=12.7U L= 106.7UM12 7 4 30 32 M W=88.9U L=12.7UM13 15 10 9 32 M W=139.7U L=12.7UM14 9 11 30 32 M W=139.7U L=12.7UM15 15 15 12 32 M W=12.7U L=207.8UM16 12 12 11 32 M W=54.1U L=12.7UM17 11 11 30 32 M W=54.1U L=12.7UM18 15 15 10 32 M W=12.7U L=45.2UM19 10 12 13 32 M W=270.5U L=12.7UM20 13 7 30 32 M W=270.5U L=12.7UM21 15 10 14 32 M W=254U L=12.7UM22 14 11 30 32 M W=241.3U L=12.7UM23 15 20 16 32 M W=19U L=38.1UM24 16 14 30 32 M W=406.4U L=12.7UM25 15 15 20 32 M W=38.1U L=42.7UM26 20 16 30 32 M W=381U L=25.4UM27 20 15 66 32 M W=22.9U L=7.6UCC 7 9 40PFCL 66 0 70PFVIN 21 0 DC -30MV AC 1VCCP 15 0 DC +15VCCN 30 0 DC -15VB 32 0 DC -20.MODEL M NMOS(NSUB=2.E15 UO=575 UCRIT=49K UEXP=0.1 TOX=0.11U+ XJ=2.95U LEVEL=2 CGSO=1.5N CGDO=1.5N CBD=4.5F CBS=4.5F+ LD=2.4485U NSS=3.2E10).PLOT DC V(20).PRINT AC VDB(20) VP(20) VDB(66) VP(66).PLOT AC VDB(20) VP(20) VDB(66) VP(66).END

Page 123: Psp Ice

- 123 -

Appendix C

PSPICE vs SPICE

The version of Spice referred to in this appendix is Spice 2G from the University ofCalifornia at Berkeley.

PSpice will run any circuit which Spice will run with these exceptions:

1) Circuits which use distortion (.DISTO) analysis. Also, the special distortionoutput variables (HD2, DIM3, etc.) are not available.

2) These options on the .OPTIONS statement are not available:a) LIMTIM - it is assumed to be 0b) LVLCOD - no in-line machine code is generatedc) METHOD - trapezoidal integration is always usedd) MAXORD - trapezoidal integration is always usede) LVLTIM- truncation error time step control is always usedf) ITL3 - truncation error time step control is always used

There are some features of Spice which are included in PSpice for compatibility, but arenot included in this manual. These are:

1) The OFF and IC= options on device statements, and the UIC option on the.TRAN statement. These have been made obsolete by the .NODESET and.IC statements.

2) The IN= option on the .WIDTH statement.

PSpice will give essentially the same results as Spice. There can be some smalldifferences, especially for values crossing zero, due to the corrections made forconvergence problems. The semiconductor device models are the same as in Spice.

Page 124: Psp Ice

- 124 -

Appendix D

User Changeable Models

D.1 Introduction

This appendix describes how to install and use the user-changeable models option forPSpice. It only applies if you have purshased this option. This option is not an additionto PSpice. Rather, it is a different packaging of the program which gives you the sourcecode for the device model subroutines. Note: you must have the Microsoft Fortrancompiler to take advantage of this option.

D.2 Installation

Normally, PSpice comes as 2 executable files (PSPICE1.EXE and PSPICE2.EXE) plussome utility files. This option gives you the program in the form of many object files(PS1x.OBJ and PS2x.OBJ) and 2 linker command files (PSPICE1.LNK andPSPICE2.LNK). Installing this option consists of making PSPICE1.EXE andPSPICE2.EXE out of all the object files.

The first step is to make backup copies of all the files. The files are on the disketteslabeled Diskette 3, 4, and 5.

The files PSPICE1.LNK and PSPICE2.LNK list the object files to be linked in aparticular order. You can change the link order if you wish, although you must notmove any object file names from PSPICE1.LNK to PSPICE2.LNK or vice versa. Theonly restriction on order is that PS1A must come first in PSPICE1.LNK, PS2A mustcome first in PSPICE2.LNK, and PS1Z must come last in both.

D.2.1 If you have a Fixed Disk

In this case the installation is fairly easy. Copy all the object files into one directory.Copy the files PSPICE1.LNK and PSPICE2.LNK into the same directory. Copy theFortran libray files DOSFOR.LIB, 8087.LIB, and FORTRAN.LIB into the samedirectory. These .LIB files come with the Microsoft Fortran compiler. Finally, do thelink with the commands:

LINK @PSPICE1.LNKLINK @PSPICE2.LNK

This will produce PSPICE1.EXE and PSPICE2.EXE.

D.2.2 If You Do Not Have a Fixed Disk

Page 125: Psp Ice

- 125 -

This case is more difficult because of the small size of the diskettes. PSPICE1.EXE isabout 200kbytes large and PSPICE2.EXE is about 310kbytes. There are many ways todo the link. The basic idea is to gather the PSPICE1.LNK (or PSPICE2.LNK) file andas many .OBJ files as possible onto one diskette. The remaining .OBJ files, the Fortranlibrary files, and the resulting .EXE file will go on the other diskette. The linker itselfmust be loaded from yet another diskette. Note that PSPICE1.LNK needs only thePS1x.OBJ files and PARAM.OBJ. PSPICE2.LNK needs only the PS2x.OBJ files andPS1B.OBJ, PS1C.OBJ, PS1E.OBJ, PS1G.OBJ, PS1H.OBJ and TMPUPD.OBJ,DIODE.OBJ, BJT.OBJ, JFET.OBJ, and MOS.OBJ.

D.2.3 Preparing the Program Diskettes

Once you have created PSPICE1.EXE and PSPICE2.EXE, you must put them on theDiskettes which came with the program. PSPICE1.EXE goes on Diskette 1 and onBackup Copy Diskette 1. PSPICE2.EXE goes on Diskette 2.

The program diskettes are now the same as they are shipped without the user-changeablemodels option. To finish installation of the program, go to chapter 2 and follow thedirections there.

D.3 Making Device Model Changes

The purpose of buying this option is to allow you to change the built-in model equationsfor one or more of the semiconductor devices. To get started, look at the filePARAM.FOR. This subroutine contains all the device parameters and all the modelparameters. Although the tables are disturbingly long, they have a very regular structureand are actually easilly easy to change.

For all cases discussed below, the procedure is to change PARAM.FOR and possiblyone or more of the other .FOR files. Then, to compile the changed files. Finally, to gothrough the above installation procedure again.

D.3.1 Changing a Parameter's Name

This is the easiest change. Using the search feature of your favorite text editor, findeach occurrence of the name in PARAM.FOR and change it. The changed name willnow be used when a circuit is read-in and will appear when the model parameter valuesare echoed to the output file.

D.3.2 Giving a Parameter an Alias

Sometimes one would like a parameter to have an alternate name (an alias). Severalbipolar model parameters, such as ISE, already have alternate names. The alias for ISEis C2. Look in PARAM.FOR at the occurrences of the parameters ISE and C2 for anexample of how this is done. A new entry is made in the LOCMA, LOCMI, andLOCMR tables (don't forget to increase their sizes in the DIMENSION statement).However, the "new" parameter has the same LOCM offset as the alternate parameter,

Page 126: Psp Ice

- 126 -

and the LOCM block size is not increased. Note that when model parameters areexhoed the fist name found in PARAM.FOR (searching downward) for a given offset isthe name which is echoed on the output. If you want the new name to appear, youshould place it above the old one.

D.3.3 Adding a Parameter

This is probably the most common case. The parameter WD in the MOSFET LOCMA,LOCMI, and LOCMR tables provides an example. A new entry is made in theLOCMA, LOCMI, and LOCMR tables (don't forget to increase their sizes in theDIMENSION statement). Its offset must be set to the offset of the **SIZE** entry, andthe offset of the **SIZE** entry must be increased by one. The new parameter will nowbe used during read-in, it will be echoed during print-out of model parameter values,and it will be available in the device subroutine. In the case of the parameter WD, seethe subroutine MOSFET in the file MOS.FOR for an example of use. Note that itsoffset there is the same as was placed in the table in PARAM.FOR.

D.3.4 Changing the Device Equations

The device equations are in the file with the same name as the type of device (diode, bjt,jfet, mosfet). The code in these subroutines takes the model parameters and the nodevoltages and from these calculates the branch currents and conductances and, duringtransient analysis, the terminal charges and branch capacitances. These equations areneither simple nor easy. It is recommended that you already be familiar with UCBerkeley's Spice 2G before making such a change. Two useful references are:

Spice: A Computer Program to Simulate Semiconductor Circuits.by Lawrence Nagel (memorandum No. ERL-M520)

Program Reference for Spice2by Ellis Cohen (memorandum No. ERL.M592)

which are available by sending a check for $20.00 and $10.00, respectively, made outto:

Regents of the University of California

to this address

Ms. Deborah DunsterEECS Industrial Liaison Program457 CoryUniversity of CaliforniaBerkeley, CA 94720

Our experience has been that you should allow 8 weeks for delivery. Also, you shouldbe aware that these references, useful as they are, contain some outdated information.

Page 127: Psp Ice

- 127 -

PSpice PROGRAM LICENSE AGREEMENT

CAREFULLY READ ALL THE TERMS AND PROVISIONS OF THIS AGREEMENT BEFOREBREAKING THE DISKETTE SEAL. BREAKING THE DISKETTE SEAL INDICATES YOURACCEPTANCE OF THESE TERMS AND PROVISIONS. IF YOU DO NOT AGREE WITH THEM,PROMPTLY RETURN THE DISKETTE PACKAGE UNOPENED AND YOUR MONEY WILL BEREFUNDED. NO REFUNDS WILL BE GIVEN IF THE DISKETTE PACKAGE HAS BEENOPENED OR IS MISSING ANY COMPONENTS.

YOU MAY NOT USE, MODIFY, COPY OR TRANSFER THE USER'S GUIDE OR PROGRAM ORDOCUMENTATION, OR ANY COPY THEREOF EXCEPT AS EXPRESSLY PROVIDED IN THISAGREEMENT.

MicroSim Corporation is the exclusive owner of the mark "PSpice", and variations thereon, used inconnection with computer programs, and for which trademark registration with the United States Patentand Trademark Office and the California Secretary of State is pending. The "PSpice" mark may not beused without a license, and no license for the "PSpice" mark is granted to you in this Agreement orotherwise. MicroSim Corporation is the exclusive owner of that certain computer program (as well as anypast or future versions, changes, modifications, improvements, supplements, revisions, source codeversions, object code versions and firmware) (the "Program") in connection with which its "PSpice" markis used. The Program is a trade secret of MicroSim Corporation. MicroSim Corporation is the exclusiveowner of that certain user's guide (as well as any past or future versions, changes, modifications,improvements, supplements and revisions) (the "User's Guide") for the program in connection with whichthe "PSpice" mark also is used. The Program and User's Guide are and shall remain the exclusiveproperty of MicroSim Corporation and are published works of which MicroSim Corporation is theexclusive copyright owner. The attached diskette package contains two (2) "copy protected" diskettes,both of which contain the Program. If you have a fixed disk machine, you will be licensed to copy theProgram onto your fixed disk for your use together with one "copy protected" diskette, and the other"copy protected" diskette containing the Program will be retained in your files for back-up purposes only.

1. LICENSE: MicroSim corporation hereby grants you a nontransferable, nonexclusive license to use theProgram and User's Guide on only one (1) computer which you must own or lease. You shall not copy,reproduce, distribute, publish or translate the Program or User's Guide, except that you shall have thenontransferable, noexclusive right to make one (1) copy of the Program (but not the User's Guide) eitherfor back-up purposes only or for use on your fixed disk machine only as set forth above, and your back-upcopy shall be retaine in your files and not run on any computer. You may not electronically transfer theProgram from one computer to another over a network. You may not distribute copies of the Program orUser's Guide or any related documentation to others. You acknowledge that you must purchase fromMicrosim Corporation one (1) copy of the Program for each computer owned or leased by you on wish torun the Program, and that you do not have the right under this Agreement to otherwise to allow theProgram to be run on any computer not owned or leased by you. You shall not change, modify orimprove the Program or User's Guide without the prior written consent of MicroSim Corporation as toeach such change, modification or improvement, which consent may be withheld in MicroSimCorporation's sole discretion. Any and all changes, modifications and improvements in the Program andUser's Guide immediately upon their creation from time to time shall be and remain the sole and exclusiveproperty of MicroSim Corporation without any separate or additional payment of any kind to you.

2. TERM: This license is effective until terminated. You may terminate it by destroying the Program andUser's Guide and all copies thereof. This license also will terminate if you fail to comply with any term orcondition of this Agreement. You agree upon such termination to destroy all copies of the Program andUser's Guide. Termination of this license and/or this Agreement shall not relieve you of responsibility forviolations incurred prior to termination.

3. NO WARRANTY: The Program and User's Guide are provided "as is" without warranty of any kind,either expressed or implied, including without limitation the implied warranties of merchantability andfitness for a particular purpose. The entire risk as to the quality and performance of the Program is withyou. Should the Program prove defective, you (and not MicroSim Corporation or its dealers) assume the

Page 128: Psp Ice

- 128 -

entire cost of all necessary servicing, repair or correction. MicroSim Corporation does not warrant,guarantee or make any representations regarding the use of or the results of the use of the Program interms of corrections, accuracy, reliability, currentness or otherwise, and you rely upon the Program andresults solely at your own risk. MicroSim Corporation does not warrant that the function contained in theProgram will meet your requirements or that the operation of the program will be uninterrupted or errorfree. SOME STATES DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THEABOVE EXCLUSION MAY NOT APPLY TO YOU.

4. LIMITATION OF REMEDIES: IN NO EVENT WILL MICROSIM CORPORATION BE LIABLETO YOU FOR ANY GENERAL, SPECIAL, CONSEQUENTIAL OR INCIDENTAL DAMAGES,INCLUDING ANY LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL ORCONSEQUENTIAL DAMAGES, COSTS OR ATTORNEY'S FEES ARISING OUT OF THEOWNERSHIP, LICENSING, USE OF OR INABILITY TO USE THE PROGRAM OR USER'S GUIDE,EVEN IF MICROSIM CORPORATION OR ITS DEALER HAS BEEN ADVISED OF THEPOSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY OTHER PARTY. SOME STATESDO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL ORCONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY NOTAPPLY TO YOU.

5. GENERAL: You may not sublicense, assign, or transfer this license, the Program or the User's Guide,and any attempt to sublicense, assign or transfer any of the rights, duties or obligations hereunder is void.Nothing herein contained shall be deemed to constitute a franchise, partnership or joint venture betweenMicroSim Corporation and you nor shall anything herein contained be deemed to make either party theagent of the other. Any waiver of any provision hereof shall not be effective unless made expressly and ina written instrument executed in the name of the party sought to be charged. Failure of any party to insist,in any or more instances, or performance of any of the terms, covenants, or conditions of this Agreementshall not be construed as a waiver or relinquishment of any rights granted hereunder or of the futureperformance of any such term, covenant or condition, and the obligations of parties with respect theretoshall continue in full force and effect. No amendment, alteration or modification of this Agreement shallbe valid in each instance such amendment, alteration or modification is expressed in a written instrumentand duly executed in the name of the parties making such amendment, alteration or modification. If anyprovisions or any part of any provision of this Agreement is held to be unenforceable or invalid by a courtof competent jurisdiction, the validity and enforceability of the enforceable portion of any such provisionand/or the remaining provisions of this Ageement shall not be affected thereby. If a dispute arises underthis Agreement, the prevailing party shall be entiled to recover its expenses, including attorney's fees, inaddition to any other relief to which it is found entitled. This Ageement shall be governed by, subject toand interpreted in accordance with the laws of the State of California except to the extent governed by theUnited States Trademark Act of 1946, as amended, and the United States Copyright Act of 1976, asamended. If you have any questions concerning this Agreement, you may contact MicroSim corporationat 14101 Yorba Street, Suit 202, Tustin, California 92680.

6. ACKNOWLEDGEMENT: YOU ACKNOWLEDGE THAT YOU HAVE READ THISAGREEMENT, UNDERSTAND IT AND AGREE TO BE BOUND BY ITS TERMS ANDCONDITIONS. YOU ALSO AGREE THAT THIS AGREEMENT IS THE COMPLETE ANDEXCLUSIVE STATEMENT OF AGREEMENT BETWEEN THE PARTIES AND SUPERSEDES ANYPROPOSAL OR PRIOR AGREEMENT, IF ANY, VERBAL OR WRITTEN, AND ANY OTHERCOMMUNICATIONS BETWEEN THE PARTIES RELATING TO THE SUBJECT MATTER OFTHIS AGREEMENT.