beautypg.com

Motorola DSP96002 User Manual

Page 559

background image

B-40

DSP96002 USER’S MANUAL

MOTOROLA

rep #N-1 ;sum 1 1

mac x0,y0,a x:(r1)+,x0 y:(r5)+n5,y0 1 2

macr x0,y0,a (r4)+ ;finish, next column B 1 1

move a,y:(r6)+ ;save output 1 1

_ecols

move (r0)+n0 ;next row A 1 1

move #mat_b,r4 ;first element B 1 1

_erows
----- -----

19

((8+(N-1))N+5)N+8 = N

3

+7*N

2

+5N+8

At a DSP56000/1 clock speed of 20.5 MHz, a [10x10][10x10] can be computed in .1715 ms.

DSP96002 IMPLEMENTATION


Program ICycles

Words

move #mat_a,r0 ;point to A 1 1

move #mat_c,r6 ;output mat C 1 1

move #N,n0 ;array size 1 1

move n0,n5 1 1

do #N,_rows 2 3

move #mat_b,r4 ;point to B 1 1

move r0,r1 ;copy start of row 1 1

do #N,_cols 2 3

move r4,r5 1 1

fclr d0 (r4)+ 1 1

fclr d1 x:(r1)+,d4.s y:(r5)+n5,d5.s 1 1

rep #N 1 2

fmpy d4,d5,d1 fadd.s d1,d0 x:(r1)+,d4.s y:(r5)+n5,d5.s 1 1

fadd.s d1,d0 r0,r1 1 1

move d0.s,y:(r6)+ 1 1

_cols

move (r0)+n0 1 1

_rows

----- -----

Totals: 19

((N+7)N+6)N+7 = N

3

+7*N

2

+6N+7

At a DSP96002 clock speed of 26.66 MHz, a [10x10][10x10] can be computed in .1325 ms.