Lab3_manual_UG_GR
pdf
keyboard_arrow_up
School
University of Texas, Rio Grande Valley *
*We aren’t endorsed by this school
Course
429
Subject
Electrical Engineering
Date
Apr 3, 2024
Type
Pages
8
Uploaded by Gicote6002
ECEN 428/722 – Lab 3: Folded and Unfolded IIR Filter Design on FPGA
Texas A & M University
Page
1
1
Introduction
In this lab, we will extend our IIR design done in the previous lab. We will implement unfolded and folded IIR filter designs and compare their differences. For this lab, you are expected to complete the following tasks: a)
Implement the unfolded IIR filter design. b)
Implement the folded IIR filter design. c)
Summarize the differences in the implementation between unfolding and folding filter design. 1.1
Introduction to Unfolding and Folding
Unfolding
is a transformation technique that increases the throughput of a digital signal processing program by duplicating the functional blocks while maintaining functionality. On the other hand,
folding
converts multiple operations into a single operation block and minimizes the number of functional blocks needed in synthesizing the digital signal processing system. Please refer to the lectures (or chapters 5 and 6 from the text authored by Keshab Parhi prescribed in the syllabus) to understand the unfolding and folding algorithms before the lab. We need to design IIR for this lab based on the same IIR design. Figure 1, Figure 2, and Figure 3 show the original, unfolded, and folded design of the IIR filter, respectively. Figure 1: IIR Original Design
ECEN 428/722 – Lab 3: Folded and Unfolded IIR Filter Design on FPGA
Texas A & M University
Page
2
Figure 2: IIR Unfolded Design Figure 3: IIR Folded Design 2
Lab Design of Unfolded IIR
Now we start to implement the designs. a)
If using Olympus server, transfer the base_vivado.zip
file form personal computer to Olympus using the scp
command (instructions shown in Lab1). b)
Log into Olympus. Unzip the zip file. Rename the extracted directory from base_vivado
to lab3_vivado
c)
Source the 2023 version of Vivado and Vitis: source /opt/coe/Xilinx/Vitis/2023.1/settings64.sh source /opt/coe/Xilinx/Vivado/2023.1/settings64.sh d)
Start Vivado, then open the project base.xpr
under lab3_vivado/base
ECEN 428/722 – Lab 3: Folded and Unfolded IIR Filter Design on FPGA
Texas A & M University
Page
3
e)
Click on File à
Add Sources
. Select Add or create design
sources
. Click Add Files and choose the files IIR_unfold.v
, multiply.v
from the lab3_codes
folder. Finally and click finish
. Refer to figure. f)
In the same manner, also add the testbench for the design. Click on File à
Add Sources
. Select Add or create simulation sources
. Choose the file IIR_unfold_tb.v
and flick Finish.
Refer to the figure below on how the design hierarchy should look after adding these files.
g)
Now its your job to complete the Verilog code for the 2-unfolded IIR module according to the unfolding algorithm taught in class. You will need to implement your code in the IIR_unfold.v
file. Remember to use an 8-bit signed fixed-point number for calculation in the lab, with 4 bits for the fractional part, 3 bits for the interger part and 1 bit for sign. After you finish coding IIR_unfold.v
, we can run behavioral simulation. Before simulation, please right click on IIR_unfold_tb
and click Set as Top
. Refer to figure below.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
ECEN 428/722 – Lab 3: Folded and Unfolded IIR Filter Design on FPGA
Texas A & M University
Page
4
h)
Start simulation but clicking run simulation à
run behavioral simulation
in the flow navigator pane on the left. Now you shoulw see the waveform of the simulation. Change the radix to fixed point, signed and binary point value to 4. If your design and testbench are correct, you should be able to see the filtered waveform on the output ports of your IIR design. 3
Implementation of Unfolded IIR on FPGA
Next, we need to implement the design on FPGA. a)
Add top_IIR_unfold.v
into your project. Once added, right click this file in the “
source
” panel and click “
set as top
”. The file should appear in blod after this step. Refer to figure below b)
Now, we need to add a dual port RAM IP that is instantiated in the top_IIR_unfold.v
. This ram will be instantiated in the FPGA and will be used to store the input/output values for the IIR fitler. c)
Double click on “blk_mem_gen_0” to customized the “block memory generator”. If a window pops up, choose customize IP.
ECEN 428/722 – Lab 3: Folded and Unfolded IIR Filter Design on FPGA
Texas A & M University
Page
5
d)
Select True Dual Port Ram
since we need a two port ram. e)
In both port A and port B options, change write width to 16, and write depth to 65536. f)
Choose operation mode Read First
, enable port type Always Enabled
.
Click “ok”
. g)
In the pop-up window, select “
Global
” in the synthesis option, and click “generate”
. h)
Now, click generate bitstream
. After the bitstream is generated, open the implemente design and make sure the Total Negative Slack is zero as shown below. This ensures the design will work properly on the FGPA for the given clock frequency.
ECEN 428/722 – Lab 3: Folded and Unfolded IIR Filter Design on FPGA
Texas A & M University
Page
6
i)
Now click
file->export->export hardware
. Click Next
. Check Include bitstream
. Click Next
two times in the following screens and and finally click Finish
. Refer to figure below.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
ECEN 428/722 – Lab 3: Folded and Unfolded IIR Filter Design on FPGA
Texas A & M University
Page
7
Now, we use can implement the design on the Zybo board. a)
Refer to HowToImplementDesignOnFPGA.pdf for the details. b)
Once you boot the Linux system on the Zybo board, run the testing program with the command: ./lab3_IIR_unfold_test c)
The results are written into lab3_IIR_unfold_results
. (Check it by ls
command) d)
Please screenshot the output in the terminal, and attach it in the post-lab report. e)
In your computer, plot the data in lab3_IIR_unfold_results using your favorate tool, and attach it in
the post-lab report. 4
Design and Implement Folded IIR (For Graduate Students)
a)
Repeat Section 2 and 3 to design a 4-folded IIR, with files: IIR_fold.v
, IIR_fold_tb.v
. Run the behavior simulation of the folded IIR design, and include it in the post-lab report. b)
Bonus: If you are interested, you can try implementing the folded IIR design on the FPGA with top_IIR_fold.v and lab3_IIR_fold_test. The output from the implementation is lab3_IIR_fold_results. c)
Please add the RAM IP with write width 8, and name blk_mem_gen_1
, as shown in figure below. d)
Note that the 3-input adder in Figure 1 should be replaced by two 2-input adders, as in Figure 2. e)
You are required to have the following folding set for the multipliers: {m1, m2, m4, m3}, and for the adders: {a3, a2, a1,
∅
}. The folding orders of input and output are both 0 (you can realize this by regarding the input and output ports as components and adding two folding sets when performing folding: {input,
∅
,
∅
,
∅
}, {output,
∅
,
∅
,
∅
}). f)
You may need to do retiming for these folding sets. Please refer to the lectures for the detail of retiming.
ECEN 428/722 – Lab 3: Folded and Unfolded IIR Filter Design on FPGA
Texas A & M University
Page
8
5
Pre-Lab Submission
1.
Please only submit 1 PDF file, containing the following items: a.
Copy your code in “unfolded_IIR.v” b.
Screenshots of the behavioral simulation of unfolded IIR design. c.
Write your observations from the simulation waveform regarding the inputs, output, latencies, intermediate signals etc d.
Answers to the following question: What are the pros and cons of unfolding and folding, compared with the original design? 2.
Please name the PDF file as “Lab#_PreLab_Section#_LastName_FirstName.pdf” 3.
Please submit the PDF file on Teams à
Assignments à
Lab3 6
Post-Lab Submissions
1.
Please only submit 1 PDF file, including the following items: a.
Screenshots of the terminal outputs of unfolded IIR design. b.
Plot of the data in the unfolded IIR output file. c.
Write your observations from the FPGA terminal outputs and the plotted values. d.
Screenshots of the behavioral simulation of the folded IIR design. (Graduate students only) 2.
Please name the PDF file as “Lab#_PostLab_Section#_LastName_FirstName.pdf” 3.
Please submit the PDF file on Teams à
Assignments à
Lab3
Related Documents
Related Questions
For the filter:
a) Determine type of filter and the cut-off frequency (Fc). Determine the peak voltage at the cut-off frequency (Fc).
b) Find GAIN (Vo/Vi) at f = .1*Fc . Find GAIN (Vo/Vi) at f = 10*Fc .
c) Determine the frequency at which GAIN = .4 (i.e., Vo = .4*Vi) . Draw the “Frequency Response Plot” in “Log-Log” format .
arrow_forward
bessel bandpass filter analysis and all formula. lecture summary
arrow_forward
Solve using the concpts of Digital Signal ProcessingShow each formula wherever necessary and please show all the steps of the design process
arrow_forward
Design an ACTIVE band-pass filter for the midrange part of a loudspeaker so that the bandpass region is
400 Hz-2000 Hz (as defined by the -3dB points). Design the circuit so that the absolute gain is 2.
a. Draw the circuit diagram and specify the resistor and capacitor values. Assume you can use either
100, 330, 500, or 1000 Ohm resistors and can select any value of capacitor.
b. Sketch the frequency response (Gain [dB] vs. frequency (Hz)). Note that you will need to convert
your gain to dB before plotting.
Magnitude (dB)
15
10
5
midrange
12 1
-5
-10
-15
-20
-25
10
100
1,000
Frequency (Hz)
10,000
100,000
arrow_forward
CR active filters find extensive use in communications and instrumentation
measurements.
a) By considering how the capacitor impedance in Figure 1 varies with frequency,
explain if the circuit in Figure 1 acts as a low-pass or high-pass filter.
p) Derive the closed-loop gain for the case of very high frequencies.
c) Draw a graph that shows the frequency response of the CR active high-pass
filter. The y-axis should correspond to gain in dBs and the x-axis to frequency.
Make sure that you clearly indicate the 3 dB point and the equation that
describes the relationship between w and CinRin at the cut-off frequency.
Cin Rin
A
Vin
Vout
Figure 1
arrow_forward
How can I add two voltages values together with on op amp? Using op amps, how to make an AD Converter? A DA Converter?
What components determine the frequency of an astable, 555 oscillator? Draw the circuit.
Draw a circuit for both an astable and a monostable, 555 multivibrator.
What is the duty cycle and percentage duty cycle of a pulse train or square wave?
What is the overshoot, rise time, fall time, and pulse width of a pulse and where on the waveform is each measured?
arrow_forward
2.
a) Consider the circuit shown in figure 3.
i) Determine what type of filter is shown in Figure 3
i) Calculate the corner or cutoff frequency. Take R = 4 k &, L= 2 H, and C= 1 uF.
R
Figure 3
b) Describe the possibility of building a second order filter with only resistors and
capacitors? and design the cutoff frequency of second order filter for low pass filter
(Expected: Describe the possibility , design the second order filter for low pass filter
circuit and design the cutoff frequency as equation only).
arrow_forward
6. An AC precision integrator is desired for a particular application to perform the operation:
Vo'(t) = -1200 Vi(t) dt
The primes indicate the ac portions of the respective functions. The lowest frequency other than a
possible de component of the input signal is estimated to be 1.5 kHz. Determine a suitable design.
7. A low frequency differentiator is desired for a particular application n to perform the operation
Vo(t) = -0.002 dvi(t)/ dt
Based on a periodic signal with a frequency of 1 kHz, determine a suitable design.
8. Design an astable 555 timer circuit to produce 1kHz square wave, where TH = 0.35 ms and T₁ = 0.65 ms.
Select C = 0.01 UE, Determine R₁ and Ra.
9. Design a monostable 555 timer circuit to produce an output pulse 5 ms wide.
10. Using op amps with Xsat = +/- 13 V, design a square/ triangular wave function generator circuit to
generate 2 kHz triangular wave with a peak-to-peak voltage of 12 V.
11. Design a non inverting Schmitt trigger circuit with VT to be adjustable…
arrow_forward
Define briefly the terms used in filter below,
a) pass band
b) attenuation band
c) Cut off frequency (-3db frequency)
arrow_forward
In a Wien bridge oscillator circuit, the value of the resistor andnthe capacitor that form the RC series and parallel branch are given as 200 ohm and 10 mF. What will be the frequency of oscillation?
arrow_forward
CR active filters find extensive use in communications and instrumentationmeasurements.a) By considering how the capacitor impedance in Figure 1 varies with frequency,explain if the circuit in Figure 1 acts as a low-pass or high-pass filter.b) Derive the closed-loop gain for the case of very high frequencies.c) Draw a graph that shows the frequency response of the CR active high-passfilter. The y-axis should correspond to gain in dBs and the x-axis to frequency.Make sure that you clearly indicate the 3 dB point and the equation thatdescribes the relationship between ω and CinRin at the cut-off frequency.
arrow_forward
(a) Explain the function of a high pass filter. Draw a diagram of a simple high–pass filter using a capacitor and a resistor.
arrow_forward
Please show work
arrow_forward
A) Write the equation for the small-signal gain function Vout/Vinfor the followingop-amp circuit
B) What kind of filter is this circuit?
C)Write the equation for the cutoff frequency of the filter
D) Sketch the Frequency Response of the system
arrow_forward
Is=20*10-16
B=100
question A&B
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:PEARSON
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:9781337900348
Author:Stephen L. Herman
Publisher:Cengage Learning
Programmable Logic Controllers
Electrical Engineering
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Fundamentals of Electric Circuits
Electrical Engineering
ISBN:9780078028229
Author:Charles K Alexander, Matthew Sadiku
Publisher:McGraw-Hill Education
Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:9780134746968
Author:James W. Nilsson, Susan Riedel
Publisher:PEARSON
Engineering Electromagnetics
Electrical Engineering
ISBN:9780078028151
Author:Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:Mcgraw-hill Education,
Related Questions
- For the filter: a) Determine type of filter and the cut-off frequency (Fc). Determine the peak voltage at the cut-off frequency (Fc). b) Find GAIN (Vo/Vi) at f = .1*Fc . Find GAIN (Vo/Vi) at f = 10*Fc . c) Determine the frequency at which GAIN = .4 (i.e., Vo = .4*Vi) . Draw the “Frequency Response Plot” in “Log-Log” format .arrow_forwardbessel bandpass filter analysis and all formula. lecture summaryarrow_forwardSolve using the concpts of Digital Signal ProcessingShow each formula wherever necessary and please show all the steps of the design processarrow_forward
- Design an ACTIVE band-pass filter for the midrange part of a loudspeaker so that the bandpass region is 400 Hz-2000 Hz (as defined by the -3dB points). Design the circuit so that the absolute gain is 2. a. Draw the circuit diagram and specify the resistor and capacitor values. Assume you can use either 100, 330, 500, or 1000 Ohm resistors and can select any value of capacitor. b. Sketch the frequency response (Gain [dB] vs. frequency (Hz)). Note that you will need to convert your gain to dB before plotting. Magnitude (dB) 15 10 5 midrange 12 1 -5 -10 -15 -20 -25 10 100 1,000 Frequency (Hz) 10,000 100,000arrow_forwardCR active filters find extensive use in communications and instrumentation measurements. a) By considering how the capacitor impedance in Figure 1 varies with frequency, explain if the circuit in Figure 1 acts as a low-pass or high-pass filter. p) Derive the closed-loop gain for the case of very high frequencies. c) Draw a graph that shows the frequency response of the CR active high-pass filter. The y-axis should correspond to gain in dBs and the x-axis to frequency. Make sure that you clearly indicate the 3 dB point and the equation that describes the relationship between w and CinRin at the cut-off frequency. Cin Rin A Vin Vout Figure 1arrow_forwardHow can I add two voltages values together with on op amp? Using op amps, how to make an AD Converter? A DA Converter? What components determine the frequency of an astable, 555 oscillator? Draw the circuit. Draw a circuit for both an astable and a monostable, 555 multivibrator. What is the duty cycle and percentage duty cycle of a pulse train or square wave? What is the overshoot, rise time, fall time, and pulse width of a pulse and where on the waveform is each measured?arrow_forward
- 2. a) Consider the circuit shown in figure 3. i) Determine what type of filter is shown in Figure 3 i) Calculate the corner or cutoff frequency. Take R = 4 k &, L= 2 H, and C= 1 uF. R Figure 3 b) Describe the possibility of building a second order filter with only resistors and capacitors? and design the cutoff frequency of second order filter for low pass filter (Expected: Describe the possibility , design the second order filter for low pass filter circuit and design the cutoff frequency as equation only).arrow_forward6. An AC precision integrator is desired for a particular application to perform the operation: Vo'(t) = -1200 Vi(t) dt The primes indicate the ac portions of the respective functions. The lowest frequency other than a possible de component of the input signal is estimated to be 1.5 kHz. Determine a suitable design. 7. A low frequency differentiator is desired for a particular application n to perform the operation Vo(t) = -0.002 dvi(t)/ dt Based on a periodic signal with a frequency of 1 kHz, determine a suitable design. 8. Design an astable 555 timer circuit to produce 1kHz square wave, where TH = 0.35 ms and T₁ = 0.65 ms. Select C = 0.01 UE, Determine R₁ and Ra. 9. Design a monostable 555 timer circuit to produce an output pulse 5 ms wide. 10. Using op amps with Xsat = +/- 13 V, design a square/ triangular wave function generator circuit to generate 2 kHz triangular wave with a peak-to-peak voltage of 12 V. 11. Design a non inverting Schmitt trigger circuit with VT to be adjustable…arrow_forwardDefine briefly the terms used in filter below, a) pass band b) attenuation band c) Cut off frequency (-3db frequency)arrow_forward
- In a Wien bridge oscillator circuit, the value of the resistor andnthe capacitor that form the RC series and parallel branch are given as 200 ohm and 10 mF. What will be the frequency of oscillation?arrow_forwardCR active filters find extensive use in communications and instrumentationmeasurements.a) By considering how the capacitor impedance in Figure 1 varies with frequency,explain if the circuit in Figure 1 acts as a low-pass or high-pass filter.b) Derive the closed-loop gain for the case of very high frequencies.c) Draw a graph that shows the frequency response of the CR active high-passfilter. The y-axis should correspond to gain in dBs and the x-axis to frequency.Make sure that you clearly indicate the 3 dB point and the equation thatdescribes the relationship between ω and CinRin at the cut-off frequency.arrow_forward(a) Explain the function of a high pass filter. Draw a diagram of a simple high–pass filter using a capacitor and a resistor.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Introductory Circuit Analysis (13th Edition)Electrical EngineeringISBN:9780133923605Author:Robert L. BoylestadPublisher:PEARSONDelmar's Standard Textbook Of ElectricityElectrical EngineeringISBN:9781337900348Author:Stephen L. HermanPublisher:Cengage LearningProgrammable Logic ControllersElectrical EngineeringISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
- Fundamentals of Electric CircuitsElectrical EngineeringISBN:9780078028229Author:Charles K Alexander, Matthew SadikuPublisher:McGraw-Hill EducationElectric Circuits. (11th Edition)Electrical EngineeringISBN:9780134746968Author:James W. Nilsson, Susan RiedelPublisher:PEARSONEngineering ElectromagneticsElectrical EngineeringISBN:9780078028151Author:Hayt, William H. (william Hart), Jr, BUCK, John A.Publisher:Mcgraw-hill Education,
Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:PEARSON
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:9781337900348
Author:Stephen L. Herman
Publisher:Cengage Learning
Programmable Logic Controllers
Electrical Engineering
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Fundamentals of Electric Circuits
Electrical Engineering
ISBN:9780078028229
Author:Charles K Alexander, Matthew Sadiku
Publisher:McGraw-Hill Education
Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:9780134746968
Author:James W. Nilsson, Susan Riedel
Publisher:PEARSON
Engineering Electromagnetics
Electrical Engineering
ISBN:9780078028151
Author:Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:Mcgraw-hill Education,