CMOS Lab Report for Engineering Students
CMOS Lab Report for Engineering Students
CMOS
Digital Electronics
Laboratory Report
Contents
Lab 5 & 6. Design, Simulation and Experimental Test of CMOS D-Latch and
CMOS NAND based S-R Latch
Lab 7. Design, Simulation and Experimental Test of 4x4 NOR ROM Array
This advanced digital electronics lab deals with models of electronic nonlinear devices and their
analysis. This advanced lab will pursue design, analysis and test of digital electronic circuits with the help of
discrete components and Integrated Circuits (IC) including VLSI circuits. This lab course will emphasizes
specifically on the design, analysis and experimental test of CMOS Ring Oscillation and Clock Generation,
CMOS Inverters and their Voltage Transfer Characteristics, CMOS Two-Input NAND Gate, CMOS
Transmission Gate, CMOS D-Latch and CMOS NAND based S-R Latch, 4x4 NOR ROM Array, CMOS Seven
Ring Voltage Control Oscillator, and Cascode Voltage Switch Logic.
Extensive hardware experimental circuit designs will be examined with the help of discrete components
and/or IC designs, and PSpice simulations will be used to examine and explain the basic building blocks of
advanced digital electronics circuits design and analysis. The main focus is on design, analysis and test of
Engineering and Computer Science real system problems and solutions. This advanced digital electronic
circuits design, analysis and test labs provide the student with the basic knowledge necessary to understand the
operation and application of CMOS Inverters, CMOS Oscillators, CMOS Logic Gates, CMOS Latches, and
CMOS Switching Circuits for various applications based on the discrete components and advanced VLSI
systems technology design point of view.
CMOS INVERTERS VOLTAGE TRANSFER CHARACTERISTICS (VTC)
Abstract: the input. When the input is low the PMOS will be
activated as shown in table 1. Table 1 though does
The construction of the CMOS inverter which uses not explain that when the channel is ON there are
paired transistors to create the inversion of the different regions which it can be in. These regions
input is described in this paper. Using PMOS and are the either Saturation or Triode.
NMOS transistors will allow for the pulling down
or pulling up the output depending on the current Channel OFF channel ON
input.
Vgsp > VTp
Vgs < VT
or,
Keywords: PMOS or,
Vin > VT +
Vin < VT + VCC
Inverters, CMOS, NMOS, PMOS VCC
Vgsn < VTn Vgs > VT
1.1. INTRODUCTION NMOS or, or,
Vin < VTn Vin > VTn
The typical CMOS inverter is shown in
figure 1.1 where the inputs of both the PMOS and
the NMOS are connected together and sent the Table 1. Relationship between gate-source voltage,
same input to their gates. Vgs, and the threshold voltage, VT, for CMOS
Operations
Abstract:
2.1 INTRODUCTION
A B Ᾱ’ B’ (A*B)’ A’+B’
0 0 1 1 1 1
0 1 1 0 1 1
1 0 0 1 1 1
1 1 0 0 0 0 Fig. 2.2 Two-Input NAND Gate
2.2 PROCEDURES, SIMULATION AND results when analyzed on ORCAD PSPICE. These
EXPERIMENTAL SET-UP verify the proper functionality of the design at the
various frequency at which it was tested with
The Nand gates is composed of a pull up and accompanying results. The gate was tested with
pull down network, composed of PMOS and three frequencies: 0.8, 1 and 1.2 MHz in
NMOS transistors respectively. When designed in conjunction with half the test frequency to produce
the Nand manner the width of the PMOS channel all the logic scenarios, inputs A and B respectively.
is larger than that of the NMOS, causing the gate to In Fig. 2.3 it is seen that there is two frequencies
not have a desired VDD/2 threshold. This led to the that are used as inputs the respective A and B
sizing of the NMOS network to match the PMOS inputs running at 0.8 MHz and 0.4 MHz.
and have an equal voltage drop across the two Following are the result from the design, in Fig.
networks. 2.4, where there are three graphs. The top is the
The Nand gate accepts two inputs and with their highest frequency, the second is half of the first,
combinations the Nand gate turns on or off the and the third is the result obtained from the Nand
NMOS and PMOS, creating paths to VDD or gate.
ground hence creating the logic. Because these are V16
5Vdc
networks that interact with each other, there is
cases where the networks in parallel and its Mbreakpd1
Mbreakpd0
components are not all on or off at the same time 0
M22
causing the “worst case” scenario. This is when the V1 = 5 V15 M21
V2 = 0
path of the current through a network is giving the TD = 0
TR = .667u
correct logic, but because of the input TF = .667u
PW = 4u
combinations not all the transistors are operating, PER = 8u
M20
causing smaller channels or longer paths. When 0
such case occurs it is identified as the “worst case” V1 = 5 V17 Mbreaknd0
V2 = 0
because the propagation delay is increased, which TD = 0
TR = .33333u
is not desirable. For this design the worst case TF = .33333u
PW = 2u
condition is when one of the PMOS transistors is PER = 4u
0 M23
on and the other off lowering the width of the
channel. Mbreaknd1
In Fig. 2.5 it is seen that there is two frequencies In Fig. 2.7 it is seen that there is two frequencies
that are used as inputs the respective A and B that are used as inputs the respective A and B
inputs running at 1.0 MHz and 0.5 MHz. inputs running at 1.2 MHz and 0.6 MHz.
Following are the result from the design, in Fig. Following are the result from the design, in Fig.
2.6, where there are three graphs. The top is the 2.8, where there are three graphs. The top is the
highest frequency, the second is half of the first, highest frequency, the second is half of the first,
and the third is the result obtained from the Nand and the third is the result obtained from the Nand
gate. gate output.
V10
5Vdc V13
Mbreakpd1 5Vdc
Mbreakpd0
Mbreakpd1
M14 0 Mbreakpd0
V1 = 5 V9 M13
M18 0
V2 = 0 M17
TD = 0 V12
V1 = 5
TR = .8u V2 = 0
TF = .8u TD = 0
PW = 5u TR = 1u
PER = 10u TF = 1u
PW = 6u
M11 PER = 12u M16
V1 = 5
0 V11 0
V2 = 0 V1 = 5 V14
TD = 0 Mbreaknd0 V2 = 0 Mbreaknd0
TR = .41667u TD = 0
TF = .416667u TR = .5u
TF = .5u
PW = 2.5u PW = 3u
PER = 5u PER = 6u
0 0 M19
M15
Mbreaknd1
Mbreaknd1
0
0
Fig. 2.7 Two-Input NAND Gate at 0.8 MHz
Fig. 2.5 Two-Input NAND Gate at 1.0 MHz
Fig. 2.10 Two-Input NAND Gate at 0.8 MHz
[Units of Each Plot: 0-5V vs. 0-18µs]
Fig. 2.8 Two-Input NAND Gate at 0.8 MHz
[Units of Each Plot: 0-5V vs. 0-25µs]
Fig. 2.10 illustrates the input frequency to
the Nand gate and the D flip-flop. The second plot
When deciding the actual implementation
show how the flip-flop cuts the frequency in half
of the design, there was an issue on obtaining two
and becomes the second input to the Nand. The
signals from separate function generators that
third plot illustrates the resulting waveform from
would be synchronized. To solve the issues, the
both inputs after the Nand gate logic. Table 2
idea of using a D-Flip flop was presented. The flip-
shows the logic proved from all the simulations
flop is use the signal from the signal generator and
half the frequency, keeping both signals
TABLE 2
synchronized. Fig.2.9 show the implementation of
Illustrates the simulation logic.
this method and how it is used to get synchronized
Input A Input B Output Correct
signals
[Half
V2
Frequency]
5Vdc
Low [0] Low [0] High [1] Yes
Mbreakpd0
Mbreakpd1
0 High [1] Low [0] High [1] Yes
M3 Low [0] High [1] High [1] Yes
4
U1A V
M2
V1 = 5 V1 High [1] High [1] Low [0] Yes
PRE
V2 = 0 2 5
TD = 0 D Q
TR = .667u 3 6 V
CLR
TF = .667u CLK Q
PW = 4u
PER = 8u 7474 M1 V
1
0
Mbreaknd0
2.3 SIMULATION AND
EXPERIMENTAL RESULTS
The Nand gate constructed provided the 1. Why would the sizes of the transistors for the
proper results with those of the simulation. A 1um model inverter that produces a Vm =Vdd/2,
factor of great importance is transistor sizing. Fig. not produce a Vm = Vdd/2 for the 2-input Nand
2.18 illustrates the output result of the Nand gate at gate?
a high frequency without sizing. As observed the
current that flows is not enough to obtain desired
results and begins to charge prematurely. As can be
observed all simulations agree with the
implementation and illustrate the importance of
sizing and the relation between the pull up and pull
down network in CMOS technology.
Fig. 2.16 The two-Input NAND switching Fig. 2.18 The two-Input NAND Gate output at 1.2
threshold MHz without sizing
The Nor gate would be sized the same way
That is due to the fact that the 2-input Nand as the Nand gate, but with the difference that the
gate consist of a pull up and pull down network to pull up network would be the one with the sizing.
implement its logic. When arranged in this way, This is due to them being complements of each
the width of the channel gets lager when arranged other because of duality [2]
in parallel. This causes more current to flow
creating a smaller resistance for the network that REFERENCES
has more elements in parallel and therefore moving [1] Sedra/Smith, Microelectronic circuits 6th
the Vm value away from Vdd/2.[1] edition.
[2] Harvard, http://people.seas.harvard.edu/
2. Estimate the sizing of the transistors for a 4- ~jones/es154/lectures/lecture_7/MOS/mos_logic.ht
input Nand gate for both a switching threshold of ml
Vdd/2 and worst case. [3] Josh Tynjala, http://logic.ly/lessons/nand-gate/.
A 4-input Nand gate would require a pull 2012
down network 2 times larger than that of the 2-
input Nand gate.
3. Explain how the transistor of a 3-input CMOS
Nor gate would be sized for both switching
threshold and worst case.
CMOS Ring Oscillation and Clock Generation
Abstract:
Keywords:
3.1. INTRODUCTION
f = 1 / 2Ndelay
REFERENCES
[1] Sedra/Smith, Microelectronic circuits 6th
edition.
[2]University Of Pennsylvania. 2006.
http://www.seas.upenn.edu/~ese319/Lecture_Notes
/Lec_21_Xmsn_Gate_RSFF_07.pdf
[3] Spectrum software, http://www.spectrum-
soft.com/news/summer2006/samplehold.shtm
Design of a CMOS D-Latch and CMOS NAND based S-R Latch
Keywords: Memory, SR-Latch, D Flip-flop, For this experiment the use of past
Sequential circuit experiments is required for the entire process. The
use of the Tgate and the inverter is needed. For the
5.1. INTRODUCTION Tgate, the use of the middle transistors for both the
NMOS and PMOS need to be from separate chips
One type of memory that is most used in so that there will be no interference between any of
today's technology is the D Flip Flop. It is used the transistors.
registers to store data. There is different ways to
construct D Flip Flop, such as using NAND gates This circuit also requires that we use two
or the method we used with Transmission gates function generators, one for the data input D and
and inverters. Figure 5.1 shows the connections of the other for the clock that will clock the TGates.
two Tgates with inverters. The clock on the Tgates needs to be at least twice
as fast as the input D frequency.
Abstract:
TABLE 1
Inputs Outputs
S R Qn+1
0 0 Memory
0 1 0
Fig. 6.2
1 0 1
The goal was to design and simulate the 2-input
1 1 X CMOS Nand based S-R latch using PSPICE. In
this step it was necessary to size the transistors for
the worst case condition and it was also necessary
to measure the time delay between the switching.
Once the simulations ware providing desired
results as those in the S-R latch, it was time to
implement it and size it using the CD4007 IC. To
implement the latch, the design drawn up in
PSPICE was used, and sized by placing NMOS
transistors in parallel. Once implemented the
design was tested for all of its possible input and
output combinations. To implement all possible
combinations a D-Flip Flop was used to produce a
half frequency signal to be used as inputs. Fig. 6.4 B-set R-RST Two-Input NAND based SR
One way the latches can be turned on or off Latch at 600k [Units of Each Plot: 0-5V vs.0-8µs]
is by a simple and gate to one of the terminals
which are holding the data. Because of the back to
back inverters this will turn it on or off manually.
The same process can be used as an enable active
high which allows the output to be correct when
the enable[on/off] bit equals logic ‘1’.
REFERENCES
[1] Sedra/Smith, Microelectronic circuits 6th
edition.
[2]University of California Riverside.
http://www.cs.ucr.edu/~ehwang/courses/cs120b/fli
pflops.pdf
Design and Sizing of a 4x4 NOR ROM Array
Abstract:
Keywords:
Read Only Memory (ROM), is a type of In NAND based ROM it is the opposite of
memory that only allows for the user to only view NOR based ROM because now when a high (1) is
the data in it and not edit it. The reason for this is required a NMOS is placed on the word line. For
because unlike other memory which can be read practical purposes ROMs can be used as lookup
and written too this memory is actually set into tables for when the same data needs to be
memory by placing physical hardware for every continuously read without it being able to be
bit. For NOR based ROM a NMOS is placed on the changed. This type of memory also never gets
word line when a 0 bit is required. deleted even if the power is taken away.
C1 C2 C3 C4
R1 0 1 0 1
R2 0 0 1 1
R3 1 0 0 1
R4 0 1 1 0
Figure 7.1: NOR Based 4x4 ROM. Table 7.1: Look up table for our ROM.
get multiple square pulses to output a square pulse
with a duty cycle of 20% at different times, is use
four separate VPULSE’s with the same frequency
except differ with the TD (time delay). A method
for designing a shift register is shown in figure 7.4
where only three D Flip Flops are used. They are
just connected in series with one output going into
the next input. This method also requires that there
be two function generators available: one to
provide 20% duty cycle input and the other to
provide the pulses for the clocks.
C1 1
C2 0
C3 0
C4 1
C1 0
C2 1
C3 1
Figure 7.7: ROM Simulation at 800 kHz.
C4 0
The previous figures represent the PSPICE
All of these readings coincide with the table
simulation results from three different frequencies.
showing that in simulation the ROM works as it is
The circuit was tested with input frequencies of
supposed to even at different frequencies.
200 kHz, 400 kHz and 800 kHz 20 % duty cycle
inputs. The top four waveforms on the simulations
represent the pulses to each word line, hence the
first waveform shows the input to the first word
line while the fourth wave shows the input to the
fourth word line. This is done so that only one
word line can be on at time, and this is done in the
practical part by using the shift register.
C1 0
C2 1
C3 0 Figure 7.8: Clock wave and a 20 percent output
C4 1 wave.
When the next word line gets activated, after the In figure 7.8 to 7.10, it is shown that using three D
first wave pulse ends, the resulting column flip flops can simulate four different inputs at
readings were: different time delays without having to use four
function generators. Figure 7.8 shows that only two
C1 0 function generators are needed to construct four
C2 0 outputs. As long as the clock is running at five
C3 1 times the frequency as the signal you want shifted
C4 1 and delayed then that signal can be shifted after
every D Flip Flop.
Figure 7.9: Input to R1 and R2 at 200 kHz. Figure 7.12: C3 and C4 outputs with 200 kHz
REFERENCES
Abstract:
Freq Hz
6.0000E+06
y = 537703x Series
4.0000E+06
R² = 0.812 2
2.0000E+06
0.0000E+00
1 3 5 7 9 11 13
Vcntrl V
Fig. 8.3 VCO when Vcrtl = 2.25V Fig. 8.6 Plot that results from the PSpice
[Units of Each Plot: 0-3V vs. 0-15µs] implementation
6.0000E+05
y = 56891x Series
4.0000E+05
R² = 0.9551 2
2.0000E+05
0.0000E+00
1 3 5 7 9 11 13
Vcntrl V
Fig. 8.8 The VCO running at 3.5V and 535KHz Fig. 8.10 The propagation delay High to Low equal
to 216 ns
circuitry to solve the issue. A simple solution
would be to add an inverter at the output to have a
full logic voltage swing.
The voltage controlled oscillator has many
implementations which are suitable in specific
implementation. Some of the few that were
researched were the integrator and the grounded
capacitor. The integrator type oscillator is as
reliable as the ring VCO but requires a harder
technique to tune and set the central frequency. The
grounded capacitor is of much easier
implementation since it can be implemented in as
little as two inverters but it has reliability issues if
not properly set up. The ring VCO is the moderate
Fig. 8.11 the propagation delay Low to
selection between both of the designs.
High equal to 208 ns.
REFERENCES
[1] Sedra/Smith, Microelectronic circuits 6th
8.4. DISCUSSION AND CONCLUSION:
edition.
[2]Wikepedia, 2012.
In comparison to the first ring oscillator this
http://en.wikipedia.org/wiki/Voltage-
design is better in terms of controlling the delay
controlled_oscillator
between stages since it does not require the
[3]Falstad 2012. http://www.falstad.com/circuit/e-
addition of components. But its drawback is that
vco.html
the voltage swing is only as big as the input as the
control voltage, meaning there must be extra
Design of Cascode Voltage Switch Logic
Figure 9.1: Differential Cascode Voltage Switch Figure 9.2: CVSL circuit design.
Logic.
The way this circuit works is that the input
logic is connected to one NMOS while the inverter
input gets inputted to the other NMOS’s gate.
These NMOS’s drains are then connected to the
PMOS’s drain above it and the PMOS’s gate that is
opposite of the prior PMOS. That connection is
where the output is read. If the connection was
from the Input’s NMOS then the output reading
will be Output_Bar while vice versa for the
input_bar readings.