<< Chapter < Page Chapter >> Page >
An overview of DSP optimization techniques, from the design stage, through high-level implementations, to assembly implementations.

Introduction to code optimization

Most practical DSP applications have a clock-cycle and/or memory budget. Initial implementations typically don't meet these budgets;therefore, the code must be optimized. Code development usually follows six steps:

  • Develop algorithm on paper
  • Simulate in MATLAB
  • Develop and simulate more efficient implementations
  • Implement algorithm in C
  • Use library routines when available
  • Use optimizing compiler
  • Manually write assembly routines for key routines

Develop algorithm on paper

The algorithm to be implemented should first be designed on paper. In addition to equations describing the algorithm, its design shouldinclude inputs and outputs of each routine and a flow chart of the operation of the complete program. Never design an algorithm or a program at a computer. While it may be possible to implement some basic algorithms and programs this way, compilers cannot overcome any designflaws that are likely to be introduced.

Simulate in matlab

Before any C code is written, the algorithm should be developed and simulated in MATLAB since problems with the algorithm design can befound more easily. This is done by applying the algorithm to test vectors and inspecting and/or plotting the results. Once thealgorithm is completely defined, C implementation can begin. Recall that in each of the previous labs a MATLAB simulation step was givenbefore assembly implementation.

Develop and simulate more efficient implementations

An efficient algorithm used as few multiplications and additions as possible. Applying DSP theory to "simplify" the algorithm is a commonway of doing this. The autocorrelation function is a simple example: a simple-minded way of implementing this is tocompute sums for each lag, but careful inspection of the autocorrelation function reveals that it is actually a function of the absolute value of the lag. Therefore each value at a negative lag is identical to the value at the correspondingpositive lag. Approximately half the apparent multiplications and additions aretherefore required. If the entire autocorrelation sequence is needed, the autocorrelation can be optimized even furtherif it is treated as a convolution of two sequences. An FFT and an inverse FFT can then be used to compute the autocorrelation.

C implementation

After the algorithm has been designed and optimized, an initial implentation in C is done. Tips on writing code with efficiency inmind can be found here . It is important, however, to get a working implementation ofthe algorithm in a reasonable amount of time as some optimizations cannot be anticipated by the programmer.Some of these coding techniques in the URL reference can be applied later on when it is clear which routines need the most optimization.This implementation can serve as a reference implementation to compare the correctness and speed of optimized versions.

Questions & Answers

what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital signal processing laboratory (ece 420). OpenStax CNX. Sep 27, 2006 Download for free at http://cnx.org/content/col10236/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing laboratory (ece 420)' conversation and receive update notifications?

Ask