5.4. SOME USEFUL ARITHMETIC OPERATIONS 87
As far as FIR and IIR filters are concerned, it is possible to scale coefficients to avoid
overflows. Let us consider the output of a filter yŒn D
N 1
X
kD0
hŒk xŒn k, where hs denote the
coefficients or the unit sample response terms and xs input samples. In case of IIR filters, for a
large enough N , the terms of the unit sample response become so small that they can be ignored.
Let us suppose that xs are in Q15 format (i.e., jxŒn kj 1). erefore, jyŒnj
N 1
X
kD0
jhŒkj.
is means that, to insure no output overflow (i.e., jyŒnj 1), the condition
N 1
X
kD0
jhŒkj 1 must
be satisfied. is condition can be satisfied by repeatedly scaling (dividing by (2) the coefficients
or the unit sample response terms.
5.4 SOME USEFUL ARITHMETIC OPERATIONS
ere are many operations, such as division, trigonometric functions, and square-root, that need
to be obtained through approximations as no dedicated hardware is available for computing
them. Here a number of techniques for implementing these operations are stated. Clearly, it
takes many instructions for such operations to get computed. It should also be noted that, in
some applications, it is more efficient to implement such arithmetic operations by using lookup
tables.
5.4.1 DIVISION
e floating-point NEON coprocessor in modern smartphones provides an instruction, named
VRECP, which provides an estimate of the reciprocal of an input number [1]. e accuracy can
be improved by using this instruction as the seed point vŒ0 for the iterative Newton–Raphson
algorithm expressed by this equation
vŒn C 1 D vŒn
.
2:0 x vŒn
/
; (5.7)
where x is the value whose reciprocal is to be found. Accuracy is increased by each iteration of
this equation. A portion of this equation, i.e., .2:0 x vŒn/, can be computed in the NEON
coprocessor via the instruction VRECPS [2]. A full iteration is then achieved by the multiplica-
tion with the previous value. In other words, on the floating-point NEON coprocessor, division
can be achieved by taking the reciprocal of the denominator and then by multiplying the recip-
rocal with the numerator. Accuracy is increased by performing many iterations. More details of
the above division approach are covered in [3].
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.72.224