Digtal Ic Manual
Digtal Ic Manual
PART I
1) Use VDD=1.8V for 0.18um CMOS process, VDD=1.3V for 0.13um CMOS
Process and
VDD=1V for 0.09um CMOS Process.
Input Characteristics Analysis
a) Plot and analyse ID vs. VGS at different drain voltages for NMOS,
PMOS. Determine Vt
b) Plot log ID vs. VGS at particular drain voltage (high) for NMOS, PMOS
and determine IOFF and sub-threshold slope.
Output Characteristics Analysis
a) Plot ID vs. VDS at different gate voltages for NMOS, PMOS and
determine Channel
Length modulation factor.
b) Plot ID vs. VDS at different gate voltages for NMOS, PMOS and
calculate gm, gds, gm/gds, and unity gain frequency. Tabulate your result
according to technologies and comment on it.
1
Input Characteristics Analysis
***************library file***************
.MODEL NMOS NMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4.1E-9
+XJ = 1E-7 NCH = 2.3549E17 VTH0 = 0.3661665
+K1 = 0.5857155 K2 = 2.994278E-3 K3 = 3.556898E-3
+K3B = 1.8784845 W0 = 1E-7 NLX = 1.80374E-7
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 1.2506467 DVT1 = 0.3605386 DVT2 = 0.0408777
+U0 = 269.1687827 UA = -1.424122E-9 UB = 2.475132E-18
+UC = 7.558213E-11 VSAT = 1.070462E5 A0 = 1.9772757
+AGS = 0.45153 B0 = 2.56812E-7 B1 = 5E-6
+KETA = -0.0130762 A1 = 2.024625E-4 A2 = 0.8237527
+RDSW = 105 PRWG = 0.4945196 PRWB = -0.2
+WR =1 WINT = 1.880796E-9 LINT = 1.401095E-8
+XL =0 XW = -1E-8 DWG = -2.161747E-9
+DWB = 8.373845E-9 VOFF = -0.0936982 NFACTOR = 2.2128214
+CIT =0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 2.671776E-3 ETAB = 9.400138E-6
+DSUB = 0.0128511 PCLM = 0.7712839 PDIBLC1 = 0.1468288
+PDIBLC2 = 2.967266E-3 PDIBLCB = -0.1 DROUT = 0.6975638
+PSCBE1 = 4.088149E10 PSCBE2 = 2.354872E-9 PVAG = 0.0106191
+DELTA = 0.01 RSH = 6.5 MOBMOD = 1
+PRT =0 UTE = -1.5 KT1 = -0.11
2
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL =0 WLN =1 WW =0
+WWN =1 WWL =0 LL =0
+LLN =1 LW =0 LWN =1
+LWL =0 CAPMOD = 2 XPART = 0.5
+CGDO = 9.37E-10 CGSO = 9.37E-10 CGBO = 1E-14
+CJ = 9.555366E-4 PB = 0.8 MJ = 0.3827435
+CJSW = 2.69781E-10 PBSW = 0.8 MJSW = 0.145082
+CJSWG = 3.3E-10 PBSWG = 0.8 MJSWG = 0.145082
+CF =0 PVTH0 = 2.401607E-4 PRDSW = -3.1167685
+PK2 = 6.948372E-4 WKETA = -2.542534E-4 LKETA = -5.176493E-3
+PU0 = 7.5752863 PUA = 1.590549E-11 PUB = 3.528309E-24
+PVSAT = 1.522996E3 PETA0 = 1.003159E-4 PKETA = -3.041391E-3 )
*
.MODEL PMOS PMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4.1E-9
+XJ = 1E-7 NCH = 4.1589E17 VTH0 = -0.3944719
+K1 = 0.5828995 K2 = 0.0266823 K3 =0
+K3B = 14.3383713 W0 = 1E-6 NLX = 1.373459E-7
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 0.6336613 DVT1 = 0.2409053 DVT2 = 0.1
+U0 = 112.690631 UA = 1.417849E-9 UB = 1.12483E-21
+UC = -1E-10 VSAT = 1.850699E5 A0 = 1.7532818
+AGS = 0.375203 B0 = 3.569636E-7 B1 = 1.12458E-6
+KETA = 0.0205518 A1 = 0.4474986 A2 = 0.3631955
+RDSW = 243.82298 PRWG = 0.5 PRWB = 0.5
+WR =1 WINT = 0 LINT = 2.551606E-8
+XL =0 XW = -1E-8 DWG = -4.374325E-8
+DWB = 2.595671E-10 VOFF = -0.0937437 NFACTOR = 2
3
+CIT =0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 0.1136843 ETAB = -0.0748821
+DSUB = 1.0613195 PCLM = 2.4303317 PDIBLC1 = 7.845168E-4
+PDIBLC2 = 0.0239307 PDIBLCB = -1E-3 DROUT = 0
+PSCBE1 = 3.207414E9 PSCBE2 = 9.282296E-10 PVAG = 15
+DELTA = 0.01 RSH = 7.5 MOBMOD = 1
+PRT =0 UTE = -1.5 KT1 = -0.11
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL =0 WLN =1 WW =0
+WWN =1 WWL =0 LL =0
+LLN =1 LW =0 LWN =1
+LWL =0 CAPMOD = 2 XPART = 0.5
+CGDO = 6.34E-10 CGSO = 6.34E-10 CGBO = 1E-14
+CJ = 1.148543E-3 PB = 0.8476511 MJ = 0.4067434
+CJSW = 2.382898E-10 PBSW = 0.8222976 MJSW = 0.3300124
+CJSWG = 4.22E-10 PBSWG = 0.8222976 MJSWG = 0.3300124
+CF =0 PVTH0 = 3.507137E-3 PRDSW = 17.811338
+PK2 = 3.610481E-3 WKETA = 0.0334716 LKETA = -3.202602E-3
+PU0 = -2.0541594 PUA = -8.93082E-11 PUB = 1E-21
+PVSAT = -50 PETA0 = 1.003159E-4 PKETA = -1.696047E-3 )
*****************************************************
.PARAM
.OPTION POST
**** main ckt****************************************
4
Vin in 0 1.8v
.end
*****************************
Vt= 351.8578m
5
VDD=1.3V FOR 0.13um NMOS
Add library files .
.PARAM
.OPTION POST
**** main ckt****************************************
.end
6
WAVEFORM for ID vs VGS
Vt=280.1352m
7
WAVEFORM FOR ID vs VGS
Vt= 198.5274m
8
PMOS VDD=1.8V for 0.18um
* PMOS Characteristics
.MODEL NMOS NMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4.1E-9
+XJ = 1E-7 NCH = 2.3549E17 VTH0 = 0.3661665
+K1 = 0.5857155 K2 = 2.994278E-3 K3 = 3.556898E-3
+K3B = 1.8784845 W0 = 1E-7 NLX = 1.80374E-7
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 1.2506467 DVT1 = 0.3605386 DVT2 = 0.0408777
+U0 = 269.1687827 UA = -1.424122E-9 UB = 2.475132E-18
+UC = 7.558213E-11 VSAT = 1.070462E5 A0 = 1.9772757
+AGS = 0.45153 B0 = 2.56812E-7 B1 = 5E-6
+KETA = -0.0130762 A1 = 2.024625E-4 A2 = 0.8237527
+RDSW = 105 PRWG = 0.4945196 PRWB = -0.2
+WR =1 WINT = 1.880796E-9 LINT = 1.401095E-8
+XL =0 XW = -1E-8 DWG = -2.161747E-9
+DWB = 8.373845E-9 VOFF = -0.0936982 NFACTOR = 2.2128214
+CIT =0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 2.671776E-3 ETAB = 9.400138E-6
+DSUB = 0.0128511 PCLM = 0.7712839 PDIBLC1 = 0.1468288
+PDIBLC2 = 2.967266E-3 PDIBLCB = -0.1 DROUT = 0.6975638
+PSCBE1 = 4.088149E10 PSCBE2 = 2.354872E-9 PVAG = 0.0106191
+DELTA = 0.01 RSH = 6.5 MOBMOD = 1
+PRT =0 UTE = -1.5 KT1 = -0.11
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL =0 WLN =1 WW =0
+WWN =1 WWL =0 LL =0
+LLN =1 LW =0 LWN =1
+LWL =0 CAPMOD = 2 XPART = 0.5
9
+CGDO = 9.37E-10 CGSO = 9.37E-10 CGBO = 1E-14
+CJ = 9.555366E-4 PB = 0.8 MJ = 0.3827435
+CJSW = 2.69781E-10 PBSW = 0.8 MJSW = 0.145082
+CJSWG = 3.3E-10 PBSWG = 0.8 MJSWG = 0.145082
+CF =0 PVTH0 = 2.401607E-4 PRDSW = -3.1167685
+PK2 = 6.948372E-4 WKETA = -2.542534E-4 LKETA = -5.176493E-3
+PU0 = 7.5752863 PUA = 1.590549E-11 PUB = 3.528309E-24
+PVSAT = 1.522996E3 PETA0 = 1.003159E-4 PKETA = -3.041391E-3 )
*
.MODEL PMOS PMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4.1E-9
+XJ = 1E-7 NCH = 4.1589E17 VTH0 = -0.3944719
+K1 = 0.5828995 K2 = 0.0266823 K3 =0
+K3B = 14.3383713 W0 = 1E-6 NLX = 1.373459E-7
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 0.6336613 DVT1 = 0.2409053 DVT2 = 0.1
+U0 = 112.690631 UA = 1.417849E-9 UB = 1.12483E-21
+UC = -1E-10 VSAT = 1.850699E5 A0 = 1.7532818
+AGS = 0.375203 B0 = 3.569636E-7 B1 = 1.12458E-6
+KETA = 0.0205518 A1 = 0.4474986 A2 = 0.3631955
+RDSW = 243.82298 PRWG = 0.5 PRWB = 0.5
+WR =1 WINT = 0 LINT = 2.551606E-8
+XL =0 XW = -1E-8 DWG = -4.374325E-8
+DWB = 2.595671E-10 VOFF = -0.0937437 NFACTOR = 2
+CIT =0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 0.1136843 ETAB = -0.0748821
+DSUB = 1.0613195 PCLM = 2.4303317 PDIBLC1 = 7.845168E-4
+PDIBLC2 = 0.0239307 PDIBLCB = -1E-3 DROUT = 0
+PSCBE1 = 3.207414E9 PSCBE2 = 9.282296E-10 PVAG = 15
+DELTA = 0.01 RSH = 7.5 MOBMOD = 1
10
+PRT =0 UTE = -1.5 KT1 = -0.11
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL =0 WLN =1 WW =0
+WWN =1 WWL =0 LL =0
+LLN =1 LW =0 LWN =1
+LWL =0 CAPMOD = 2 XPART = 0.5
+CGDO = 6.34E-10 CGSO = 6.34E-10 CGBO = 1E-14
+CJ = 1.148543E-3 PB = 0.8476511 MJ = 0.4067434
+CJSW = 2.382898E-10 PBSW = 0.8222976 MJSW = 0.3300124
+CJSWG = 4.22E-10 PBSWG = 0.8222976 MJSWG = 0.3300124
+CF =0 PVTH0 = 3.507137E-3 PRDSW = 17.811338
+PK2 = 3.610481E-3 WKETA = 0.0334716 LKETA = -3.202602E-3
+PU0 = -2.0541594 PUA = -8.93082E-11 PUB = 1E-21
+PVSAT = -50 PETA0 = 1.003159E-4 PKETA = -1.696047E-3 )
*
*Use VDD=1.8V for 0.18um
.PARAM
.OPTION POST
M1 vdd ng 0 0 pmos W=360n L=180n
R1 in ng 50
Vdd vdd 0 1.8v
Vin in 0 1.8v
*** SIMULATION Commands ***
.op
.dc Vin -1.8 0 0.05 Vdd -1.8 0 0.3
.probe dc i(m1)
.end
11
WAVEFORM for ID vs VGS
Vt=-201.9340m
.PARAM
.OPTION POST
M1 vdd ng 0 0 pmos W=360n L=130n
R1 in ng 50
Vdd vdd 0 1.3v
Vin in 0 1.3v
12
.end
13
VDD=1V for 0.09un
Add library file
.PARAM
.OPTION POST
M1 vdd ng 0 0 pmos W=180n L=90n
R1 in ng 50
Vdd vdd 0 1v
Vin in 0 1v
*** SIMULATION Commands ***
.op
.dc Vin -1 0 0.05 Vdd -1 0 0.3
.probe dc i(m1)
.end
14
WAVEFORM for ID vs VGS
Vt= -113.9333m
b) Plot log ID vs. VGS at particular drain voltage (high) for NMOS, PMOS and
determine IOFF and sub-threshold slope
for nmos 180n
Add library file
M1 vdd ng 0 0 nmos W=360n L=180n
R1 in ng 50
Vdd vdd 0 1.8v
Vin in 0 1.8v
*** SIMULATION Commands ***.op
.dc Vin 0 1.8 0.05 Vdd 0 1.8 1.8
.probe dc i(m1)
.load current current
.end
15
WAVEFORM
16
WAVEFORM
IOFF=208.02p sub-threshold =1.5678u
17
WAVEFORM
IOFF=819.32p sub-threshold =505.44n
18
Output Characteristics Analysis
VDD=1.8V for 0.18un
Add library file
.OPTION POST
.PARAM
*** NETLIST Description ***
M1 vdd ng 0 0 nmos W=360n L=180n
R1 in ng 50
Vdd vdd 0 1.8v
Vin in 0 1.8v
*** SIMULATION Commands ***
.op
.dc Vdd 0 1.8 0.1 Vin 0 1.8 0.5
.probe dc i(m1)
.load current current
.end
19
WAVEFORM
20
VDD=1.3V for 0.13un
Add library file
.OPTION POST
.PARA
*** NETLIST Description ***
M1 vdd ng 0 0 nmos W=260n L=130n
R1 in ng 50
Vdd vdd 0 1.3v
Vin in 0 1.3v
*** SIMULATION Commands ***
.op
.dc Vdd 0 1.3 0.01 Vin 0 1.3 0.5
.probe dc i(m1)
.load current current
.end
21
WAVEFORM
Vgs=1.3v, lamda=28.77u
Vgs=1v, lamda=12.58u
Vgs=0.5v, lamda=4.33u
Vgs=0.2v, lamda=48.26n
22
VDD=1V for 0.09un
Add library file
.OPTION POST
.PARAM
*** NETLIST Description ***
.end
23
WAVEFORM
Vgs=1v, lamda=22.75u
Vgs=0.5v,lamda=13.185u
Vgs=0.1v,lamda=13.45n
24
PMOS ID VS VDS
VDD=1.8V for 0.18um
Add library file
.PARAM
.OPTION POST
M1 vdd ng 0 0 pmos W=360n L=180n
R1 in ng 50
Vdd vdd 0 1.8v
Vin in 0 1.8v
*** SIMULATION Commands ***
.op
.dc Vdd -1.8 0 0.1 Vin -1.8 0 0.3
.probe dc i(m1)
.end
25
WAVEFORM
Vgs=-1.8v, lamda=34.24u
Vgs=-1.5v, lamda=24.09u
Vgs=-1v, lamda=13.88u
Vgs=-0.5v, lamda=3.4u
Vgs=0.1v, lamda=9.56p
26
VDD=1.3V FOR 0.13um
Add library files.
.PARAM
.OPTION POST
M1 vdd ng 0 0 pmos W=260n L=130n
R1 in ng 50
Vdd vdd 0 1.3v
Vin in 0 1.3v
27
WAVEFORM
Vgs=-1.3v,lamda=23.36u
Vgs=-1v,lamda=15.10u
Vgs=-0.1v,lamda=2.47n
28
VDD=1V for 0.09un
Add library file
.PARAM
.OPTION POST
M1 vdd ng 0 0 pmos W=180n L=90n
R1 in ng 50
Vdd vdd 0 1v
Vin in 0 1v
29
WAVEFORM
Vgs=-1v,lamda=16.16u
Vgs=-0.5v,lamda=4.63u
Vgs=-0.1v,lamda=9.07u
30
b) Plot ID vs. VDS at different gate voltages for NMOS, PMOS and
calculate gm, gds, gm/gds, and unity gain frequency. Tabulate your result
according to technologies and comment on it.
31
2) Use VDD=1.8V for 0.18um CMOS process, VDD=1.2V for
0.13um CMOS Process and
VDD=1V for 0.09um CMOS Process.
a) Perform the following
i. Plot VTC curve for CMOS inverter and thereon plot dVout
vs. dVin and determine
Transition voltage and gain g. Calculate VIL, VIH, NMH,
NML for the inverter.
ii. Plot VTC for CMOS inverter with varying VDD.
iii. Plot VTC for CMOS inverter with varying device ratio.
b) Perform transient analysis of CMOS inverter with no load and
with load and determine
tpHL, tpLH, 20%-to-80% tr and 80%-to-20% tf. (use VPULSE =
2V, Cload = 50fF)
32
VDD=1.8V for 0.18um CMOS process
*TECHNOLOGY: SCN018
FEATURE SIZE: 0.18 microns
33
+WL =0 WLN =1 WW =0
+WWN =1 WWL =0 LL =0
+LLN =1 LW =0 LWN =1
+LWL =0 CAPMOD = 2 XPART = 0.5
+CGDO = 9.37E-10 CGSO = 9.37E-10 CGBO = 1E-14
+CJ = 9.555366E-4 PB = 0.8 MJ = 0.3827435
+CJSW = 2.69781E-10 PBSW = 0.8 MJSW = 0.145082
+CJSWG = 3.3E-10 PBSWG = 0.8 MJSWG = 0.145082
+CF =0 PVTH0 = 2.401607E-4 PRDSW = -3.1167685
+PK2 = 6.948372E-4 WKETA = -2.542534E-4 LKETA = -5.176493E-3
+PU0 = 7.5752863 PUA = 1.590549E-11 PUB = 3.528309E-24
+PVSAT = 1.522996E3 PETA0 = 1.003159E-4 PKETA = -3.041391E-3 )
*
.MODEL PMOS PMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4.1E-9
+XJ = 1E-7 NCH = 4.1589E17 VTH0 = -0.3944719
+K1 = 0.5828995 K2 = 0.0266823 K3 =0
+K3B = 14.3383713 W0 = 1E-6 NLX = 1.373459E-7
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 0.6336613 DVT1 = 0.2409053 DVT2 = 0.1
+U0 = 112.690631 UA = 1.417849E-9 UB = 1.12483E-21
+UC = -1E-10 VSAT = 1.850699E5 A0 = 1.7532818
+AGS = 0.375203 B0 = 3.569636E-7 B1 = 1.12458E-6
+KETA = 0.0205518 A1 = 0.4474986 A2 = 0.3631955
+RDSW = 243.82298 PRWG = 0.5 PRWB = 0.5
+WR =1 WINT = 0 LINT = 2.551606E-8
+XL =0 XW = -1E-8 DWG = -4.374325E-8
+DWB = 2.595671E-10 VOFF = -0.0937437 NFACTOR = 2
+CIT =0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 0.1136843 ETAB = -0.0748821
34
+DSUB = 1.0613195 PCLM = 2.4303317 PDIBLC1 = 7.845168E-4
+PDIBLC2 = 0.0239307 PDIBLCB = -1E-3 DROUT = 0
+PSCBE1 = 3.207414E9 PSCBE2 = 9.282296E-10 PVAG = 15
+DELTA = 0.01 RSH = 7.5 MOBMOD = 1
+PRT =0 UTE = -1.5 KT1 = -0.11
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL =0 WLN =1 WW =0
+WWN =1 WWL =0 LL =0
+LLN =1 LW =0 LWN =1
+LWL =0 CAPMOD = 2 XPART = 0.5
+CGDO = 6.34E-10 CGSO = 6.34E-10 CGBO = 1E-14
+CJ = 1.148543E-3 PB = 0.8476511 MJ = 0.4067434
+CJSW = 2.382898E-10 PBSW = 0.8222976 MJSW = 0.3300124
+CJSWG = 4.22E-10 PBSWG = 0.8222976 MJSWG = 0.3300124
+CF =0 PVTH0 = 3.507137E-3 PRDSW = 17.811338
+PK2 = 3.610481E-3 WKETA = 0.0334716 LKETA = -3.202602E-3
+PU0 = -2.0541594 PUA = -8.93082E-11 PUB = 1E-21
+PVSAT = -50 PETA0 = 1.003159E-4 PKETA = -1.696047E-3 )
*
v1 2 0 1.8v
35
v2 1 0 PULSE(0V 1.8V 0NS 0NS 0NS 5NS 10NS)
*c1 3 0 50f
.TRAN 0.1NS 15NS
.Dc v2 0 1.8 0.001
*.print dv2(dv1)
.end
dvout\dvin=-6.279
similarly we can try it for 130n n 90n and we can compare.
36
To find NMH AND NML
From graph
VOH=1.695V, VIL=0.674V
VOL=0.114V, VIH=0.920V
NMH=VOH-VIH=0.775
NML=VIL-VOL=0.56
37
Transition voltage
From graph Vm=0.8125
v1 2 0 1.2v
v2 1 0 PULSE(0V 1.2V 0NS 0NS 0NS 5NS 10NS)
*c1 3 0 50f
.TRAN 0.1NS 15NS
.Dc v2 0 1.2 0.001
*.print dv2(dv1)
.end
38
WAVEFORM
VOH=1.1641V
VIL=0.5067V
VOL=0.03100V
VIH=0.61928V
NMH=0.5448V
NML=0.4757V
VM=0.56V
39
VDD=1V for 0.09um
.PARAM
.OPTION POST
v1 2 0 1v
v2 1 0 PULSE(0V 1V 0NS 0NS 0NS 5NS 10NS)
*c1 3 0 50f
.TRAN 0.1NS 15NS
.Dc v2 0 1 0.001
*.print dv2(dv1)
.end
40
WAVEFORM
VOH=0.9424V
VOL=0.0733V
VIH=0.5604V
VIL=0.37402V
NMH=0.382V
NML=0.3007V
VM=0.47V
41
VTC for CMOS inverter with varying VDD
For 180nm technology
VDD=1.2V, 1V,0.9V, 0.1V
42
VDD= 0.8V,2V,1V
43
VTC for CMOS inverter with varying device ratio
FROM GRAPH
………… W=750
- - - - - -W=180
-----------W=300
44
CHANGING WIDTH OF NMOS
IDEAL L=180 W=180
NMOS(CASE1) 180 350
(CASE2) 180 800
PMOS 180 180
FROM GRAPH
………W=350
- - - - - -W=800
----------W=180
OBERVATION FOR DEVICE RATIO
Device ratio is one of the important parameter while designing any digital
circuit, the driving capability is dependent on device ratio.
If the device ratio of CMOS INV changes the corresponding ON and OFF timing
of PMOS and NMOS also changes in graph
From the above graph it is observed that by changing the width of PMOS (W),
ON state and OFF state of PMOS and NMOS alter, i.e., if the w of PMOS is
increased the corresponding on state of PMOS increases and on state of NMOS
decreases
Similarly we can do it for 130n and 90n and compere it
45
b) Perform transient analysis of CMOS inverter with no load and with load and
determine
tpHL, tpLH, 20%-to-80% tr and 80%-to-20% tf. (use VPULSE = 2V, Cload =
50fF)
46
+WWN =1 WWL =0 LL =0
+LLN =1 LW =0 LWN =1
+LWL =0 CAPMOD = 2 XPART = 0.5
+CGDO = 9.37E-10 CGSO = 9.37E-10 CGBO = 1E-14
+CJ = 9.555366E-4 PB = 0.8 MJ = 0.3827435
+CJSW = 2.69781E-10 PBSW = 0.8 MJSW = 0.145082
+CJSWG = 3.3E-10 PBSWG = 0.8 MJSWG = 0.145082
+CF =0 PVTH0 = 2.401607E-4 PRDSW = -3.1167685
+PK2 = 6.948372E-4 WKETA = -2.542534E-4 LKETA = -5.176493E-3
+PU0 = 7.5752863 PUA = 1.590549E-11 PUB = 3.528309E-24
+PVSAT = 1.522996E3 PETA0 = 1.003159E-4 PKETA = -3.041391E-3 )
*
.MODEL PMOS PMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4.1E-9
+XJ = 1E-7 NCH = 4.1589E17 VTH0 = -0.3944719
+K1 = 0.5828995 K2 = 0.0266823 K3 =0
+K3B = 14.3383713 W0 = 1E-6 NLX = 1.373459E-7
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 0.6336613 DVT1 = 0.2409053 DVT2 = 0.1
+U0 = 112.690631 UA = 1.417849E-9 UB = 1.12483E-21
+UC = -1E-10 VSAT = 1.850699E5 A0 = 1.7532818
+AGS = 0.375203 B0 = 3.569636E-7 B1 = 1.12458E-6
+KETA = 0.0205518 A1 = 0.4474986 A2 = 0.3631955
+RDSW = 243.82298 PRWG = 0.5 PRWB = 0.5
+WR =1 WINT = 0 LINT = 2.551606E-8
+XL =0 XW = -1E-8 DWG = -4.374325E-8
+DWB = 2.595671E-10 VOFF = -0.0937437 NFACTOR = 2
+CIT =0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 0.1136843 ETAB = -0.0748821
+DSUB = 1.0613195 PCLM = 2.4303317 PDIBLC1 = 7.845168E-4
47
+PDIBLC2 = 0.0239307 PDIBLCB = -1E-3 DROUT = 0
+PSCBE1 = 3.207414E9 PSCBE2 = 9.282296E-10 PVAG = 15
+DELTA = 0.01 RSH = 7.5 MOBMOD = 1
+PRT =0 UTE = -1.5 KT1 = -0.11
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL =0 WLN =1 WW =0
+WWN =1 WWL =0 LL =0
+LLN =1 LW =0 LWN =1
+LWL =0 CAPMOD = 2 XPART = 0.5
+CGDO = 6.34E-10 CGSO = 6.34E-10 CGBO = 1E-14
+CJ = 1.148543E-3 PB = 0.8476511 MJ = 0.4067434
+CJSW = 2.382898E-10 PBSW = 0.8222976 MJSW = 0.3300124
+CJSWG = 4.22E-10 PBSWG = 0.8222976 MJSWG = 0.3300124
+CF =0 PVTH0 = 3.507137E-3 PRDSW = 17.811338
+PK2 = 3.610481E-3 WKETA = 0.0334716 LKETA = -3.202602E-3
+PU0 = -2.0541594 PUA = -8.93082E-11 PUB = 1E-21
+PVSAT = -50 PETA0 = 1.003159E-4 PKETA = -1.696047E-3 )
*
**Use VDD=1.8V for 0.18um
.PARAM
.OPTION POST
v1 2 0 2v
v2 1 0 PULSE(0V 2V 0NS 20NS 80NS 500NS 1000NS)
c1 3 0 50f
48
.TRAN 0.1NS 700NS
.meas tran delay_1 trig V(1) val='0.45' rise=1
+ targ v(3) val='0.45' fall=1
.end
Transient analysis of CMOS inverter with load FOR tpHL, tpLH, 20%-to-80%
tr
49
Transient analysis of CMOS inverter with load FOR tpHL, tpLH, 80%-to-20%
tr
WRITING IN CODE: v2 1 0 PULSE (0V 2V 0NS 80NS 20NS 500NS
1000NS)
50
delay_1= 5.4886E-09 TPHL= 9.9886E-09 TPLH= 4.5000E-09
51
c) Perform AC analysis of CMOS inverter with fanout 0 and fanout 1.
(Use Cin= 0.012pF,
Cload = 4pF, Rload = k)
For fanout0
Add library files
.PARAM
.OPTION POST
v1 4 0 10 ac 1
v2 2 0 0v
cin1 1 4 0.012p
cout1 5 0 4p
rl1 3 5 1k
.op
.ac dec 10 1k 1meg
.print ac v(4) v(5) I(m1) I(m2)
.end
52
WAVEFORM
For fanout1
Add library files
.PARAM
.OPTION POST
M1 1 2 0 0 nmos l=180n W=360n
M2 1 2 3 3 pmos l=180n W=720n
cin1 2 5 0.012p
cout1 7 0 4p
rl1 6 7 1k
v1 5 0 10 ac 1
53
v2 3 0 0v
.op
.ac dec 10 1k 1meg
.print ac v(4) v(5) I(m1) I(m2)
.end
54
3) Perform simulation to measure the power and delay for digital
circuits.
For NAND gate
55
WAVEFORM
56
PART II
Design, Write Verilog code for the circuits given below, Simulate, synthesize, view
report, Use EDA Tools like Cadence, Mentor Graphics, and Synopsis.
1) Adder
2) Magnitude Comparator
3) Parity Generator
4) D and T F/F
4) Universal Shift Register
5) Counter
57
1. ADDER
a. half adder
MODULE
input a;
input b;
output sum;
output carry;
endmodule
58
TESTBENCH:
module halfaddert_b;
reg a;
reg b;
wire sum;
wire carry;
initial begin
#10$stop;
End
59
OUTPUT WAVEFORM
60
b .FULL ADDER
MODULE
module full(a,b,cin,sum,carry);
input a,b,cin;
output sum,carry;
reg sum,carry;
always@(a,b,cin)
begin
sum=a^b^cin;
carry=(a&b)|(b&cin)|(cin&a);
end
endmodule
TESTBENCH
module tb;
reg a,b,cin;
wire sum,carry;
full dut(a,b,cin,sum,carry);
initial
begin
#10 a=1'b0;b=1'b0;cin=1'b0;
#10 a=1'b0;b=1'b0;cin=1'b1;
#10 a=1'b0;b=1'b1;cin=1'b0;
#10 a=1'b0;b=1'b1;cin=1'b1;
#10 a=1'b1;b=1'b0;cin=1'b0;
#10 a=1'b1;b=1'b0;cin=1'b1;
#10 a=1'b1;b=1'b1;cin=1'b0;
61
#10 a=1'b1;b=1'b1;cin=1'b1;
end
endmodule
OUTPUT WAVEFORM
62
2. MAGNITUDE COMPARATOR
MODULE
module comparator(a,b,eq,lt,gt);
always @(a,b)
begin
if (a==b)
begin
eq = 1'b1;
lt = 1'b0;
gt = 1'b0;
end
else if (a>b)
begin
eq = 1'b0;
lt = 1'b0;
gt = 1'b1;
end
else
begin
eq = 1'b0;
lt = 1'b1;
gt = 1'b0;
end
end
endmodule
TESTBENCH
module comparator_tst;
reg [3:0] a,b;
wire eq,lt,gt;
initial
begin
a = 4'b1100;
b = 4'b1100;
#10;
63
a = 4'b0100;
b = 4'b1100;
#10;
a = 4'b1111;
b = 4'b1100;
#10;
a = 4'b0000;
b = 4'b0000;
#10;
$stop;
end
endmodule
OUTPUT WAVEFORM
64
3. PARITY GENERATOR
MODULE
module parity(
input x,y,z,
output result);
endmodule
TESTBENCH
module parity_tb;
reg x,y,z;
wire result;
parity dut(x,y,z,result);
initial begin
// Initialize Inputs
x = 0;
y = 0;
z = 0;
#100;
x = 0;
65
y = 0;
z = 1;
#100;
x = 0;
y = 1;
z = 0;
#100;
x = 0;
y = 1;
z = 1;
#100;
x = 1;
y = 0;
z = 0;
66
#100;
x = 1;
y = 0;
z = 1;
#100;
x = 1;
y = 1;
z = 0;
#100;
x = 1;
y = 1;
z = 1;
#100;
end
endmodule
67
OUTPUT WAVEFORM
68
4. D FLIP FLOP
MODULE
module dflipflopmod(q, qb, d, clk);
output q;
output qb;
input d;
input clk;
reg q;
reg qb;
begin
q=d;
qb=~q;
end
endmodule
TESTBENCH
module d_tb;
reg d;
reg clk;
wire q;
wire qb;
initial begin
// Initialize Inputs
69
d = 0;
clk = 0;
end
always #3 clk=~clk;
always #5 d=~d;
endmodule
OUTPUT WAVEFORM
70
T FLIPFLOP
MODULE
module tffmod(q. qb, t, clk,);
input t;
input clk;
output reg q;
initial q<=1’b0;
begin
q<=q^t;
qb<= ~q;
end
endmodule
TESTBECH
module tflipflopt_b;
reg t;
reg clk;
wire q, qb;
initial begin
71
t = 0;
clk = 0;
#100;
end
always #3 clk=~clk;
always #5 t=~t;
endmodule
OUTPUT WAVEFORM
72
5 .UNIVERSAL SHIFT REGISTER
input load;
reg [7:0]temp;
begin
if (rst_a)
op = 0;
else
case(load)
1'b1:
temp = ip;
73
// op = temp;
end
1'b0: //Operation
case (sh_ro_lt_rt)
endcase
endcase
end
endmodule
74
TESTBENCH
module uni_shift_8b_tst;
reg load,rst_a,clk;
.clk(clk));
initial
begin
clk=1'b1;
end
initial
begin
ip = 8'b11001100;
rst_a = 1'b1;
load = 1'b1;
75
sh_ro_lt_rt = 2'b00;
#100;
ip = 8'b10001100;
rst_a = 1'b0;
load = 1'b1;
sh_ro_lt_rt = 2'b01;
#100;
ip = 8'b11001100;
load = 1'b0;
sh_ro_lt_rt = 2'b01;
#100;
ip = 8'b10101101;
load = 1'b1;
76
sh_ro_lt_rt = 2'b01;
#100;
ip = 8'b11001101;
load = 1'b0;
sh_ro_lt_rt = 2'b01;
#100;
ip = 8'b11101100;
load = 1'b1;
sh_ro_lt_rt = 2'b10;
#100;
ip = 8'b11110000;
load = 1'b0;
sh_ro_lt_rt = 2'b10;
#100;
77
ip = 8'b11001100;
load = 1'b1;
sh_ro_lt_rt = 2'b11;
#100;
ip = 8'b11001101;
load = 1'b0;
sh_ro_lt_rt = 2'b11;
#100;
ip = 8'b11001000;
load = 1'b1;
sh_ro_lt_rt = 2'b11;
#100;
$stop;
endmodule
78
OUTPUT WAVEFORM
79
6. COUNTER
module up_counter(input clk, reset, output[3:0] counter
);
reg [3:0] counter_up;
// up counter
always @(posedge clk or posedge reset)
begin
if(reset)
counter_up <= 4'd0;
else
counter_up <= counter_up + 4'd1;
end
assign counter = counter_up;
endmodule
TESTBENCH
module upcounter_testbench();
reg clk, reset;
wire [3:0] counter;
80
OUTPUT WAVEFORM
81