What makes a DSP chip a DSP Conventional

  • Slides: 13
Download presentation
What makes a DSP chip a DSP? • Conventional microprocessors use the Von Neumann

What makes a DSP chip a DSP? • Conventional microprocessors use the Von Neumann architecture: program and data all in a single memory. Address and data buses are shared between instruction and data fetches. Address Memory CPU/ALU Data ECE 411 DSP Intro 1

 • Von Neumann architecture is inexpensive, simple, and effective, BUT there are performance

• Von Neumann architecture is inexpensive, simple, and effective, BUT there are performance problems: – Von Neumann “bottleneck”: fetch for next instruction collides with data fetch/store – Buses may be idle during instruction decode – DSP algorithms often have “multiplyaccumulate” requirements: coef[n] * data[n], where two operands must be fetched • Most DSP chips use Harvard architecture: separate memory space(s) for program and data ECE 411 DSP Intro 2

Harvard Architecture P Address Program Memory CPU/ALU Instr. D 1 Address D 1 Data

Harvard Architecture P Address Program Memory CPU/ALU Instr. D 1 Address D 1 Data D 2 Address Data Memory #1 ECE 411 D 2 Data #2 DSP Intro 3

DSP Architectural Features • ALU typically centered around Multiply. Accumulate (MAC) structure with large

DSP Architectural Features • ALU typically centered around Multiply. Accumulate (MAC) structure with large accumulator – Digital filters require accumulated sum-ofproducts • Multiple address generators to handle separate memory spaces – Address units handle modulo buffer arithmetic ECE 411 DSP Intro 4

DSP Data Representation • Numerical values represented as binary fractions: -1. 0 value <

DSP Data Representation • Numerical values represented as binary fractions: -1. 0 value < 1. 0 Radix point -20 2 -1 2 -2 2 -3 2 -(n-1) Sign bit ECE 411 DSP Intro 5

Why a fractional representation? • The product of two fractional numbers is also a

Why a fractional representation? • The product of two fractional numbers is also a fractional number • Normalized representation is convenient • Coefficients from digital filter designs are typically already in fractional form ECE 411 DSP Intro 6

DSP Architecture: Accumulator • Accumulator register holds intermediate results (nbit number x n-bit number

DSP Architecture: Accumulator • Accumulator register holds intermediate results (nbit number x n-bit number yields 2 n-1 bit number) • Accumulator typically has extra “guard bits” or “extension register” for overflow Input Register Mult Guard ECE 411 Accum High DSP Intro Accum Low 7

Accumulator Example Sign bit 28 … 21 20 2 -1 … 2 -23 2

Accumulator Example Sign bit 28 … 21 20 2 -1 … 2 -23 2 -24 … … Guard (8 bits) … 2 -47 … Accum High (24 bits) Accum Low (24 bits) Radix point Motorola 56 xxx has two 56 -bit accumulators (48 -bit result with 8 guard bits) ECE 411 DSP Intro 8

Digital Filter Example • Simple FIR filter is given by • Current output is

Digital Filter Example • Simple FIR filter is given by • Current output is sum of product of coefficients and past input values. ECE 411 DSP Intro 9

Filter example (cont. ) x[n] Z-1 b 0 Z-1 b 1 Z-1 b 2

Filter example (cont. ) x[n] Z-1 b 0 Z-1 b 1 Z-1 b 2 + y[n] x[n-1] x[n-2] x[n-3] ECE 411 b 3 DSP Intro 10

Filter example (cont. ) • Procedure: – Clear accumulator – Fetch coefficient and data

Filter example (cont. ) • Procedure: – Clear accumulator – Fetch coefficient and data – MAC – Repeat fetch & MAC until done ECE 411 DSP Intro 11

DSP Support for Parallel Moves • Need to fetch next coefficient and next stored

DSP Support for Parallel Moves • Need to fetch next coefficient and next stored value at each step in the filter • DSPs generally support a parallel move or fetch operation while MAC is computed • This design avoids idle ALU and data buses Ex: mac x 0, y 0, a ECE 411 x: (r 0)+, x 0 DSP Intro y: (r 4)+, y 0 12

Summary • DSP chips use the Harvard architecture: separate program and data memory spaces

Summary • DSP chips use the Harvard architecture: separate program and data memory spaces • ALU is centered around the multiply-accumulate (MAC) function • DSPs typically use a fractional number representation • Address computation generally supports modulo buffer address arithmetic • DSPs avoid idle cycles by allowing parallel actions ECE 411 DSP Intro 13