# Connexions

You are here: Home » Content » Digital Signal Processing Laboratory (ECE 420) » Lab

### Lenses

What is a lens?

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

#### Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
• TI DSP

This collection is included inLens: Texas Instruments DSP Lens
By: Texas Instruments

"Doug course at UIUC using the TI C54x DSP has been adopted by many EE, CE and CS depts Worldwide "

Click the "TI DSP" link to see all content affiliated with them.

Click the tag icon to display tags associated with this content.

#### Also in these lenses

• Lens for Engineering

This module and collection are included inLens: Lens for Engineering
By: Sidney Burrus

Click the "Lens for Engineering" link to see all content selected in this lens.

### Recently Viewed

This feature requires Javascript to be enabled.

### Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Inside Collection (Course):

# Lab

Summary: Students are to implement and optimize a power spectral density estimator, a pseudo-noise (PN) sequence generator, and an IIR filter.

In this lab you are to implement and optimize the a pseudo-noise (PN) sequence generator, IIR filter, and autocorrelation routines that are part of the previous lab's PSD estimator. For the lab grade, you will be judged on the execution time of your system (memory usage need not be minimized).

## Reference Implementation

After taking a look at the source code of the PSD estimator reference implementation, you will likely discover inefficiencies. This implementation is provided as the "reference implementation" of the optimization process and to define the expected input and output of the application. The computational efficiency of your code will be judged against this implementation. While the given code might serve as a starting point, you should do whatever you need to do to make your code as efficient as possible, while operating in an equivalent manner as the given code.

The exact portion of the code to be optimized is defined below. You may write in C, assembly, or any combination of the two; choose whatever will allow you to write the fastest code. The optimization process will be smoother if you plan for optimization before you begin any programming.

## Optimization

Since a primary purpose of this lab is to learn optimization and efficient code techniques, your lab grade will be based primarily on the total execution time of your system. You are not required to optimize memory use. Note that by execution time we mean cycle count, not the number of instructions in your program. Remember that several of the TMS320C54xx instructions take more than one cycle. The multicycle instructions are primarily the multi-word instructions, including instructions that take immediates, like stm, and instructions using direct addressing of memory (such as ld *(temp),A). Branch and repeat statements also require several cycles to execute. Most C instructions take more than one cycle. The debugger can be used to determine the exact number of cycles used by your code; ask your TA to demonstrate. However, since the number of execution cycles used by an instruction is usually determined by the number of words in its encoding, the easiest way to estimate the number of cycles used by your code is to count the number of instruction words in the .lst file or the disassembly window in the debugger.

We will grade you based on the number of cycles used between the input_full = 0; and bit_rev_fft(); statements. Note that some instructions, like RPT, are non-repeatable instructions; their use may cause unnecessary glitches in I/O. For grading simplicity, your final code should not have modifications except between these two instructions, and M should be set to 31. If the number of cycles between the two points is variable, the maximum possible number of cycles will be counted. You must use the core.asm file in v:\ece320\54x\dsplib\core.asm or the C core file in v:\ece320\54x\dspclib\core.asm as provided by the TAs; these files may not be modified. We reserve the right to test your code by modifying the inputs.

## Routine-Specific Optimization Tips

If you are programming the PN generator in assembly, you may wish to refer to the description of assembly instructions for logical operations in Section 2-2 of the C54x Mnemonic Instruction Set reference. Initialize the shift register to one. You can debug the PN output by comparing it to the output of the MATLAB code. Be prepared to prove to a TA that your PN generator works properly as part of your quiz.

Your IIR filtering routine can debugged by writing an impulse followed by zeros in autocorr_in instead of randsample.

Your autocorrelation routine can be debugged by commenting out the IIR-filtering routine and writing the maximum DC value into autocorr_in in a similar manner as described the IIR-debugging step. Note that each of these tips is the most helpful if the output is inspected in memory.

This lab is to be completed in one week. Grading for this lab will be a bit different from past labs:

• 1 point: Prelab
• 2 points: Working code, implemented from scratch in assembly language or C.
• 5 points: Optimization. These points will be assigned based on your cycle counts and the optimizations you have made.
• 2 points: Oral quiz.

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

#### Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

#### Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks