EE265 Lab 4ab Notes

Due Thursday 2/12/2008

Winter 2008-2009
Instructor: Teresa Meng

What to submit

- demonstration of functionality and verification of parts a and b during office hours

- hard copies of

    - lab writeup

    - myfftfilt.m - your implementation of part a

    - only the main() function in main.c - your implementation of part b

- submit in dropoff box soft copies of

    - myfftfilt.m

    - main.c

    - matlab verification for part b

 

Goals

- part a (Matlab development and verification): correct functionality of blocked FFT filtering using overlap-and-add (OLA) or overlap-and-save (OLS) and correct verification by comparing to filter(h,1,x)

- part b (C development and Matlab verification): correct functionality of FFT and IFFT using dsplib functions and correct verification by comparing to fft and ifft. Note: your C code need not initialize the values of x to anything. Just perform the FFT and IFFT, making supporting function calls as necessary.

- Good writeup

 

Tips

 

DESIGN

- part a: OLA vs. OLS

When deciding between the two, think about the computation effort required for each.

 

 

DEVELOPMENT

- part a: handling the last frame (length < L)

Be sure to zero-pad it to length N before taking the fft.

 

- part b: syntax of cfft vs. rfft (this is hella confusing)

OK: cfft32_SCALE(x,NX);

NOT OK: cfft32(x,NX,SCALE);

OK: rfft32(x,NX,SCALE);

NOT OK: rfft32_SCALE(x,NX);

similar deal with ifft and non-32

 

 

DEBUGGING
- part a: off-by-one errors
Don't be a noob.

 

- part b: won't compile with 32-bit versions of functions

Change DATA to LDATA in the declaration of x.

 

 

MATLAB verification
- part b: type matching

If you use LDATA in C, use int32 in Matlab. DATA <--> int16.

 

WRITEUP

- question 1

rfft(n) <-> cfft(n/2) + cbrev(n/2) + unpack

I don't know where the documentation on unpack is, so just assume that it takes 0 cycles.

"Would you have easily been able to write a 64-point FFT code that out performs the DSP library routine?" Emphasis on "easily"...