Sie sind auf Seite 1von 51

Digital Signal Processing

Pramod P J
Centre for Development of Advanced Computing, Hyderabad
Signal Processing Applications
• Embedded system cost & input/output rates
– Low-cost, low-throughput: sound cards, 2G cell
phones, MP3 players, car audio, guitar effects Single DSP
– Medium-cost, medium-throughput: printers,
disk drives, 3G cell phones, ADSL modems, Single DSP +Coprocessor
digital cameras, video conferencing
– High-cost, high-throughput: high-end printers,
audio mixing boards, wireless basestations, Multiple DSPs
3-D medical reconstruction from 2-D X-rays
• Embedded processor requirements
– Inexpensive with small area and volume
– Predictable input/output (I/O) rates to/from processor
– Power constraints (200 mW average for voice and 500 mW for
video on cell phone; batteries give 5 Watt-hours)

16-7-2007 Prof. Brian L. Evans, 2010 http://signal.ece.utexas.edu/ Pramod P J


Signal Processing Applications
DSP Processor Market
• DSP processor market
9
Annual
– ~1/3 embedded market 8
Revenue
7
6

• DSP proc. market 2007 5


4
Billions of
Dollars
3
Wireless
2
Consumer 1
0
Video 1999 2001 2003 2005 2007

Automotive 70
Share
Wireline 60
50 TI
Source: Forward Concepts Computer Freescale
40
Agere
30 Analog Dev

• DSP proc. benchmarking 20 Philips


Other
10
– Berkeley Design Technology 0
Inc. http://www.bdti.com 2004 2005 2006 2007
Source: Forward Concepts

16-7-2007 Pramod P J
Prof. Brian L. Evans, 2010 http://signal.ece.utexas.edu/
Questions

A. What is a DSP?
B. Which DSP do I use?
C. How Do I Get Going (Development cycle & Programming DSP)?

16-7-2007 Pramod P J
Digital vs Analog Signals

Digital

Advantages Limitations
• More flexible • Discrete time
• Better control over • Finite word-length effect
accuracy requirements
• Reproducibility
• Storage facility

16-7-2007 Pramod P J
DSP Introduction
• Digital Signal Processing: application of mathematical operations to
digitally represented Signals

• Signals represented digitally as sequences of samples

• Digital signals obtained from physical signals via tranducers (e.g.,


microphones) and analog-to-digital converters (ADC)

• Digital signals converted back to physical signals via digital-to-


analog converters (DAC)

• Digital Signal Processor (DSP): electronic system that processes


digital signals

16-7-2007 Pramod P J
Signal Processing Systems
Signal in Processing Signal out
(Analog or Digital) (Analog or Digital)
Operation, Transformation

Digital Signal Processing?


Digital Signal in Digital Processing Digital Signal out

Operation, Transformation performed on digital signals (using a computer or


o t h e r s p e c i a l - p u r p o s e d i g i t a l h a r d w a r e )

Analog to Digital Digital To


Digital Signal Analog
Analog Converter Processing Converter Analog
Signal
Signal

Digital Digital
16-7-2007 Signal Signal Pramod P J
16-7-2007 Pramod P J
16-7-2007 Pramod P J
Why Go Digital? -- Advantages!!!!
• Stability
• Better protection mechanism can be implemented
• Programmability and hence flexibility
– One hardware can perform several tasks.
– Upgradeability and flexibility.
• Repeatability
– Identical performance from unit to unit.
– No drift in performance due to temperature or aging.
• More reliable systems as components are less sensitive to
variations in ambient variables (eg. temperature)
• Immune to noise or Controlled accumulation of noise
• Low cost or Hardware cost independent of complexity
• Easy to store and transmit digital signals (eg. in floppy disk,
CDROM, hard disk)
• Easy to debug - hence short development time
• Hardware easily modified, Can be simulated

16-7-2007 Pramod P J
Signal I/P Filter Sampler A/D DSP

Signal O/P Reconstruction Filter


16-7-2007 Pramod P J
Sampling Process: An Example
1 1

0 0

-1 -1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

x(t) = cos(ωt) x(nT) = cos [ (ω+ ωs)nT]


x(nT) = cos(ωnT)

Digital Bin/Analog
Sampler Signal Hold
Analog LPF Processing Analog
Signal Analog/bin
Signal
Anti-aliasing
Filter
Digital Digital
Signal Signal

