home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / ibm / pc / hardware / 24342 < prev    next >
Encoding:
Text File  |  1992-09-15  |  62.9 KB  |  975 lines

  1. Newsgroups: comp.sys.ibm.pc.hardware
  2. Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!uni-heidelberg!rz.uni-karlsruhe.de!usenet
  3. From: S_JUFFA@iravcl.ira.uka.de (|S| Norbert Juffa)
  4. Subject: What you always wanted to know about math coprocessors 1/4
  5. Message-ID: <1992Sep15.162554.10917@rz.uni-karlsruhe.de>
  6. Sender: usenet@rz.uni-karlsruhe.de (USENET News System)
  7. Organization: University of Karlsruhe (FRG) - Informatik Rechnerabt.
  8. Date: Tue, 15 Sep 1992 16:25:54 GMT
  9. X-News-Reader: VMS NEWS 1.23
  10. Lines: 963
  11.  
  12.  
  13.          WHAT YOU ALWAYS WANTED TO KNOW ABOUT MATH COPROCESSORS
  14.  
  15.  
  16.          This document has been created to provide the net.community
  17.          with some detailed information about mathematical coprocessors
  18.          for the Intel 80x86 CPU family. It may also help to answer
  19.          some of the FAQs (frequently asked questions) about this topic.
  20.          The focus of this document is on 387 compatible chips, but
  21.          there is also some information on the other chips in the 80x87
  22.          family and the Weitek coprocessors. Care was taken to make the
  23.          information included as accurate as possible. If you think you
  24.          have discovered erroneous information in this text, or think
  25.          that a certain detail needs to be clarified, or want to suggest
  26.          additions to this text, feel free to contact me at:
  27.  
  28.          S_JUFFA@IRAVCL.IRA.UKA.DE
  29.  
  30.          or at my snail mail address:
  31.  
  32.          Norbert Juffa
  33.          Wielandtstr. 14
  34.          7500 Karlsruhe 1
  35.          Germany
  36.  
  37.  
  38.          This is the second version of this document and I'd like to thank
  39.          those who have helped improving it by commenting on the previous
  40.          version:
  41.  
  42.          Fred Dunlap (cyrix!volt!fred@texsun.Central.Sun.COM), Peter
  43.          Forsberg (peter@vnet.ibm.com), Richard Krehbiel (richk@grevyn.com),
  44.          Arto Viitanen (av@cs.uta.fi), Jerry Whelan (guru@stasi.bradley.edu),
  45.          Eric Johnson (johnson%camax01@uunet.UU.NET), Bengt Ask
  46.          (f89ba@efd.lth.se), Thomas Hoberg (tmh@prosun.first.gmd.de),
  47.          Nhuan Doduc (ndoduc@framentec.fr), John Levine
  48.          (johnl@iecc.cambridge.ma.us)
  49.  
  50.  
  51.  
  52.  
  53.          CONTENTS of this document
  54.  
  55.          1) What are math coprocessors?
  56.          2) What applications benefit from using a math coprocessor
  57.          3) Installing a math coprocessor
  58.          4) Description of available math coprocessors, special features,
  59.             available speeds, packaging, power consumption
  60.          5) Price information
  61.          6) How do math coprocessors work
  62.          7) Performance comparison of math coprocessors
  63.          8) Test for IEEE-754 conformance and accuracy of transcendental
  64.             functions for different math coprocessors
  65.          9) References (literature)
  66.          10)Addresses of manufacturers of math coprocessors
  67.          11)Appendix A: Test programs for partial compatibility checks
  68.          12)Appendix B: Benchmark programs TRNSFORM and PEAKFLOP
  69.  
  70.  
  71.          What are math coprocessors?
  72.  
  73.          A coprocessor in the traditional sense is a processor that extends
  74.          the capabilities of a CPU in a transparent manner. This means that
  75.          from the programmer's view the CPU and coprocessor together look
  76.          like one machine. The 80x87 math coprocessors are typical examples
  77.          of such coprocessors. The 80x86 CPUs (with the exception of the 80486,
  78.          which has a built-in 'coprocessor') can only handle 8, 16, or 32 bit
  79.          integers as their primary data types. However, many applications
  80.          require the use of floating-point numbers. Simply put, use of floating
  81.          point numbers enables one to express not only integers, but also
  82.          fractional values over a wide range. The most common application
  83.          of floating point numbers is in scientific applications, where very
  84.          small (e.g. Planck's constant) and very large numbers (e.g. speed
  85.          of light) have to be expressed. But floating-point numbers are also
  86.          useful for business applications such as computing interest. Since
  87.          the 80x86 CPUs do not support floating-point numbers or operations
  88.          on them directly, they have to be programmed using the CPU's integer
  89.          capabilities. This results in slow computations when floating-point
  90.          numbers are used. This is where the 80x87 coprocessors come in.
  91.          Adding a 80x87 to a 80x86 based system augments the CPU architecture
  92.          with eight floating point registers, five additional data types and
  93.          over 70 additional mnemonics. This greatly enhances the system's
  94.          capability to do floating-point computations, as the coprocessor is
  95.          specifically designed to handle floating-point numbers efficiently.
  96.          Like most things in life, floating-point arithmetic has been
  97.          standardized. The relevant standard, to which I will refer quite
  98.          often in this document, is IEEE-754 Standard for Binary Floating-Point
  99.          Arithmetic [10,11]. The standard specifies numeric formats, value
  100.          sets and how the basic arithmetic (+,-,*,/,sqrt, remainder) has to
  101.          work. All the coprocessors covered in this document claim full or
  102.          at least partial compliance with this standard. When browsing the
  103.          literature for information on math coprocessors, you will also
  104.          encounter quite a few acronyms that refer to them: MCP (Math
  105.          CoProcessor), NDP (Numerical Data Processor), NPX (Numerical
  106.          Processor eXtension), FPU (Floating Point Unit). The latter usually
  107.          refers to the 'built-in coprocessor' of the i486.
  108.  
  109.  
  110.          The only data type the 80x87 coprocessors (and the 80486 floating
  111.          point unit, or FPU) can hold in their registers is an 80-bit long
  112.          floating-point number. This data type (called temporary real or
  113.          double extended precision) can represent numbers which range in
  114.          size between 3.36*10^-4932 and 1.19*10^4932 (3.65*10^-4951 to
  115.          1.19*10^4932 including denormal numbers) where the '^' denotes the
  116.          power operator. For those familiar with floating point formats, this
  117.          format has 64 mantissa bits, 15 exponent bits and 1 sign bit for
  118.          the total of 80 bits. This format provides a precision of about
  119.          19 decimal places. The 80x87 can handle additional data types
  120.          that are converted to/from the internal format upon being loaded/
  121.          stored to/from the coprocessor. These include 16 bit, 32 bit, and
  122.          64 bit integers as well as a 18 digit BCD (binary coded decimal)
  123.          occupying 10 bytes and two additional floating point types. The
  124.          short real data type, also called single precision, has 32 bits
  125.          that split into 23 mantissa bits, 8 exponent bit and a sign
  126.          bit. This format provides a precision of about 6-7 decimal places
  127.          and can represent numbers between 1.17*10^-38 and 3.40*10^38
  128.          (1.40*10^-45 to 3.40*10^38 including denormal numbers). The long
  129.          real, or double precision, data type has 64 bits, consisting of
  130.          52 mantissa bits, 11 exponent bits and the sign bit. It provides
  131.          15-16 decimal digits of precision and can handle numbers from
  132.          2.22*10^-308 to 1.79*10^308 (4.94*10^-324 to 1.79*10^308 including
  133.          denormal numbers).
  134.  
  135.          In addition to load/store the above mentioned operand types, the
  136.          80x87 coprocessors can perform all the basic arithmetic operation
  137.          on floating point numbers. Besides 'knowing' how to add, subtract,
  138.          multiply and divide they can also compare floating-point numbers,
  139.          change the sign, take the square root or absolute value, compute
  140.          the remainder and compute some of the transcendental functions,
  141.          like the logarithm. The eight registers in the 80x87 are organized
  142.          in a stack-like manner which takes some time getting used to if
  143.          one programs the coprocessor directly in assembler. However,
  144.          nowadays the compilers or interpreters for most high level
  145.          languages (HLL) can give the programmer access to the coprocessor's
  146.          data types and use their instructions, so there is not much need
  147.          to worry about the rather unusual architecture of the 80x87.
  148.  
  149.          Strictly speaking, the Weitek Abacus 3167 and 4167 are not
  150.          coprocessors in that they do not transparently extended the
  151.          CPU architecture. Rather they could be described as special
  152.          memory mapped IO-devices. Since the term coprocessor has been
  153.          traditionally used for these chips, they are also called by
  154.          that term in this document. The architecture of the Weitek
  155.          chips differs significantly from the 80x87. The Weitek's register
  156.          file consists of 31 32-bit register, each one capable of holding
  157.          an IEEE single precision number. Pairs of consecutive single
  158.          precision registers can also be used as 64-bit IEEE double
  159.          precision register. Thus there are 15 double precision registers.
  160.          The Weitek register file has the standard organization known from
  161.          other registers files like those in the 80386, not the special
  162.          stack-like organization of the 80x87 coprocessors. The Weitek
  163.          coprocessors have been tuned for maximum performance. Therefore,
  164.          only a small instruction set has been implemented, but each
  165.          instruction executes at a very high speed, usually only a few
  166.          clock cycles each. Instructions available are load/store, add,
  167.          subtract, subtract reverse, multiply, multiply and negate,
  168.          multiply and accumulate, multiply and take absolute value,
  169.          divide reverse, negate, absolute value, compare/test, convert
  170.          fix/float, and square root. Note that the Weitek Abacus does not
  171.          support a double extended format, has no built-in transcendental
  172.          functions, and does not support denormals. The ressources required
  173.          to implement such features have instead been devoted to implement
  174.          the basic arithmetic operations as fast as possible. While the
  175.          80x87 coprocessors perform all internal calculations in double
  176.          extended precision and therefore have about the same performance
  177.          for single and double precision calculations, the Weitek features
  178.          explicitly single and double precision operations. For applications
  179.          that require only single precision the Weitek provides additional
  180.          performance that way, as single precision operations are about
  181.          twice as fast as their double precision counterparts. Since the
  182.          Weitek Abacus has more registers than the 80x87 coprocessors,
  183.          values can be kept in registers more often and have to be loaded
  184.          from memory less frequently. This also leads to a performance gain.
  185.          To the CPU, the Weitek Abacus looks like a 64 kB block of memory
  186.          starting at physical address 0C0000000h. Every address in this
  187.          range corresponds to a coprocessor instruction. Accessing a
  188.          specified memory location within this block with the 386/486's
  189.          MOV instruction causes the corresponding instruction to be executed.
  190.          The instructions have been assigned to memory locations in such a
  191.          way that loads to consecutive coprocessor registers can make use
  192.          of the 386/486 MOVS string instruction. The memory mapped interface
  193.          of the Weitek coprocessors is much faster than the IO-oriented
  194.          protocol that is used to couple the CPU to the 80287 and 80387
  195.          coprocessors. The Weitek's starting address of 0C0000000h is only
  196.          a physical address. The Weitek's memory block can be assigned to
  197.          any logical address using the MMU (memory managment unit) in the
  198.          386/486's protected and virtual modes. This also means that the
  199.          Weitek Abacus 3167 and 4167 can *not* be used in the real mode
  200.          of those processors, since the physical start address of the
  201.          Weitek coprocessors is not within the 1 MByte address range and
  202.          the MMU is inoperable in real mode. However, DOS programs can
  203.          make use of the Weitek Abacus by using a DOS extender or a
  204.          memory manager like EMM386 that run in protected/virtual mode
  205.          themself and can therefore map the Weitek's memory block to
  206.          any desired location in the 1 MByte address range. Typically
  207.          the FS segment register is then set up to point to the Weitek's
  208.          memory block. On the 80486, this technique has severe draw backs,
  209.          as using the FS: prefix takes an additional clock cycle, thereby
  210.          nearly halving the performance of the 4167. Most DOS based compilers
  211.          exibit this problem, so the only way aroun it is to code in assembly
  212.          language [75]. The Weitek Abacus 3167 and 4167 are also supported
  213.          by the UNIX operating system [33].
  214.  
  215.  
  216.          What applications will profit by using a math coprocessor?
  217.  
  218.          According to the Intel 387DX User's Guide, there are more
  219.          than 2100 commercial programs that can make use of a 387
  220.          compatible coprocessor. Every program that uses floating
  221.          point arithmetic somewhere and supports a 80x87 coprocessor
  222.          can gain speed by installing a coprocessor. However, the
  223.          speedup will vary from program to program and even within
  224.          the same program depending on how computation intensive the
  225.          program or operation within the program is. Typical applications
  226.          that benefit from the use of a 80x87 coprocessor are:
  227.          - Business graphics programs, such as Arts&Letters, Freedom
  228.            of Press, and Freelance
  229.          - Spreadsheet programs like Lotus 1-2-3, Excel, Quattro, and
  230.            Wingz
  231.          - CAD programs such as AutoCAD, VersaCAD, and GenericCAD
  232.          - Database programs such as dBase IV, FoxBase, and Paradox
  233.          - Math and Science programs such as Mathematica, TKSolver,
  234.            SPSS/PC, and Statgraphics
  235.          Note that for spreadsheets and databases, a coprocessor
  236.          only helps if some kind of floating point computations
  237.          is performed. This is true more often for spreadsheets
  238.          than for data bases. Also note that the speed of many
  239.          programs depends quite heavily on the speed of the graphics
  240.          adapter (CAD) or the disk performance (databases), so the
  241.          computational performance is only a (small) part of the
  242.          total performance of the application. There are some programs
  243.          that won't run without a coprocessor, among them AutoCAD R10
  244.          and later and Mathematica. Most GUIs (graphical user interfaces)
  245.          such as Microsoft Windows or OS/2's Presentation Manager do
  246.          *not* gain additional speed from using a *mathematical* coprocessor,
  247.          since their graphics operations only use integer arithmetic [71].
  248.          They benefit from a graphics board with a graphics 'coprocessor'
  249.          though that speed up certain common operations such as BitBlt
  250.          or line drawing. A few GUIs used on PCs, e.g. X-Windows, use
  251.          a certain amount of floating point operations for operations
  252.          such as arc drawing. However, the use of floating-point operations
  253.          in X-Windows seems to have decreased significantly in versions
  254.          after X11R3, so the overall performance impact of a coprocessor
  255.          is small [72]. Applications running under any GUI may take
  256.          advantage of a math coprocessor though, e.g. Excel under MS-Windows.
  257.  
  258.          While support for 80x87 coprocessors is very common in application
  259.          programs, the Weitek Abacus coprocessors do not enjoy such wide
  260.          spread support. Due to their high price, only a few high-end PCs
  261.          have been equipped with Weitek coprocessors. Therefore most of
  262.          the programs that support these coprocessors are also high-end
  263.          products like AutoCAD and Versacad-386.
  264.  
  265.  
  266.  
  267.          Installing a math coprocessor
  268.  
  269.          Usually, installing a coprocessor doesn't pose much of a problem,
  270.          as every coprocessor comes with installation instructions and a
  271.          diagnostic disk that lets you check for correct operation once
  272.          the coprocessor has been installed. In addition, the user manuals
  273.          of most computers have a section on coprocessor installation.
  274.  
  275.          1) Make sure to get the right coprocessor for your system. An
  276.             8087 works together with 8086, 8088, V20, and V30 CPUs. An
  277.             80287, 287XL or compatible works together with a 80286 CPU.
  278.             There are also some old 386 motherboards that accept a 80287
  279.             coprocessor, but they usually also provide a socket for the
  280.             387 and I recommend to get a 387 then for use with these
  281.             systems. A 80387, 387DX or compatible coprocessor is for 386
  282.             based systems, as is the Intel RapidCAD. 387 coprocessors
  283.             also work together with Cyrix' 486DLC CPU which despite its
  284.             name does not include an FPU. Similarly, the 387SX or compatible
  285.             coprocessor go into systems whose CPU is a 386SX or Cyrix 486SLC.
  286.             The Weitek Abacus 3167 works with a 386 CPU but requires a
  287.             121-pin EMC socket in your system. Some computers, such as
  288.             IBM's PS/2s, don't have this socket. The Weitek Abacus 4167
  289.             works together with the 486 and requires the appropriate
  290.             142-pin socket to be present.
  291.             Always install a coprocessor that is rated at the same speed
  292.             as the CPU. That is, for a 40 MHz 386 system using AMD Am386-40,
  293.             install a coprocessor rated for 40 MHz such as a Cyrix 83D87-40,
  294.             C&T 38700DX-40, IIT 3C87-40, or ULSI 83C87-40. Running a
  295.             coprocessor above its specified frequency rating may cause it to
  296.             produce false results, which you might fail to recognize as such.
  297.             I have personally experienced this problem with a Cyrix 83D87-33
  298.             that I tried to push to 40 MHz. It passed all the diagnostic
  299.             benchmarks on the Cyrix diagnostic disk and the tests of some
  300.             commercial system test programs. However, I found it to fail the
  301.             Whetstone and Linpack benchmarks, which include accuracy
  302.             checks. So although there is usually no problem with overheating
  303.             when pushing a coprocessor over the specified maximum frequency
  304.             rating, be warned that operation of a coprocessor above the
  305.             maximum ratings stated by the manufacturer makes operation
  306.             unreliable. Some 386 boards allow the coprocessor to be clocked
  307.             differently than the CPU. This is called asynchronous operation
  308.             and allows you to run the coprocessor at 33 MHz while the CPU
  309.             runs at 40 MHz, for example. Please note that only the Intel
  310.             80387 and 387DX support asynchronous operation. The 387 'clones'
  311.             from Cyrix, C&T, IIT and ULSI always run at the full speed of the
  312.             CPU, even if you have set up your motherboard for asynchronous
  313.             operation.
  314.          2) Once you've got the correct coprocessor for your system you
  315.             can start the actual installation process:
  316.             - turn off the computer's power switch and unplug the power
  317.               cord from the wall outlet
  318.             - remove the cover of your computer
  319.             - locate the math coprocessor socket. This socket is located
  320.               right next to the CPU, which can be identified by the
  321.               printing on top of the chip. The CPU usually is one of the
  322.               biggest chips on the board. The 8078 and 80287 DIL sockets
  323.               are rectangular sockets with 20 pin holes on each of the
  324.               longer sides. The 387SX PLCC socket is a square socket that
  325.               has 17 vertical connector strips on the 'wall' of each side.
  326.               The 387 PGA socket is square and has two rows of pin holes
  327.               on each side. The EMC socket is similar but has three rows
  328.               of holes on each side. The PGA socket for the Weitek 4167 is
  329.               also square with three rows of holes on each side. If the CPU
  330.               and coprocessor socket is on a separate card rather than on
  331.               the motherboard (typical for modular systems), you have to
  332.               remove the card and place it on a flat and hard surface free
  333.               of static electricity. If you can't find the math coprocessor
  334.               socket, consult your owner's manual or your computer dealer.
  335.               If you want to install the Intel RapidCAD in a 386 system,
  336.               you will have to remove the 386 CPU before starting to
  337.               install the two RapidCAD chips. Intel provides an easy to
  338.               use chip extractor and a storage box for the 386 chip for
  339.               this purpose. Just follow the instructions in the RapidCAD
  340.               installation manual.
  341.             - On many systems, the motherboard is only supported at a small
  342.               number of points. Since considerable force is required to
  343.               insert a pin grid chip like the 80387, RapidCAD, or Weitek
  344.               Abacus 3167 into it's socket, the board may bend quite a lot
  345.               due to the insertion pressure. This may lead to cracks in
  346.               the board that may render it inoperable. Damage done to the
  347.               board in this way is usually not covered by the warranty on
  348.               the part. Therefore, it may be a good idea to check how much
  349.               the board bends by pressing on the math coprocessor socket
  350.               with a finger. If you find it to bend easily, try to put
  351.               something under the board directly beneath the coprocessor
  352.               socket. If this is impossible, like in most desktop cases,
  353.               consider removing the whole mother board from the case, and
  354.               placing it on a hard and flat surface free of static electricity.
  355.             - Be sure you are properly grounded before you remove the
  356.               coprocessor from its antistatic box. Static electricity
  357.               can damage the coprocessor. Make sure you do not touch
  358.               the pins.
  359.             - Check if all pins are straight and not bend. If you find
  360.               bent pins, carefully straigthen them with needle-nose pliers
  361.               or tweezers.
  362.             - Match the coprocessor's orientation with the orientation
  363.               of the socket. 8087 and 287 coprocessors have a notch on one
  364.               the shorter sides of their rectangular DIL package that should
  365.               be matched with the notch of the coprocessor socket. Usually
  366.               the 286 CPU and the 287 coprocessor are placed alongside each
  367.               other and both have the same orientation, that is their
  368.               respective notches point in the same direction. 387SX
  369.               coprocessors feature a white dot or similar mark that matches
  370.               with some sort of marking on the socket. 387 coprocessors
  371.               have a beveled corner that is also marked with a white dot
  372.               or similar marking. This should be matched with the beveled
  373.               or otherwise marked corner of the socket. If you install
  374.               a 387 coprocessor in an EMC socket, leave one row of holes
  375.               free on each side. Correct orientation of the coprocessor
  376.               is absolutely essential, because if you insert it the
  377.               wrong way it may be damaged. If you have found the correct
  378.               orientation, make sure all pins are correctly aligned with
  379.               their respective holes. Press firmly and evenly on the chip.
  380.               You may have to press hard to seat the coprocessor all the
  381.               way. Make sure your motherboard does not bend more than
  382.               slighty under the insertion pressure. Otherwise it may
  383.               develop cracks that could damage the signal lines on the
  384.               board. For 8087, 287, and 387 coprocessors it is normal that
  385.               the coprocessor does not go all the way in but about one
  386.               millimeter (1/25 inch) of space is left between the socket
  387.               and the bottom of the coprocessor chip. This enables the
  388.               insertion of a extraction device should it become necessary
  389.               to remove the coprocessor. Note that the construction of the
  390.               387SX's PLCC socket makes it next to impossible to remove
  391.               the coprocessor once fully inserted, as the top of the chip
  392.               is level with the socket's 'walls' then.
  393.          3) Check your computer's manual for the jumpers and/or switches
  394.             you may have to set for coprocessor operation.
  395.             Put the cover back on the system unit and reconnect the power.
  396.             Turn on your computer. Depending on your BIOS, you may have
  397.             to run the setup or configuration program to register the
  398.             coprocessor.
  399.             Use the diagnostic disk included with your coprocessor to
  400.             check for correct operation of your coprocessor.
  401.  
  402.  
  403.  
  404.          Coprocessor emulations
  405.  
  406.          In the absence of a coprocessor, floating-point calculations
  407.          are most often performed by a software package that simulates
  408.          the operations of the coprocessor. Such a program is called
  409.          a coprocessor emulator. Simulating the coprocessor has the
  410.          advantage that identical code can be generated for use with
  411.          either the coprocessor and the emulator so that it is possible
  412.          to write programs that run on both, systems with and systems
  413.          without a coprocessor, without any changes. Wether the program
  414.          is to use the coprocessor or the emulator can then be determined
  415.          at run-time by checking if a math coprocessor is present in
  416.          the system.
  417.  
  418.          Two approaches to interface an 80x87 emulator to programs are
  419.          common. While the first method works with all 80x86 processors,
  420.          the second only works from the 80286 on. The first method makes
  421.          use of the fact that all coprocessor instruction start with the
  422.          same five bit pattern 11011. Thus the first byte of a coprocessor
  423.          instruction will be in the range D8-DF hexadecimal. In addition,
  424.          coprocessor instructions usually are preceeded by a WAIT instruction
  425.          (opcode 9Bh) which is one byte long (the reason for doing this
  426.          is described in a later chapter on the operation of the 80x87).
  427.          One common approach is to replace the WAIT instruction and the
  428.          first byte of the coprocessor instruction with one of eight
  429.          interrupts; the remaining bytes of the coprocessor instruction
  430.          are left unchanged. Interrupts 34 to 3B hexadecimal are used for
  431.          this emulation technique. Note that the sequences 9B D8 .. 9B DF
  432.          can be easily converted to the interrupt instructions CD 34 .. CD 3B
  433.          by simple addition and subtraction of constants. The compiler or
  434.          assembler produces code that contains the appropriate interrupt
  435.          calls instead of the coprocessor instructions. If a coprocessor
  436.          is detected at run-time, the emulator interrupts point to a short
  437.          routine that converts the interrupts calls back to coprocessor
  438.          instructions (self modifying code). If no coprocessor is found
  439.          the interrupts point to an emulation package which examines the
  440.          byte(s) following the interrupt intruction to determine what
  441.          operation to perform. The method described is used by the compilers
  442.          from Microsoft and Borland for example. It works with every
  443.          80x86 CPU from the 8086/8088 on.
  444.          The second method to interface an emulator is only available on
  445.          286 and 386 machines. If the emulation bit in the machine status
  446.          word of these processors is set, the processors will generate an
  447.          interrupt 7 whenever a coprocessor instruction is encountered.
  448.          The interrupt vector then points to an emulation package that
  449.          decodes the instruction and performs the desired operation. This
  450.          approach has the advantage that the emulator doesn't have to be
  451.          included in the program code, but can be loaded as a TSR or
  452.          device driver once and then used by every program that requires
  453.          a coprocessor. Emulation via interrupt 7 is transparent, which
  454.          means that programs containing coprocessor instructions execute
  455.          just like a coprocessor was present, only slower. This approach
  456.          is taken by the public domain EM87 emulator and the commercial
  457.          Franke387 emulator, for example. Even programs that require a
  458.          coprocessor to run like AutoCAD are 'fooled' to believe that
  459.          a coprocessor is present with emulators using INT 7.
  460.  
  461.          The size of the emulator used by TP 6.0 is about 9.5 kB, EM87
  462.          occupies about 15.8 kB as a TSR, and Franke387 uses about 13.4 kByte
  463.          as a device driver. Note that Franke387 and especially EM87 model
  464.          a real coprocessor much more closely than Turbo Pascal's emulator
  465.          does. In particular, EM87 supports denormal numbers, precision
  466.          control, and rounding control. The emulator in TP 6.0 does not
  467.          implement these features. The version of Franke387 tested (V2.4)
  468.          supports denormals in single and double precision, but not
  469.          double extended precision. It supports precision control, but
  470.          not rounding control. Intel's E80287 is supposed to be an 100%
  471.          exact emulation of the 80287 coprocessor [44]. Generally, the
  472.          more closely a real coprocessor is modelled by the emulator,
  473.          the slower does the emulator run and the larger the code for the
  474.          emulator gets.
  475.  
  476.  
  477.          Relative execution times of coprocessor vs. software emulators
  478.          for particular coprocessor instructions
  479.  
  480.                         Intel 387DX    TP 6.0 Emulator   EM87 Emulator
  481.  
  482.          FADD ST, ST(0)       1              26                104
  483.          FDIV [DWord]         1              22                136
  484.          FXAM                 1              10                 73
  485.          FYL2X                1              33                102
  486.          FPATAN               1              36                110
  487.          F2XM1                1              38                110
  488.  
  489.  
  490.          The following table is an excerpt from [44]:
  491.  
  492.                         Intel 80287  Intel E80287 Emulator
  493.  
  494.          FADD ST, ST(0)       1              42
  495.          FDIV [DWord]         1             266
  496.          FXAM                 1             139
  497.          FYL2X                1              99
  498.          FPATAN               1             153
  499.          F2XM1                1              41
  500.  
  501.  
  502.  
  503.          The following has been adapted from [43] and merged with my own
  504.          data:
  505.  
  506.                         Intel 8087  TP 6.0 Emul. (8086)  Intel Emul. (8086)
  507.  
  508.          FADD ST, ST(0)       1              20                 94
  509.          FDIV [DWord]         1              22                 82
  510.          FPTAN                1              18                144
  511.          F2XM1                1               6                171
  512.          FSQRT                1              44                544
  513.  
  514.  
  515.  
  516.          One of the reasons emulators are so slow is that they are
  517.          often designed to run with every CPU from the 8086/8088 on.
  518.          This is the case with the emulators built into the compiler
  519.          libraries of the Turbo Pascal 6.0 (also used by Turbo C/C++)
  520.          and Microsoft C 6.0 compiler (probably also used in other
  521.          Microsoft products) and is also true for the EM87 emulator
  522.          in the public domain. By using code that can run on a 8086/8088,
  523.          these emulators forego the speed advantage offered by the
  524.          additional instructions and architectureal enhancements (such
  525.          as 32-bit registers) of the more advanced Intel 80x86 processors.
  526.          A notable exception is the Franke387 emulator, a commercial
  527.          emulator that is also sold as shareware. It uses 386 specific
  528.          32-bit code and only runs on 386/386SX computers.
  529.  
  530.          Besides being slow, coprocessor emulators have other drawbacks
  531.          compared with real coprocessors. Most of the emulators do not
  532.          support the additional instructions that the 387 compatible
  533.          coprocessors offer over the 80287. Often, some of the low-level
  534.          stack-manipulating instructions like FDECSTP are not emulated.
  535.          For example, [76] lists the coprocessor instructions not emulated
  536.          by Microsoft's emulator (included in the MS-C and MS-Fortran
  537.          libraries) as follows:
  538.          FCOS         FRSTOR      FSINCOS      FXTRACT
  539.          FDECSTP      FSAVE       FUCOM
  540.          FINCSTP      FSETPM      FUCOMP
  541.          FPREM1       FSIN        FUCOMPP
  542.          Often, some parts of the coprocessor architecture, like the status
  543.          register, are not or only partially emulated. Some emulators do not
  544.          conform to the IEEE-754 standard in their implementation of the basic
  545.          arithmetic functions, while the coprocessors do. Also, they sometimes
  546.          lack the support for denormals (a special class of floating point
  547.          numbers) although it is required by the standard. Not all the 80x87
  548.          emulators support rounding control and precision control (features
  549.          required by IEEE-754). Most of the omissions are aimed at making
  550.          the emulator faster and smaller. Because of the shortcomings of
  551.          coprocessor emulators, a real coprocessor is a must for anybody
  552.          planning to do some serious computations. At todays prices, this
  553.          shouldn't pose much of a problem to anybody.
  554.  
  555.          Nhuan Doduc (ndoduc@framentec.fr) has tested a number of standalone
  556.          coprocessor emulators for PCs, among them the two emulators, EM87
  557.          and Franke387 V2.4, already mentioned. He found Franke387 to be the
  558.          best in terms of reliablity, speed, and accuracy.
  559.  
  560.  
  561.  
  562.          Available coprocessors, CPU+FPU as of 08-10-92:
  563.  
  564.  
  565.          Intel 8087     [43] was the first coprocessor that Intel brought
  566.                         out for the 80x86 family. It was introduced in 1980
  567.                         and therefore does not have full compatibility with
  568.                         the IEEE-754 standard for floating point arithmetic,
  569.                         which was finally released in 1985. It complements
  570.                         the 8088 and 8086 CPUs and can also be interfaced
  571.                         to the 80188 and 80186 processors. It comes in a
  572.                         40 pin CERDIP (ceramic dual inline package). It
  573.                         is available in 5 MHz, 8 Mhz (8087-2), and 10 MHz
  574.                         (8087-1) versions. The 8087 is implemented using
  575.                         NMOS. Power consumption is rated at max. 2400 mW [42].
  576.                         A neat trick to enhance the processing power of the
  577.                         8087 for computations that use only the basic
  578.                         arithmetic operations (+,-,*,/) and do not require
  579.                         high precision is to set the precision control to
  580.                         single precision. This gives one a performance
  581.                         increase of up to 20%. For details about programming
  582.                         the precision control, see program PCtrl in appendix A.
  583.          Intel 80187    is a rather new coprocessor designed to support the
  584.                         80C186 embedded controller. It was introduced in 1989
  585.                         and implements the complete 80387 instruction set.
  586.                         It is available in a 40 pin CERDIP (ceramic dual
  587.                         inline package) and a 44 pin PLCC (plastic leaded
  588.                         chip carrier) for 12.5 and 16 MHz operation. Power
  589.                         consumption is rated at max. 675 mW for the
  590.                         12.5 MHz version and max. 780 mW for the 16 MHz
  591.                         version [37].
  592.          Intel 80287    [44] is the original Intel coprocessor for the 80286
  593.                         and was introduced in 1983. It uses the same execution
  594.                         unit as the 8087 and therefore has the same speed
  595.                         (sometimes slower due to additional overhead in CPU
  596.                         coprocessor communication). As the 8087, it does not
  597.                         provide full compatibility with the IEEE-754 floating
  598.                         point standard released in 1985. It was manufactured
  599.                         in NMOS technology. There are 6 MHz, 8 MHz, and 10
  600.                         MHz versions. The chip comes in a 40 pin CERDIP
  601.                         (ceramic dual inline package). Power consumption can
  602.                         be estimated to be the same as that for the 8087,
  603.                         which is max. 2400 mW. The 80287 has been replaced
  604.                         in the Intel 80x87 family with its successor, the
  605.                         Intel 287XL, which has been introduced in 1990. The
  606.                         287XL is done in CMOS. It is based on the 387 core
  607.                         and therefore much faster than the 80287. There may
  608.                         still be a few of the old 80287 chips on the market
  609.                         though.
  610.          Intel 80287XL  is the second generation 287 introduced by Intel
  611.                         in 1990. Since it is based on the 387 core, it
  612.                         features full IEEE 754 compatibility and faster
  613.                         execution of coprocessor instructions. Intel claims
  614.                         about 50% faster operation than the 80287 for typical
  615.                         benchmark test such as Whetstone [45]. Comparison
  616.                         with benchmark results for the AMD 80C287, which is
  617.                         identical to the Intel 80287, support this claim [1].
  618.                         The Intel 287XL performed 66% faster than the AMD
  619.                         80C287 on the fractal benchmark and 66% faster on
  620.                         the Whetstone benchmark in these tests. Whetstone
  621.                         results from [46] show the Intel 287XL at 12.5 MHz
  622.                         to perform 552 kWhets/sec as opposed to the AMD's
  623.                         80C287 289 kWhets/sec, a 91% performance increase.
  624.                         A benchmark using the MathPak program showed the
  625.                         Intel 287XL to be 59% faster than the Intel 80287
  626.                         (6.9 sec. vs. 11.0 sec.) [26]. Since the 287XL
  627.                         has all the additional instructions and enhancements
  628.                         of a 387, most software automatically identifies
  629.                         it as an 80387 compatible coprocessors and makes
  630.                         use of the extra features available like the FSIN
  631.                         and FCOS instructions. The 287XL is done in CMOS
  632.                         and therefore uses less power than the older 80287,
  633.                         which was done in NMOS. The 287XL is rated for
  634.                         speeds of up to 12.5 MHz. At 12.5 MHz, the power
  635.                         consumption is rated at max. 675 mW, about 1/4 of
  636.                         the 80287 power consumption. The 287XL comes in
  637.                         either a 40 pin CERDIP (ceramic dual inline package)
  638.                         or a 44 pin PLCC (plastic leaded chip carrier). The
  639.                         latter version is called the 287XLT and intended
  640.                         mainly for laptop use.
  641.          AMD 80C287     is an exact clone of the old Intel 80287 that was
  642.                         brought to market by AMD in 1989. It contains the
  643.                         original microcode of the 80287 and is therefore
  644.                         100% compatible with this chip. However, as the name
  645.                         indicates, the 80C287 is manufactured in CMOS and
  646.                         therefore uses less power than an equivalent Intel
  647.                         80287. At 12.5 Mhz, its power consumption is rated
  648.                         at max. 625 mW or slightly less than that of the
  649.                         Intel 80287XL [27]. There is also another version
  650.                         called AMD 80EC287 that uses an 'intelligent' power
  651.                         save feature to reduce the power consumption below
  652.                         80C287 levels. Tests at 10.7 MHz show typical power
  653.                         consumption for the 80EC287 to be at 30mW, compared
  654.                         to 150 mW for the AMD 80C287, 300 mW for the Intel
  655.                         287XL and 1500 mW for the Intel 80287 [57]. The
  656.                         80EC287 is therefore ideally suited for low power
  657.                         laptop systems. The AMD 80C287 is available in speeds
  658.                         of 10, 12, and 16 MHz. I have only seen it being
  659.                         offered in 10 MHz and 12 MHz versions though. At
  660.                         about US$ 50, it is the cheapest coprocessor available.
  661.                         Note that it provides less performance than the
  662.                         newer Intel 287XL (see above for details). The AMD
  663.                         80C287 is available in 40 pin ceramic and plastic
  664.                         DIPs (dual inline package) and as 44 pin PLCC
  665.                         (plastic leaded chip carrier). Due to recent legal
  666.                         battles with Intel over the right to use the 287
  667.                         microcode, which AMD lost, AMD may have to discontinue
  668.                         this product (disclaimer: I am not a legal expert).
  669.          Cyrix 82S87    was developed from the Cyrix 83D87, Cyrix' 387 'clone'
  670.                         and has been available since 1991. It implements the
  671.                         full 387 instruction set. It totally complies with
  672.                         the IEEE-754 standard for floating point arithmetic
  673.                         and features nearly total compatibility with Intel's
  674.                         coprocessors. It implements the transcendental
  675.                         functions with the same degree of accuracy and the
  676.                         superior speed of the Cyrix 83D87. This makes the
  677.                         Cyrix 82S87 the fastest [1] and most accurate 287
  678.                         compatible coprocessor available. Documentation by
  679.                         Cyrix [46] rates the 82S87 at 730 kWhets/sec for a
  680.                         12.5 MHz system, while the Intel 287XL performs only
  681.                         552 kWhets/sec. 82S87 chips sold after about August
  682.                         1992 use the internals of the Cyrix 387+, which
  683.                         succeeds the original 83D87 [73]. The 82S87 is a
  684.                         fully static CMOS design with very low power
  685.                         requirements that can run at speeds of 6 to 20 MHz.
  686.                         Cyrix documentation shows the 82S87 to consume about
  687.                         the same amount of power as the AMD 80C287 (see above).
  688.                         The 82S87 comes in a 40 pin DIP or a 44 pin PLCC
  689.                         (plastic leaded chip carrier) compatible with the
  690.                         pinout of the Intel 287XLT and ideally suited for
  691.                         laptop use.
  692.          IIT 2C87       was the first 287 clone available. It was introduced
  693.                         to the market in 1989. It has about the same speed
  694.                         as the Intel 287XL [1]. The 2C87 implements the
  695.                         full 387 instruction set [38]. Tests I ran on the
  696.                         3C87 seem to indicate that it is not fully compatible
  697.                         with the IEEE-754 standard for floating-point
  698.                         arithmetic (see below for details), so it can be
  699.                         assumed that the 2C87 also fails these test as it
  700.                         presumably uses the same core as the 3C87. The IIT
  701.                         2C87 provides extra functions not available on any
  702.                         other 287 chip [38]. It has 24 user accessible
  703.                         floating-point registers organized into three register
  704.                         banks. Additional instructions (FSBP0, FSBP1, FSBP2)
  705.                         allow switching from one bank to another. Transfers
  706.                         between registers in different banks are not
  707.                         supported however, so this feature by itself
  708.                         is of limited usefulness. Also there seems to
  709.                         be only one status register (containing the
  710.                         stack top pointer), so it has to be manually
  711.                         loaded and stored when switching between banks
  712.                         with a different number of registers in use [40].
  713.                         The register bank's main purpose is to aid the
  714.                         fourth additional instruction the 2C87 has
  715.                         (F4X4), which does a full multiply of a 4x4 matrix
  716.                         by a 4x1 vector, an operation common in 3D graphics
  717.                         applications [39]. The built-in matrix multiply
  718.                         speeds this operations up by a factor of 6 to 8
  719.                         compared with a programmed solution according to
  720.                         the manufacturer [38]. Tests show the speed-up
  721.                         to be indeed in this range [40]. For the 3C87, I
  722.                         measured the execution time of F4X4 to be about
  723.                         280 clock cycles, the execution time on the 2C87
  724.                         should be somewhat bigger. I estimate it to be
  725.                         around 310 clock cycles due to the higher CPU-NDP
  726.                         communication overhead in instruction execution in
  727.                         286/287 systems (~45-50 clock cycles) compared with
  728.                         386/387 systems (~16-20 clock cycles). As useful as
  729.                         the F4X4 instruction may seem, there are only very
  730.                         few applications that make use of this feature if
  731.                         a IIT coprocessor is detected at run time, among
  732.                         them Schroff Development's Silver Screen and
  733.                         Evolution Computing's Fast-CAD 3-D [25]. The 2C87
  734.                         is available for speeds of up to 20 MHz. It is
  735.                         implemented in an advanced CMOS process and has
  736.                         therefore a low power consumption of typically
  737.                         about 500 mW [38].
  738.          Intel 387      was the first generation of coprocessors for the
  739.                         Intel 386. It was introduced in 1986, about one
  740.                         year after introduction of the 80386. Early 386
  741.                         system were therefore equipped with a 80287 and a
  742.                         80387 socket. The 80386 works together with the
  743.                         80287 but the numerical performance is hardly
  744.                         adequate for such a system. The 80387 has since
  745.                         been superseeded by the Intel 387DX introduced
  746.                         by a quiet change in 1990. You might find it
  747.                         when aquiring an old 386 machine, though. The
  748.                         80387 is about 20% slower than the newer 387DX
  749.                         (see the paragraph below for detailed information).
  750.                         Like the other 387 coprocessors, the 80387 is packaged
  751.                         in a 68-pin ceramic PGA. The Intel 80387 is
  752.                         manufactured using Intel's older 1.5 micron CHMOS
  753.                         III technology that has moderate power requirements.
  754.                         Power consumption at 16 MHz is max. 1250 mW (750 mW
  755.                         typical), at 20 MHz it is max. 1550 mW (950 mW
  756.                         typical), and at 25 MHz it is max. 1950 mW (1250 mW
  757.                         typical) [60].
  758.          Intel 387DX    is the second generation Intel 387 that was quietly
  759.                         introduced in 1989. This version is done in a more
  760.                         advanced CMOS process than the 80387 that enables
  761.                         the coprocessor to run at a maximum frequency of 33
  762.                         MHz, while the 80387 had a maximum frequency of 25 MHz.
  763.                         The 387DX is about 20% faster than the 80387 on the
  764.                         average for the same clock frequency. For a 386/387
  765.                         system operating at 29 MHz the Whetstone benchmark
  766.                         compiled with the highly optimizing Metaware High-C
  767.                         V1.6 runs at 2377 kWhetstones/sec for the 80387 and
  768.                         at 2693 kWhetstones/sec for the 387DX, a 13% increase.
  769.                         In a fractal calculation programmed in assembly
  770.                         language, the 387DX performance was 28% higher than
  771.                         the performance of the 80387. The transcendental
  772.                         functions have also sped up from the 80387 to the
  773.                         387DX. In the Savage benchmark compiled with the
  774.                         Metaware High-C V1.6 optimizing compiler and running
  775.                         on a 29 MHz system, the 80387 evaluated 77600 function
  776.                         calls/second, while the 387DX evaluated 97800 function
  777.                         calls/second, a 26% increase [7]. Some instructions
  778.                         have been sped up a lot more more than the average
  779.                         20%. For example the FBSTP instruction has been sped
  780.                         up by a factor of 3.64. The Intel 387DX (and its
  781.                         predecessor 80387) are the only 387 coprocessors
  782.                         that support asynchronous operation of CPU and NDP.
  783.                         The 387 consists of a bus interface unit and a
  784.                         numerical execution unit. The bus interface unit
  785.                         always runs at the speed of the CPU clock (CPUCLK2).
  786.                         If the CKM (ClocK Mode) pin of the 387 is strapped
  787.                         to Vcc, the numerical execution unit runs at the
  788.                         same speed as the bus interface unit. If CKM is tied
  789.                         to ground, the numerical execution unit runs at the
  790.                         speed provided by the NUMCLK2 input. The ratio of
  791.                         NUMCLK2 (coprocessor clock) to CPUCLK2 (CPU clock)
  792.                         must lie within the range 10:16 to 14:10. For example,
  793.                         for a 20 MHz 386, the Intel 387DX could be clocked
  794.                         from 12.5 MHz to 28 MHz via the NUMCLK2 input. On
  795.                         the Cyrix 83D87, Cyrix 387+, ULSI 83C87, and the IIT
  796.                         387, the CKM pin is not connected. These coprocessors
  797.                         always run at the speed of the CPU. The Intel 387DX
  798.                         is manufactured using Intel's advanced low power
  799.                         CHMOS IV technology. Power consumption at 20 MHz is
  800.                         max. 900 mW (525 mW typical), at 25 MHz it is max.
  801.                         1050 mW (625 mW typical), and at 33 MHz it is 1250
  802.                         mW (750mW typical) [59].
  803.          Intel 387SX    is the coprocessor for the Intel 386SX. The 386SX is
  804.                         an Intel 386 with a 16-bit data path. This reduces
  805.                         somewhat the costs to build a complete system as
  806.                         compared to a full 32-bit design required by the
  807.                         80386DX. The 386SX main purpose was to replace the
  808.                         80286 CPU, which Intel subsequently stopped producing.
  809.                         Due to the 16-bit data path, the 386SX is slower than
  810.                         the 386DX and offers about the same speed as a 80286
  811.                         at the same clock frequency for 16-bit applications.
  812.                         As the 386SX is a complete 80386, it offers also the
  813.                         possibility to run 32-bit applications and supports
  814.                         the virtual 8086 mode used for example by Windows'
  815.                         enhanced mode. The 387SX has all the features the
  816.                         Intel 387DX offers, including the ability for
  817.                         asynchronous operation of CPU and coprocessor
  818.                         (see the above paragraph on the Intel 387DX for
  819.                         details). Due to the 16 bit data path between the
  820.                         CPU and the coprocessor, the 387SX is a bit slower
  821.                         than a 387DX operating at the same frequency. The
  822.                         387SX comes in a 68-pin PLCC (pastic leaded chip
  823.                         carrier) package and is available in 16 Mhz and 20
  824.                         MHz versions. Coprocessors for faster 386SX systems
  825.                         based on the Am386SX CPU are available from IIT,
  826.                         Cyrix, and ULSI. Power consumption for the 387SX
  827.                         at 16 MHz is max. 1250 mW (740 mW typical), for
  828.                         the 20 MHz version it is max. 1500 mW (1000 mW
  829.                         typical) [62].
  830.          IIT 3C87       came out in 1989 at about the same time as the
  831.                         Cyrix 83D87. Both coprocessors are faster than
  832.                         Intel's 387DX coprocessor. Tests I ran with the
  833.                         IEEETEST program show that the 3C87 is not fully
  834.                         compatible with the IEEE-754 standard for
  835.                         floating-point arithmetic although the manufacturer
  836.                         claims differently. It is well possible that the
  837.                         reported errors are due to personal interpretations
  838.                         of the standard by the program's author that have
  839.                         been incorporated into IEEETEST and that the
  840.                         standard also supports the different interpretation
  841.                         chosen by IIT. On the other hand, the IEEE test
  842.                         vectors incorporated into IEEETEST have become
  843.                         somewhat of an industry standard [66] and Intel's
  844.                         387, 486, and RapidCAD chips pass the test without
  845.                         a single failure, so the fact that the IIT 3C87
  846.                         fails some of the tests indicates that it is not
  847.                         fully compatible with the Intel 387 coprocessor.
  848.                         My tests also show that the IIT 3C87 does not
  849.                         support denormals for the double extended format.
  850.                         It is not entirely clear wether the IEEE standard
  851.                         mandates support for extended precision denormals,
  852.                         as the IEEE-754 document explicitly only mentions
  853.                         single and double precision denormals. Missing
  854.                         support for denormals is not a critical issue with
  855.                         most applications but there are some programs for
  856.                         which support of denormals is quite helpful, if not
  857.                         important [41]. Anyhow, failure of the 3C87 to
  858.                         support extended precision denormal numbers is an
  859.                         incompatibility with the Intel 387 and 486. The 3C87
  860.                         provides extra functions not available on any other
  861.                         387 chip [38]. It has 24 user accessible floating-point
  862.                         registers organized into three register banks.
  863.                         Additional instructions (FSBP0, FSBP1, FSBP2)
  864.                         allow switching from one bank to another. Transfers
  865.                         between registers in different banks are not
  866.                         supported however, so this feature by itself
  867.                         is of limited usefulness. Also there seems to
  868.                         be only one status register (containing the
  869.                         stack top pointer), so it has to be manually
  870.                         loaded and stored when switching between banks
  871.                         with a different number of registers in use [40].
  872.                         The register banks main purpose is to aid the
  873.                         fourth additional instruction the 3C87 has
  874.                         (F4X4), which does a full multiply of a 4x4 matrix
  875.                         by a 4x1 vector, an operation common in 3D graphics
  876.                         applications [39]. I measured this instruction to
  877.                         execute in about 280 clock cycles, during which
  878.                         time it executes 16 multiplications and 12 additions.
  879.                         The built-in matrix multiply speeds the matrix by
  880.                         vector multiply up by a factor of 3 compared
  881.                         with a programmed solution according to IIT [39].
  882.                         The results for my own TRNSFORM benchmark support
  883.                         this claim (see results below), showing a performance
  884.                         increase by a factor of about 2.5. This makes
  885.                         matrix multiplies on the IIT 3C87 nearly as fast as
  886.                         on an Intel 486 at the same clock frequency. However,
  887.                         there are only very few applications that make use
  888.                         of this feature if a IIT 3C87 is detected at run time,
  889.                         among them Schroff Development's Silver Screen and
  890.                         Evolution Computing's Fast-CAD 3-D [25]. Like the
  891.                         387 'clones' from Cyrix and ULSI, the 3C87 does not
  892.                         support asynchronous operation of the CPU and the
  893.                         coprocessor. The 3C87 always runs at the full speed
  894.                         of the CPU. The 3C87 is implemented in an advanced
  895.                         CMOS process and has low power requirements of
  896.                         typically about 600 mW. It is available in 16, 20,
  897.                         25, 33, and 40 MHz versions.
  898.          IIT 3C87SX     is the version of the IIT 3C87 that is intended for
  899.                         use with Intel's 386SX or AMD's Am386SX CPU. It is
  900.                         functionally equivalent to the IIT3C87. Due to the
  901.                         16-bit data path between the CPU and the coprocessor
  902.                         in a 386SX based system, coprocessor instructions
  903.                         will execute somewhat slower than on the 3C87. The
  904.                         IIT 3C87SX is the only 387SX coprocessor that is
  905.                         offered at speeds of 16, 20, 25, and 33 MHz right
  906.                         now. I have read that Cyrix has also annouced a
  907.                         83S87-33, but haven't seen it being offered yet.
  908.                         The 3C87SX is packaged in a 68-pin PLCC.
  909.          Cyrix 83D87    was introduced in 1989, only shortly after the
  910.                         coprocessors from IIT. It has been the fastest
  911.                         387 compatible coprocessor in several benchmark
  912.                         comparisons [1,7,68,69]. It also came out as the
  913.                         fastest coprocessor in my own tests (see benchmark
  914.                         results below). Although the Cyrix 83D87 provides
  915.                         up to 50% more performance than the Intel 387DX
  916.                         in benchmarks comparisons, the speed advantage
  917.                         over other 387 compatible coprocessors in real
  918.                         applications is usually much smaller. For example,
  919.                         in a test using the program 3D-Studio, the Cyrix
  920.                         83D87 was 6% faster than the Intel 387DX [1].
  921.                         Besides being the fastest 387 coprocessor, the
  922.                         83D87 also offers the most accurate transcendental
  923.                         functions results of all coprocessors tested (see
  924.                         test results below). The new version of the 83D87,
  925.                         which is sold as 387+ in Europe, even surpasses
  926.                         the level of accuracy of the original 83D87 design.
  927.                         Unlike Intel's coprocessors, which use the CORDIC
  928.                         [18,19] algorithm to compute the transcendental
  929.                         functions, Cyrix uses polynomial and rational
  930.                         approximations to the functions. In the past the
  931.                         CORDIC method has been popular since it requires
  932.                         only shifts and adds which makes it easy to implement.
  933.                         It is also reasonably fast. Recently, the cost for
  934.                         the implementation for fast floating-point multipliers
  935.                         has dropped significantly due to the availablity of
  936.                         VLSI, making the use of polynomial and rational
  937.                         approximations superior to CORDIC for the generation
  938.                         of transcendental functions [61]. The Cyrix 83D87
  939.                         uses a fast array multiplier, making its transcendental
  940.                         functions faster than those of any other 387 compatible
  941.                         coprocessor. It also uses 75 bit for the mantissa
  942.                         in intermediate calculations (as opposed to 68 bits
  943.                         on other coprocessors), making its transcendental
  944.                         functions more accurate than those of any other
  945.                         coprocessor or FPU (see results below). The 83D87
  946.                         and its successor, the 387+ are the 387 'clones'
  947.                         with the highest degree of compatibility. There
  948.                         are only very few SW and HW incompatibilties with
  949.                         the Intel 387DX. These have been documented by
  950.                         Cyrix [12]. The software differences are caused
  951.                         by some bugs present in the 387DX that Cyrix fixed
  952.                         for the 83D87. Unlike the Intel 387DX, the 83D87
  953.                         (and all other 387 'clones' as well) does not support
  954.                         asynchronous operation of CPU and coprocessor. There
  955.                         have also been problems in the past with the CPU -
  956.                         coprocessor communication, causing the 83D87 to
  957.                         hang on some machines. The reason was that Cyrix
  958.                         shaved off a wait state in the communication protocol,
  959.                         which caused a communications breakdown between the
  960.                         CPU and the 83D87 for some systems running at 25 MHz
  961.                         or faster. One notable example of this behavior was
  962.                         the Intel 302 board. The problem is only rarely
  963.                         encountered with the current generation of 386
  964.                         motherboards. It is possible that the problem has
  965.                         been entirely eliminated in the 387+, the sucessor
  966.                         to the 83D87. To reduce power consumption the 83D87
  967.                         features advanced power saving features. Those
  968.                         portions of the coprocessor that are not needed
  969.                         are automatically shut down. If no coprocessor
  970.                         instructions are being executed, all parts except
  971.                         the bus interface unit are shut down [12]. Maximal
  972.                         power consumption of the Cyrix 83D87 at 33 MHz is
  973.                         1900 mW, typical power consumption at this clock
  974.                         frequency is 500 mW [15].
  975.