Vous êtes sur la page 1sur 60

Practical Date: / / .

Aim: To study N-MOS & P-MOS with its I-V characteristics.


Objective:

1. To be familiar with ngSpice tool.


2. To learn about concept of N-MOS & P-MOS.

Introduction

The metaloxidesemiconductor field-effect transistor (MOSFET) is a transistor used for amplifying


or switching electronic signals. In MOSFETs, a voltage on the oxide-insulated gate electrode can
induce a conducting channel between the two other contacts called source and drain. The channel
can be of n-type or p-type, and is accordingly called an nMOSFET or a pMOSFET. Figure 1 shows the
schematic diagram of the structure of an nMOS device before and after channel formation.

Figure 2 shows symbols commonly used for MOSFETs where the bulk terminal is either labeled (B)
or implied (not drawn).
Output Characteristics

MOSFET output characteristics plot ID versus VDS for several values of VGS.

The characteristics of an nMOS transistor can be explained as follows. As the voltage on the top
electrode increases further, electrons are attracted to the surface. At a particular voltage level,
which we will shortly define as the threshold voltage, the electron density at the surface exceeds
the hole density. At this voltage, the surface has inverted from the p-type polarity of the original
substrate to an n-type inversion layer, or inversion region, directly underneath the top plate as
indicated in Fig. 1(b). This inversion region is an extremely shallow layer, existing as a charge
sheet directly below the gate. In the MOS capacitor, the high density of electrons in the inversion
layer is supplied by the electronhole generation process within the depletion layer. The positive
charge on the gate is balanced by the combination of negative charge in the inversion layer plus
negative ionic acceptor charge in the depletion layer. The voltage at which the surface inversion
layer just forms plays an extremely important role in field-effect transistors and is called the
threshold voltage Vtn. The region of output characteristics where VGStn and no current flows is
called the cutt-off region. When the channel forms in the nMOS (pMOS) transistor, a positive
(negative) drain voltage with respect to the source creates a horizontal electric field moving the
electrons (holes) toward the drain forming a positive (negative) drain current coming into the
transistor. The positive current convention is used for electron and hole current, but in both cases
electrons are the actual charge carriers. If the channel horizontal electric field is of the same order
or smaller than the vertical thin oxide field, then the inversion channel remains almost uniform
along the device length. This continuous carrier profile from drain to source puts the transistor in a
bias state that is equivalently called either the non-saturated, linear, or ohmic bias state. The
drain and source are effectively short-circuited. This happens when VGS > VDS + Vtn for nMOS
transistor and VGS < VDS +Vtp for pMOS transistor. Drain current is linearly related to drain-
source voltage over small intervals in the linear bias state .
But if the nMOS drain voltage increases beyond the limit, so that VGS < VDS + Vtn, then the
horizontal electric field becomes stronger than the vertical field at the drain end, creating an
asymmetry of the channel carrier inversion distribution shown in Figure 4.

If the drain voltage riseswhile the gate voltage remains the same, then VGD can go below the

threshold voltage in the drain region. There can be no carrier inversion at the drain-gate oxide
region, so the inverted portion of the channel retracts from the drain, and no longer touches this
terminal. The pinched-off portion of the channel forms a depletion region with a high electric field.
The n-drain and p-bulk form a pn junction. When this happens the inversion channel is said to be
pinched-off and the device is in the saturation region. The characteristics can be loosely
modelled by the following equations.

Transfer Characteristics

The transfer characteristic relates drain current (ID) response to the input gate-source driving
voltage (VGS). Since the gate terminal is electrically isolated from the remaining terminals (drain,
source, and bulk), the gate current is essentially zero, so that gate current is not part of device
characteristics. The transfer characteristic curve can locate the gate voltage at which the transistor
passes current and leaves the OFF-state. This is the device threshold voltage (Vtn). Figure 5 shows
measured input characteristics for an nMOS and pMOS transistor with a small 0.1V potential across
their drain to source terminals.

The transistors are in their non-saturated bias states. As VGS increases for the nMOS transistor in
Figure 5a, the threshold voltage is reached where drain current elevates.
For VGS between 0V and 0.7V, ID is nearly zero indicating that the equivalent resistance between
the drain and source terminals is extremely high. Once VGS reaches 0.7V, the current increases
rapidly with VGS indicating that the equivalent resistance at the drain decreases with increasing
gate-source voltage. Therefore, the threshold voltage of the given nMOS transistor is about Vtn
0.7V. The pMOS transistor input characteristic in Figure 5b is analogous to the nMOS transistor
except the ID and VGS polarities are reversed.

Simulation:
CODE

N-MOS:-

VDS 1 0
VGS 2 0
M1 1 2 0 0 MODN L=0.18U W=0.36U
.DC VDS 0 1.8 .1 VGS 0 1.8 .6

.model MODN NMOS


+Level = 49
+Lint = 4.e-08 Tox = 4.e-09
+Vth0 = 0.3999 Rdsw = 250
+lmin=1.8e-7 lmax=1.8e-7
+wmin=1.8e-7 wmax=1.0e-4
+version =3.1 Xj= 6.0000000E-08
+Nch= 5.9500000E+17 lln= 1.0000000
+lwn= 1.0000000 wln= 0.00
+wwn= 0.00 ll= 0.00
+lw= 0.00 lwl= 0.00
+wint= 0.00 wl= 0.00
+ww= 0.00 wwl= 0.00
+Mobmod= 1 binunit= 2
+Dwg= 0.00 Dwb= 0.00
+K1= 0.5613000 K2= 1.0000000E-02
+K3= 0.00 Dvt0= 8.0000000
+Dvt1= 0.7500000 Dvt2= 8.0000000E-03
+Dvt0w= 0.00 Dvt1w= 0.00
+Dvt2w= 0.00 Nlx= 1.6500000E-07
+W0= 0.00 K3b= 0.00
+Ngate= 5.0000000E+20 Vsat= 1.3800000E+05
+Ua= -7.0000000E-10 Ub= 3.5000000E-18
+Uc= -5.2500000E-11 Prwb= 0.00
+Prwg= 0.00 Wr= 1.0000000
+U0= 3.5000000E-02 A0= 1.1000000
+Keta= 4.0000000E-02 A1= 0.00
+A2= 1.0000000 Ags= -1.0000000E-02
+B0= 0.00 B1= 0.00
+Voff= -0.12350000 NFactor= 0.9000000
+Cit= 0.00 Cdsc= 0.00
+Cdscb= 0.00 Cdscd= 0.00
+Eta0= 0.2200000 Etab= 0.00
+Dsub= 0.8000000 Pclm= 5.0000000E-02
+Pdiblc1= 1.2000000E-02
+Pdiblc2= 7.5000000E-03
+Pdiblcb= -1.3500000E-02
+Drout= 1.7999999E-02
+Pscbe1= 8.6600000E+08
+Pscbe2= 1.0000000E-20 Pvag= -0.2800000
+Delta= 1.0000000E-02Alpha0= 0.00
+Beta0= 30.0000000 kt1= -0.3700000
+kt2= -4.0000000E-02 At= 5.5000000E+04
+Ute= -1.4800000 Ua1= 9.5829000E-10
+Ub1= -3.3473000E-19 Uc1= 0.00
+Kt1l= 4.0000000E-09 Prt= 0.00
+Cj= 0.00365 Mj= 0.54
+Pb= 0.982 Cjsw= 7.9E-10
+Mjsw= 0.31 JS=1.50E-08
+JSW=2.50E-13 Xti=3.0
+Cgdo=2.786E-10 Cgso=2.786E-10
+Cgbo=0.0E+00 Capmod= 2
+NQSMOD= 0 Elm= 5
+Xpart= 1 Cgsl= 1.6E-10
+Cgdl= 1.6E-10 Ckappa= 2.886
+Cf= 1.069e-10 Clc= 0.0000001
+Cle= 0.6 Dlc= 4E-08
+Dwc= 0 Vfbcv= -1

.END

.CONTROL
run
.ENDC

P-MOS:-
VDS 1 0
VGS 2 0
M1 1 2 0 0 MODP L=0.18U W=0.36U
.DC VDS 0 -1.8 -.1 VGS 0 -1.8 -.6

.model MODP PMOS


+Level = 49
+Lint = 3.e-08 Tox = 4.2e-09
+Vth0 = -0.42 Rdsw = 450
+lmin=1.8e-7 lmax=1.8e-7
+wmin=1.8e-7 wmax=1.0e-4
+version =3.1 Xj= 7.0000000E-08
+Nch= 5.9200000E+17 lln= 1.0000000
+lwn= 1.0000000 wln= 0.00
+wwn= 0.00 ll= 0.00
+lw= 0.00 lwl= 0.00
+wint= 0.00 wl= 0.00
+ww= 0.00 wwl= 0.00
+Mobmod=1 binunit= 2
+Dwg= 0.00 Dwb= 0.00
+hdif=0.00 rsh= 0
+K1= 0.5560000 K2= 0.00
+K3= 0.00 Dvt0= 11.2000000
+Dvt1= 0.7200000 Dvt2= -1.0000000E-02
+Dvt0w= 0.00 Dvt1w= 0.00
+Dvt2w= 0.00 Nlx= 9.5000000E-08
+W0= 0.00 K3b= 0.00
+Ngate= 5.0000000E+20
+Vsat= 1.0500000E+05 Ua= -1.2000000E-10
+Ub= 1.0000000E-18
+Uc= -2.9999999E-11 Prwb= 0.00
+Prwg= 0.00 Wr= 1.0000000
+U0= 8.0000000E-03 A0= 2.1199999
+Keta= 2.9999999E-02 A1= 0.00
+A2= 0.4000000 Ags= -0.1000000
+B0= 0.00 B1= 0.00
+Voff= -6.40000000E-02 NFactor= 1.4000000
+Cit= 0.00 Cdsc= 0.00
+Cdscb= 0.00 Cdscd= 0.00
+Eta0= 8.5000000 Etab= 0.00
+Dsub= 2.8000000 Pclm= 2.0000000
+Pdiblc1= 0.1200000 Pdiblc2= 8.0000000E-05
+Pdiblcb= 0.1450000 Drout= 5.0000000E-02
+Pscbe1= 1.0000000E-20
+Pscbe2= 1.0000000E-20 Pvag= -6.0000000E-02
+Delta= 1.0000000E-02
+Alpha0= 0.00 Beta0= 30.0000000
+kt1= -0.3700000 kt2= -4.0000000E-02
+At= 5.5000000E+04 Ute= -1.4800000
+Ua1= 9.5829000E-10 Ub1= -3.3473000E-19
+Uc1= 0.00 Kt1l= 4.0000000E-09
+Prt= 0.00
.END

.CONTROL
run
.ENDC

CIRCUIT

[N-MOS] [P-MOS]
OUTPUT

[N-MOS] [P-MOS]
Practical Date: / / .

Aim: To study designing of NAND gate and simulation.

Objective:

3. To be familiar with ngSpice tool.


4. To learn about concept of NAND gate circuit.

CODE

V1 n1 0 DC 1.8
VIN1 n2 0 PULSE(0 1.8 0 10p 10p 5n 10n)
VIN2 n3 0 PULSE(0 1.8 0 10p 10p 1.5n 3n)
MP1 n5 n2 n1 n1 MODP L=0.18u W=0.9u
MP2 n5 n3 n1 n1 MODP L=0.18u W=0.9u
MN1 n4 n2 0 0 MODN L=0.18u W=0.72u
MN2 n5 n3 n4 0 MODN L=0.18u W=0.72u

.model MODP PMOS


+Level = 49 Lint = 3.e-08 Tox = 4.2e-09
+Vth0 = -0.42 Rdsw = 450 lmin=1.8e-7
+lmax=1.8e-7 wmin=1.8e-7 wmax=1.0e-4 Tref=27.0 version =3.1
+Xj= 7.0000000E-08 Nch= 5.9200000E+17
+lln= 1.0000000 lwn= 1.0000000 wln= 0.00
+wwn= 0.00 ll= 0.00
+lw= 0.00 lwl= 0.00 wint= 0.00
+wl= 0.00 ww= 0.00 wwl= 0.00
+Mobmod= 1 binunit= 2 xl= 0.00
+xw= 0.00
+binflag= 0 Dwg= 0.00 Dwb= 0.00
+ACM= 0 ldif=0.00 hdif=0.00
+rsh= 0 rd= 0 rs= 0
+rsc= 0 rdc= 0
+K1= 0.5560000 K2= 0.00
+K3= 0.00 Dvt0= 11.2000000 Dvt1= 0.7200000
+Dvt2= -1.0000000E-02 Dvt0w= 0.00 Dvt1w= 0.00
+Dvt2w= 0.00 Nlx= 9.5000000E-08 W0= 0.00
+K3b= 0.00 Ngate= 5.0000000E+20
+Vsat= 1.0500000E+05 Ua= -1.2000000E-10 Ub= 1.0000000E-18
+Uc= -2.9999999E-11 Prwb= 0.00
+Prwg= 0.00 Wr= 1.0000000 U0= 8.0000000E-03
+A0= 2.1199999 Keta= 2.9999999E-02 A1= 0.00
+A2= 0.4000000 Ags= -0.1000000 B0= 0.00
+B1= 0.00
+Voff= -6.40000000E-02 NFactor= 1.4000000 Cit= 0.00
+Cdsc= 0.00 Cdscb= 0.00 Cdscd= 0.00
+Eta0= 8.5000000 Etab= 0.00 Dsub= 2.8000000
+Pclm= 2.0000000 Pdiblc1= 0.1200000 Pdiblc2= 8.0000000E-05
+Pdiblcb= 0.1450000 Drout= 5.0000000E-02 Pscbe1= 1.0000000E-20
+Pscbe2= 1.0000000E-20 Pvag= -6.0000000E-02 Delta= 1.0000000E-02
+Alpha0= 0.00 Beta0= 30.0000000
+kt1= -0.3700000 kt2= -4.0000000E-02 At= 5.5000000E+04
+Ute= -1.4800000 Ua1= 9.5829000E-10 Ub1= -3.3473000E-19
+Uc1= 0.00 Kt1l= 4.0000000E-09 Prt= 0.00

.model MODN NMOS


