223 EE3117 DIC Lab2 Eng Updated 11202023
223 EE3117 DIC Lab2 Eng Updated 11202023
LABORATORY 2
DIGITAL LOGIC COMPONENTS
OBJECTIVES
EXPERIMENT 1
Requirement: Student must complete the truth table of NAND2, NOR2, and EX-OR2,
then verify them by running simulation.
Instruction: Student may present their work following the template shown below
a. Schematic:
Truth table of inverter (INV):
INPUT OUTPUT
A Y
Schematic:
Symbol of INV:
In fact, at the beginning of this symbol, Cadence Virtuoso just generates a rectangle
with pins you arranged before. You use drawing tools to create a symbol for inverter
symbol. Moreover, you make sure to check and save your symbol.
b. DC Analysis simulation:
Use ADE-L to simulate the DC response of an INV gate. Apply an input signal in
the form of a RAMP voltage ranging from 0-1V (or sweep the input voltage signal from
0-1V) and observe the output response. The circuit parameters are configured as follows:
Parameters Value
1
1
[0, 1]
During the simulation process, students record the following two results: output voltage
values at various values of with a 0.1V step and plot the curve of . Besides,
students can decrease step to draw curve of more precise.
( ) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
( )
Table 3 The output voltage values at various values of with 0.1V step.
c. Transient simulation:
100
Voltage 1 0
Voltage 2 1
Rise time 1
Delay 0
Pulse width 1
Period 2
Figure 4 Testbench circuit INV generated by (left) MOS transistor (right) VerilogA.
During simulation process, students record input and output waveform. Then, students
measure some timing measurements.
Parameters Result
Dynamic power
Static power
The waveform to prove the circuit works correctly. Moreover, students have to
apply these parameters in vpulse, then simulate your design.
In1 In2
Voltage 1 0 0
Voltage 2 1 1
Period 4n 2n
Rise time 1p 1p
Fall time 1p 1p
Pulse width 2n 1n
(Hint: you can use marker (hotkey “M”) along with differential mode (hotkey “D”) or
calculator to measure)
EXPERIMENT 2
Objective: Design some combinational logic circuits re-using logic components designed
in experiment 3 (lab1), and experiment 1 (lab 2).
Requirement: You simulate 2-to-1 channel multiplexer, and an 8-to-3 Bit Priority
encoder.
Instructions:
There are three ways to design a multiplexer, such as: transmission gate,
compound gate, and tristate inverter. First, students have to complete the truth table of
multiplexer 2-to-1. Second, students simulate and verify the schematics shown in
Figure 6. Finally, students measure some parameters required as shown in Table 6.
Figure 5 MUX 2-to-1 using (a) transmission gate (b) compound gate (c) tristate inverter
MULTIPLEXER 2-to-1
Transmission
Compound gate Tristate inverter
gate
Power consumption
Unlike a multiplexer that selects one individual data input line and then sends
that data to a single output line or switch. The job of a priority encoder is to produce a
binary output address for the input with the highest priority.
Figure 6 Block diagram and truth table of 8-to-3 bit priority encoder (P-encoder).
The waveform to prove the 2-to-1 channel multiplexer circuit works correctly,
and measure parameters shown in Table 7.
The waveform to prove the 8-to-3 bit priority encoder circuit works correctly.
EXPERIMENT 3
Objective: Review the basic sequential logic components – latch and flip-flop (D-type
latch and D-type flip-flop).
Requirements:
Distinguish latch and flip-flop by studying D-type latch and D-type flip-flop
using transmission gate. Moreover, you will know definition of setup and hold time, and
analyze them in this design.
Study three designs of D-type flip-flop and learn how to measure setup and hold
time of these designs.
Instructions:
There are many methods to design D-type latch and flip-flop. First, students can
review these operations using transmission gate structure shown in Figure 7 and
Figure 8. Sketching hand drawing waveform at each node to observe these operations is
a good idea.
Figure 9, Figure 10, and Figure 11 present three design methods of D-type
filp-flop.
Figure 10 Schematic of D-type Flip-Flop positive edge triggered with Preset using
TSPC – True Single Phase Clock – structure.
In this experiment, students use Cadence Virtuoso to measure the setup and hold
time of these D-type flip-flop (from Figure 9 to 11). Recall that the setup and hold time
are the minimum time before and after the rising clock edge the input signal must
remain constant to store the signal and to generate a stable output, respectively.
Students can measure setup and hold time using this method: Shift input D
closer to rising CLK signal until Q output is incorrect.
Simulate D-type latch and flip-flop to verify your hand drawing waveform of
Figure 7 and Figure 8.
Simulate three D-type flip-flop designs shown in Figure 9, Figure 10, and
Figure 11.
Measure some timing parameters, and power consumption of each design. Then,
consider these results.
D Flip-flop
– Setup time
− Hold time
Power consumption
----------------------------------------------------------------------------------------------