EE265 Lab 4c Notes

Due Saturday 2/23/2008

Winter 2007-2008
Instructor: Teresa Meng

What to submit

- demonstration of functionality during office hours

- hard copies of

    - lab writeup

    - Matlab plots of expected output, measured output, and absolute error for both channels after at least 16 iterations

    - the plots requested in part 3

- email Yusheng (subject line: lab4c submit) soft copies of

    - your entire project folder (lab4/fftfilt/asm) zipped up. Include your Matlab verification files in the asm directory.

 

Goals

- functionality: 20 points

- code design: 15 points

- performance: 15 points (no penalty for using cfft instead of rfft. Around 13k cycles is reasonable.)

- writeup: 20 points

 

Tips

 

DESIGN

- Obtaining filter coefficients

Do the FFT of h_bp40 in Matlab, and save the FFT coefficients in the coefDat section of your code.

If you use rfft, just use the first 128 coefficients:

H_bp0 .word -148, 0, ...

H_bp120 .word ... 49, -30

 

- OLA vs. OLS

One is clearly better than the other from both a functionality and a performance point of view.

- Make sure that buffer_sect is in DARAM1 and that other sections are in DARAM or SARAM.

 

DEVELOPMENT

Basically your processBuffer() should contain C code with assembly function calls. Use 16-bit versions of dsplib functions. You can make everything 16-bits instead of 32-bits. 

If you use C variables in your assembly, make sure to declare them in the .h55 file.

Use AMOV _x, XAR0, where x is a C array, to set a pointer to the array.

 

DEBUGGING
-
If *(ARx+T1) doesn't increment ARx by T1 after the instruction, do this:

 

    .ARMS_off

_function_name:

    bclr arms

    ...

    bset arms

    RET

 

 This changes from control mode to DSP mode. See the Mnemonic guide -> addressing mode for details.

 

- Do NOT bclr SXMD at the end of your function! dsplib functions are counting on that bit to be set.