+Level = 49
+Lint = 4.e-08 Tox = 4.e-09
+Vth0 = 0.3999 Rdsw = 250
+lmin=1.8e-7 lmax=1.8e-7 wmin=1.8e-7 wmax=1.0e-4 Tref=27.0 version =3.1
+Xj= 6.0000000E-08 Nch= 5.9500000E+17
+lln= 1.0000000 lwn= 1.0000000 wln= 0.00
+wwn= 0.00 ll= 0.00
+lw= 0.00 lwl= 0.00 wint= 0.00
+wl= 0.00 ww= 0.00 wwl= 0.00
+Mobmod= 1 binunit= 2 xl= 0
+xw= 0 binflag= 0
+Dwg= 0.00 Dwb= 0.00
+K1= 0.5613000 K2= 1.0000000E-02
+K3= 0.00 Dvt0= 8.0000000 Dvt1= 0.7500000
+Dvt2= 8.0000000E-03 Dvt0w= 0.00 Dvt1w= 0.00
+Dvt2w= 0.00 Nlx= 1.6500000E-07 W0= 0.00
+K3b= 0.00 Ngate= 5.0000000E+20
+Vsat= 1.3800000E+05 Ua= -7.0000000E-10 Ub= 3.5000000E-18
+Uc= -5.2500000E-11 Prwb= 0.00
+Prwg= 0.00 Wr= 1.0000000 U0= 3.5000000E-02
+A0= 1.1000000 Keta= 4.0000000E-02 A1= 0.00
+A2= 1.0000000 Ags= -1.0000000E-02 B0= 0.00
+B1= 0.00
+Voff= -0.12350000 NFactor= 0.9000000 Cit= 0.00
+Cdsc= 0.00 Cdscb= 0.00 Cdscd= 0.00
+Eta0= 0.2200000 Etab= 0.00 Dsub= 0.8000000
+Pclm= 5.0000000E-02 Pdiblc1= 1.2000000E-02 Pdiblc2= 7.5000000E-03
+Pdiblcb= -1.3500000E-02 Drout= 1.7999999E-02 Pscbe1= 8.6600000E+08
+Pscbe2= 1.0000000E-20 Pvag= -0.2800000 Delta= 1.0000000E-02
+Alpha0= 0.00 Beta0= 30.0000000
+kt1= -0.3700000 kt2= -4.0000000E-02 At= 5.5000000E+04
+Ute= -1.4800000 Ua1= 9.5829000E-10 Ub1= -3.3473000E-19
+Uc1= 0.00 Kt1l= 4.0000000E-09 Prt= 0.00
+Cj= 0.00365 Mj= 0.54 Pb= 0.982
+Cjsw= 7.9E-10 Mjsw= 0.31 Php= 0.841
+Cta= 0 Ctp= 0 Pta= 0
+Ptp= 0 JS=1.50E-08 JSW=2.50E-13
+N=1.0 Xti=3.0 Cgdo=2.786E-10
+Cgso=2.786E-10 Cgbo=0.0E+00 Capmod= 2
+NQSMOD= 0 Elm= 5 Xpart= 1
+Cgsl= 1.6E-10 Cgdl= 1.6E-10 Ckappa= 2.886
+Cf= 1.069e-10 Clc= 0.0000001 Cle= 0.6
+Dlc= 4E-08 Dwc= 0 Vfbcv= -1

.END

.CONTROL
tran 1ns 10ns
.ENDC

CIRCUIT
OUTPUT

[INPUT1]

[INPUT2]
[OUTPUT]
Practical Date: / / .

Aim: To study designing of NOR gate and simulation.

Objective:

1. To be familiar with ngSpice tool.


2. To learn about concept of NOR gate circuit.

CODE

V1 n1 0 DC 1.8
VIN1 n2 0 PULSE(0 1.8 0 10p 10p 5n 10n)
VIN2 n3 0 PULSE(0 1.8 0 10p 10p 1.5n 3n)
MP1 n4 n2 n1 n1 MODP L=0.18u W=1.8u
MP2 n5 n3 n4 n1 MODP L=0.18u W=1.8u
MN1 n5 n2 0 0 MODN L=0.18u W=0.36u
MN2 n5 n3 0 0 MODN L=0.18u W=0.36u

.model MODP PMOS


+Level = 49 Lint = 3.e-08 Tox = 4.2e-09
+Vth0 = -0.42 Rdsw = 450 lmin=1.8e-7
+lmax=1.8e-7 wmin=1.8e-7 wmax=1.0e-4 Tref=27.0 version =3.1
+Xj= 7.0000000E-08 Nch= 5.9200000E+17
+lln= 1.0000000 lwn= 1.0000000 wln= 0.00
+wwn= 0.00 ll= 0.00
+lw= 0.00 lwl= 0.00 wint= 0.00
+wl= 0.00 ww= 0.00 wwl= 0.00
+Mobmod= 1 binunit= 2 xl= 0.00
+xw= 0.00
+binflag= 0 Dwg= 0.00 Dwb= 0.00
+ACM= 0 ldif=0.00 hdif=0.00
+rsh= 0 rd= 0 rs= 0
+rsc= 0 rdc= 0
+K1= 0.5560000 K2= 0.00
+K3= 0.00 Dvt0= 11.2000000 Dvt1= 0.7200000
+Dvt2= -1.0000000E-02 Dvt0w= 0.00 Dvt1w= 0.00
+Dvt2w= 0.00 Nlx= 9.5000000E-08 W0= 0.00
+K3b= 0.00 Ngate= 5.0000000E+20
+Vsat= 1.0500000E+05 Ua= -1.2000000E-10 Ub= 1.0000000E-18
+Uc= -2.9999999E-11 Prwb= 0.00
+Prwg= 0.00 Wr= 1.0000000 U0= 8.0000000E-03
+A0= 2.1199999 Keta= 2.9999999E-02 A1= 0.00
+A2= 0.4000000 Ags= -0.1000000 B0= 0.00
+B1= 0.00
+Voff= -6.40000000E-02 NFactor= 1.4000000 Cit= 0.00
+Cdsc= 0.00 Cdscb= 0.00 Cdscd= 0.00
+Eta0= 8.5000000 Etab= 0.00 Dsub= 2.8000000
+Pclm= 2.0000000 Pdiblc1= 0.1200000 Pdiblc2= 8.0000000E-05
+Pdiblcb= 0.1450000 Drout= 5.0000000E-02 Pscbe1= 1.0000000E-20
+Pscbe2= 1.0000000E-20 Pvag= -6.0000000E-02 Delta= 1.0000000E-02
+Alpha0= 0.00 Beta0= 30.0000000
+kt1= -0.3700000 kt2= -4.0000000E-02 At= 5.5000000E+04
+Ute= -1.4800000 Ua1= 9.5829000E-10 Ub1= -3.3473000E-19
+Uc1= 0.00 Kt1l= 4.0000000E-09 Prt= 0.00

