|
|||||||||||||||||||||||
Why ARM's EABI Matters |
|||||||||||||||||||||||
It's common nowadays to hear of the new ARM EABI (embedded application binary interface) Linux port. There are many motivations to start using it, but there is one we especially like -- it's much faster for floating point operations. Since many ARM cores lack a hardware FPU (floating point unit), any software acceleration is more than welcome. It might be hard to switch to EABI, though. For instance, for the Debian distribution, EABI is actually considered a new port. Without EABI The ARM EABI improves the floating point performance. This is not surprising, if you read how your processor is wasting a lot of cycles now. From the Debian ARM-EABI wiki: The current Debian port creates hardfloat FPA instructions. FPA comes from "Floating Point Accelerator." Since the FPA floating point unit was implemented only in very few ARM cores, these days FPA instructions are emulated in kernel via Illegal instruction faults. This is of course very inefficient: about 10 times slower that -msoftfloat for a FIR test program. The FPA unit also has the peculiarity of having mixed-endian doubles, which is usually the biggest grief for ARM porters, along with structure packing issues.So, what does this mean? It means that the compilers usually generate instructions for a piece of hardware, namely a Floating Point Unit, that is not actually there! When you make a floating point operation, such at 3.58*x, the CPU runs into an illegal instruction, and it raises an exception. The kernel catches this specific exception and performs the intended float point operation, and then resumes executing the program. And this is slow because it implies a context switch. The benchmark We decided to make a simple benchmark using our Open Hardware Free ECB_AT91 ARM(ARMv4t) development board, based on an Atmel AT91RM9200 processor. The ECB_AT91, top and bottom We used a simple benchmark we have used before: the dot product of two given vectors, the Euclidean distance of the vectors, and the FFT (fast Fourier transform) algorithm (complex valued, Cooley and Tukey radix-2). The source code we used is available here (GPL). It's common to use the number of floating point operations per second (FLOPS) performed by a given program for benchmarking purposes. However, this can be misleading, because some operations (e.g. division) take more time than others (e.g. addition). To ensure uniformity, we ran the same program in both setups, with similar compiler flags. First we tried the Old ABI using the Debian distribution (Debian Sid), and an image that we bootstrapped. Then, for the EABI test, we used the Angstrom Distribution, part of the OpenEmbedded project. Results EABI vx. OABI, floating point benchmark (Free_ECP_AT91_V1.5, AT92RM9200) EABI/OABI speed-up, floating point benchmark (Free_ECB_AT91_V1.5, AT92RM9200) In each context switch, both the data and instruction cache are flushed, and this hurts the Old ABI's performance. You will notice it in the graphs because the performance with the old ABI does not depend on the size (N) of the input data, whereas in EABI the impact of the cache in the performance is seen clearly. The dot-product performance only goes down when N > 4096 (When we use more than 16KB in memory); the Atmel processor we're using has a 16 Kbyte data cache. |
|||||||||||||||||||||||
ڣhttp://linuxdevices.com/articles/AT5920399313.html | |||||||||||||||||||||||
光盘映象(the Latest DVD Images) | ||||
用户手册(User Manual) | ||||
Linux | ||||
WindowsCE 6.0 | ||||
WindowsCE 5.0 | ||||
Android(仅供参考,不提供技术支持) | ||||
注意:此处提供的Android系统仅在128M或更大容量Nand Flash的mini2440 + 统宝3.5"LCD上测试通过。 | ||||
开源的简易OS和裸机测试代码 | ||||
常用工具和软件、驱动等 | ||||
Datasheets | ||||
(未完) | ||||
|