- Floating point unit
A floating point unit (FPU) is a part of a
computer system specially designed to carry out operations onfloating point numbers. Typical operations areaddition ,subtraction ,multiplication ,division , andsquare root . Some systems (particularly older,microcode -based architectures) can also perform varioustranscendental function s such as exponential or trigonometric calculations, though in most modern processors these are done with software library routines.In most modern general purpose
computer architecture s, one or more FPUs are integrated with the CPU; however manyembedded processor s, especially older designs, do not have hardware support for floating point operations.In the past, some systems have implemented floating point via a
coprocessor rather than as an integrated unit; in themicrocomputer era, this was generally a single microchip, while in older systems it could be an entire circuit board or a cabinet.Not all computer architectures have a hardware FPU. In the absence of an FPU, many FPU functions can be emulated, which saves the added hardware cost of an FPU but is significantly slower. Emulation can be implemented on any of several levels - in the CPU as
microcode , as anoperating system function, or inuser space code.In most modern computer architectures, there is some division of floating point operations from
integer operations. This division varies significantly by architecture; some, like the Intel x86 have dedicated floating point registers, while some take it as far as independent clocking schemes.Floating point operations are often pipelined. In earlier
superscalar architectures without generalout-of-order execution , floating point operations were sometimes pipelined separately from integer operations. Today, many CPUs/architectures have more than one FPU, such as thePowerPC 970 , and processors based on theNetburst andAMD64 architectures (such as thePentium 4 andAthlon 64 , respectively.)When a CPU is executing a program that calls for a floating-point operation, there are three ways to carry it out:
* a floating point unit emulator (a floating-point library)
* add-on FPU
* integrated FPUMost modern computers have integrated FPU hardware.
Floating point library
Some floating-point hardware only supports the simplest operations -- addition, subtraction, and multiplication.But even the most complex floating-point hardware has a finite number of operations it can support -- for example, none of them directly support
arbitrary-precision arithmetic .When a CPU is executing a program that calls for a floating-point operation not directly supported by the hardware, the CPU uses a series of simpler floating-point operations.In systems without any floating-point hardware, the CPU emulates it using a series of simpler
fixed-point arithmetic operations that run on the integerarithmetic logic unit .The software that lists the necessary series of operations to emulate floating point operations is often packaged in a floating-point library.
id software released a game,
Quake which was the first 3D game to require a hardware FPU to play.Integrated FPUs
In some cases, FPUs may be specialized, and divided between simpler floating point operations (mainly addition and multiplication) and more complicated operations, like division. In some cases, only the simple operations may be implemented in hardware, while the more complex operations could be emulated.
In some current architectures, the FPU functionality is combined with units to perform
SIMD computation; an example of this is the replacement of thex87 instructions set with SSE instruction set in thex86-64 architecture used in newer Intel and AMD processors.Add-on FPUs
In the 1980s, it was common in
IBM PC /compatiblemicrocomputers for the FPU to be entirely separate from the CPU, and typically sold as an optional add-on. It would only be purchased if needed to speed up or enable math-intensive programs.The
IBM PC , XT, and most compatibles based on the 8088 or 8086 had a socket for the optional 8087 coprocessor. The AT and80286 -based systems were generally socketed for the80287 , and80386 /80386SX based machines for the80387 and80387SX respectively, although early ones were socketed for the80287 , since the80387 did not exist yet.Starting with the
80486 , in x86 chips the floating point unit was integrated with the CPU, something true for almost all later x86-architecture processors. One notable exception is the80486SX ; it was also unusual in that no actual coprocessor was available -- the80487 was a full CPU with an integrated FPU; when installed, the original 80486SX would be disabled.In addition to the Intel x87 series, several other companies manufactured co-processors for the x86 series. These included
Cyrix which marketed its FasMath series as higher performance but fully x87 compatible, andWeitek which offered a high-performance but not fully x87 compatible series of coprocessors.In addition to the Intel architectures, FPUs as coprocessors were available for the
Motorola 680x0 line. These FPUS, the 68881 and68882 , were common in68020 /68030 -basedworkstation s like theSun 3 series. They were also commonly added to higher-end models ofApple Macintosh andCommodore Amiga series, but unlike IBM PC-compatible systems, sockets for adding the coprocessor were not as common in lower end systems. With the68040 , Motorola integrated the FPU and CPU, but like the x86 series, a lower cost68LC040 without an integrated FPU was also available.Also, there are add-on FPUs Coprocessor units for Microcontroller units (MCUs/µCs)/Single Board Computers (SBCs) which serve to provide Floating Point Arithmetic capability in systems that might not otherwise possess said functionality. The difference in these types of FPU Coprocessors, when compared to more traditional Floating Point Coprocessors such as the 80x87 series, is that these add-on FPUs are host-processor independent, possess their own programming requirements, and are often provided with their own IDEs.
See also
* ALU
*Execution unit
*IEEE floating-point standard (also known as IEEE 754)
* [http://www.opencores.org/projects.cgi/web/fpu100/fpu_doc.pdf OPENCORES.ORG] Floating Point Unit
*Quake An id software game, the first 3D game to require an FPU to runNotes
Wikimedia Foundation. 2010.