.model MODN NMOS


+Level = 49
+Lint = 4.e-08 Tox = 4.e-09
+Vth0 = 0.3999 Rdsw = 250
+lmin=1.8e-7 lmax=1.8e-7 wmin=1.8e-7 wmax=1.0e-4 Tref=27.0 version =3.1
+Xj= 6.0000000E-08 Nch= 5.9500000E+17
+lln= 1.0000000 lwn= 1.0000000 wln= 0.00
+wwn= 0.00 ll= 0.00
+lw= 0.00 lwl= 0.00 wint= 0.00
+wl= 0.00 ww= 0.00 wwl= 0.00
+Mobmod= 1 binunit= 2 xl= 0
+xw= 0 binflag= 0
+Dwg= 0.00 Dwb= 0.00
+K1= 0.5613000 K2= 1.0000000E-02
+K3= 0.00 Dvt0= 8.0000000 Dvt1= 0.7500000
+Dvt2= 8.0000000E-03 Dvt0w= 0.00 Dvt1w= 0.00
+Dvt2w= 0.00 Nlx= 1.6500000E-07 W0= 0.00
+K3b= 0.00 Ngate= 5.0000000E+20
+Vsat= 1.3800000E+05 Ua= -7.0000000E-10 Ub= 3.5000000E-18
+Uc= -5.2500000E-11 Prwb= 0.00
+Prwg= 0.00 Wr= 1.0000000 U0= 3.5000000E-02
+A0= 1.1000000 Keta= 4.0000000E-02 A1= 0.00
+A2= 1.0000000 Ags= -1.0000000E-02 B0= 0.00
+B1= 0.00
+Voff= -0.12350000 NFactor= 0.9000000 Cit= 0.00
+Cdsc= 0.00 Cdscb= 0.00 Cdscd= 0.00
+Eta0= 0.2200000 Etab= 0.00 Dsub= 0.8000000
+Pclm= 5.0000000E-02 Pdiblc1= 1.2000000E-02 Pdiblc2= 7.5000000E-03
+Pdiblcb= -1.3500000E-02 Drout= 1.7999999E-02 Pscbe1= 8.6600000E+08
+Pscbe2= 1.0000000E-20 Pvag= -0.2800000 Delta= 1.0000000E-02
+Alpha0= 0.00 Beta0= 30.0000000
+kt1= -0.3700000 kt2= -4.0000000E-02 At= 5.5000000E+04
+Ute= -1.4800000 Ua1= 9.5829000E-10 Ub1= -3.3473000E-19
+Uc1= 0.00 Kt1l= 4.0000000E-09 Prt= 0.00
+Cj= 0.00365 Mj= 0.54 Pb= 0.982
+Cjsw= 7.9E-10 Mjsw= 0.31 Php= 0.841
+Cta= 0 Ctp= 0 Pta= 0
+Ptp= 0 JS=1.50E-08 JSW=2.50E-13
+N=1.0 Xti=3.0 Cgdo=2.786E-10
+Cgso=2.786E-10 Cgbo=0.0E+00 Capmod= 2
+NQSMOD= 0 Elm= 5 Xpart= 1
+Cgsl= 1.6E-10 Cgdl= 1.6E-10 Ckappa= 2.886
+Cf= 1.069e-10 Clc= 0.0000001 Cle= 0.6
+Dlc= 4E-08 Dwc= 0 Vfbcv= -1

.END

.CONTROL
tran 1ns 10ns
.ENDC

CIRCUIT

OUTPUT
[INPUT1]

[INPUT2]
[OUTPUT]
Practical Date: / / .

Aim: To study designing of 4:1 MUX and simulation.

Objective:

1. To be familiar with ngSpice tool.


2. To learn about concept of Multiplexer circuit.

CODE

.SUBCKT TWOTOONE n2 n3 n4 n5 n6 n1
MN1 n2 n4 n6 0 MODN L=0.18u W=0.36u
MN2 n3 n5 n6 0 MODN L=0.18u W=0.36u
.ENDS TWOTOONE

.SUBCKT INVERTER n2 n3 n1
MP1 n3 n2 n1 n1 MODP L=0.18u W=0.72u
MN1 n3 n2 0 0 MODN L=0.18u W=0.36u
.ENDS INVERTER

Vc n1 0 DC 1.8
VIN3 n2 0 PULSE(0 1.8 0 1p 1p 5n 10n)
VIN2 n3 0 PULSE(0 1.8 0 1p 1p 10n 20n)
VIN1 n4 0 PULSE(0 1.8 0 1p 1p 15n 30n)
VIN0 n5 0 PULSE(0 1.8 0 1p 1p 20n 40n)
VS0 n6 0 PULSE(0 1.8 0 1p 1p 80n 160n)
VS1 n7 0 PULSE(0 1.8 0 1p 1p 160n 320n)
XIN0 n6 n8 n1 INVERTER
XIN1 n7 n9 n1 INVERTER
X00 n2 n3 n6 n8 n10 n1 TWOTOONE
X01 n4 n5 n6 n8 n11 n1 TWOTOONE
X1 n10 n11 n7 n9 n12 n1 TWOTOONE
.model MODP PMOS
+Level = 49 Lint = 3.e-08 Tox = 4.2e-09
+Vth0 = -0.42 Rdsw = 450 lmin=1.8e-7
+lmax=1.8e-7 wmin=1.8e-7 wmax=1.0e-4 Tref=27.0 version =3.1
+Xj= 7.0000000E-08 Nch= 5.9200000E+17
+lln= 1.0000000 lwn= 1.0000000 wln= 0.00
+wwn= 0.00 ll= 0.00
+lw= 0.00 lwl= 0.00 wint= 0.00
+wl= 0.00 ww= 0.00 wwl= 0.00
+Mobmod= 1 binunit= 2 xl= 0.00
+xw= 0.00
+binflag= 0 Dwg= 0.00 Dwb= 0.00
+ACM= 0 ldif=0.00 hdif=0.00
+rsh= 0 rd= 0 rs= 0
+rsc= 0 rdc= 0
+K1= 0.5560000 K2= 0.00
+K3= 0.00 Dvt0= 11.2000000 Dvt1= 0.7200000
+Dvt2= -1.0000000E-02 Dvt0w= 0.00 Dvt1w= 0.00
+Dvt2w= 0.00 Nlx= 9.5000000E-08 W0= 0.00
+K3b= 0.00 Ngate= 5.0000000E+20
+Vsat= 1.0500000E+05 Ua= -1.2000000E-10 Ub= 1.0000000E-18
+Uc= -2.9999999E-11 Prwb= 0.00
+Prwg= 0.00 Wr= 1.0000000 U0= 8.0000000E-03
+A0= 2.1199999 Keta= 2.9999999E-02 A1= 0.00
+A2= 0.4000000 Ags= -0.1000000 B0= 0.00
+B1= 0.00
+Voff= -6.40000000E-02 NFactor= 1.4000000 Cit= 0.00
+Cdsc= 0.00 Cdscb= 0.00 Cdscd= 0.00
+Eta0= 8.5000000 Etab= 0.00 Dsub= 2.8000000
+Pclm= 2.0000000 Pdiblc1= 0.1200000 Pdiblc2= 8.0000000E-05
+Pdiblcb= 0.1450000 Drout= 5.0000000E-02 Pscbe1= 1.0000000E-20
+Pscbe2= 1.0000000E-20 Pvag= -6.0000000E-02 Delta= 1.0000000E-02
+Alpha0= 0.00 Beta0= 30.0000000
+kt1= -0.3700000 kt2= -4.0000000E-02 At= 5.5000000E+04
+Ute= -1.4800000 Ua1= 9.5829000E-10 Ub1= -3.3473000E-19
+Uc1= 0.00 Kt1l= 4.0000000E-09 Prt= 0.00

.model MODN NMOS


+Level = 49
+Lint = 4.e-08 Tox = 4.e-09
+Vth0 = 0.3999 Rdsw = 250
+lmin=1.8e-7 lmax=1.8e-7 wmin=1.8e-7 wmax=1.0e-4 Tref=27.0 version =3.1
+Xj= 6.0000000E-08 Nch= 5.9500000E+17
+lln= 1.0000000 lwn= 1.0000000 wln= 0.00
+wwn= 0.00 ll= 0.00
+lw= 0.00 lwl= 0.00 wint= 0.00
+wl= 0.00 ww= 0.00 wwl= 0.00
+Mobmod= 1 binunit= 2 xl= 0
+xw= 0 binflag= 0
+Dwg= 0.00 Dwb= 0.00
+K1= 0.5613000 K2= 1.0000000E-02
+K3= 0.00 Dvt0= 8.0000000 Dvt1= 0.7500000
+Dvt2= 8.0000000E-03 Dvt0w= 0.00 Dvt1w= 0.00
+Dvt2w= 0.00 Nlx= 1.6500000E-07 W0= 0.00
+K3b= 0.00 Ngate= 5.0000000E+20
+Vsat= 1.3800000E+05 Ua= -7.0000000E-10 Ub= 3.5000000E-18
+Uc= -5.2500000E-11 Prwb= 0.00
+Prwg= 0.00 Wr= 1.0000000 U0= 3.5000000E-02
+A0= 1.1000000 Keta= 4.0000000E-02 A1= 0.00
+A2= 1.0000000 Ags= -1.0000000E-02 B0= 0.00
+B1= 0.00
+Voff= -0.12350000 NFactor= 0.9000000 Cit= 0.00
+Cdsc= 0.00 Cdscb= 0.00 Cdscd= 0.00
+Eta0= 0.2200000 Etab= 0.00 Dsub= 0.8000000
+Pclm= 5.0000000E-02 Pdiblc1= 1.2000000E-02 Pdiblc2= 7.5000000E-03
+Pdiblcb= -1.3500000E-02 Drout= 1.7999999E-02 Pscbe1= 8.6600000E+08
+Pscbe2= 1.0000000E-20 Pvag= -0.2800000 Delta= 1.0000000E-02
+Alpha0= 0.00 Beta0= 30.0000000
+kt1= -0.3700000 kt2= -4.0000000E-02 At= 5.5000000E+04
+Ute= -1.4800000 Ua1= 9.5829000E-10 Ub1= -3.3473000E-19
+Uc1= 0.00 Kt1l= 4.0000000E-09 Prt= 0.00
+Cj= 0.00365 Mj= 0.54 Pb= 0.982
+Cjsw= 7.9E-10 Mjsw= 0.31 Php= 0.841
+Cta= 0 Ctp= 0 Pta= 0
+Ptp= 0 JS=1.50E-08 JSW=2.50E-13
+N=1.0 Xti=3.0 Cgdo=2.786E-10
+Cgso=2.786E-10 Cgbo=0.0E+00 Capmod= 2
+NQSMOD= 0 Elm= 5 Xpart= 1
+Cgsl= 1.6E-10 Cgdl= 1.6E-10 Ckappa= 2.886
+Cf= 1.069e-10 Clc= 0.0000001 Cle= 0.6
+Dlc= 4E-08 Dwc= 0 Vfbcv= -1

.END

.CONTROL
tran 1n 350n
.ENDC
CIRCUIT

OUTPUT

[DATA INPUT] [DATA INPUT]


[DATA INPUT] [DATA INPUT]

[SELECT INPUT] [SELECT INPUT]


[OUTPUT]
Practical Date: / / .

Aim: To study designing of HALF ADDER and simulation.

Objective:

1. To be familiar with ngSpice tool.


2. To learn about concept of HALF ADDER circuit.

CODE

*Code for Half Adder Gate

*CMOS Inverter
.subckt INV 2 1
.model P1 PMOS kp=200 VTO=-1 NSUB= 1.0E15 UO=550
.model N1 NMOS kp=200 VTO=1 NSUB= 1.0E15 UO=550
M1 1 2 3 3 P1 L=1U W=1U AD=10P AS=10P
M2 1 2 0 0 N1 L=2U W=6U AD=10P AS=10P
VDD 3 0 DC 5V
VSS 0 0 DC 0V
.ends

*XOR Gate
.subckt XOR 1 4 5
.model P1 PMOS Kp=20
.model N1 NMOS Kp=20
M1 2 1 3 3 P1
M2 5 4 1 3 P1
M3 2 1 0 0 N1
M4 2 4 5 0 N1
VDD 3 0 5V
VSS 0 0 0V
.ends

*NAND Gate
.subckt NAND 2 4 1
M1 1 2 3 3 P1
M2 1 4 3 3 P1
M3 1 2 5 5 N1
M4 5 4 0 0 N1
VDD 3 0 5V
VSS 0 0 0V
.model P1 PMOS Kp=20
.model N1 NMOS Kp=20
.ends

X1 1 2 3 XOR
X2 1 2 4 NAND
X3 4 5 INV
VA 1 0 pulse(0 5 40ns 0 0 40ns 80ns)
VB 2 0 pulse(0 5 20ns 0 0 40ns 80ns)

.tran 0.01ns 100ns


.control
destroy all
run
set color0=white
set color1=black
set xbrushwidth=3
plot V(1)
Plot V(2)
plot V(3)
plot V(5)
.ENDC
.end

OUTPUT

[INPUT]
[SUM]

[CARRY]
Practical Date: / / .

Aim: To study CMOS transfer characteristics.

Objective:

1. To be familiar with ngSpice tool.


2. To learn about concept of CMOS.

Digital inverter quality is often measured using the Voltage Transfer Curve (VTC), which is a plot of
input vs. output voltage. From such a graph, device parameters including noise tolerance, gain,
and operating logic-levels can be obtained.

Ideally, the voltage transfer curve (VTC) appears as an inverted step-function - this would indicate
precise switching betweenon and off - but in real devices, a gradual transition region exists. The
VTC indicates that for low input voltage, the circuit outputs high voltage; for high input, the output
tapers off towards 0 volts. The slope of this transition region is a measure of quality - steep (close
to -Infinity) slopes yield precise switching. The tolerance to noise can be measured by comparing
the minimum input to the maximum output for each region of operation (on / off).

CODE

V1 n1 0 DC 1.8

MP n2 n0 n1 n1 MODP L=0.18u W=2.5u

MN n2 n0 0 0 MODN L=0.18u W=0.36u

VIN n0 0

.DC VIN 0 1.8 0.1

.model MODP PMOS

+Level = 49

+Lint = 3.e-08 Tox = 4.2e-09

+Vth0 = -0.42 Rdsw = 450


+lmin=1.8e-7 lmax=1.8e-7

+wmin=1.8e-7 wmax=1.0e-4

+version =3.1 Xj= 7.0000000E-08

+Nch= 5.9200000E+17 lln= 1.0000000

+lwn= 1.0000000 wln= 0.00

+wwn= 0.00 ll= 0.00

+lw= 0.00 lwl= 0.00

+wint= 0.00 wl= 0.00

+ww= 0.00 wwl= 0.00

+Mobmod=1 binunit= 2

+Dwg= 0.00 Dwb= 0.00

+hdif=0.00 rsh= 0

+K1= 0.5560000 K2= 0.00

