c31filt.c contains a function, called filter(), that processes
data sample by sample. freader reads 16-bit sampled data from a file,
processes it through the DSK board, and writes it back to a file:
freader.exe signal_swapped.raw signal_out.raw
Your task is the following:
In MATLAB, implement the filter:
Do the following:
plot the frequency response of the filter
plot the frequency response of audio data in signal.raw
using a 512 point fft and a window centered at t = 1.0 secs.
filter the entire file through the filter, and plot the frequency
response of the filtered signal at t = 1.0 secs
play the audio data through your sound system using your sound
tools
Implement this filter on the DSK using the c31filt.c program.
Process the signal through this filter and demonstrate you get
the same result (one way to do this is to difference the two
signals sample by sample).
Be sure to make sure the files match exactly at the beginning and
ends of the file!
Use your sound tools to compare the audio data by listening to
the signals.
Analyze the assembly code for your filter program and optimize it
by recoding the filter by hand. Reprocess the signal and show that
it gives the same result as before. Measure the improvement in speed
in terms of C3X clock cycles.
This assignment will count for one MATLAB assignment and one DSP lab
assignment. You will demonstrate your system to the Lab TA and answer
questions about it (particularly the optimization). You will also
turn in a web-based document describing this exercise in detail.
Please consult with your Lab TA - you will have many questions regarding
the details of this lab.