EECS 452 Lab 2 Basic DSP Using the C5515 ezdsp Stick

Similar documents
EECS 452 Lab 2 Basic DSP Using the C5515 ezdsp Stick

An introduction to Digital Signal Processors (DSP) Using the C55xx family

ECE4703 B Term Laboratory Assignment 2 Floating Point Filters Using the TMS320C6713 DSK Project Code and Report Due at 3 pm 9-Nov-2017

D. Richard Brown III Associate Professor Worcester Polytechnic Institute Electrical and Computer Engineering Department

University of Saskatchewan 5-1 EE 392 Electrical Engineering Laboratory III

Digital Signal Processing and Applications with the TMS320C6713 DSK

Workshop Goals. Page 2 of 68

ECE 5655/4655 Laboratory Problems

EECS 452 Lab 7: SPI, I2S on C5515 and DE2 70

Working with the Compute Block

Note. The above image and many others are courtesy of - this is a wonderful resource for designing circuits.

EECS 452 Midterm Closed book part Fall 2010

D. Richard Brown III Professor Worcester Polytechnic Institute Electrical and Computer Engineering Department

EE445L Fall 2014 Final Version A Page 1 of 7

DSP Development Environment: Introductory Exercise for TI TMS320C55x

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

EECS 452 Midterm Closed book part Fall 2010

A Constant Rate of Change Name Part 1

Lab 1 Introduction to TI s TMS320C6713 DSK Digital Signal Processing Board

Unit 1, Lesson 1: Moving in the Plane

ECE4703 Mid-term Exam B-16. Name: Box #:

EE445L Fall 2014 Final Version A solution Page 1 of 7

UNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Quiz II

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711

EECS 473 Midterm Exam

Graphing functions by plotting points. Knowing the values of the sine function for the special angles.

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS 150 Spring 2000

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class)

EE445L Fall 2018 Final EID: Page 1 of 7

Parallel FIR Filters. Chapter 5

DSP First Lab 02: Introduction to Complex Exponentials

How to Use Low-Energy Accelerator on MSP MCUs. Cash Hao Sept 2016

ECE2049: Homework 1. Consider the following code to compute the average of your exam grades: #define NUM_EXAMS (3)

DSP Laboratory (EELE 4110) Lab#8 Applications on Texas Instruments DSK TMS320C6711 part2

CS12020 (Computer Graphics, Vision and Games) Worksheet 1

PSIM Tutorial. How to Use SCI for Real-Time Monitoring in F2833x Target. February Powersim Inc.

Class #15: Experiment Introduction to Matlab

5.2. The Sine Function and the Cosine Function. Investigate A

Sierra Radio Systems. HamStack. Project Board Reference Manual V1.0

Database Use & Design

Problem Score 1 / 10 2 / 26 3A / 10 3B / 12 3C / 6 4 / code check off / 22 /2 Total /100

Basic Concepts. Task One: The Basic Latch. Laboratory Nine Latches, RAM & Android Architecture

Section 5.4: Modeling with Circular Functions

SignalMaster Manual Version PN: M072005

Project Plan of Simultaneous Co-Test of high performance DAC ADC Pairs

Lab 3: Building a Power Supply and a Stereo Amplifier

PARTS LIST 1 x PC Board 36 x 5mm Red LED 36 x 12mm LED Standoff 36 x NPN Transistor 36 x 10kΩ Resistor OTHER PARTS YOU MAY NEED

Chapel Hill Math Circle: Symmetry and Fractals

SPPDF 01 Development Suite User s Manual. For SPPDM-01 FIR Filter Platform

Slide Set 1. for ENCM 339 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Question 1: As you drag the green arrow, what gets graphed? Does it make sense? Explain in words why the resulting graph looks the way it does.

e-pg Pathshala Subject: Computer Science Paper: Embedded System Module: Interrupt Programming in Embedded C Module No: CS/ES/20 Quadrant 1 e-text

PHYS 5061 Lab 1: Introduction to LabVIEW

VICP Signal Processing Library. Further extending the performance and ease of use for VICP enabled devices

Number Systems (2.1.1)

Floating-Point Unit. Introduction. Agenda

3. Suggested Use and Configurations Multiple Computers with a Single DiGiGrid M... 11

EXCEL + POWERPOINT. Analyzing, Visualizing, and Presenting Data-Rich Insights to Any Audience KNACK TRAINING

EECS 452 Lab 3 Introduction to the DE2-70 FPGA board

ECS Baruch Lab 5 Spring 2019 Name NetID (login, like , not your SUID)

2IN35 VLSI Programming Lab Work Assignment 1: Hardware design using Verilog

What is OneNote? The first time you start OneNote, it asks you to sign in. Sign in with your personal Microsoft account.

ECE2049: Homework 1. Due: Thursday, 25 May 2017 by 7pm

