Math Products
GoFast® for ARM Cortex Thumb-2 and Keil
Fast Floating Point Library
Features
- Fast
- Reentrant
- ROMable
- Conforms to IEEE 754 Format
- "Link and Go" compiler support for Keil
- Includes complete source, test programs, project files, and startup code
Description
GoFast® for ARM Cortex Thumb-2 (e.g. Cortex-M3) was carefully designed for high performance operation in embedded applications and ease of use including “link and go” compatibility with the Keil C compiler. GoFast provides ROMable, reentrant IEEE and ANSI compatible Thumb-2 floating point support. It boosts the performance of an application’s math calculations or eliminates the need for a hardware floating-point coprocessor, in order to reduce product manufacturing cost. It is delivered with full assembly source code.
Currently GoFast is offered for the ARM and Thumb-2 instruction sets, not Thumb.
Functionality
GoFast ARM Cortex Thumb-2 offers the following reentrant floating point routines, for both single and double precision:
- intrinsic basic operations + - * /
- intrinsic conversions
- sqrt
- sin, cos, tan
- asin, acos, atan, atan2
- sinh, cosh, atanh
- log, log10, exp, pow
- floor, ceil, fabs
- modf, fmod, frexp, ldexp
Floating Point Technology
GoFast is based on “Architecture Independent Technology” (AIT) and proven floating point algorithms that were developed for over a decade. The algorithms have been thoroughly tested using automated methods.
Conformance and Testing
The accuracy of each GoFast Floating Point Library is within one (least significant) bit for arithmetic functions and two bits for transcendental functions, in most cases. The IEEE 754 Floating Point Format defines special representations for underflow, overflow, and invalid operation. The GoFast routines use these formats and adhere to the IEEE 754 error handling procedures in all applicable cases. Quality assurance and testing procedures have assured proper product operation. In addition, each delivery includes target specific test programs assuring confidence of product operation.
Timings
The following table gives the times for all floating point operations, for GoFast and the Keil floating point library. The times, in microseconds, were measured using the indicated processor and evaluation board. The basic operations (add, subtract, multiply, divide, conversions, and comparisons) in the Keil C library are hand-coded and faster than those in GoFast, so the Keil versions are used instead. (If you only need these basic operations, you don’t need GoFast.) Thus, the routines linked are a mixture of both libraries, as indicated in bold below. GoFast provides the greatest benefit for the more complex operations, offering a 3x performance boost for some.
Microsecond Timings
Cortex-M3: STM32F103VBT6, 72 MHz, Code Int Flash, Data Int SRAM
|
Double Precision |
Single Precision |
Function |
GoFast |
Keil |
GoFast |
Keil |
add |
4.999 |
3.319 |
3.544 |
2.177 |
subtract |
5.253 |
3.499 |
3.804 |
2.191 |
rsubtract |
5.215 |
3.545 |
3.687 |
2.269 |
divide |
32.633 |
23.420 |
16.678 |
5.359 |
multiply |
4.852 |
3.591 |
3.030 |
1.960 |
__neg |
0.892 |
0.856 |
0.737 |
0.698 |
feq |
2.825 |
1.702 |
2.056 |
1.631 |
fge |
2.776 |
2.015 |
2.057 |
1.782 |
fgt |
2.817 |
2.015 |
2.056 |
1.781 |
fle |
2.816 |
2.015 |
2.058 |
1.783 |
flt |
2.776 |
2.014 |
2.056 |
1.783 |
sqrt |
63.381 |
25.165 |
33.019 |
10.135 |
fmod |
21.741 |
21.106 |
15.991 |
10.641 |
ldexp |
2.250 |
1.669 |
1.947 |
1.456 |
frexp |
1.941 |
1.631 |
1.534 |
1.261 |
modf |
7.509 |
2.798 |
4.469 |
1.891 |
fabs |
0.892 |
2.815 |
0.739 |
2.272 |
sin |
20.105 |
65.259 |
8.085 |
27.340 |
cos |
19.803 |
64.705 |
8.065 |
27.070 |
tan |
52.946 |
89.125 |
22.603 |
32.266 |
exp |
24.529 |
93.500 |
7.627 |
60.275 |
log |
58.292 |
93.048 |
27.410 |
31.838 |
log10 |
60.149 |
104.669 |
27.955 |
37.966 |
atan |
65.979 |
106.982 |
29.084 |
32.249 |
atan2 |
93.719 |
126.000 |
42.579 |
37.238 |
acos |
49.841 |
152.490 |
78.884 |
49.510 |
asin |
48.958 |
152.162 |
69.763 |
49.310 |
cosh |
50.582 |
118.385 |
21.914 |
70.045 |
sinh |
51.495 |
120.997 |
22.690 |
72.083 |
tanh |
53.940 |
114.241 |
33.671 |
64.646 |
pow |
82.604 |
262.701 |
36.581 |
130.719 |
floor |
2.350 |
1.503 |
1.627 |
1.046 |
ceil |
2.430 |
1.503 |
1.705 |
1.044 |
long to fp |
2.668 |
3.580 |
2.319 |
1.592 |
ulong to fp |
2.272 |
3.992 |
1.805 |
1.592 |
fp to long |
1.797 |
1.375 |
1.356 |
1.222 |
fp to ulong |
1.797 |
1.090 |
1.355 |
0.977 |
longlong to fp |
5.941 |
6.809 |
5.605 |
7.085 |
ulonglong to fp |
5.596 |
6.840 |
5.264 |
7.075 |
fp to longlong |
2.682 |
1.549 |
2.291 |
1.375 |
fp to ulonglong |
2.664 |
1.281 |
2.281 |
1.146 |
sgl to dbl |
1.649 |
1.281 |
- |
- |
dbl to sgl |
2.079 |
1.359 |
- |
- |
Times were measured on STMicro STM3210B-EVAL board with Keil v4.13a.
GoFast is a registered trademark of Lantronix Inc. ARM and Thumb are registered trademarks of ARM Ltd.
|