16-7-2007 Pramod P J
Today’s DSP “Killer Apps”

• In terms of dollar volume, the biggest markets for DSP processors today
include:
– Digital cellular telephony
– Wireless technologies
– Modems
– Commercial electronics

 Most demand good performance


 All demand low cost
 Many demand high energy efficiency

• Trends are towards better support for these (and similar) major applications.

16-7-2007 Pramod P J
Processor Classes
• General Purpose - high performance
– Pentiums, Alpha's, SPARC
– Used for general purpose application
– Heavy weight OS - UNIX, NT

?• – Workstations, PC's
Embedded processors and processor cores
– ARM, 486SX, Hitachi SH7000, NEC V800
– Single program
– Lightweight, often realtime OS
– DSP support
– Cellular phones, consumer electronics (e. g. CD players)
• Microcontrollers
– Extremely cost sensitive
– Small word size – 8/16 bit common
– Highest volume processors by far
– Automobiles, toasters, thermostats, ...

16-7-2007 Professor David A. Patterson, Computer Science 252, Spring 1998 Pramod P J
Applications of DSP

• Signal Synthesis
Applications • Implementing a certain processing task
• Studying/ Analyzing certain signal

16-7-2007 Pramod P J
Example DSP Applications
• Digital cellular phones • Voice mail
• Satellite communications • Digital cameras
• Automated inspection • Navigation equipment
• Seismic analysis • Modems (POTS, ISDN, cable,...)
• Vehicle collision avoidance • Audio production
• Secure communications • Noise cancellation
• Voice over Internet • Videoconferencing
• Tapeless answering machines • Medical ultrasound
• Motor control • Pagers
• Sonar • Patient monitoring
• Consumer audio • Music synthesis, effects
• Cordless phones • Radar

•Task done by microprocessors


16-7-2007 Pramod P J
DSP Requirements

• General purpose processors (GPP), -controllers


Hardware • Digital Signal Processors (DSP) Fast real-time
Faster DSPing
• Programmable logic ( PLD, FPGA )

• Programming languages: C / C++ ...


Software • “High level” languages: Matlab, Octave, Mathematica…
• Dedicated tools (ex: filter design s/w packages)

16-7-2007 Pramod P J
DSP Vs GPP
• General-purpose microprocessors are designed primarily for Data
Processing
– The primary burden is Data Read/Write
• Digital Signal Processors are Microprocessors specifically
designed for Signal Processing
– The primary burden is Mathematical operation

DSP architecture therefore incorporates certain features not found in


general-purpose P’s

• DSPs tend to be written for 1 program, not many programs.


• Hence OSes are much simpler, there is no virtual memory or protection, ...
• DSPs sometimes run hard real-time apps
• You must account for anything that could happen in a time slot
• All possible interrupts or exceptions must be accounted for and their
collective time be subtracted from the time interval.
• Therefore, exceptions are BAD!
• DSPs have an infinite continuous data stream
16-7-2007 Pramod P J
DSP vs GPP : Data Paths & Instruction Sets

16-7-2007 Pramod P J
DSP vs GPP : Memory Architecture & Addressing

16-7-2007 Pramod P J
DSP Vs GPP
• Most DSP tasks require:
 Repetitive numeric computations
 Attention to numeric fidelity
 High memory bandwidth, mostly via array accesses
 Real-time processing
• Processors must perform these tasks efficiently while minimizing:
 Cost
 Power
 Memory use
 Development time

16-7-2007 Pramod P J
The Evolution of DSP
Processors

16-7-2007 Pramod P J
DSP Architectures
Architecture

Algorithm

16-7-2007 Pramod P J
FIR Filtering: A Motivating Problem

• One of the most common signal processing tasks.

y[n] = ∑ h[n]*x[n-k]

16-7-2007 Pramod P J
FIR Filter on Von Neumann Architecture

loop:
mov *r0,x0
mov *r1,y0
• Each tap (M+1 taps total) nominally mpy x0,y0,a
requires: add a,b
mov y0,*r2
– Two data fetches inc r0
– Multiply inc r1
– Accumulate inc r2
dec ctr
– Memory write-back to update delay line tst ctr
jnz loop

Problems: Bus / memory bandwidth bottleneck, control code overhead


16-7-2007 Pramod P J
FIR Filter on DSP
• 16-bit fixed-point
• Harvard architecture
• Accumulator
• Specialized instruction set

