Motorola DSP96002 User Manual page 589

32-bit digital signal processor
Table of Contents

Advertisement

Bezier Cubic Evaluation
move
move
move
move
move
fmpy
fmpy.s d4,d0,d2
fmpy
fmpy.s d1,d2,d2
fmpy.s d0,d0,d1
fmpy.s d1,d4,d1
fmpy
fmpy.s d0,d2,d2
fmpy.s d1,d4,d1
fmpy.s d1,d5,d1
fadd.s d1,d2
The result x(t) is in d2. The setup of the pointers is not included because this is application dependent and
does not have to be performed for each evaluation of x(t). The first two moves may also be application
dependent and be merged with other data ALU operations for a savings of two more cycles and program
steps.
Reference: "Fundamentals of Interactive Computer Graphics",
B.1.38
Byte/16 Bit Packing/Unpacking From/To 32 Bits
B.1.38.1 Pack Four Bytes Into a 32 Bit Word
The following packs four 8 bit bytes into a single 32 bit word. The bytes to be packed are right justified in
four separate registers:
d0 = xxxA
d1 = xxxB
B-70
#Ptable+2,r0
#2,n0
#TK,r4
d4,d0,d1 fsub.s d5,d0
d4,d5,d1 fsub.s d1,d2
d4,d4,d1 fsub.s d1,d2
James D. Foley Andries Van Dam
Addison-Wesley 1982
d2 = xxxC
d3 = xxxD
DSP96002 USER'S MANUAL
x:(r0)-,d4.s
x:(r4)+,d0.s y:,d5.s
x:(r0)-,d4.s d0.s,d5.s
y:(r4)-,d4.s 1
x:(r0)+n0,d4.s
d5.s,d4.s
x:(r0)+n0,d5.s
Totals:
Program
ICycles
Words
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
---
---
13
13
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents