Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Floating-point unit

From Wikipedia, the free encyclopedia
Part of a computer system
Collection of thex87 family of math coprocessors byIntel

Afloating-point unit (FPU),numeric processing unit (NPU),[1] colloquiallymath coprocessor, is a part of acomputer system specially designed to carry out operations onfloating-point numbers.[2] Typical operations areaddition,subtraction,multiplication,division, andsquare root. Modern designs generally include afused multiply-add instruction, which was found to be very common in real-world code. Some FPUs can also perform varioustranscendental functions such asexponential ortrigonometric calculations, but the accuracy can be low,[3][4] so some systems prefer to compute these functions in software.

Floating-point operations were originally handled insoftware in early computers. Over time, manufacturers began to provide standardized floating-point libraries as part of their software collections. Some machines, those dedicated to scientific processing, would include specialized hardware to perform some of these tasks with much greater speed. The introduction ofmicrocode in the 1960s allowed these instructions to be included in the system'sinstruction set architecture (ISA). Normally these would be decoded by the microcode into a series of instructions that were similar to the libraries, but on those machines with an FPU, they would instead be routed to that unit, which would perform them much faster. This allowed floating-point instructions to become universal while the floating-point hardware remained optional; for instance, on thePDP-11 one could add the floating-point processor unit at any time using plug-inexpansion cards.

The introduction of themicroprocessor in the 1970s led to a similar evolution as the earliermainframes andminicomputers. Earlymicrocomputer systems performed floating point in software, typically in a vendor-specific library included inROM. Dedicated single-chip FPUs began to appear late in the decade, but they remained rare in real-world systems until the mid-1980s, and using them required software to be re-written to call them. As they became more common, the software libraries were modified to work like the microcode of earlier machines, performing the instructions on the main CPU if needed, but offloading them to the FPU if one was present. By the late 1980s,semiconductor manufacturing had improved to the point where it became possible to include an FPU with the main CPU, resulting in designs like thei486 and68040. These designs were known as an "integrated FPU"s, and from the mid-1990s, FPUs were a standard feature of most CPU designs except those designed as low-cost asembedded processors.

In modern designs, a single CPU will typically include severalarithmetic logic units (ALUs) and several FPUs, reading many instructions at the same time and routing them to the various units for parallel execution. By the 2000s, even embedded processors generally included an FPU as well.

History

[edit]

In 1954, theIBM 704 had floating-point arithmetic as a standard feature, one of its major improvements over its predecessor theIBM 701. This was carried forward to its successors the 709, 7090, and 7094.

In 1963, Digital announced thePDP-6, which had floating point as a standard feature.[5]

In 1963, theGE-235 featured an "Auxiliary Arithmetic Unit" for floating point and double-precision calculations.[6]

Historically, some systems implementedfloating point with acoprocessor rather than as an integrated unit (but now in addition to the CPU, e.g.GPUs – that are coprocessors not always built into the CPU – have FPUs as a rule, while first generations of GPUs did not). This could be a singleintegrated circuit, an entirecircuit board or a cabinet. Where floating-point calculation hardware has not been provided, floating-point calculations are done in software, which takes more processor time, but avoids the cost of the extra hardware. For a particular computer architecture, the floating-point unit instructions may beemulated by a library of software functions; this may permit the sameobject code to run on systems with or without floating-point hardware. Emulation can be implemented on any of several levels: in the CPU asmicrocode, as anoperating system function, or inuser-space code. When only integer functionality is available, theCORDIC methods are most commonly used fortranscendental function evaluation.[citation needed]

In most modern computer architectures, there is some division of floating-point operations frominteger operations. This division varies significantly by architecture; some have dedicated floating-point registers, while some, likeIntel x86, go as far as independentclocking schemes.[7]

CORDIC routines have been implemented inIntel x87 coprocessors (8087,[8][9][10][11][12] 80287,[12][13] 80387[12][13]) up to the80486[8] microprocessor series, as well as in theMotorola 68881[8][9] and 68882 for some kinds of floating-point instructions, mainly as a way to reduce thegate counts (and complexity) of the FPU subsystem.

Floating-point operations are oftenpipelined. In earliersuperscalar architectures without generalout-of-order execution, floating-point operations were sometimes pipelined separately from integer operations.

The modular architecture ofBulldozer microarchitecture uses a special FPU named FlexFPU, which usessimultaneous multithreading. Each physical integer core, two per module, is single-threaded, in contrast with Intel'sHyperthreading, where two virtual simultaneous threads share the resources of a single physical core.[14][15]

Floating-point library

[edit]
Wikibooks has a book on the topic of:Floating Point/Soft Implementations
Wikibooks has a book on the topic of:Embedded Systems/Floating Point Unit

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, no FPUs directly supportarbitrary-precision arithmetic.

When a CPU is executing a program that calls for a floating-point operation that is not directly supported by the hardware, the CPU uses a series of simpler floating-point operations. In systems without any floating-point hardware, the CPUemulates it using a series of simplerfixed-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-pointlibrary.

Integrated FPUs

[edit]

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 ormicrocode, while the more complex operations are implemented as software.

In some current architectures, the FPU functionality is combined withSIMD units to perform SIMD computation; an example of this is the augmentation of thex87 instructions set withSSE instruction set in thex86-64 architecture used in newer Intel and AMD processors.

Add-on FPUs

[edit]
Main article:Coprocessor

Several models of thePDP-11, such as the PDP-11/45,[16] PDP-11/34a,[17]: 184–185  PDP-11/44,[17]: 195, 211  and PDP-11/70,[17]: 277, 286–287  supported an add-on floating-point unit to support floating-point instructions. The PDP-11/60,[17]: 261  MicroPDP-11/23[18] and severalVAX models[19][20] could execute floating-point instructions without an add-on FPU (the MicroPDP-11/23 required an add-on microcode option),[18] and offered add-on accelerators to further speed the execution of those instructions.

In the 1980s, it was common inIBM PC/compatiblemicrocomputers for the FPU to be entirely separate from theCPU, 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. TheAT and80286-based systems were generally socketed for the80287, and80386/80386SX-based machines – for the80387 and80387SX respectively, although early ones were socketed for the 80287, since the 80387 did not exist yet. Other companies manufactured co-processors for the Intel x86 series. These includedCyrix andWeitek.Acorn Computers opted for the WE32206 to offersingle,double andextended precision[21] to itsARM poweredArchimedes range, introducing a gate array to interface the ARM2 processor with the WE32206 to support the additional ARM floating-point instructions.[22] Acorn later offered the FPA10 coprocessor, developed by ARM, for various machines fitted with the ARM3 processor.[23]

Coprocessors were available for theMotorola 68000 family, the68881 and 68882. These were common inMotorola 68020/68030-basedworkstations, like theSun-3 series. They were also commonly added to higher-end models of AppleMacintosh and CommodoreAmiga series, but unlike IBM PC-compatible systems, sockets for adding the coprocessor were not as common in lower-end systems.

There are also add-on FPU coprocessor units formicrocontroller units (MCUs/μCs)/single-board computer (SBCs), which serve to provide floating-pointarithmetic capability. These add-on FPUs are host-processor-independent, possess their own programming requirements (operations,instruction sets, etc.) and are often provided with their ownintegrated development environments (IDEs).

See also

[edit]

References