+K3= 0.00 Dvt0= 11.2000000

+Dvt1= 0.7200000 Dvt2= -1.0000000E-02

+Dvt0w= 0.00 Dvt1w= 0.00

+Dvt2w= 0.00 Nlx= 9.5000000E-08

+W0= 0.00 K3b= 0.00

+Ngate= 5.0000000E+20

+Vsat= 1.0500000E+05 Ua= -1.2000000E-10

+Ub= 1.0000000E-18

+Uc= -2.9999999E-11 Prwb= 0.00

+Prwg= 0.00 Wr= 1.0000000

+U0= 8.0000000E-03 A0= 2.1199999

+Keta= 2.9999999E-02 A1= 0.00

+A2= 0.4000000 Ags= -0.1000000

+B0= 0.00 B1= 0.00

+Voff= -6.40000000E-02 NFactor= 1.4000000

+Cit= 0.00 Cdsc= 0.00

+Cdscb= 0.00 Cdscd= 0.00

+Eta0= 8.5000000 Etab= 0.00

+Dsub= 2.8000000 Pclm= 2.0000000

+Pdiblc1= 0.1200000 Pdiblc2= 8.0000000E-05

+Pdiblcb= 0.1450000 Drout= 5.0000000E-02

+Pscbe1= 1.0000000E-20
+Pscbe2= 1.0000000E-20 Pvag= -6.0000000E-02

+Delta= 1.0000000E-02

+Alpha0= 0.00 Beta0= 30.0000000

+kt1= -0.3700000 kt2= -4.0000000E-02

+At= 5.5000000E+04 Ute= -1.4800000

+Ua1= 9.5829000E-10 Ub1= -3.3473000E-19

+Uc1= 0.00 Kt1l= 4.0000000E-09

+Prt= 0.00

.model MODN NMOS

+Level = 49

+Lint = 4.e-08 Tox = 4.e-09

+Vth0 = 0.3999 Rdsw = 250

+lmin=1.8e-7 lmax=1.8e-7

+wmin=1.8e-7 wmax=1.0e-4

+version =3.1 Xj= 6.0000000E-08

+Nch= 5.9500000E+17 lln= 1.0000000

+lwn= 1.0000000 wln= 0.00

+wwn= 0.00 ll= 0.00

+lw= 0.00 lwl= 0.00

+wint= 0.00 wl= 0.00

+ww= 0.00 wwl= 0.00

+Mobmod= 1 binunit= 2

+Dwg= 0.00 Dwb= 0.00

+K1= 0.5613000 K2= 1.0000000E-02

+K3= 0.00 Dvt0= 8.0000000

+Dvt1= 0.7500000 Dvt2= 8.0000000E-03

+Dvt0w= 0.00 Dvt1w= 0.00

+Dvt2w= 0.00 Nlx= 1.6500000E-07

+W0= 0.00 K3b= 0.00

+Ngate= 5.0000000E+20 Vsat= 1.3800000E+05

+Ua= -7.0000000E-10 Ub= 3.5000000E-18

+Uc= -5.2500000E-11 Prwb= 0.00

+Prwg= 0.00 Wr= 1.0000000

+U0= 3.5000000E-02 A0= 1.1000000


+Keta= 4.0000000E-02 A1= 0.00

+A2= 1.0000000 Ags= -1.0000000E-02

+B0= 0.00 B1= 0.00

+Voff= -0.12350000 NFactor= 0.9000000

+Cit= 0.00 Cdsc= 0.00

+Cdscb= 0.00 Cdscd= 0.00

+Eta0= 0.2200000 Etab= 0.00

+Dsub= 0.8000000 Pclm= 5.0000000E-02

+Pdiblc1= 1.2000000E-02

+Pdiblc2= 7.5000000E-03

+Pdiblcb= -1.3500000E-02

+Drout= 1.7999999E-02

+Pscbe1= 8.6600000E+08

+Pscbe2= 1.0000000E-20 Pvag= -0.2800000

+Delta= 1.0000000E-02 Alpha0= 0.00

+Beta0= 30.0000000 kt1= -0.3700000

+kt2= -4.0000000E-02 At= 5.5000000E+04

+Ute= -1.4800000 Ua1= 9.5829000E-10

+Ub1= -3.3473000E-19 Uc1= 0.00

+Kt1l= 4.0000000E-09 Prt= 0.00

+Cj= 0.00365 Mj= 0.54

+Pb= 0.982 Cjsw= 7.9E-10

+Mjsw= 0.31 JS=1.50E-08

+JSW=2.50E-13 Xti=3.0

+Cgdo=2.786E-10 Cgso=2.786E-10

+Cgbo=0.0E+00 Capmod= 2

+NQSMOD= 0 Elm= 5

+Xpart= 1 Cgsl= 1.6E-10

+Cgdl= 1.6E-10 Ckappa= 2.886

+Cf= 1.069e-10 Clc= 0.0000001

+Cle= 0.6 Dlc= 4E-08

+Dwc= 0 Vfbcv= -1

.END
.CONTROL

run

.ENDC

CIRCUIT

OUTPUT

[nMOSW=0.36u] [nMOSW=0.36u]

[pMOSW=0.72u] [pMOSW=2.5u]

{2 times} {5 times}

Vous aimerez peut-être aussi