ICA Part3 Merged
ICA Part3 Merged
ICA Part3 Merged
To become a centre of excellence in Education, research and produce high quality Engineers in the field of
Electronics and Communication Engineering to face the challenges of future technological changes.
Transform students into valuable resources for industry and society by imparting contemporary technical
education.
Develop interpersonal skills and leadership qualities among students by creating an ambience of academic
integrity to participate in various professional activities
Course objectives:
To understand the non-linear applications of operational amplifiers (IC741).
To familiarize with theory and applications of IC555 timers.
To design and construct multivibrators using Op-Amp and 555 Timer.
To design and verify various combinational circuits using HDL.
To design and verify various sequential logic circuits using HDL.
COURSE OUTCOMES:
By the end of the course student will be able to:
CO1: Design the circuits using op-amps for various applications like Schmitt Trigger, Precision
Rectifier, Comparators and three terminal IC 78XX regulator.
CO2: Design active filters for the given specifications and obtain their frequency response
characteristics.
CO3: Design and analyze multivibrator circuits using Op-amp and 555Timer.
CO4: Design and Verify various combinational circuits like multiplexers, and de-multiplexers,
encoder, decoder, ALU, code converters etc using FPGA.
CO5: Design and Verify various sequential circuits like flip-flops, counters using FPGA.
Mapping of Course Outcomes with Program Outcomes & Program Specific Outcomes:
PO PSO
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
1
3 2 3 3 1 1 1 1 2
2 3 2 3 3 1 1 1 1 2
CO 3 3 3 3 3 1 1 1 1 2
4 3 2 3 3 2 1 1 1 1 2
5 3 2 3 3 2 1 1 1 1 2
LIST OF EXPERIMENTS
S.No Name of the Experiment
CYCLE-I: Analog Circuits
1. Frequency response of Op-amp in Inverting and Non-inverting modes.
2. Design an amplifier using Op-amp for the given specifications.
3. Measurement of Op-amp parameters.
4. Design and verification of Op-amp adder, subtractor, Integrator, Differentiator.
5. Design of Schmitt Trigger using op-amp.
6. Design and verification of Active LPF & HPF using op-amp.
7. Comparison of functionality of Astable multivibrator using a) Op-amp b) IC
555.
8. Verification of functionality of R-2R ladder DAC.
CYCLE-II: Experiments Using FPGA
9. Verify the functionality of parallel adder using FPGA.
10. Verify the functionality of 4x1 Multiplexer using FPGA.
11. Verify the functionality of 1x4 Demultiplexer using FPGA.
12. Verify the functionality of 4:2 encoder using FPGA.
13. Verify the functionality of 3:8 decoder using FPGA.
14. Design and verify the functionality of Binary to Gray Code converter.
15. Verify the functionality of 2-bit Comparator using FPGA.
16. Verify the functionality of ALU using FPGA.
17. Verify the functionality of Mod-4 Counter using FPGA.
18. Verify the functionality of Delay Flip flop using FPGA.
Note: A minimum of any five experiments have to be done from each cycle.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
Anil Neerukonda Institute of Technology & Sciences (Autonomous)
Sangivalasa-531 162, Bheemunipatnam Mandal, Visakhapatnam District
Scheme of Evaluation
(INTEGRATED CIRCUITS LABORATORY)
i. Continuous Evaluation(25M)
I. Preparation of Observation – 5M(The appropriate aim, experimental design,
Circuit diagram , selection of components, & Model Graph)
II. Execution of Experiment/Result – 5M(The procedure of doing experiment,
Apparatus usage& accurate Output(Theoretical & Practical correlation ), valid
Result Statements)
III. Record – 5M (The record submitted in time and with neat & clear(Write-
up,Aim,Appratus,Procedure,Theory), Circuit diagram, Experimental design, Graphs
& valid Result Statements)
IV. Pre lab & Post lab questions – 5M(The number of questions answered before and
after doing the each lab experiment)
V. Attendance ---- 5M
RUBRICS
IC Laboratory
S.No Performance Indicator Excellent Good Average Poor
>80% to ≤100% >60% to ≤80% >40% to ≤60% performance
≤40%
1. An ability to identify, formulate and Able to apply the concepts of Shows nearly complete Unable to apply the concept Poor
solve Electronic Circuit problems electronic circuits to solve understanding of concepts of of electroniccircuits in knowledge on
with Linear/Digital Integrated given problem statement. electronics in problem solving. solving problems effectively. electronics
circuit knowledge and to design as Able to Develop a design Developed a design Strategy, Developed the design concept.
well as analyze and interpret data. Strategy, analyzed the circuit analyzed the circuit with some strategy with Guidance and Developed
(Based on Observation) (max:5M) as an individual or with a guidance. unable to analyze the circuit design
(PO1, PO2, PO3) team. Must be assisted in integrating properly. contains many
Able to relate theoretical Previous knowledge and More Guidance is need to errors.
concepts with practical relating theoretical concepts integrating previous Unable to
problem solving. to problem solving. knowledge. recollect the
theoretical
knowledge
with practical
problem
solving.
2. An ability to conduct experimentsto Able to conduct the Able to conduct the Able to conduct the Unable to use
perform certain operation as an experiment and validate the experiment and validate the experiment but not validated the
individual or with a team and results with the theoretical results partially with the the results with the components
represent data from the results so as value and drawn the theoretical value and drawn theoretical value and conduct
to facilitate analysis and conclusions. the conclusions. experiment.
explanations of the data, and write Able to use Ability to use
conclusions. components/modern tool components/modern tool is
An ability to simulate circuits using effectively to produce less and/or need guidance to
modern tool desired output. know the usage of
(Based on Execution & components.
Result)(max:5M)
(PO4, PO5, PO9)
3. Graduates to acquire the ability to Report is presented very Report is presented good and Report is presented with Report
communicate effectively when neatly and used very good used good professional poor organization of the contains many
employing written professional writing style writing style with the content. errors and
Communications by following the with the professional code of professional code of ethics. having
ethical principle of report writing. ethics. Use graphs, tables and inadequate
(5M) Use graphs, tables and diagrams to support points, information.
(Based on Record)(max:5M) diagrams to support points, interpret and assess
(PO8,PO10) interpret and assess information. Few desired
information. information is missing in the
report.
4. An ability to communicate effectively Able to listen carefully and Able to listen carefully and Able to listen carefully and Unable to
when employing oral able to describe the purpose able to describe the purpose less knowledge on purpose of listen carefully
communications. of the experiments and its of the experiments and its doing experiments and its and unable to
(Based on pre-lab and post-lab scope. scope. scope. describe the
viva) (5M). Able to deliver a well- Unable to deliver a well- purpose of
(PO10) organized oral presentation organized oral presentation doing
after doing an experiment after doing an experiment experiment
and relevant
theoretical
information
clearly.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
Anil Neerukonda Institute of Technology & Sciences (Autonomous)
Sangivalasa-531 162, Bheemunipatnam Mandal, Visakhapatnam District
ABOUT LAB:
Linear ICs are employed in many electronic equipment like Audio amplifiers, A/D (analog-to-digital)
converters, Integrators, Multivibrators, Oscillators, Audio filters etc. Keeping these factors into the
considerations basic and most commonly used linear IC 741 op-amp and IC 555 are introduced. Digital
Experiments like Parallel adder, Multiplexer, De-Multiplexer, Encoder, Decoder, Flip flops, Counters, Code
convertors, ALU are introduced and their functionality is verified using FPGA Kits. This laboratory is to cater
the needs of under graduate students to practically explore the fundamental concepts of electronics. It helps the
students to gaining knowledge about electronic system and IC design and pursuing projects in electronics. The
students are also encouraged to implement the designed circuits using discrete components on the breadboard.
LAB PHOTO:
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
Anil Neerukonda Institute of Technology & Sciences (Autonomous)
Sangivalasa-531 162, Bheemunipatnam Mandal, Visakhapatnam District
3. Read and understand how to carry out an experiment thoroughly before coming to the laboratory.
5. Turn OFF the circuit immediately if you see any component heating.
6. Dismount all the components and wires before returning the kit.
Don’ts
1. Don’t touch live electric wires.
CIRCUIT DIAGRAM:
INVERTING MODE
Rf (10K)
7
R1 (1K) +15V
2_ Vo (CRO)
6
LM 741
Vs +
20mV 3
AFO
- 15V
4
Input and output waveforms of inverting amplifier
Rf (10K)
7
R1 (1K) +15V
2
_ 6
LM 741
+
3 Vo (CRO)
Vs
20mV - 15V
AFO 4
Input and output waveforms of non-inverting amplifier
PROCEDURE:
1. The circuit is connected as shown in circuit diagram (1) in inverting mode.
2. A 15v dual supply is given to the op amp from TRPS.
3. Now an input voltage of (Say 20mV to 30mV) is given from the signal generator.
4. By varying the frequency, the output voltage VO is noted from the CRO for different values of
frequencies up to 1MHz.
5. For each value, the gain is calculated by the formula,
V
AV 20 log O dB
VI
6. Now the circuit diagram (2) is connected in non-inverting mode and the above procedure is
repeated.
7. It is observed that the gain (AV) of an op amp is greater in non-inverting mode compared to that in
inverting mode.
THEORETICAL CALCULATIONS:
For Inverting mode:
AV
R f
AV 20 log 10 AV
R1
For Non-Inverting mode:
AV 1
R f
AV 20 log 10 AV
R
1
TABULAR FORM :
INVERTING MODE : Vi =
FREQUENCY (Hz) O/P VOLTAGE GAIN AV = 20 log Vo / Vi
Vo (V) (dB)
100
200
300
500
700
1k
2k
3k
5k
7k
10k
20k
30k
50k
70k
100k
200k
300k
500k
700k
1M
100
200
300
500
700
1k
2k
3k
5k
7k
10k
20k
30k
50k
70k
100k
200k
300k
500k
700k
1M
MODEL GRAPH :
Non-inv mode
AVmax(Ninv)
}-3dB
Inv mode
AVmax(inv)
}-3dB
Gain in
dB
fh fh
Freq in Hz
Bandwidth ≈ fh
GRAPH:
A graph is plotted between voltage gain (dB) and frequency (Hz) both for inverting and non-
inverting amplifiers.
PREACAUTION:
1. Avoid loose and wrong connections.
2. The output signal should be free from distortions.
3. Avoid parallax error while taking readings from CRO.
RESULT:
The frequency responses characteristics of the given Op-amp in both inverting & non
inverting modes are Obtained.
VIVA:
1. Why response of Op-amp starts from constant.
2. What are the difference between inverter & non-inverter Amplifier?
3. What are the types of packages for op-amp?
4. What is inverting and non-inverting amplifier?
5. What is the non-inverter closed-loop op-amp gain factor?
EXPERIMENT NO:2
Objective:
Measurement of Op – Amp Parameters: To determine the CMRR and slew rate of operational
amplifier.
APPARATUS:
100K
R1 (100ohms) +15V
2
6
LM 741
R1 (100ohms)
3 Vo (CRO)
- 15V
20V
1KHz
100K
2. SLEW RATE:
+15V
2
LM 741
3
Vo (CRO)
2V at 1KHz - 15V
10K
Procedure:
COMMON MODE REJECTION RATIO:
1. Connections are made as shown in circuit diagram.
2. A DC supply of 15V is given.
3. An input signal of 20V at 1 KHz is given from the signal generator.
4. The output voltage Vo is measured from the CRO is calculated by the formula
R V
CMRR 1 F S
R1 VO
SLEW RATE:
1. Connections are made as shown in circuit
2. A DC dual supply of 15V is given from the TRPS.
3. An input signal of 2V at 1 KHz is given from the signal generator.
4. The frequency is increased gradually and the voltage at which square wave transforms into
triangular wave is noted. The value of frequency is also noted.
5. The slew rate is calculated by the formula.
2f mVM V
SlewRate Sec
10 6
PRECAUTIONS :
1. Loose and wrong connections should be avoided.
2. Readings are to be taken without parallax error.
3. The power should be turned off before making and breaking circuit connections.
Result: Measurement of Op – Amp Parameters: Determined the CMRR and slew rate of operational
amplifier.
VIVA:
Objective:
Applications of Op – Amp: To realize Summing Amplifier and Subtracting Amplifier by using 741 Op-
Amp.
CIRCUIT DIAGRAM:
i) Summer R1=R2=R3=1KΩ
Vcc = +15
4
R
2 - 7
LM
R 6
3 + 4
V
-Vee = -15
V V
ii) Subtractor: R1=R2=R3=R4=1KΩ
R1
Vcc = +15V
4
R2
2 - 7
LM
R3 6
741
3 + 4
Vo
R4 -VEE = -15V
V1 V2
Procedure:
I. Summing Amplifier:
Op amp may be used to design a circuit whose output is the sum of several input signals. Such a circuit
is called a summing amplifier or a summer. If V1 , V2 are two input signals given to the inverting
RF
terminal, then VO V1 V2
R
Summing Amplifier Procedure:
1. Connections are made as per the circuit diagram.
2. Input voltages V1 and V2 are given and the corresponding output voltage Vo is measured from
CRO.
3. Output varies as VO V1 V 2 , since RF = R.
II. Subtracting Amplifier:
The function of a subtractor is to provide an output, which is equal to the difference of two input
signals (or) proportional to the difference of two input signals. If V 1 and V2 are the input voltages at
RF
inverting and non – inverting terminals, then VO V1 V2
R
Subtracting Amplifier Procedure:
1. Connections are made as per the circuit diagram.
2. Input voltage V1 and V2 are given to the inverting and non – inverting terminals respectively
and corresponding output voltage is measured from CRO.
3. Output varies as VO V2 V1
Op Amp as Integrator:
A circuit in which the output voltage waveform is the integral of the input voltage waveform is the
integrator or the integration amplifier. Such a circuit is obtained by using a basic inverting amplifier
configuration with the feedback resistor RF replaced by a capacitor CF. The output voltage is given by
1
RC
VO V1dt
Integrator is used in signal wave shaping circuits and in analog computers. If the input is a sine wave,
the output is a cosine wave. If the input is a square wave, the output will be a triangular wave. In the
practical integrator, RF is connected across feedback capacitors CF. This RF limits the low frequency
gain and minimizes the variation in the output voltage. The input signal will be integrated properly if
the time constant
T = R1 CF is larger than the time period T of the input signal.
R1=10KΩ, R2=100KΩ, C2
C2=0.01µf
R2
Vcc = +15 V
4
R1
2 - 7
LM 741
6
3 + 4
4V Vo
Vin -Vee = -15 V
10KHz
Op Amp as Differentiator:
The function of a differentiator is to give an output voltage, which is proportional to the rate of change
of input voltage. The differentiator may be constructed from a basic inverting amplifier if an input
resistor is replaced by capacitor C1. The output voltage is given by
dVI
VO RC
dt
The condition for differentiator is τ << T where τ = C1RF for sine wave and square wave inputs, the
resulting differentiated outputs are cosine wave and spike outputs respectively. Differentiator is used to
detect high frequency components in an input signal.
CIRCUIT DIAGRAM:
R2
Vcc = +15 V
C1
4
R1
2 - 7
LM 741
6
3 + 4
0.4V Vo
-Vee = -15 V
1KHz
PROCEDURE:
I. Integrator:
1. Connections are made as per the circuit diagram.
2. By using a function generator, a square wave input 4Vp-p is given.
3. The frequency applied is 10 KHz.
4. A perfect triangular wave is obtained. The peak-to-peak voltage and the time period of input and
output waves are measured from CRO.
5. The waveforms are plotted.
II Differentiator:
1. Connections are made as per the circuit diagram.
2. A square wave input of 4V (p-p) and frequency of 1KHZ is applied from function generator.
3. Output waveform is observed. Corresponding amplitude and time period is observed and
frequency is calculated.
4. With the above data plot the output graphs with time on X-axis and voltage on Y-axis.
MODEL GRAPHS:
DIFFERENTIATOR: INTEGRATOR:
PRECAUTIONS :
1. Loose and wrong connections should be avoided.
2. Readings are to be taken without parallax error.
3. The power should be turned off before making and breaking circuit connections.
Result:
a) Applications of Op – Amp: Realized the Summing Amplifier and Subtracting Amplifier by
using 741 Op-Amp.
b) Applications of Op – Amp: Realized the Integrator and Differentiator by using 741 Op-Amp.
VIVA:
1. What are the applications of op-amp?
2. What is difference between integrator and differentiator?
3. Why is RC differentiator known as a high pass filter?
4. What is the function of integrator?
5. What are the applications of integrator and differentiator?
EXPERIMENT NO: 4
Design of Schmitt Trigger using op-amp
Objective:
To observe the output waveform of a Schmitt trigger circuit and to note down the hysteresis voltage
VHY with the reference of VUT and VLT .
Apparatus:
S.No Apparatus Type Range Quantity
1. OP-AMP IC 741 02
2. Resistance 2.2KΩ ,10KΩ 2,1
3. Regulated Power supply (0-30V) 01
4. Signal Generator 1MHz 01
5. CRO 01
6. Breadboard and Wires ,CRO Probes
Theory:
The circuit shown is known as the Schmitt trigger or Squaring Circuit. It shows an working
comparator with positive feedback. This circuit converts an irregular shaped waveform to a square
wave hence it is called as a square wave generator. If positive feedback is added to a basic comparator
circuit, Gain can be increased greatly. The input voltage Vin triggers the output Vo every time it exceeds
certain voltage levels called upper threshold voltage V UT and lower threshold voltage VLT.
The threshold voltages are obtained by using the voltage divider R 1 - R2 where the voltage across R1 is
fed back to the (+) input. The voltage across R1 is variable reference threshold voltage that depends on
the value the polarity of the output voltage V0 . When V0 = + VSAT the voltage across R1 is called the
upper threshold Voltage VUT.
The input voltage Vin must be slightly more positive than VUT in order to cause the output Vo to switch
from
V SAT to VSAT as long as Vin VUT , Vo is at VSAT
R2
VUT
R2
VSAT & VLT VSAT
R f R2 R f R2
R2 R2
VHY
R R
VSAT
R R
VSAT
f 2 f 2
Circuit Diagram:
MODEL GRAPHS:
R2
Lower threshold voltage: VLT VSAT
R f R2
V SAT
PRECAUTIONS:
RESULT: Observed the output waveform of a Schmitt trigger circuit and noted down the hysteresis
voltage VHY with the reference of VUT and VLT.
Viva questions:
1. What do mean by Schmitt trigger?
2. What are the applications of Schmitt triggers?
3. What is meant by Hysteresis voltage?
4. What is meant by threshold voltage?
5. What is the difference between a Binary and Schmitt Trigger?
EXPERIMENT NO: 5
Design and Verification of Active LPF & HPF Using Op-Amp
Objective:
To obtain the frequency response of the active filters LPF & HPF Using Op-Amp by varying the
frequency.
APPARATUS:
S.No Apparatus Type Range Quantity
1. OP-AMP LM 741 IC 01
2. Resistance 10kΩ, 16 KΩ 2,1
3. Capacitors 0.01μF 01
4. Function generator 1MHz
5. Regulated Power supply (0-30V) 01
6. Breadboard and Wires ,CRO Probes
THEORY:
Filters are frequency selective networks, which can allow desired range of frequencies and
attenuates other frequencies. Filters are classified:
Depending on the type of the elements used as resistor, capacitor, and inductor such a type of
filter is called as passive filters. By using op-amp and transistor on addition to passive elements, they
are called as active filters.
Depending on the range of frequencies the active filters can be classified as low pass, band pass,
high pass, all pass, band reject filters.
CIRCUIT DIAGRAM:
HIGH PASS BUTTERWORTH FILTER
10K
Circuit diagram
10K
2 7 +VCC(+15V)
-
741C
0.01µFD
6
3 +
Vi(100 mv) P-P 16K 4 Vo
-VEE(-15V)
DESIGN:
PROCEDURE:
1. The circuit is connected as per the circuit diagram
2. The Frequency of the input signal is varied and the Corresponding out put voltage is noted. The
magnitude of the input Signal is kept constant throughout the experiment.
3. The gain for each frequency is calculated using the formula
V
Gain in dB 20 log o
VI
4. A graph for gain v/s frequency is plotted which is known as Frequency response.
TABULAR FORM:
HIGH PASS BUTTERWORTH FILTER
Input Voltage: 100 mv (p-p)
RESULT: Designed and obtained the response of active filters by varying the frequency
Viva questions
1. What is filter?
2. What is an active filter?
3. What is high pass filters & low pass filters?
4. Name the types of filters?
5. What is butter worth filter?
EXPERIMENT NO: 6
ASTABLE MULTIVIBRATOR USING 555 IC TIMER
Objective:
To obtain a symmetric square wave output by maintaining certain duty cycle by using 555 IC.
APPARATUS:
CIRCUIT DIAGRAM:
Vcc =12v
8 4
RA
10K
1N 4007
7 555 3
1
Output
RB 3.3K
TIMER
0.1µFD 6 5
2 1
0.01µFD
PIN DIAGRAM:
MODEL GRAPHS:
PROCEDURE:
2 1
The output is low while the capacitor discharges from VCC to VCC and the voltage across
3 3
1 2
t
Duty cycle =
t HIGH
R A RB (without diode)
T R A 2 RB
(v) (v)
PRECAUTIONS:
RESULT:
Obtained a symmetric square wave output by maintaining certain duty cycle by using 555 IC
Viva questions
1. What do mean by duty cycle?
2. What is RS flip flop?
3. What is comparator?
4. What are the applications of astable multivibrator?
5. What is quasi stable state?
EXPERIMENT: 7
Operation of R-2R ladder DAC and flash type ADC
Objective:
To study the operation of
i) R-2R DAC
ii) Flash type ADC
APPARATUS REQUIRED:
S.NO APPARATUS RANGE QUANTITY
1. OP-AMP LM 741 IC 1
3. Multimeter - 1
4. RPS DUAL(0-30) V 1
5. Breadboard and Wires ,CRO Probes Connecting Wires
THEORY:
In weighted resistor type DAC, op-amp is used to produce a weighted sum of digital
inputs where weights are produced to weights of bit positions of inputs. Each input is
amplified by a factor equal to ratio of feedback resistance to input resistance to which it is
connected.
RF 1 1 1
VOUT D3 D2 D1 D0
R 2 4 8
The R-2R ladder type DAC uses resistor of only two values R and2R.The inputs to resistor
network may be applied through digitally connected switches or from output pins of a counter.
The analogue output will be the maximum, when all inputs are of logic high.
RF 1 1 1 1
V D3 D2 D1 D0
R 2 4 8 16
In a 3 input ADC, if the analog signal exceeds the reference signal, comparator turns
on. If all comparators are off, analog input will be between 0 and V/4.If C1 is high and C2 is
low input will be between V/4 and V/2.If C1 andC2 are high and C3 is low input will be
between 3V/4 and V.
CIRCUIT DIAGRAM: a) R-2R Ladder DAC:
PROCEDURE:
PRECAUTIONS:
RESULT:
The operation of R-2R ladder DAC and Flash type ADC was studied
Viva Questions:
1. Which types of switches are not preferable for a simple weighted resistor DAC?
2. The inverted R-2R ladder can also be operated in?
3. What are the Multiplying DAC uses?
4. List out the direct type ADCs.
5. What are the main advantages of integrating type ADCs & State the Dis-advantages of ADCs?
Cycle: II
(FPGA Based Experiments)
EXPERIMENT: 1
Verify the functionality of Parallel adder using FPGA
Aim: : To develop a HDL Code for Parallel Adder using full adder as a sub module and
verify its functionality using Xilinx Vivado.
Verilog Program:
RTL SCHEMATIC:
RESULT: Hence the 4-bit parallel adder is programmed using verilog and its functionality is verified
through simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is HDL?
2. What is the need for Verilog HDL?
3. What is meant by simulation?
4. What is meant by synthesis?
5. What is Parallel adder?
EXPERIMENT: 2
Verify the functionality of 4:1 Multiplexer using FPGA
Aim: To develop a HDL Code for 4:1 Multiplexer using 4:1 MUX using Gate level and Behavioral
modeling and verify its functionality using Xilinx Vivado.
Logic Diagram:
Verilog Program:
module mux_8x1(O,s,i);
input [7:0]i;input [2:0]s;
output O;
mux41 a0 ({s[1:0]},{ i[3:0]},w1);
mux41 a1 ({s[1:0]},{ i[7:4]},w2);
m21 a2 (w1,w2,s[2],O);
endmodule
** Sub-module Verilog programs**
RTL SCHEMATIC:
RESULT: - Hence the 8x1 Multiplexer is programmed using verilog and its functionality is verified
through simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is Blocking assignment?
2. What is the use of Concurrent assignments?
3. What is the difference between dataflow and Behavioral Modeling?
4. What are the applications of Multiplexers?
5. What is the difference between always and initial block?
EXPERIMENT: 3
Verify the functionality of 1:4 Demultiplexer using FPGA
Aim: To develop a HDL Code for 1x4 Demultiplexer and verify its functionality using Xilinx Vivado.
Logic Diagram:
Testbench:
module demux102_tb;
reg a,s0,s1:
wire y0, yl,y2, y3;
demux102dut (a, so, sl, y0, yl, y2, y3);
initial
begin
a=1'b1;
s0=1'b0;sl=1'b0;
#5 s0=1'b0;s1=1'b1;
#5 s0=1'bi:sl=1'b0;
#5 s0=1'bl:s1=1'b1;
#5 $stop:
end
endmodule
RTL Schematic:
Simulation Waveform:
RESULT: - Hence the 1x4 DeMultiplexer is programmed using verilog and its functionality is verified
through simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is the use of case statement?
2. What is the use of Non-blocking assignments?
3. What is the syntax of equality Operator?
4. What are the applications of DeMultiplexers?
5. What is the Testbench?
EXPERIMENT: 4
Verify the functionality of 8:3 Encoder and Priority Encoder using FPGA
Aim: To develop a HDL Code for 8:3 encoder using behavioral and Gate level modeling and verify its
functionality using Xilinx Vivado.
Apparatus: Personal Computer
Xilinx Vivado
Basys3 Artix7 FPGA
Logic Diagram:
Simulation Results:
RTL SCHEMATIC:
Testbench:
module pe_tb;
reg [7:0]y;
reg en;
wire [2:0]a;
encoder dut(y,a,en);
initial
begin
en=1'b1;y=8'b00000001;
#5 en=1'b1;y=8'b00000010;
#5 en=1'b1;y=8'b00000100;
#5 en=1'b1;y=8'b00001000;
#5 en=1'b1;y=8'b00010000;
#5 en=1'b1;y=8'b00100000;
#5 en=1'b1;y=8'b01000000;
#5 en=1'b1;y=8'b10000000;
#5 $stop;
end
endmodule
Simulation Results:
RTL SCHEMATIC:
RESULT: Hence the 8:3 encoder and priority encoder is programmed using verilog and its
functionality is verified through simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is priority encoder?
2. What is the use of $stop?
3. What is RTL Schematic?
4. What are the applications of encoders?
EXPERIMENT: 5
Verify the functionality of 3:8 Decoder using FPGA
Aim: To develop a HDL Code for 3:8 decoder using behavioral and Gate level modeling and verify its
functionality using Xilinx Vivado.
Apparatus: Personal Computer
Xilinx Vivado
Basys3 Artix7 FPGA
Logic Diagram:
Verilog Program:
Testbench
module de_tb;
wire[7:0]y;
reg[2:0]a;
de dut(a,y,din);
initial
begin
din=1'b1;a=3'b000;
#5 din=1'b1;a=3'b001;
#5 din=1'b1;a=3'b010;
#5 din=1'b1;a=3'b011;
#5 din=1'b1;a=3'b011;
#5 din=1'b1;a=3'b100;
#5 din=1'b1;a=3'b101;
#5 din=1'b1;a=3'b110;
#5 din=1'b1;a=3'b111;
#5 din=1'b0;a=3'b000;
#5 din=1'b0;a=3'b001;
#5 din=1'b0;a=3'b010;
#5 din=1'b0;a=3'b011;
#5 din=1'b0;a=3'b100;
#5 din=1'b0;a=3'b101;
#5 din=1'b0;a=3'b110;
#5 din=1'b0;a=3'b111;
#5 $stop:
end
endmodule
Simulation Results:
RTL SCHEMATIC:
Simulation Waveform:
RESULT: - Hence the 3:8 Decoder is programmed using verilog and its functionality is verified
through simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is the use of conditional statement?
2. What is the use of Nested if statements?
3. What is the syntax of equality Operator?
4. How many 2:4 decoders required for 3:8 decoder?
5. What is the use of $monitor?
EXPERIMENT: 6
Verify the functionality of Binary to Gray code converter using FPGA
Aim: To develop a HDL Code for Binary to Gray code converter using dataflow modeling and verify
its functionality using Xilinx Vivado.
Apparatus: Personal Computer
Xilinx Vivado
Basys3 Artix7 FPGA
Verolog Program:
module binary2gray(
input [3:0] a,
output [3:0] g
);
assign g[0]=a[0]^a[1];
assign g[1]=a[1]^a[2];
assign g[2]=a[2]^a[3];
assign g[3]=a[3];
endmodule
Testbench
module b2g_tb;
reg [3:0]a;
wire [3:0]g;
binary2gray dut(a,g);
initial
begin
a=4'b0000;
#5 a=4'b0001;
#5 a=4'b0010;
#5 a=4'b0011;
#5 a=4'b0100;
#5 a=4'b0101;
#5 a=4'b0110;
#5 a=4'b0111;
#5 a=4'b1000;
#5 a=4'b1001;
#5 a=4'b1010;
#5 a=4'b1011;
#5 a=4'b1100;
#5 a=4'b1101;
#5 a=4'b1110;
#5 a=4'b1111;
#5 $stop;
end
endmodule
Simulation Results:
RTL Schematic:
RESULT: - Hence the Binary to Gray code converter is programmed using verilog and its functionality
is verified through simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is the use of Code converters ?
2. What is the use of assignment statement?
3. What are the different operators available in Verilog
4. What are the applications of Code converters?
5. What is the Testbench?
EXPERIMENT: 7
Verify the functionality of Comparator using FPGA
Aim: To develop a HDL Code for comparator using Gate Level modeling and verify its functionality
using Xilinx Vivado.
Apparatus: Personal Computer
Xilinx Vivado
Basys3 Artix7 FPGA
Verilog Program:
module comparator(
input a,
input b,
output c,
output d,
output e
);
wire w0,w1;
not(w0,a);
not(w1,b);
and(c,w0,b);
and(e,w1,a);
nor(d,c,e);
endmodule
Testbench:
module c_tb;
reg a,b;
wire c,d,e;
comparator dut(a,b,c,d,e);
initial
begin
#5 a=2;b=3;
#5 a=3;b=2;
#5 a=2;b=2;
#5 $stop;
end
endmodule
Simulation Waveform:
RTL schematic:
RESULT: - Hence the Comparator is programmed using verilog and its functionality is verified
through simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is the use of Comparator ?
2. What are the primitive gates available in HDL?
3. What are the different Shifting available in Verilog
4. What are the applications of Comparators?
5. What is the Testbench?
EXPERIMENT: 8
Verify the functionality of Arithmetic and Logic Unit using FPGA
8. Design and Verify the functionality of Arithmetic and Logic Unit using FPGA
Aim: To develop a HDL Code for ALU using behavioral modeling and verify its functionality using
Xilinx Vivado.
Apparatus: Personal Computer
Xilinx Vivado
Basys3 Artix7 FPGA
Verilog Program:
module alu(result,data1,data2,select);
output reg [7:0] result;
input [7:0] data1,data2;
input [2:0] select;
always @(*)
begin
case (select)
3'b000:
result = data1+data2; //add
3'b001:
result = data1 - data2; //subtraction
3'b010:
result = data1 * data2; //product
3'b011:
result = data1 / data2; //divison
3'b100:
result=data1&data2;//and
3'b101:
result=~data2;//not
3'b110:
result=data1|data2;//or
3'b111:
result=data1^data2;//xor
default:
result = 8'b00000000;
endcase
end
endmodule
Testbench
module alu_tb;
reg [7:0] data1,data2; //inputs
reg [2:0] select; //control input
wire [7:0] result; //output
alu dut(result,data1,data2,select);
initial
begin
data1=8'b00000101;
data2=8'b00000011;
#5select=3'b000;
#5select=3'b001;
#5select=3'b010;
#5select=3'b011;
#5select=3'b100;
#5select=3'b101;
#5select=3'b110;
#5select=3'b111;
#5 $stop;
end
endmodule
Simulation results:
RTL SCHEMATIC:
RESULT: - Hence the ALU is programmed using verilog and its functionality is verified through
simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is the use of ternary operator?
2. What is the use of conditional assignments?
3. What are the different operators available in Verilog?
4. What are the applications of ALU?
5. What is the Testbench?
EXPERIMENT: 9
Verify the functionality of Counter using FPGA
Aim: To develop a HDL Code for Counter using Gate Level modeling and verify its functionality
using Xilinx Vivado.
Apparatus: Personal Computer
Xilinx Vivado
Basys3 Artix7 FPGA
Verilog Program:
module counter(clk,rst,count);
input clk,rst;
output reg [3:0]count;
always@(posedge clk) begin
if(rst == 1 || count == 9)
count <= 0;
else
count <= count + 1;
end
endmodule
Testbench:
module tb();
reg clk,rst;
wire [3:0]count;
counter c1(clk,rst,count);
initial begin
clk = 0;
forever #5 clk = ~clk;
end
initial begin
rst = 0;
#5 rst = 1;
#10 rst = 0;
#200 $finish;
end
initial
$monitor("%d%d",clk,count);
initial begin
$dumpfile("dump.vcd");
$dumpvars;
end
endmodule
Simulation Waveform:
RESULT: - Hence the Mod-10 Counter is programmed using verilog and its functionality is verified
through simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is the use of Counter ?
2. What are the primitive gates available in HDL?
3. What are the different Counters available?
4. What are the applications of Counters?
5. What is the difference between of Synchronus and Asynchronous Counters?
EXPERIMENT: 10
Verify the functionality of D-Flip Flop using FPGA
Aim: To develop a HDL Code for D-flipflop using Gate Level modeling and verify its functionality
using Xilinx Vivado.
Apparatus: Personal Computer
Xilinx Vivado
Basys3 Artix7 FPGA
Verilog Programme:
module RisingEdge_DFlipFlop(D,clk,Q);
input D; // Data input
input clk; // clock input
output Q; // output Q
always @(posedge clk)
begin
Q <= D;
end
endmodule
Testbench:
module tb_DFF();
reg D;
reg clk;
reg reset;
wire Q;
RisingEdge_DFlipFlop_SyncReset dut(D,clk,reset,Q);
initial begin
clk=0;
forever #10 clk = ~clk;
end
initial begin
reset=1;
D <= 0;
#100;
reset=0;
D <= 1;
#100;
D <= 0;
#100;
D <= 1;
end
endmodule
Simulation Waveform:
RESULT: - Hence the D-flipflop is programmed using verilog and its functionality is verified through
simulation and synthesis using Xilinx Vivado.
VIVA QUESTIONS:
1. What is the use of D-FF ?
2. What are the keywords used for representing clock signal in Verilog HDL?
3. What is the difference between Latch and Flipflop?
4. What are the applications of flipflops?
5. What is the difference between initial and always keyword?
Hardware Implementation steps
Introduction to the XILINX Vivado
In this part, you will use Xilinx's Vivado to design, simulate and implement all the
digital circuits. Once completed the simulation, implementation will be downloaded
to the BASYS board and then tested using the on board LED's and switches.
1. Double click on the Vivado icon on your desktop to open up the welcome window
of the development tool (as shown below). Three main sections can be observed in
this window:“Quick Start”, “Tasks”, and “Learning Center”.
2. Now, click on “Create Project” to create a new project. You have to be careful about
where to save your project file in the computer lab. The computers in the lab run a hard
disk protection program that could interfere with Xilinx. So, if you save your project in
a preserved folder, Xilinx might have problem with running the simulation. You have
two choices: (1) either save the project directly on your USB flash disk. This option is
good since your USB disk have normal read/write access and Xilinx runs correctly.
However, this option can be slow for USB flash disks. The option (2)is to save the
project in a folder that’s in the desktop. Then, compress the folder into a ZIP file and
email it to yourself. Start by creating a folder on the desktop called‘Lab_1’. Create this
folder in Windows, not from Xilinx. Then, in Xilinx, create a new project
inside“Lab_1”.Name your project, ‘Test_1’andit will be in the folder
“\Desktop\Lab_1\Test_1”. When you finish your lab, you can copy your project on
your flash disk.
3. In the next window, choose “RTL Project” as the project type. You can the
description of this type in the window.
4. In the opened window, you can create source file (Verilog/Verilog Header/System
Verilog/VHDL/Memory File) for your new project or add sources from the existing
projects. Click on “Create File”, and in the opened window choose “Verilog” for the
“File type”, write a name for your file (“Part_1”), and click on “Ok”. Continue
clicking on Next until reaching the “Default Part” window.
5. In this window, choose “Artix-7” for the “Family”, “-1” for “Speed grade”,
and“cpg236” for “Package”. In the shown parts, select “xc7a35tcpg236-1”. Take a
look at the configuration of this part for your own familiarity.
6. Look at your new project summary.
7. Define the input and the output ports of your module according to the shown window.
8. The opened window is the main environment for your project that is called “Project
Manager”. You can explore it by seeing the options of each category in the toolbar on
top of the window. In the left side, you can see the “Settings”, “Add
Sources”,“”Language Template”, “IP Catalog”, “IP Integrator”, “Simulation”, “RTL
Analysis”, “Synthesis”, “Implementation”, and “Program and Debug”. Each of these
serves apart of the digital design flow. In the middle, you can see the windows for
“Sources”, “Properties”, “Project Summary”, and the reports and summaries for the
execution of the project files.
9. Double click on the “Part_1.v” file (*.v) in the “Sources” window. The VERILOG
source file appears where the window is located in right side. Note that the module
shows the defined inputs and outputs that were selected previously.
Now that the design is finished, you must build the project. Click Run Synthesis on the left
hand menu towards the bottom, on successful completion click on Run Implementation. On
successful completion of implementation click on “Open Implemented Design” in the dialog
box that appears. Proceed to the next steps.”
10. We do the “RTL Analysis”. Expand the Open Elaborated Design entry under the RTL
Analysis tasks of the Flow Navigator pane and click on Schematic. The model(design)
will be elaborated and a logic view of the design is displayed. Notice that some of the
switch inputs go through gates before being output to LEDs and the rest go straight
through to LEDs as modeled in the file.
11. Once RTL analysis is performed, another standard layout called the I/O Planning is
available. Click on the drop-down button and select the I/O Planning layout.
12. Notice that the Package view is displayed in the Auxiliary View area, Device
Constraints tab is selected, and I/O ports tab is displayed in the Console View area.
Also notice that design ports (led and swt) are listed in the I/O Ports tab with both
having multiple I/O standards. Move the mouse cursor over the Package view,
highlighting different pins. Notice the pin site number is shown at the bottom of the
Vivado GUI, along with the pin type (User IO, GND, VCCO…) and the I/O bank it
belongs to.
13. The user should imply input the “Site” table next to the input/output to the desired
pin. From Appendix D, for BASYS board, SW0 is located on pin V17, SW1 is located
on pin V16 and LED0 is located on pin U16. These names can also be found inside the
parentheses below the switches and the ones in the right side of the LEDs on the board.
The value of I/O Std for all of these switches should be setto“LVCMOS33”.
14. Select File>Save Constraints. Name and save the constraint file.
Then we should simulate the design using the XSim Simulator. Click Add Sources under the Project
Manager tasks of the Flow Navigator pane. Select the Add or Create Simulation Sources option and
click Next. We create a new file for simulation, andnameitasPart_1_Sim.
15. For the simulation file, we don’t need to set the I/O. Click OK in this step.
16. Double click on the “Part_1_Sim.v” in the Sources window to type the following
contents into the file. Within the Test-bench file, the simulation step size and
theresolutioncanbespecifiedinline1.TheTest-benchmodule definition begins on line 23.
Line 33 instantiates the UUT (unit/module under test). Also, it should be mentioned
that the timescale for both the Verilog module and the test-bench module is set to 1
ns/1 ps.
17. Click on Run Simulation >Run Behavioral Simulation under the Project Manager
tasks of the Flow Navigator window. The test-bench and source files are compiled and
the XSim simulator is run (assuming no errors). Click on the “Zoom Fit” icon to see all
the spectrum of simulation.
18. In the last part, let’s click on the Generate Bit stream on the left hand menu towards
the bottom. Vivado runs through both Run Synthesis and Run Implementation before it
generates the bit stream automatically. This process generates the *.BIT file needed to
program the FPGA. The following window will be opened if the bit stream is
generated.
19. Go to “Flow Hardware Manager” in the toolbar. Turn ON your board by pushing
up its power switch. Click on “Auto Connect” icon in the Hardware Manager window.
Click on the board name “xc7a35t_0 (1)”. In the opened “Hardware Device
Properties” window, make sure the bit file is selected for the “Programming file”.
Next, right click on the board name and choose “Program Device…”. Once the status
of the board goes to “Programmed”, then you can check the design functionality on
the board by changing the state of switches.
20. Check the operation for the two-input AND gate and fill out the following
table. Remember we have selected switch SW0 for input “Inp_1”, switch SW1
for input “Inp_2” and led LED0 for the output “Outp”. Toggle the switches for
the states shown in the table below and fill in the output by observing LED0.
This table should confirm the truth table for a two-input AND gate.
88