[edit]
  1. ^"Intel 80287XL Numeric Processing Unit".computinghistory.org.uk. Retrieved2024-11-02.
  2. ^Anderson, Stanley F.; Earle, John G.; Goldschmidt, Robert Elliott; Powers, Don M. (January 1967). "The IBM System/360 Model 91: Floating-Point Execution Unit".IBM Journal of Research and Development.11 (1):34–53.doi:10.1147/rd.111.0034.ISSN 0018-8646.
  3. ^Dawson, Bruce (2014-10-09)."Intel Underestimates Error Bounds by 1.3 quintillion".randomascii.wordpress.com. Retrieved2020-01-16.
  4. ^"FSIN Documentation Improvements in the "Intel® 64 and IA-32 Architectures Software Developer's Manual"".intel.com. 2014-10-09. Archived fromthe original on 2020-01-16. Retrieved2020-01-16.
  5. ^"PDP-6 Handbook"(PDF).www.bitsavers.org.Archived(PDF) from the original on 2022-10-09.
  6. ^"GE-2xx documents".www.bitsavers.org.CPB-267_GE-235-SystemManual_1963.pdf, p. IV-4.
  7. ^"Intel 80287 family".www.cpu-world.com. Retrieved2019-01-15.
  8. ^abcMuller, Jean-Michel (2006).Elementary Functions: Algorithms and Implementation (2nd ed.). Boston, Massachusetts:Birkhäuser. p. 134.ISBN 978-0-8176-4372-0.LCCN 2005048094. Retrieved2015-12-01.
  9. ^abNave, Rafi (March 1983). "Implementation of Transcendental Functions on a Numerics Processor".Microprocessing and Microprogramming.11 (3–4):221–225.doi:10.1016/0165-6074(83)90151-5.
  10. ^Palmer, John F.;Morse, Stephen Paul (1984).The 8087 Primer (1st ed.).John Wiley & Sons Australia, Limited.ISBN 0471875694. 9780471875697. Retrieved2016-01-02.
  11. ^Glass, L. Brent (January 1990). "Math Coprocessors: A look at what they do, and how they do it".Byte.15 (1):337–348.ISSN 0360-5280.
  12. ^abcJarvis, Pitts (1990-10-01)."Implementing CORDIC algorithms – A single compact routine for computing transcendental functions".Dr. Dobb's Journal:152–156. Retrieved2016-01-02.
  13. ^abYuen, A. K. (1988). "Intel's Floating-Point Processors".Electro/88 Conference Record: 48/5/1–7.
  14. ^"AMD Steamroller vs Bulldozer".WCCFtech. Archived fromthe original on 9 May 2015. Retrieved14 March 2022.
  15. ^Halfacree, Gareth (28 October 2010)."AMD unveils Flex FP".bit-tech.net. Archived from the original on Mar 22, 2017. Retrieved29 March 2018.
  16. ^PDP-11/45 Processor Handbook(PDF).Digital Equipment Corporation. 1973. Chapter 7 "Floating Point Processor".
  17. ^abcdPDP-11 Processor Handbook(PDF).Digital Equipment Corporation. 1979.
  18. ^abMICRO/PDP-11 Handbook(PDF).Digital Equipment Corporation. 1983. p. 33.
  19. ^VAX – Hardware Handbook Volume I – 1986(PDF).Digital Equipment Corporation. 1985.
  20. ^VAX – Hardware Handbook Volume II – 1986(PDF).Digital Equipment Corporation. 1986.
  21. ^"Western Electric 32206 co-processor".www.cpu-world.com. Retrieved2021-11-06.
  22. ^Fellows, Paul (March 1990). "Programming The ARM: The Floating Point Co-processor".A&B Computing. pp. 43–44.
  23. ^"Acorn Releases Floating Point Accelerator" (Press release). Acorn Computers Limited. 5 July 1993. Retrieved7 April 2021.

Further reading

[edit]
Models
Architecture
Instruction set
architectures
Types
Instruction
sets
Execution
Instruction pipelining
Hazards
Out-of-order
Speculative
Parallelism
Level
Multithreading
Flynn's taxonomy
Processor
performance
Types
By application
Systems
on chip
Hardware
accelerators
Word size
Core count
Components
Functional
units
Logic
Registers
Control unit
Datapath
Circuitry
Power
management
Related
Retrieved from "https://en.wikipedia.org/w/index.php?title=Floating-point_unit&oldid=1283607743"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp