Hi Prasad,
DeviPrasad Natesan wrote:
> "The HW acceleration is for single precision only - using doubles
> (including literal constants like 2.0), will force calls to the software
> libraries. Since uClibc's math library does everything with doubles,
> you won't see a lot of speedup on things like trig functions. However
> you will see instant 20-100X speedup on raw floating point arithmetic in
> your apps."
>
>
> Does that mean all the double precision floating point will be
> converted to single precision by the library to calculate the result.?
No - in fact the opposite. the uClibc math libraries are all double, so
unfortunately gain no benefit from the HW FPU.
> I am running ntpd which has lots of double. So putting a FPU in the
> microblaze, does it increase the speed.?
No. To gain the benefit from the single precision FPU, you need to
audit your application code to change doubles into floats. You also
need to change constants into explicit floats, like this:
float myval=1.00;
myval*=(float)2.5;
Note the explicit cast of the constant 2.5 to a float - otherwise the
compiler will promote myval to a double, do a (software) double
precision multiply, then truncate the result back to a float - not what
you want!
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/