Real Time DSP and the Motorola 56300 DSP Chip - PowerPoint PPT Presentation

About This Presentation
Title:

Real Time DSP and the Motorola 56300 DSP Chip

Description:

Make only small changes code changes before testing again. ... Test code segments in isolation using the debugger or the software simulator. ... – PowerPoint PPT presentation

Number of Views:200
Avg rating:3.0/5.0
Slides: 26
Provided by: robm2
Learn more at: http://ecee.colorado.edu
Category:
Tags: dsp | chip | motorola | real | testing | time

less

Transcript and Presenter's Notes

Title: Real Time DSP and the Motorola 56300 DSP Chip


1
Real Time DSPand theMotorola 56300 DSP Chip
  • R.C. Maher
  • ECEN4002/5002 DSP Laboratory
  • Spring 2003

2
Introduction DSP Review
  • Sampled signal is represented as a sequence of
    numbers xn
  • Unit sample ?n 0,0,0,1,0,0,0,
  • Can write
  • ?Sifting property

3
Linearity, Time Invariance
  • Linear systems additivity and scaling
  • Time-Invariant systems delay (shift) of input
    sequence simply causes the same delay (shift) of
    output sequence

4
Unit Sample Response
  • The response of an LTI system to a unit sample is
    very useful. Note that

Sifting
Linearity
Convolution
Time Invariance
5
Unit Sample Response (cont.)
  • NOTE we can find the response of an LTI system
    to any input if we know hn
  • What if input is a complex exponential?

6
Frequency Response
  • Frequency response is the discrete-time Fourier
    transform of the unit sample response
  • This is a periodic function with period 2?
  • 2? corresponds to the sample rate, fs , of the
    sampled-data system

7
Sampling Effects Frequency Domain
Fourier Transform of continuous function
Fourier Transform of sampled function
?S gt 2 ?N
?S lt 2 ?N (aliasing)
XS(j?)
?
?S
-?S
2?S
-2?S
8
The Motorola 5630x
  • Programming model
  • Introduction to instruction set
  • Assembler directives

9
ALU
5630x ALU
10
ALU Registers
  • General-Purpose
  • 24 bits
  • Move to/from other registers
  • Move to/from memory
  • ALU/Mult operands
  • Accumulators
  • 56 bits 8 24 24
  • Move to/from other registers
  • Move to/from memory
  • ALU/Mult results

A1
A0
A2
B1
B0
B2
11
5630x Addressing Unit
12
AGU Registers
Index Registers
Modulo Registers
Offset Registers
13
Addressing Examples
  • move x(R4),X0 Register Indirect
  • move x(R0),X1 w/ postincrement by 1
  • move x(R4)-,X1 w/ postdecrement by 1
  • move x-(R0),X1 w/ predecrement by 1
  • move x(R4)N4,X0 w/ postincrement by N
  • move x(R0)-N0,X1 w/ postdecrement by N
  • move x(R4N4),X0 w/ indexed offset by N
  • (no update)

14
Program Layout
  • Instruction format
  • lab1 mac x0,y0,a x(r0),x0 y(r4),y0
    comment
  • Some assembler directives
  • ORG EQU INCLUDE END
  • DS DC (comment)

Label field
Operation field
Operand field
X move field
Y move field
Comment field
15
Memory Organization
  • 56303
  • Program 0 - 0FFF (4k words)
  • X Data 0 - 07FF (2k words)
  • Y Data 0 - 07FF (2k words)
  • 56307
  • Program 0 - 3FFF (16k words)
  • X Data 0 - 5FFF (24k words)
  • Y Data 0 - 5FFF (24k words)

16
Real Time Signal Processing
17
Real Time means
  • Input/output streams are sustained no gaps or
    dropped data
  • Processing must occur within the sample period
    1/fs (at least on average)
  • Fixed delay through the system (the latency)
    usually must be minimized
  • Availability of data drives the system

18
DSP System
DSP receives an interrupt as each sample arrives
Clock
Clock
Data
Data
High speed serial data
DSP receives an interrupt when D/A ready for
sample
19
DSP Software Development
  • Write software
  • Assemble and link
  • Download to EVM
  • Run!
  • but how to determine if it works or not??
  • and what if program doesnt work??

20
Testing and Debugging
  • Can be a complicated process because
  • Write and assemble code on PC, but then download
    and run on EVM indirect observation is
    required.
  • Algorithm and implementation errors are often
    subtle and ellusive numerical details.
  • Real Time programs cant be run in slow motion,
    so identifying bugs requires creative methods.

21
Testing and Debugging (cont.)
  • Suggestions
  • Develop and test your code incrementally. Make
    only small changes code changes before testing
    again. In other words, never be more than one
    change away from a working program.
  • Test code segments in isolation using the
    debugger or the software simulator.
  • Learn to use your eyes and ears to find bugs.

22
Edit Assemble Load Test
  • Edit source code file
  • Use simple text editor (DOS Edit, Notepad, etc.)
  • Plain text, not case sensitive
  • USE LOTS OF COMMENTS!!
  • Use modular code design and organization
  • Assemble
  • Execute asm56300 a b g l file.asm
  • Check for errors, and re-edit as necessary

23
Edit Assemble Load Test (cont.)
  • Download .cld module to the EVM
  • Run the Domain Technologies Debugger EVM30XW
  • File Load and browse to the .cld file
  • Test the module
  • Start the code (green button on Debugger)
  • Observe input/output signals
  • When in doubt, stop and download known good code
    (e.g, pass.cld)

24
The Pass.asm Program
  • Initializes codec (stereo)
  • Handles codec data interrupts
  • Main program loop polls for data ready, then puts
    left sample in A and right sample in B
  • Uses some X and Y memory
  • Note r6 is used as a stack pointer

25
Lab Assignment 1
  • Due at START of class in one week
  • Topics
  • Use EVM and software tools
  • Observe sampling and reconstruction
  • Program 1 gain multiplier
  • Program 2 word length and quantization
  • Program 3 aliasing
Write a Comment
User Comments (0)
About PowerShow.com