SPICE_exp-1
Transcript of SPICE_exp-1
-
7/28/2019 SPICE_exp-1
1/4
Digital Electronics Circuits Laboratory
SPICE Experiment-1
Follow steps given below.1- Open a Notepad File. Enter the following description of a NMOS Inverter. You are not
required to enter the comment lines
NMOS INVERTER
VSUPPLY VDD 0 5
VIN IN 0 PULSE 0 5 2NS 2NS 2NS
+15NS 30NS
RG IN GATE 10K
RD VDD OUT 100k
M1 OUT GATE 0 0 MN L=0.25U W=1U
+AS=1E-12 AD=2E-12 PS=3U PD=3U* model
.MODEL MN NMOS (LEVEL=1 TOX=2.6N
VT0=0.3 GAMMA=0.2
+PHI=0.6 U0=250 LD=0.025U CJ=8E-
4 CJSW=8E-12
+CGSO = 3.365E-10 CGDO=3.365E-10
LAMBDA=0.2)
* analysis
.TRAN 1NS 100NS
.DC VIN 0 7 0.001
*output.PLOT DC V(OUT)
.PLOT TRAN V(OUT) V(IN)
.END
Note that the complete format for describing a MOSFET is
MXXXXXXX ND NG NS NB MNAME
+
+
for L, W, AD, AS, PD, PS, see figure on the last page. In this experiment LS=LD=1um.
2- Save this file as nmos_inv.cir.
3- Double click on the WinSpice icon to open the command window. To run thesimulation go to File -> Open -> nmos_inv
4- Which of the above SPICE statements are used to plot the VTC of the inverter
-
7/28/2019 SPICE_exp-1
2/4
5- Which of the above SPICE statements are used to plot the output voltage waveforrn of
the inverter.
6- Open a new Notepad File. Enter the followingdescription of a CMOS Inverter. Body of NMOS
is connectedto ground while the body of PMOS is
connected to VSUPPLY.
CMOS INVERTER
M1 2 1 0 0 MN L=0.25U W=1U
+AS=1E-12 AD=2E-12 PS=3U PD=3U
M2 2 1 3 3 MP L=0.25U W=2U
+AS=2E-12 AD=2E-12 PS=4U PD=4U
VIN 1 0 PULSE 0 5 2PS 2PS 2PS
+15PS 30PSVSUPPLY 3 0 5
* models
.MODEL MN NMOS (LEVEL=1 TOX=2.6N VT0=0.3 GAMMA=0.2
+PHI=0.6 U0=250 LD=0.025U CJ=8E-4 CJSW=8E-12
+CGSO = 3.365E-10 CGDO=3.365E-10 LAMBDA=0.2)
.MODEL MP PMOS (LEVEL=1 TOX=2.6N VT0=0.3 GAMMA=0.2
+PHI=0.6 U0=100 LD=0.025U CJ=8E-4 CJSW=8E-12
+CGSO = 3.365E-10 CGDO=3.365E-10 LAMBDA=0.15)
* analysis
.TRAN 0.1PS 50PS
.DC VIN 0 7 0.001
.PLOT DC V(2)
.PLOT TRAN V(2) V(1)
.END
7- Save this file as cmos_inv.cir
8- Repeat steps 3.
9-From the plot windows find VOH, VOL, VIH, VIL, VM, tr, tf. You can find thesevalues from the printed values or by zooming into the plots windows. You can zoom into
a specific area of plot window by selecting that area with the mouse. Write their values
below.
NMOS
PMOS
NMOS
-
7/28/2019 SPICE_exp-1
3/4
VOH VOL VIH
(approx.)
VIL
(approx.)
VM tr tf
10- Draw the CMOS inverter labeling the nodes labeling the nodes with numbers asdesignated in the above description
11- Modify the above SPICE file to plot the waveforms of the currents flowing in the
PMOS and NMOS.
12- Simulate the ID vs VDS curves of a NMOS using NMOS model described in step-1.
Sweep VDS from 0 to 5V. Vary VGS from 0V to 0.7V in steps of 0.1V.AssumeL=0.5um W=2um LS=LD=0.75um.
13- The circuit shown below is known as Ring Oscillator Simulate the circuit using the
CMOS inverter described in step 6. Perform the transient analysis on the circuit and plot
output voltage of the 11th inverter. Also write down the SPICE input file
SPICE deck:
-
7/28/2019 SPICE_exp-1
4/4
MOSFET STRUCTURE IN 3D
AS = Area of Source = LS x W
AD = Area of Drain = LD x W
PS = Perimeter of Source =2 LS + W (channel side is not included)
PD = Perimeter of Drain =2 LD + W (channel side is not included)
Xj = Junction Depth
In SPICE: MXXXXXXX ND NG NS NB MNAME
+
ND, NG, NS, and NB are the drain, gate, source, and bulk (substrate) nodes, respectively.
MNAME is the model name.
DRAINSOURCE
body
W
L
polysilicongate
xj
LD
GATE
xj
LS