CAD LAb
CAD LAb
(EEC-653)
DEPARTMENT OF ELECTRONICS&COMMUNICATION
ENGINEERING
27, Knowledge Park-III, Greater Noida, (U.P.)
Phone : 0120-2323854-58
website :- www.dronacharya.info
CONTENTS
S.NO.
TITLE
PAGE NO.
1.
2.
3.
List of Experiments 5
PSPICE EXPERIMENTS
4.
Experiment No. 16
5.
Experiment No. 29
6.
7.
VHDL EXPERIMENTS
8.
9.
10.
11.
SYLLABUS
(AS PER PRESCRIBED BY MTU, NOIDA.)
EEC-553 CAD OF ELECTRONICS LABL T P
003
PSPICE EXPERIMENTS
1.
2.
3.
4.
VHDL EXPERIMENTS
1. Synthesis and simulation of Full Adder.
2. Synthesis and Simulation of Full Subtractor.
3. Synthesis and Simulation of 3 X 8 Decoder.
4. Synthesis and Simulation of 8 X 1 Multiplexer.
10 MARKS
TEACHERS ASSESMENT :
10 MARKS
EXTERNAL EXAM
30 MARKS
TOTAL
50 MARKS
LIST OF EXPERIMENTS
PSPICE EXPERIMENTS
1.
2.
3.
4.
VHDL EXPERIMENTS
1. Synthesis and simulation of Full Adder.
2. Synthesis and Simulation of Full Subtractor.
3. Synthesis and Simulation of 3 X 8 Decoder.
4. Synthesis and Simulation of 8 X 1 Multiplexer.
PSPICE EXPERIMENTS
EXPERIMENT NO. 01
AIM: To verify the characteristics of Basic Digital Gates
CIRCUIT :
You're simulating a circuit, it requires several digital gates, but you don't have a mixed-mode
simulator. What to do? One solution involves creating simplified versions of the logic functions.
To do this, we look to the NMOS transistor implementation of logic gates where the transistor
acts like a voltage-controlled switch. But, instead of the transistor, we'll use the SPICE switch.
Just like the transistor, the switch is defined to turn ON when the input voltage goes HI.
By placing the these switches in parallel or series, a variety of basic logic functions can come to
life. Here's some helpful hints for logic circuit building:
FUNCTION OUTPUT
AND - Switches in Series
OR - Switches in Parallel
INVERTED - Pull-Up Resistor
NON-INVERTED - Pull-Down Resistor
S1 and S2 are defined by RON = 10 _ and ROFF = 1 M_. Compared to the other resistances in
the circuit, these should look like an ideal switches. More on the SPICE switch below.
CIRCUIT INSIGHT Simulate the SPICE circuit named LOGIC_SW.CIR. VA and VB create
two binary signals that form the sequence 00, 01, 10 and 11. VCC = +5V supplies power to the
7|DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING,
DRONACHARYA GROUP OF INSTITUTIONS, GR. NOIDA.
logic gate. Plot the inputs V(1), V(2) and the output V(3). For a clearer view, you might want to
plot V(3) in a separate plot window. Does the output go LO when V(1) and V(2) are HI?
Note the finite rise and fall times of V(1) and V(2). You may have also noticed that the output
V(3) quickly changes when the inputs pass through 2.5 V. This is the approximate logic
threshold level defined for the SPICE switches.
RESULT:
EXPERIMENT NO. 02
AIM: To verify the characteristics of Low pass and High pass filter.
CIRCUIT:
Heres a simple circuit for you to dive into running SPICE simulations and plotting results.
What is the purpose of this circuit? Basically it has two roles: to pass the desired low frequency
signals and stop the unwanted high frequency signals.
CUTOFF FREQUENCY
As stated above, the circuit has two roles: to pass the desired low frequency signals and stop the
unwanted high frequency signals. But at what frequency does the filter change its behavior from
passing the low ones to stopping the high ones. This is called the cut-off frequency.
For R1=1k and C1=0.032uF you get fc = 5kHz. Run a simulation. Plot the AC (frequency)
sweep results for the output magnitude VM(2) and phase VP(2). What does the magnitude look
like before and after 5kHz?
SPICE FILE
VIN 1 0 AC 1V
RF 1 2 1.59
CF 2 0 100UF
.AC DEC 20 100HZ 100KHZ
.PROBE
.END
After running this in PSpice, we start PROBE, choose "Add" from the "Trace" menu and plot the
output voltage. PROBE provides the following graph.
Heres a simple circuit for you to dive into running SPICE simulations and plotting results.
10|DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING,
DRONACHARYA GROUP OF INSTITUTIONS, GR. NOIDA.
What is the purpose of this circuit? Basically it has two roles: to pass the desired high frequency
signals and stop the unwanted low frequency signals.
SPICE FILE
Vin 1 0 AC 10V
Rf 1 2 4.0
CF 2 3 2.0uF
Lf 3 0 127uH
.AC DEC 20 100Hz 1MEG
.PROBE
.END
This time we did not use 1V for the input voltage. Therefore, we will need to have PROBE
actually divide the input into the output to get the gain. We show this gain in decibels.
Notice that the gain below the resonant frequency of 10 kHz slopes upward at 40 dB/decade.
When we plot the phase shift of this filter, we only need to specify the phase angle of the output
voltage since the input voltage was specified at 0 degrees.
EXPERIMENT NO.03
AIM: Verification of HalfWave and Full-Wave Rectifier.
RECTIFIER
Before the development of silicon semiconductor rectifiers, vacuum tube diodes and copper(I)
oxide or selenium rectifier stacks were used. High power rectifiers, such as are used in
highvoltage
direct current power transmission, now uniformly employ silicon semiconductor devices
of various types. These are thyristors or other controlled switching solid-state switches which
effectively function as diodes to pass current in only one direction.
HALF WAVE RECTIFIER
CIRCUIT:
In half wave rectification, either the positive or negative half of the AC wave is passed, while the
other half is blocked. Because only one half of the input waveform reaches the output, it is very
inefficient if used for power transfer. Half-wave rectification can be achieved with a single diode
in a one-phase supply, or with three diodes in a three-phase supply. Half wave rectifiers yield a
unidirectional but pulsating direct current.
SPICE FILE
V1 1 0 SIN(0 10V 100HZ)
R 1 2 1K
DA 0 2 D1
.MODEL D1 D
.TRAN 0.01MS 20MS
.PROBE
.END
RESULT:
SPICE FILE
V1 1 0 SIN(0 10V 100HZ)
R 2 3 1K
C 2 3 1N
D1 1 2 MOD1
D2 0 2 MOD1
.MODEL MOD1 D
.TRAN 0.01MS 20MS
.PROBE
.END
MODEL WAVEFORM:
RESULT:
EXPERIMENT NO. 04
AIM: To verify the characteristics of CE Amplifier.
CIRCUIT:
SPICE FILE
VIN 1 4 SIN(0 1.5V 2KHZ)
VB 4 0 2.3V
RL 3 0 15K
V1 2 0 15V
Q1 2 1 3 MOD1
16|DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING,
DRONACHARYA GROUP OF INSTITUTIONS, GR. NOIDA.
VHDL EXPERIMENTS
EXPERIMANT NO.01
AIM:Synthesis and Simulation of Full Adder.
SOFTWARE USED: Xilinx ISE 13.3i
BLOCK DIAGRAM
TRUTH TABLE
VHDL CODE
library IEEE;
use IEEE.std_logic_1164.all;
18|DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING,
DRONACHARYA GROUP OF INSTITUTIONS, GR. NOIDA.
WAVEFORM
EXPERIMANT NO.02
AIM:Synthesis and Simulation of Full Subtractor.
SOFTWARE USED: Xilinx ISE 13.3i
BLOCK DIAGRAM
TRUTH TABLE
VHDL CODE
libraryieee;
use ieee.std_logic_1164.all;
entityflsub_select is
port(a:inbit_vector(2 downto 0);
s:out bit_vector(1 downto 0));
endflsub_select;
architecturebeh of flsub_select is
begin
with a select
20|DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING,
DRONACHARYA GROUP OF INSTITUTIONS, GR. NOIDA.
WAVEFORM
EXPERIMANT NO.03
AIM:Synthesis and Simulation of 3 X 8 Decoder.
SOFTWARE USED: Xilinx ISE 13.3i
BLOCK DIAGRAM:
TRUTH TABLE:
VHDL CODE:
library IEEE;
use IEEE.std_logic_1164.all;
entity decoder3X8 is
port (
g1 : in STD_LOGIC;--g1, g2a_l, g2b_l cascade i/ps
g2a_l : in STD_LOGIC;
22|DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING,
DRONACHARYA GROUP OF INSTITUTIONS, GR. NOIDA.
g2b_l : in STD_LOGIC;
a : in STD_LOGIC_VECTOR (2 downto 0);
y_l : out STD_LOGIC_VECTOR (0 to 7)
);
end decoder3X8;
architecture deco38 of decoder3X8 is
begin
process (a,g1,g2a_l,g2b_l)
begin
if (g1 and not g2a_l and not g2b_l)='1'then
if a <= "000"then y_l<= "01111111";
elsif a <= "001"then y_l<= "10111111";
elsif a <= "010"then y_l<= "11011111";
elsif a <= "011"then y_l<= "11101111";
elsif a <= "100"then y_l<= "11110111";
elsif a <= "101"then y_l<= "11111011";
elsif a <= "110"then y_l<= "11111101";
elsif a <= "111"then y_l<= "11111110";
else y_ l<= "11111111";
end if;
elsey_l<= "11111111";
end if;
end process;
end deco38;
WAVEFORMS
VIVA QUESTIONS
1. Write the behavioral code for the IC 74x138.
2. Write the VHDL code for the IC 74x138 using CASE statement.
3. Write the VHDL code for the IC 74x138 using WITH statement.
4. Write the VHDL code for the IC 74x138 using WHEN--ELSE statement.
5. Write the structural program for IC 74x138.
6. What does priority encoder mean?
7. How many decoders are needed to construct 4X16 decoder?
8. What is the difference between decoder and encoder?
9. Write the syntax for exit statement?
10. Explain briefly about next statement?
11. How to specify the delay in VHDL program?
12. Write the syntax for component declaration.
EXPERIMANT NO.04
AIM:Write a VHDL code for IC741518x1 multiplexer.
SOFTWARE USED: Xilinx ISE 13.3i
BLOCK DIAGRAM
TRUTH TABLE
VHDL CODE
library IEEE;
use IEEE.std_logic_1164.all;
entity mux151 is
port (
I :in STD_LOGIC_VECTOR (7 downto 0); --8 i/p lines
S :in STD_LOGIC_VECTOR (2 downto 0); --3 data select lines
25|DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING,
DRONACHARYA GROUP OF INSTITUTIONS, GR. NOIDA.
WAVEFORM
VIVA QUESTIONS