move #Xaddr,r0
move #Haddr,r4
rep #Ntaps
mac x0,y0,a x:(r0)+,x0 y:(r4)+,y0

One / Two instructions per tap !

16-7-2007 Pramod P J
16-7-2007 Pramod P J
MAC & DSP algorithms !

 The Sum of Products (SOP) is the key element in most DSP


algorithms:

Algorithm Equation
M
Finite Impulse Response Filter a
y ( n) 
k 0
k x(n  k )

M N
Infinite Impulse Response Filter a
y ( n) 
k 0
k x ( n  k ) b
k 1
k y (n  k )

N
Convolution  x ( k ) h( n  k )
y ( n) 
k 0

N 1
Discrete Fourier Transform X (k )   x(n) exp[  j(2 / N )nk ]
n 0

N 1
  
Discrete Cosine Transform F u    c(u). f ( x). cos  2N u2x  1
x 0

16-7-2007 Pramod P J
Multiple Execution Units

• DSP applications typically have very high computational


requirements.
• In addition to the MAC unit, they typically contain an
arithmetic-logic unit(ALU) and a shifter.

16-7-2007 Pramod P J
Efficient Memory Accesses
• Ability to fetch the MAC instruction, data sample, and a
filter coefficients from memory in a single cycle.

16-7-2007 Pramod P J
Efficient Memory Accesses

• Many DSP algorithms consume two data


operands per instruction.
– Include a small bank of RAM near the processor core

– Freeing the instruction bus to be used for data fetches


instead of instruction fetches.

16-7-2007 Pramod P J
Calculating Memory Addresses
• High memory bandwidth requirements are often further
supported via dedicated hardware.
• Memory accesses in DSP algorithms tend to exhibit
very predictable patterns.
• The most common of these modes is register-indirect
addressing with post-increment.

16-7-2007 Pramod P J
Number Format

• Fixed point format

– Represented as an integer or fraction using fixed


number of bits
– Integers
• X = -s.[ 2n-1+bn-2.2n-2+bn-3.2n-3+ …. +b1.21+b0.20 ]
• Range -> -2n-1 to + 2n-1 – 1
– Fraction
• X = -s. [ 20+b-1.2-1+b-2.2-2+ …. +b-(n-2).2-(n-2)+ b-(n-1).2-(n-1) ]
• Range -> -1 to + (1-2n-1)

16-7-2007 Pramod P J
Number Format

• Floating point format


– Used to overcome the requirement of unlimited
number of bits
– Follows IEEE-754 format
• 1 sign bit + 8 exponent + 23 Mantissa
– 2(E-bias)x1.F
– Range of mantissa -> -(2-2-n) to +(2-2-n)

16-7-2007 Pramod P J
Zero-Overhead Looping
• DSP algorithms typically spend the vast majority of their
processing time in loops.
• Implement a for-next loop without bargaining for more
clock cycles.
– Zero-overhead looping.

16-7-2007 Pramod P J
Specialized Instruction Sets
• Make maximum use of the processor’s underlying
hardware.
– Increasing efficiency.
• Minimize the amount of memory space required to store
DSP programs.
– Instruction are kept short.
• Conventional DSP processors tend to have highly
specialized, complicated, and irregular instruction sets.

16-7-2007 Pramod P J
Architecture of DSP
• General-purpose processors are based on the Von Neumann
architecture (single memory bank and processor accesses this
memory bank through single set of address and data lines)

• Harvard architecture commonly used in DSP processors


– Separate Data and Program memories (two memory banks)

– Separate Address Buses for Data and Program memories

• Modified Harvard architecture (with additional memory banks)


several data memory banks

16-7-2007 Pramod P J
A Typical DSP Architecture

PM Data DM Data
Address Address DM Address
Program PM Address
Generator Generator Data
Memory
(PM) Memory
(DM)
Instruc-
tions & Program Sequencer
secondary Data only
Instruction Cache
data
PM Data DM Data

Registers DMA Bus


I/O
Multiplier Controller
(DMA)
ALU

Shifter
Input/Output
16-7-2007 Pramod P J
A. What is DSP?

• It processes data in real time


• Is a type of microprocessor - one that is incredibly fast
and powerful
• Advantages of designing with DSPs over other
microprocessors:
• Single-cycle multiply- accumulate operations
• Real-time performance, simulation and
emulation
• Flexibility & Reliability
• Increased system performance
• Reduced system cost

16-7-2007 Pramod P J
B. Which DSP do I use?

