Aim of the Experiment
A goal of this experiment is to design discrete-time digital filters
and implement them in real time.
In this experiment you will see the special architectural features
of digital signal processors such as circular buffers that make the
processors well suited for signal processing.
You will implement different digital filters using in two different
In this experiment, you will construct finite impulse response (FIR)
filters and infinite impulse response (IIR) filters on the DSP.
For the FIR filter implementation, you will use the C-based convolution
routine as well as the two assembly routines provided for you.
- Using Circular Buffers in a C program
- Using Circular Buffers supported by the TMS320C6748 Hardware
The response of these filters will be measured by
- Using a signal generator, A/D converter, DSP, D/A converter and
Equipment to be checked out
- OMAP-L138 Low-Cost Developer Kit (LCDK)
- Two BNC - stereo pin (DSP) cables
The above list of equipment is the equipment required per work station.
- Real-Time Digital Signal Processing from MATLAB to
C with the TMS320C6x DSPs (Jan. 2012) by
Thad B. Welch, Cameron H. G. Wright and Michael G. Morrow,
- Chapters 3, 4 and 7
- Appendices A, B, C and D
- Software Receiver Design by
C. Richard Johnson, Jr., William A. Sethares and Andrew Klein
- Sections 3.1-3.4
- Chapter 4
- Sections 6.1-6.2
- Chapter 7
- Course reader
part 2 and
by Mr. Chao Jia and Ms. Debarati Kundu,
The University of Texas at Austin
Lab #3 instructions
part 2 and
by Mr. Yeong Choo, Mr. Chao Jia, Mr. Sam Kanawati, and Ms. Debarati Kundu,
The University of Texas at Austin
Assembly code files
LabVIEW transmitter demonstration by Dr. Zukang Shen to show how labs 1-6 fit together
by Prof. Steven Tretter, University of Maryland
(from Jan. 2008 lab manual)
All measurements and findings should be in lab report (cycle counts,
frequency response, phase responses, etc.).
In addition, please answer the following questions:
Note from second week of lab:
The frame-based FIR program filters both the left and the right channel,
and the sample based FIR filter filters only one channel.
So, the number of machine cycles for frame-based filtering should be
divided by two in order to be compared with the corresponding value for
- Number of taps before you run out of time for FIR filtering.
- Why use circular buffers?
- What happens if you do not multiply the scale factor in an IIR
filter implementation using a cascade of second-order sections (SOS)?
- Advantages and disadvantages of FIR vs. IIR filters.
Milestones to Demonstrate to the TA
After each one of these parts, show them to the TA:
- FIR using C routine (codec)
- FIR using assembly routines (codec)
- IIR filter (codec)
For this lab, it is especially important to realize that the addition
of an element into a circular array and the actual convolution calculation
are two entirely separate operations.
Labs 5, 6, and 7 will directly involve performing multiple convolutions
for FIR filters, so it makes sense to go ahead and put the Lab #3
convolution routine in a function.
As mentioned on the code grading page, the use of the C modulo operator
"%" is discouraged and will be penalized.
Debugging and Troubleshooting Tips
When connecting the USB cable from the PC to the C6748 DSP board, please
use the USB port on the opposite side of the board from the power connector.
tips for Code Composer Studio v4.
Here are general tips for debugging and troubleshooting:
- Remez filter is just "equiripple" in fdatool.
- Please notice which channel are you using when reading
samples from signal generator.
You can also use T connector to feed both channels with signal.
- Some students found that the frame-based FIR filter yielded a
larger number of machine cycles compared to sample-based FIR
The frame based FIR program filters both the left and the right
channel, and the sample based FIR filter filters only one channel.
So, the number of machine cycles for frame-based filtering should
divided by two in order to be compared with the corresponding
value for sample-based filtering.
When seeing an incorrect output on the oscilloscope, the cause
may be one of the following:
- Changed the sampling rate in Interrupt Service Routine (isr)
file but forgot to change it in the configuration file.
The sampling frequency specified in isr file is only used for
- The interrupt is not working. Even though the interrupt is not
working, the oscilloscope could still show sinusoidal-like noise.
This can be easily checked by measuring the magnitude of the
waveform, and knowing that noise should have a very small magnitude.
- Using the single-channel versions of ReadSample(data) and
WriteSample(data) defined in the files for lab 3.
These functions have bugs in them.
Instead, use the two-channel versions ReadSample(left, right) and
For IIR filter implementation, a common mistake is to forget to negate
the feedback coefficients.
For a biquad, the difference equation for the output
given the input
y[n] = a1 y[n-1] + a2 y[n-2] + b0 x[n] + b1 x[n-1] + b2 x[n-2]
The transfer function, which assumes zero-valued initial conditions, is
b0 + b1 z + b2 z
1 - a1 z - a2 z
Note the negative signs in front of a1 and a2.
Submitting this assignment is optional, but doing it would
be useful with your QUIZ preparations
Back to the course home page