9 POINTS TO A GOOD LINE GRAPH

Elec 326: Digital Logic Design

02 - Numerical Representations

Embedded Target for TI C6000 DSP 2.0 Release Notes

CS1114 Section 8: The Fourier Transform March 13th, 2013

TNG-3B derives its operating power from the serial port. The DTR, RTS, and both data lines are all used, and must be properly connected.

United States Naval Academy Electrical and Computer Engineering Department EC310-6 Week Midterm Spring 2015

BEng (Hons.) Telecommunications. BSc (Hons.) Computer Science with Network Security

Configurable Multiprocessing: An FIR

Quadric Surfaces. Six basic types of quadric surfaces: ellipsoid. cone. elliptic paraboloid. hyperboloid of one sheet. hyperboloid of two sheets

Analog Conversion and MAC. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Java Assignment 3: Loop Practice Ver 3.0 Last Updated: 12/1/2015 8:57 AM

Problem Score 1 / 27 2 / 19 3 / 16 4 / 14 code check off 5 / 22 /2 Total /100

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab

ECE4703 Laboratory Assignment 5

University Program Advance Material

Assignment 3 Functions, Graphics, and Decomposition

EECS 270 Midterm Exam

Chapter 1 Programming: A General Overview

Performance Analysis of Line Echo Cancellation Implementation Using TMS320C6201

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

ENCM 339 Fall 2017 Lecture Section 01 Lab 9 for the Week of November 20

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

1 Getting started with Processing

Experiment 6 Finite Impulse Response Digital Filter (FIR).

Laboratory 1 Introduction to MATLAB for Signals and Systems

LC-1: Interference and Diffraction

C55x Digital Signal Processors Software Overview

Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Transcriber(s): Aboelnaga, Eman Verifier(s): Yedman, Madeline Date Transcribed: Fall 2010 Page: 1 of 9

AP Calculus AB Summer Assignment 2018

ENCM 369 Winter 2017 Lab 3 for the Week of January 30

Microsoft Excel 2013: Part 3 More on Formatting Cells And Worksheet Basics. To apply number formatting:

Experiment 3. Getting Start with Simulink

2-1 Transformations and Rigid Motions. ENGAGE 1 ~ Introducing Transformations REFLECT

Lab 1 Implementing a Simon Says Game

Transcription:

EECS 452 Lab 2 Basic DSP Using the C5515 ezdsp Stick 1. Pre-lab Q1. Print the file you generated (and modified) as described above. Q2. The default structure of the FIR filter is Direct-Form FIR a. How is this different from the Transposed-Form? b. Draw the Direct-Form and Transposed-Form FIR. What do you think the advantage of each structure is? Q3. Answer the following questions assuming you have the FIR filter you just created using Matlab. a. What is the expected group delay? b. What is the expected phase shift in a 1 KHz input? c. What is the lowest frequency where you would expect to see a 180 degree phase shift? Q4. In your own words, explain the role of each of the arguments to fir(). Q5. Redraw the figure assuming index= 4. oldest x( ) entry newest x( ) entry entry index = 2 x(j-nh+2) x(j-nh+1) x(j-nh) x(j-0) x(j-1) x(j-2) x(j-nh+5) x(j-nh+4) x(j-nh+3) lowest memory address highest memory address Q6. Let s suppose we have a buffer in to store audio samples, and this buffer has 256 entries. One way we could index the buffer is to use if statements and reset the index to 0 if it exceeds 255. How could we do this using bit-masking instead? Right one or two lines of code to accomplish this. VF14.0, 9/7/2014 12:32 PM

EECS 452 Lab 2 Basic DSP Using the C5515 ezdsp Stick Page 2 of 5 Q7. Read the in-lab section associated with DDS. Consider the figure found in that section with the caption DDS block diagram. If the register were 16 bits but only the top 6 bits were used to index the sine table, what would be the output frequency of the generated sine wave if f s were 48 KHz and FTV=2? Show your work. Q8. If the sine table we are using doesn t have 64 entries and instead has only 48 entries, we can t use all the possible values of the register. Given that, what would be the output frequency of the generated sine wave if f s were 48 KHz and FTV=2? Again, show your work. Q9. Design a first-order passive low-pass filter. Assume you have only a 10k Ohm resistor and you want the 3dB-down frequency to be 30 khz. Assume you have any capacitor value you need. a. Draw a picture of the circuit and label the values of the components. b. If you were to use a 10 khz unit-amplitude sine wave as an input, what would you expect the magnitude of the output to be? c. As above but for a 30 khz sine wave? A 100 khz sine wave? Q10. Consider a stereo tip-ring-sleeve (TRS) connector. Draw a diagram showing what each part of the connector is generally used for. Cite your source(s).

EECS 452 Lab 2 Basic DSP Using the C5515 ezdsp Stick Page 3 of 5 2. In Lab: Q1. Input unit-amplitude 10, 30, and 100 KHz sine waves. For each input, list the output amplitude. How well does this match with your pre-lab answers? Q2. If f s=48 Khz and we are using the six most-significant digits of a 16-bit number to index our 64- entry table, what frequency sine wave would we expect to get if FTV=1? If FTV=1024? Explain your answers. Q3. What impact, if any, does the filter have on smoothing out the signal? Q4. While we ve written the code for you, you will need to write similar code later. As such, let s examine a few different parts of this program and try to understand them. a. Consider the FIR function. What is the array in? b. In the FIR function, what role does sum = sum + 0x00004000; play in rounding? c. In the while(1) loop, what role does i have? d. What pump are we priming with the first for loop in the main? Explain what (if anything) would happen if we removed that code. Q5. In the pre-lab, you were asked to predict the group delay. What group delay do you actually see? How did you go about measuring it? Q6. What was the group delay? What was the lowest frequency at which the phase shift was 180 degrees? Q7. Answer the following questions on filter timing. a. If we have a 100MHz processor and we sample at about 50kHz (makes the math easier) what is the maximum number of cycles that our filter can use for each input before we need to worry about not being able to meet our real-time constraints? b. How many cycles does our current filter take? To measure this, click the expressions tab, which is circled red in the following graphic and type into the text field delta_time. Launch the program then pause it to read delta_time. You can also toggle a break point at the beginning or end of a loop you re interested in so you re not randomly guessing where you ve stopped the code. c. Given the above, how large do you think we could make the filter before we started to run out of CPU time? (Hint: Try to half/double the length of the filter and see whether you half/double the CPU cycles, roughly. Then you have to consider the cycles taken by AIC_read2/AIC_write2.) Q8. Now build and launch this code and measure the latency of filtering each sample. How does this compare to what we measured above? Why is that? Q9. Now build and launch this code and measure the latency of filtering each sample. How does this compare with our base measurement?

EECS 452 Lab 2 Basic DSP Using the C5515 ezdsp Stick Page 4 of 5 Q10. Pick 3 of the assembly commands you see in the FIR filter function (such as MOV and SUB) and explain what they are doing. Also indicate how many cycles each of those instructions take. You will need to use the C5515 Mnemonic ISR reference (SWPU067E). Q11. What are the advantages of using the if/else over the bit masking? What are the limitations of bit masking? Q12. Using the fastest indexing protocol we have, about how many taps can we have in our filter? Q13. What is the CPU latency per sample with your new filter? Q14. Look at the libraries that are included in the project (right click on project in project window, go to Properties. Then select Build C5500 Linker ). Look under the File Search Path. What library do you think is associated with TI s DSPlib? Q15. a. How many taps are there in your FIR filter? b. How many cycles did the fir() function take to process a single input? Q16. Q17. a. How many taps are there in your FIR filter? b. How many cycles did the fir() function take to process a single input? c. Assuming there is some constant overhead associated with calling the fir() function and that runtime is otherwise linear, how many taps could you process in real-time? Show your work. d. How does this compare to the code you wrote in the previous part? a. Sketch (roughly) the frequency response of your 500+ tap filter in the swept range. b. How does your sketch compare to the frequency response that fdatool gave you when you designed the filter?

EECS 452 Lab 2 Basic DSP Using the C5515 ezdsp Stick Page 5 of 5 3. Post Lab: Q1. One hardware construct that is commonly added to DSPs, but not to standard processors, is circular buffers. See http://www.dspguide.com/ch28/2.htm for example. a. Explain why they would be helpful here. b. The C5515 supports circular buffering. Look at TI s manual named spru371f.pdf and read section 6.11. Explain, in your own words, how they work. Q2. Consider the following FIR implementation and compare it to the one in fir_filter.c. a. What s the advantage of using this one? (Hint: consider the case where you need to use multiple different FIR filters at the same time.) b. This solution would still make it hard to do a low-pass 100-tap filter and a 50-tap highpass filter. Why is that and how could you fix the problem? Int16 FIR2(Int16* inbuf, const Int16* taps, Uint16 i) { Int32 sum; Uint16 j, index; sum=0; } //The actual filter work for(j=0; j<lpl; j++) { if(i>=j) index = i - j; else index = ASIZE + i - j; sum += (Int32)inBuf[index] * (Int32)taps[j]; } sum = sum + 0x00004000; // So we round rather than truncate. return (Int16) (sum >> 15); // Conversion from 32 Q30 to 16 Q15. Hand-in list: Each group should hand-in the following material, neatly stapled: Your sign-off sheet. It should be on the front and include each partner s name and unique name. A typed set of answers to the questions from the in-lab and post-lab. If figures are required, neat, hand-drawn, figures are acceptable. A printout of your code from G2 and G6. If you modified any header files, be sure to include them also.