B-198
DSP96002 USER’S MANUAL
MOTOROLA
move d0.d,l:ieee_out ;output as dp ieee number
move (r2)-n2 ;delete last sample
jmp _loop
;
NxN by NxN Matrix Multiplication Example
;
; Multiply Two Matrices: AB = C
;
; ***NOTE: All numbers are assumed to be in DPLIB format.
;
org x:0
order equ 3 ;Nth order system
elements equ order*order
a ds 4*elements ;matrix A stored starting at x:$00
org x:64
b ds 4*elements ;matrix B stored starting at x:$40
org x:128
c ds 4*elements ;matrix C stored starting at x:$80
;
org p:$100
start move #a,r2 ;r2 points to matrix A elements
move #b,r1 ;r1 points to matrix B elements
move #c,r0 ;r0 points to matrix C (the result)
move #4,n0 ;offset for 4 word numbers
move #order*4,n1 ;offset for one row
move #4,n2 ;offset for 4 word numbers
move #(elements-order+1)*4,n3
move #(order+1)*4,n4
move n1,n5
move #(elements*4)-1,m0
move #(elements*4)-1,m1
move #(elements*4)-1,m2
;
3x3mult do #order,rows ;calculate each row of the result
do #order,columns ;calculate each column of the result
jsr dp_mpy ;multiply the first row-column elements
move (r1)+n1 ;update B offset for next column element
move (r2)+n2 ;update A offset for next row element
jsr dp_mac ;accumulate the inner products
move (r1)+n1 ;update B offset for next column element
move (r2)+n2 ;update A offset for next row element
jsr dp_mac ;accumulate the inner products
move n3,n2 ;update A offset to return to column 1
move n4,n1 ;update B offset for next column
move (r0)+n0 ;update result matrix pointer
move (r1)+n1 ;point to a row 1 element
move (r2)+n2 ;point to a column 1 element
move n0,n2 ;restore A offset
move n5,n1 ;restore B offset
columns move n1,n2 ;update A offset for row shift
move #b,r1 ;point to B column 1
move (r2)+n2 ;point to the next A row
move n0,n2 ;restore A offset
rows stop ;resultant matrix finished
include "dplib"
end
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......