Motorola DSP96002 User Manual
Page 562
MOTOROLA
DSP96002 USER’S MANUAL
B-43
DSP96002 IMPLEMENTATION
Program ICycles
Words
move #mask,r4 ;point to coefficients 1 1
move #8,m4 ;mod 9 1 1
move #image,r0 ;top boundary 1 1
move #image+514,r1 ;left of first pixel 1 1
move #image+2*514,r2 ;left of first pixel 2nd row 1 1
move #2,n1 ;adjustment for end of row 1 1
move n1,n2 1 1
move #imageout,r5 ;output image 1 1
move x:(r0)+,d4.s y:(r4)+,d5.s ;preload, get c(1,1) 1 1
fmpy.s d4,d5,d0 x:(r0)+,d4.s y:(r4)+,d6.s ;get c(1,2) 1 1
do #512,_rows 2 3
do #512,_cols 2 3
fmpy.s d4,d6,d1 x:(r0)-,d4.s y:(r4)+,d5.s ;c(1,3) 1 1
fmpy d4,d5,d0 fadd.s d0,d1 x:(r1)+,d4.s y:(r4)+,d5.s ;c(2,1) 1 1
fmpy d4,d5,d0 fadd.s d0,d1 x:(r1)+,d4.s y:(r4)+,d5.s ;c(2,2) 1 1
fmpy d4,d5,d0 fadd.s d0,d1 x:(r1)-,d4.s y:(r4)+,d5.s ;c(2,3) 1 1
fmpy d4,d5,d0 fadd.s d0,d1 x:(r2)+,d4.s y:(r4)+,d5.s ;c(3,1) 1 1
fmpy d4,d5,d0 fadd.s d0,d1 x:(r2)+,d4.s y:(r4)+,d5.s ;c(3,2) 1 1
fmpy d4,d5,d0 fadd.s d0,d1 x:(r2)-,d4.s y:(r4)+,d5.s ;c(3,3) 1 1
fmpy d4,d5,d0 fadd.s d0,d1 x:(r0)+,d4.s y:(r4)+,d5.s ;c(1,1) 1 1
fmpy d4,d5,d0 fadd.s d0,d1 x:(r0)+,d4.s y:(r4)+,d6.s ;c(1,2) 1 1
move d1.s,y:(r5)+ ;output 1 1
_cols
move x:(r0)+,d4.s y:(r5)+,d7.s ;adj r0,r5 1 1
move x:(r0)+,d4.s y:(r5)+,d7.s ;load,aj r5 1 1
fmpy.s d4,d5,d0 (r1)+n1 1 1
move (r2)+n2 1 1
move x:(r0)+,d4.s ;load 1 1
_rows
----------
Totals: 29
(Kernel=10N), 10N
2
+8N+13
←