DOC PREVIEW
Berkeley ELENG 105 - Introduction to SPICE

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ObjectiveMaterialsProcedureTransient AnalysisDC AnalysisTF AnalysisAppendixSyntax ReferenceUsing a GUIUNIVERSITY OF CALIFORNIA AT BERKELEYCollege of EngineeringDepartment of Electrical Engineering and Computer SciencesEE105 Lab ExperimentsExperiment 1: Introduction to SPICE1 ObjectiveSPICE stands for Simulation Program with Integrated Circuit Emphasis. It is the predominant tool usedto simulate circuits and was developed a t UC Be rkeley in the 1970s. You will be using SPICE extensivelyin your circuit design courses, and this lab will teach you how to use a p opular commercial package calledHSPICE, one of many implementations based o n the original Berkeley SPICE. You will learn how to specifyand analyze a circuit with HSPICE and how to plot the results of your analysis with a tool c alled Avanwaves,or Awaves for short.2 MaterialsFor this lab, all you need is a computer with HSPICE installed. You can use either the Windows or UNIXversion, but you will have to rea d the appropriate documentation for whichever version you choose. Thecomputers located in the EE105 lab in 353 Cory are Windows machines with the Windows version of HSPICEinstalled, so if you’re working in la b you should use the Windows version. If you need to use HSP ICE athome, you c an either use Windows Remote Desktop to login to a Windows server and use the Windowsversion of HSPICE, or you can use SSH to login to a UNIX server a nd use the UNIX version of HSPICE.3 Procedure3.1 Transient Analysis1. Write a netlist for the circuit in Figure 1, a simple RC low-pass filter. Let vsbe a 1 kHz square waveoscillating between 0 V and 5 V. You can model this square wave using the PULSE sourc e type.−vs+1 kΩ0.1 µF+vo−Figure 1: Low-pass filter2. Run a tra nsient analys is on this circuit from t = 0 ms to t = 10 ms.3. Use Awaves to generate plots fo r vsand voas functions of time. Print copies of these plots.4. In Awaves, use the cursor to estimate how long it takes for the capacitor to charge from 0 V to 3.16 V(note that 3.16 is 5 (1 − 1/e) ≈ 0.63 · 5). Is this value close to what you’d expect?5. Now, use a .measure statement to measure how long it takes for the capacitor to charge fro m 0 V to3.16 V. How does this compare to your result obtained from the graph in Awaves? Note: If you’reusing TRIG/TARG, you must use a non-zero value for the TRIG. If you want to measure from zero,simply use a very small, but non-zero, TRIG value.13 PROCEDURE 26. Adjust the step time used in your transient analysis (try making it larger and smaller ). Does thisva riation change the result of your .measure sta tement?3.2 DC Analysis1. Figur e 2(a) shows a transistor called an n-MOSFET, short for n-channel metal-oxide-semiconductorfield effect transistor. We often call these NMOS or NFETs fo r short. Although you haven’t learnedhow these work yet, you can still s imulate them in SPICE. The terminals of the device are labeled foryou: Drain, Gate, Source, and Body. In this case, the body is connected to the source, a configurationwe’ll see often in this course. In this config uration, transistors are often drawn as in Figure 2(b).−+VGSGSDBID−+VDD(a)−+VGSGSDID−+VDD(b)Figure 2:(a) NMOS transistor with body terminal explicity shown (b) NMOS transistor with bodyimplicity tied to source2. Write a netlist for the circuit in Figure 2 using the following parameters:• Step VGSfrom 0 V to 5 V in increments of 1 V.• Sweep VDDfrom 0 V to 5 V in increments of 0.1 V.• The model for the NMOS should have the following parameters: kp=60e-6 vt0=1 lambda=0.05• The dimensions of the tra nsistor are W/L = 4.5 µm/1.5 µm3. Use Awaves to plot IDversus VDDwith all the values of VGSyou stepped in your DC a nalysis. Note:You may have to invert IDin Awaves—it should be positive and increasing with VDDin your plot.Everything sho uld be shown on one graph. These are the I-V curves for a typical NMOS transistor.3.3 TF Analysis1. Figur e 3 shows the small-signal model for a NPN B JT, short for bipo lar junction tra nsistor. We oftenmodel transistors with simpler, linear components in order to analyze them. Once again, we’ve labeledthe terminals for you: Collector, Base, and Emitter.−vs+RBBrπ+vπ−gmvπCroRC+vo−EREFigure 3:A small-signal model of a BJT4 APPENDIX 32. Write a netlist for the circuit in Figure 3 using the following parameters:• RB= 1 kΩ, rπ= 2.6 kΩ, RC= 10 kΩ, RE= 5 kΩ, ro= 24 kΩ, gm= 38 mS• Use a .tf statement to find the voltage gain, Av= vo/vs.4 Appendix4.1 Syntax ReferenceThis is the same syntax reference supplied in the HSPIC E tutorial. Any bracketed lab e ls must be replacedentir e ly (i.e. if you want a value of 5 V, you should replace <value> with 5V).• Independent voltage sourcev<name> <+ terminal> <- terminal> <value>• Independent current sourcei<name> <+ terminal> <- terminal> <value>• Voltage-controlled voltage sourceE<name> <+ terminal> <- terminal> <+ control> <- control> <gain>• Current-contr olled vo ltage s ource (vcontrol refers to the voltage source which the controlling currentflows through)H<name> <+ terminal> <- terminal> <vcontrol> <gain>• Voltage-controlled current sourceG<name> <+ terminal> <- terminal> <+ control> <- control> <gain>• Current-contr olled current source (vcontrol refers to the voltage source which the controlling currentflows through)F<name> <+ terminal> <- terminal> <vcontrol> <gain>• Sinusoidal source (used as a <value>)sin(<offset> <amplitude> <frequency> <delay> <damping> <phase>)• Square wave source (used as a <value>)pulse(<vmin> <vmax> <delay> <rise time> <fall time> <pulse width> <period>)• Piece-wise linear source (used as a <value>)pwl(<t0> <v0> <t1> <v1> <t2> <v2> ...)• Resistorr<name> <terminal 1> <terminal 2> <value>• Capacitorc<name> <terminal 1> <terminal 2> <value>• Inductorl<name> <terminal 1> <terminal 2> <value>• Model (type can be nmos, pmos, NPN, PNP, or D for diode).model <name> <type> (<parameter list>)• MOSFET (you can specify additional parameters, such as W=<value> L=<value>, in the parameterlist)m<name> <drain> <gate> <source> <body> <model> <parameter list>• BJTq<name> <collector> <base> <emitter> <model> <parameter list>4 APPENDIX 4• Dioded<name> <+ terminal> <- terminal> <model> <parameter list>• AC analysis (pick either lin, dec, or oct).ac <lin|dec|oct|> <number of samples> <freq start> <freq stop>• DC analysis.dc <source> <start> <stop> <step>• Nested DC analysis (source1 is swept, source2


View Full Document

Berkeley ELENG 105 - Introduction to SPICE

Documents in this Course
Lecture 3

Lecture 3

21 pages

Lecture 9

Lecture 9

15 pages

Lecture 3

Lecture 3

19 pages

Lecture 3

Lecture 3

22 pages

Outline

Outline

16 pages

Lecture 3

Lecture 3

21 pages

Lecture 2

Lecture 2

28 pages

Lecture 3

Lecture 3

21 pages

Lecture 4

Lecture 4

22 pages

Lecture 6

Lecture 6

25 pages

Lecture 1

Lecture 1

13 pages

Lecture 5

Lecture 5

22 pages

Lecture 3

Lecture 3

21 pages

Lecture 1

Lecture 1

13 pages

Lecture 8

Lecture 8

25 pages

Lecture

Lecture

5 pages

Overview

Overview

24 pages

Lecture 5

Lecture 5

22 pages

Load more
Download Introduction to SPICE
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to SPICE and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to SPICE 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?