Welcome to the home page for ECE4703 "Real-Time Digital Signal Processing" for B-term 2015.

# announcements and lecture slides

- [14-Dec-2015] Lecture 12. Demonstration of gradient descent and LMS with non-white input signals. We discussed adaptive filtering for noise cancellation and equalization. I demonstrated noise cancellation using the TMS320C6713 DSK in class with the Lab 6 sound files. We also went over the final exam topics and distributed the course evaluations.
- [12-Dec-2015] Lecture 11. We continued our discussion of batch methods for MMSE system identification. Here is some Matlab code that you can use to perform system identification using the brute-force correlation and matrix inversion method (this may be useful for checking your results in Lab 6). We also discussed gradient descent methods and LMS for real-time system identification. Here is some example Matlab code demonstrating the concept of gradient descent and LMS. Here is some example Matlab code to demonstrate LMS-adapted unknown system identification. Although this code is vectorized to run fast in Matlab, you might find this useful for getting started on your C code for Lab 6.
- [07-Dec-2015] Lecture 10. We wrapped up our discussion of FFT complexity and began our study of adaptive filtering by covering the MMSE criterion and batch calculation of MMSE filter coefficients.
- [03-Dec-2015] Lecture 9 was an on-board review of linear vs. circular convolution and examples of overlap-and-add and overlap-and-save fast convolution. I also demonstrated fast convolution of a single block on the TI cycle accurate simulator using the TI FFT code. We also discussed computational complexity of the FFT and input/output FFT index scrambling with FFT butterfly diagrams from the Thad Welch textbook. This Matlab demo shows complexity trends of the FFT and DFT (requires the support function dft.m). Regarding the bit and digit reversal functions bitrev.sa and digitrev_index.c, this Texas Instruments documentation discusses how the TI functions work and how they are memory and computationally efficient.
- [30-Nov-2015] Lecture 8 was an on-board discussion of frame-by-frame processing, asymptotic complexity of algorithms, and fast convolution. I also handed out some material on using the FFT for fast convolution.
- [23-Nov-2015] Lecture 7 finished the slides from lecture 6 and covered efficient ASM coding on the C6713. We discussed the use of schedule tables. This example code is for the dot product examples covered in lecture. In particular, note the #pragma DATA_ALIGN for forcing the compiler to properly align the arrays for double-word loads.
- [16-Nov-2015] Lecture 6 wrapped up fixed-point filtering. Here is the FIR filter code and the IIR filter code I showed in class (this code is not optimized and the shift values may not apply to your filter design). We also began assembly language programming on the C6713. An example C program for calling two assembly language functions (donothing.asm) and (test_asm.asm) may also be useful for understanding the examples and getting started on Lab 4.
- [12-Nov-2015] Lecture 5 continued the topic of fixed-point FIR filtering and began fixed-point IIR filtering. We discussed how to come up with a reasonable "shift plan" and the fixed-point IIR Matlab simulator.
- [09-Nov-2015] Lecture 4 was an on-board discussion about fixed-point FIR filtering. We covered good strategies for fixed-point multiplication, discussed some tools you can use in the Matlab Fixed-Point Toolbox, and looked at the demos fixedpoint_fir_demo_pt1.m, fixedpoint_fir_demo_pt2.m, and fixedpoint_fir_demo_pt3.m.
- [05-Nov-2015] Lecture 3 was an on-board discussion of implementation strategies for real-time FIR and IIR filtering with floating point arithmetic. Here is the handout on realization structures.
- [02-Nov-2015] Lecture 2 slides (pdf) and some aliasing and quantization audio examples.
- [29-Oct-2015] Lecture 1 slides (pdf).
- [28-Oct-2015] First lab session hardware introduction and software introduction (pdf).
- [27-Oct-2015] An email was sent to the class mailing alias ece4703@ece.wpi.edu today. If you did not receive this email, please contact Prof. Brown.

# general

There is no required textbook for this course. In the past, we have used Real-Time Digital Signal Processing: Based on the TMS320C6000 by Nasser Kehtarnavaz and Digital Signal Processing and Applications with the TMS320C6713 and TMS320C6416 DSK by Donald Reay and Rulph Chassaing. Both of these books are good references, but are not required for the course.

The course syllabus (pdf) including expected course outcomes, grading information, and late policies.

ECE4703 academic honesty policies.

ECE4703 students with disabilities statement.

# links and files

- How to configure Code Composer Studio v5 for use with the C6713 DSK.
- How to build and run a "Hello World" project from a project template on the C6713 DSK in Code Composer Studio v5.
- How to make sure the chip support and board support libraries necessary for real-time DSP on the C6713 DSK in Code Composer Studio v5 are installed. Also, here is link to the rts6700.lib file that may be causing permission problems in AK227.
- How to create, build, run, and test a simple stereo loop project on the C6713 DSK in Code Composer Studio v5.
- Here is a three minute screencast showing how to profile code running on the C6713 DSK using breakpoint/stopwatch profiling in CCS v5. This type of profiling is convenient, but is known to be less accurate than using a cycle accurate simulator.
- Here is a seven minute screencast showing how to profile code using the CCS v5 profiling tools on a cycle accurate simulator. This approach tends to give more accurate results than breakpoint/stopwatch profiling, but you have to modify your code or make a new project. The keys here are: (i) remove all calls to BSL library functions, (ii) remove the code that sets up interrupts, change any interrupt service routines to regular functions, and remove vectors.asm, and (iii) change the target configuration to a cycle accurate simulator. Here is the code I used in the screencast: simulatortester.c.
- Here is a five minute screencast showing how to quickly plot the contents of a buffer in CCS and also how to save the contents of a buffer to a separate file for subsequent processing in Matlab or another program.
- Other useful links and files.

# laboratory assignments

General report and project code submission guidelines (pdf).

## lab 1: familiarization with ccs and the dsk

Assignment (pdf) and grade sheet. Project report and CCS files due by 3:00pm on 05-Nov-2015.

## lab 2: floating-point FIR and IIR filtering

Assignment (pdf) and grade sheet. Project report and CCS files due by 3:00pm on 12-Nov-2015.

## lab 3: fixed-point FIR and IIR filtering

Assignment (pdf) and grade sheet. Project report and CCS files due by 3:00pm on 19-Nov-2015.

## lab 4: hand-optimized assembly language programming

Assignment (pdf) and grade sheet. Project report and CCS files due by 3:00pm on 03-Dec-2015.

## lab 5: fast convolution FIR filtering

Assignment (pdf) and grade sheet. Project report and CCS files due by 3:00pm on 10-Dec-2015

Here are the TI files needed for the radix-2 FFT: cfftr2_dit.sa, bitrev.sa, and digitrev_index.c. Here also some example main code that shows how to correctly use TI's optimized FFT code (including the critical pragmas to ensure buffer alignment). Careful study of this example project should be helpful in the Laboratory 5 assignment.

## lab 6: adaptive filtering

Assignment (pdf) and grade sheet. Project report and CCS files due by 3:00pm on 17-Dec-2015. Due to grading constraints, no late submissions can be accepted.

Useful files for testing your code: lab6part1.zip (three unknown systems to identify) and lab6part2.wav (noise cancellation sound file). The song in part 2 is The Distance by Cake.

# examinations

The midterm examination is scheduled for November 19.

The final examination is scheduled for December 17.

# homework

No homework is assigned in this course.