16-7-2007 Pramod P J
Conventional DSP Processors

• The low-cost, low-performance DSP processors


– Operate at around 20-50 MHz
– Maintaining very modest power consumption and
memory usage
– Typically used in consumer and telecommunications
products
• Analog Devices’ ASDP-21xx
• Texas Instruments’ TMS320C2xx

16-7-2007 Pramod P J
Conventional DSP Processors

• Midrange DSP processors

– Increased clock speeds and more sophisticated


architectures
– Operate at 100-150MHz
– Typically used in wireless telecommunications
applications and high-speed modems
• Motorola DSP563xx
• Texas Instruments TMS320C54x

16-7-2007 Pramod P J
Enhanced-Conventional DSP
Processors
• Extend conventional DSP architectures by
adding parallel execution units
– Execute more work per cycle
• Wider data buses to allow them to retrieve more
words per clock cycle
• Lucent Technologies DSP16xxx

16-7-2007 Pramod P J
Multi-Issue Architectures
• Using very simple instructions that typically
encode a single operation.
• These processors achieve a high level of
parallelism by issuing and executing instructions
in parallel groups.
– Execute at higher clock rates.
• The two classes of multi-issue architectures.
– VLIW(very long instruction word)
– superscalar

16-7-2007 Pramod P J
VLIW architecture
• In the VLIW architecture, the assembly
language programmer specifies which
instructions will be executed in parallel.
– The grouping does not change during
program execution.
• Advantages
– Simple hardware
– compilers can spot ILP easily
• Disadvantages
– Little compatibility between generations

16-7-2007 Pramod P J
Superscalar Architecture
• Superscalar processors, contain specialized
hardware that determines which instructions will
be executed in parallel.
– Dynamically schedule parallel operations.
• Advantage
– Compatibility between generations
• Disadvantage
– Very complex hardware

16-7-2007 Pramod P J
VLIW vs. Superscalar
• VLIW and superscalar processors must have
sufficient instruction decoders, registers, and
memory bandwidth.
– High energy consumption.
• In general, multi-issue processors are designed
with an emphasis on increased speed.

16-7-2007 Pramod P J
B. Which TI DSP do I use? B. Which TI DSP do I use?

• TMS320C5000™ DSP platform


 2G, 2.5G and 3G cell phones
• Highest performance C6000  Digital audio players
• Most power efficient C5000  Digital still cameras
 Portable products
• Control optimized C2000  Networking
 Voice over Packet
 Wireless modems
 IP phone
• TMS320C6000™ DSP platform  Personal digital assistants
 DSL & pooled modems
 Digital imaging
• TMS320C2000™ DSP platform
 Pumps, fans, HVAC
 Voice over Packet
 Appliance controllers
 Wireless base stations
 Servo motion control
 Wireless LAN  Factory automation
 Central office switches  Transportation
 Network cameras  Power supplies
 Private branch exchange  Consumer goods
 Speech recognition  Industrial drives
 Office equipment

16-7-2007 Pramod P J
C. How Do I Get Going?

Basic Steps to Starting Development

1 Step One: Selecting a DSP Processor

2 Step Two: Evaluation of DSP Technology and Tools


• DSP Starter Kit (DSK) - A DSP-based board with a code size-limited version of
Code Composer Studio to use the board

3. Step Three: Initial Development


• Code Composer Studio™ IDE - Code Composer Studio (CCS) includes all the
software (including hardware drivers)
• Evaluation Module (EVM) – This development board comes with CCS IDE
Compile Tools and emulation device drivers
• Emulation Technology Overview Code Composer Studio IDE - CCS IDE
includes all the software (including hardware drivers)
• Emulation - The XDS510 is used for JTAG emulation. In order to debug
custom target boards
• Third Party Network Overview

16-7-2007 Pramod P J
“DSP in your pocket”
Community

• On-line community
• Code examples with
software
•Promotions for example
contribution

Hardware Software

• TMS320C5505 • Chip Support Library


fixed-point
low power DSP • CCS IDE™ Rev 4.0
• TLV320AIC3204 Stereo codec
• I2C EEPROM
• Embedded XDS100 JTAG • TMDX5505eZDSP
emulation
• Price: $49
• Expansion Connector
• Evaluation capability of C5504/5
16-7-2007 Pramod P J
low power DSP
16-7-2007 Pramod P J

Das könnte Ihnen auch gefallen