Real-time digital signal processing: implementations, ... changes in the input signal is limited by its internal clock rate, so that it may be slow to
Document source : notes.ump.edu.my
etc.) for the output signal, and listen to the output sound. Depending upon the type of
loudspeaker being used, we may need to use an amplifier to drive the loudspeaker.
20. Implement the following square-root approximation equation in C55x assembly language:
x
p
0:2075806 1:454895x À 1:34491x
2
1:106812x
3
À 0:536499x
4
0:1121216x
5
This equation approximates an input variable within the range of 0:5 x 1. Based on the
values in the following table, calculate
x
p
.
x
0.5
0.6
0.7
0.8
0.9
x
p
21. Write a C55x assembly function to implement the inverse square-root approximation
equation as following:
1=
x
p
1:84293985 À 2:57658958x 2:11866164x
2
À 0:67824984x
3
:
This equation approximates an input variable in the range of 0:5 x 1. Use this approxi-
mation equation to compute 1=
x
p
in the following table:
x
0.5
0.6
0.7
0.8
0.9
1=
x
p
Note that 1=
x
p
will result in a number greater than 1.0. Try to use Q14 data format. That is,
use 0x3FFF for 1 and 0x2000 for 0.5, and scale back to Q15 after calculation.
EXERCISES
125
Summary :
Use this approxi- mation equation to compute 1= x p in the following table: x 0.5 0.6 0.7 0.8 0.9 1= x p Note that 1= x p will result in a number greater than 1.0.
Tags :
equation,following,use,output,range,squareroot,c55x,assembly,approximates,table,loudspeaker,ariable,input