Sie sind auf Seite 1von 6

Analog VLSI Design

Laboration 1
The purpose of this lab is to learn how to draw a circuit in LTspice and then do the basic simulation types provided by LTspice (and any other spice tool), i.e. OP, DC, AC and TRAN, and then visualize the result.

Assistant phone oce e-mail 2108 Lars.Vestling@angstrom.uu.se Lars Vestling 018-471 7240 A

September 2009 LV Name Passed

(UNIX-account)

Date

Introduction

The purpose of this lab is to learn how to describe circuits so that the simulator understands it. This includes drawing the circuit, assigning parameter values to the components, e.g. resistance values, transistor models, etc. Then the type of simulation has to be set up and nally the results has to be visualized. The lab consists of four parts, each dealing with one type of simulation and circuit description and visualizing is included in each part. The dierent parts is:
OP - operating point simulation DC - DC sweep simulation AC - small-signal AC simulation TRAN - transient simulation

OP-simulation

In an operating point simulation the default voltages and currents of the sources in the circuit is applied and all node voltages and currents between nodes are calculated and presented in a list. Figure 1 shows the same current mirror that were discussed in the lectures. The dimensions were calculated and now we want to see how good it ts to the simulations.

Figure 1: Schematic circuit description to the current mirror. The following will show you in detail the steps necessary from starting the program until the result is presented on the screen. 1. Start the program LTspice IV1 (scad3.exe). 2. Select File:New Schematic or press 3. Add MOS-transistor M1: Select Edit:Component or press to get the Select Component dialog. Select nmos4 and press OK. Place the transistor on the sheet by left clicking, then release the cursor by right clicking.
1 If

to create a blank drawing sheet.

you dont have it on your computer it can be downloaded from http://www.linear.com/designtools/software/#Spice.

4. Set MOS-transistor parameters. Right-click on the transistor and ll in Model Name: CMOSN, Length(L): 4u and Width(W): 9u in the dialog. Press OK. 5. Add MOS-transistor M1. Select Edit:Duplicate or press . The cursor now changes symbol. Left-click on the rst transistor and before you place the duplicated one press Ctrl-E to mirror it. 6. Add resistor R1. Select Edit:Resistor or press . Rotate Ctrl-R and mirror Ctrl-E it before you place it. Rightclick on the resistor and set the resistance to 250k. 7. Add voltage sources Vdd and Vout. Open the Select Component dialog. Choose the component named voltage and place it. Right-click on the voltage source and ll in DC value(V): 5. Right-click on the name V1 and change it to Vdd. Duplicate the voltage source and rename the second one to Vout. 8. Add GND. Select Edit:Place GND or press 9. Add wiring. Select Edit:Draw Wire or press . Connect the components with wires according to gure 1. Left-click to start a wire. Left-click to change direction. Left-click to end a wire on a existing node. Right-click to end a wire on a non-existing node. 10. Add models. To be able to simulate the denition for the models used (CMOSN) must be given. The model parameter is listed in the le scna20.models and must be included in the circuit description. Select Edit:SPICE Directive or press . Type .include scna20.models in the dialog and press OK. If the model le is located elsewhere the full path has to be given. 11. Setup simulation. Select Simulate:Edit Simulation Cmd . Choose the operating point simulation, the tab called DC op pnt. Press OK. Now .op should be typed somewhere in the schematic. 12. Simulate. Now, everything is set for simulation so select Simulate:Run or press 13. The result. An operating point simulations just gives a list of voltages and currents and you should now have a window with just that. In our calculations we decided that the drain current in M1 and M2 should be 15 A and that VGS should be 1.2 V. What does the simulations says? . . Place one or more GND-symbols at appropriate places.

VGS =

ID,M 1 =

ID,M 2 =

Comments:

DC-simulation

In a DC simulation any voltage source (or current source) can be swept. One source at the time is swept and up to 3 dierent sources can be swept in one simulation. The rst exercise is to examine the inuence of VOU T in our current mirror, gure 1. This is done by sweeping Vout and see how the currents through the transistors changes. 1. Right-click in the text line .op or select Simulate:Edit Simulation Cmd from the menus. 2. Select the tab DC sweepand then ll in: Name of 1st source: Vout, Type of sweep: linear, Start Value: 0, Stop value: 5 and Increment: 0.1. Press OK. 3. Now the line .op should be replace with .dc Vout 0 5 0.1. 4. Simulate. 5. Now an empty plot should have appeared in a new window. 6. Move the cursor over the drain of a transistor. It then changes to a symbol that looks like a clamp meter , then click and that current will be plotted in the window above. Plot both Id(M1) and Id(M2). 7. Left-click on Id(M1) or Id(M2) in the plot legend to insert a cursor in the plot. 8. In our calculations, Vout,min was 0.44 V. What does the simulation says?

Vout,min =

Comments:

AC-simulation
1. For voltage source V1 the AC amplitude is set to 0.01 V (the AC phase can be omitted). 2. Use the device Opamps/UniversalOpamp2 from the list in select components. 3. The text string +2.5V is just a node name. Since there are two nodes with name +2.5V it means that they are connected. To change the node name, select Edit:Label Net or press . Type the name and press OK and click on a node in the net. 4. +2.5V (twice), -2.5V (twice), in and out are all node names that makes it easier to evaluate the results later. 5. In the simulation setup dialog, choose AC analysis and type in Type of Sweep: Decade, No of points: 10, Start Freq: 100 and Stop Freq: 1e8. This gives you the line .ac dec 10 100 1e8 to place on the sheet.

Draw the circuit shown in gure 2. The dierences from the previous exercise is listed below:

Figure 2: Schematic circuit description an inverting amplier. 6. Simulate. 7. Place the cursor near the out node and the probe symbol will appear . Click on the node and V(out) will appear in the plot window, both as amplitude (solid line) and phase (dashed line). 8. We are not really interested in the absolute output voltage, but the amplication is of more interest. Rightclick on V(out) in the plot window legend. The expression editor dialog pops-up and it says V(out) in the text eld. Change this to V(out)/V(in) and press OK. 9. What is the theoretical amplication of the circuit? What is the simulated amplication? What is the cut-o frequency?

Av,calc =

dB

Av,sim =

dB

f0 =

Comments:

Transient simulation

The transient simulation is demonstrated by a digital inverter. Draw the schematic as in gure 3. The length and width of both transistors are 4u and 10u respectively. For the simulation setup choose transient from dialog.

Figure 3: Schematic circuit description an inverter. What is the rise and fall time of the inverter? If they dier, why?

trise =

tf all =

Why a dierence?

The answer to why they dier gives a simple answer to the cure. Modify the circuit so that the rise and fall times are about the same.

trise,mod =

tf all,mod =

Describe the modied circuit:

Das könnte Ihnen auch gefallen