Floating point unit
Floating point unit , FPU (for Floating Point Unit ) or NPU (for Numeric Processing Unit ) are terms from computer technology and denote a special processor that performs operations on floating point numbers . Since, in particular with older, microcode- based systems, in addition to comparatively simple operations such as addition, subtraction, multiplication, division or root extraction, transcendent functions such as the exponential function or various trigonometric functions were implemented in hardware, one also speaks of mathematical coprocessors .
The FPU can also sit as an external chip in its own housing (e.g. Intel 80287) or be integrated in a specific area within the CPU (e.g. Intel Pentium).
Early CISC - processors usually missing registers and commands to handle floating point numbers. Such calculations and mathematical functions were carried out via software library calls by the main processor, which was optimized for integer processing. In order to relieve the CPU of these computationally intensive tasks, there were initially arithmetic processors such as the AMD AM9511, which were addressed as peripheral components. With later CISC CPUs such as the Intel x86 processors (up to 486 ) or the Motorola 68k CPUs, there was the option of retrofitting an additional coprocessor on the motherboard .
The age of integrated FPUs was heralded by several factors:
- Caches built into CPUs are incompatible with external FPUs. Intel's last stand-alone floating point unit, the i487 external coprocessor , was therefore actually a modified full 80486DX CPU. In contrast to the 80486SX, this had a built-in floating point unit. The modification of the coprocessor consisted of an additional control pin and an artificial lock that prevented its own operation. If the coprocessor was used, the SX CPU was deactivated.
- Mathematical functions were increasingly used in "normal" applications, e.g. B. in rendering fonts.
- Gate functions became increasingly cheaper, sockets and connectors more expensive.
Function and structure
The presence of an FPU enables a significant increase in performance for floating point intensive calculations. For example, coprocessors offered wider registers: Even with 16- and 32-bit CPUs, the FPU often had 64-bit, 80-bit or 128-bit wide registers. As a result, simple calculations could be carried out with greater accuracy and a larger range of values was covered. Since the inside of the FPU is ultimately also a digital processing unit, further, tricky methods are required in order to achieve real acceleration. Many models (e.g. the 8087 ) have calculation methods optimized on the hardware side, such as B. the CORDIC algorithm for trigonometric functions, which only works with addition and register shift, but without lengthy multiplication. Often a great acceleration is also achieved with permanently implemented lookup tables . This means that the values are not determined by running the loop several times , but are first approximated with the help of tables and then determined with sufficient accuracy using interpolation methods (an error in such a table was the cause of the so-called Pentium bug ). Furthermore, an FPU can often organize its registers as a matrix and thus accelerate vector calculations.
Most FPUs provide operations for the basic arithmetic operations (with higher accuracy than the CPU), logarithm , square root and power calculation and trigonometric functions , as well as functions for calculating with matrices.
- Large INTEL CPU / FPU archive - lots of pictures and information
- AMD64 Architecture Programmer's Manual Volume 5: 64-Bit Media and x87 Floating-Point Instructions ( Memento of March 8, 2014 in the Internet Archive ) (Memento of March 8, 2014 in the Internet Archive; English; PDF file; 1.38 MB)