Motorola DSP56000 Manual page 580

24-bit digital signal processor
Hide thumbs Also See for DSP56000:
Table of Contents

Advertisement

page 132,60,1,1
;newlms2n.asm
;
New Implementation of the delayed LMS on the DSP56000 Revision C
;Memory map:
;
Initial X
;
x(n)
x(n-1)
x(n-2)
;
]
;
r0
;hx is an unused value to make the calculations faster.
;
opt
cc
ntaps
equ
4
input
equ
$FFC0
output
equ
$FFC1
org
x:$0
state
ds
5
org
y:$0
coef
ds
5
;
org
p:$40
move #state,r0
move #2,n0
move #ntaps,m0
move #coef +1,r4
move #ntaps,m4
move #coef,r5
move m4,m5
_smploop
movep
move
a,x:(r0)
;error signal is in y1
;FIR sum in a=a+h(k) old*x(n-k)
;h(k)new in b=h(k)old + error*x(n-k-1)
cir
a
x:(r0)+,x0
move
x:(r0)+,x1
do
#taps/2,_lms
mac
x0,y0,a
y0,b
macr
x1,y1,b
x:(r0)+,x0
mac
x1,y0,a
y0,b
macr
x0,y1,b
x:(r0)+,x1
;
_lms
move
move
(r0) -n0
;(Get d(n), subtract fir output (reg a), multiply by "u", put
;the result in y1. This section is application dependent.)
movep
a y:output
Figure B-5 Real Input FFT Based on Glenn Bergland Algorithm (Sheet 7 of 8)
B - 18
BENCHMARK PROGRAMS
H
x(n-3)
x(n-4)
;start of X
;mod 5
;coefficients
;mod 5
;coefficients
;mod 5
;
y:input,a
;get input sample
;save input sample
;x0=x(n)
y:(r4)+,y0
;x1=x(n-1),y0=h(0)
;
b,y:(r5)+
;a=h(0)*x(n),b=h(0)
y:(r4)+,y0
;b=h(0)+e*x(n-1)=h(0)new
;x0=x(n-2) y0=h(1)
b,y:(r5)+
;a=a+h(1)*x(n-1) b=h(1)
y:(r4)+,y0
;b=h(1)+e*x(n-2)
;x1=x(n-3) y0=H(2)
b,y:(r5)+
;save last new c( )
;pointer update
;output fir if desired
BENCHMARK PROGRAMS
hx
h0
h1
h2
]
]
r5
r4
Prog
word
h3
Icyc
1
1
1
1
1
1
2
3
1
1
1
1
1
1
1
1
1
1
1
1
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56k

Table of Contents