Please disable your adblock and script blockers to view this page

Extracting ROM constants from the 8087 math coprocessor's die


IC
IBM
Intel

CORDIC
NMOS
CMOS
log10(2
(1
IEEE
Twitter
RSS
8086
8088
Intel
Wikipedia
PLA
JavaScript
ABBAABBAABBA
BCD
Post


8087

No matching tags

No matching tags

No matching tags


Xerox Alto
log102
ROM.14Computing
log2(3
FDLZ
FLD1
FLDPI
FLD2T


8087

Positivity     44.00%   
   Negativity   56.00%
The New York Times
SOURCE: http://www.righto.com/2020/05/extracting-rom-constants-from-8087-math.html
Write a review: Hacker News
Summary

By examining the chip closely, various constants can be read out of the chip's ROM, numbers such as pi that the chip uses in its calculations.Die of the Intel 8087 floating point unit chip, with main functional blocks labeled. which use shifts and adds of special constants for efficient computation.This post describes the ROM that holds constants (not to be confused with the larger, four-level microcode ROM.2) The constant ROM holds the constants (such as pi, ln(2), and sqrt(2)) that the 8087 needs for its computations. The photo below shows part of the constant ROM. The ROM consists of two columns of transistors, holding the bits. To explain how the ROM works, I'll start by explaining how a transistor works.Part of the constant ROM, with the metal layer removed. (The metal lines have been removed; the orange line shows the position of one.)A portion of the constant ROM. Bits are programmed into the ROM by changing the silicon doping pattern, creating transistors or leaving insulating regions. Thus, a value is read from the ROM by activating a select line, reading that ROM value onto the output lines.The constant ROM has 134 rows of 21 columns.5 The next issue is how to map the 134×21 grid of bits into values.6The chip's data path consists of 67 horizontal rows, so it seemed pretty clear that the 134 rows in the ROM corresponded to two sets of 67-bit constants. The bottom value is the constant 1.8Bit values labeled in the constant ROM. The last two groups of constants are used to compute transcendental functions using the CORDIC algorithm, which I will discuss next.The constants in the ROM reveal some details about the algorithms used by the 8087. To make the algorithm work, the atan constants are precomputed and stored in the constant ROM.14Computing the base-2 log and base-2 exponential also use CORDIC algorithms, with the associated logarithmic constants. By multiplying one side of the equation by the sequence of values, and adding the corresponding log constants to the other side, the log or exponential can be computed.15The 8087's support for transcendental functions is more limited than you might expect. It contains 42 constants in a ROM, and the values of these constants can be extracted under a microscope. Many of the constants are used for computing the tangent, arctangent, log, and power functions, using fast CORDIC algorithms.Die photo of the 8087 with the metal layer removed. It spawned the IEEE 754 floating-point standard used for most modern floating-point arithmetic, and the 8087's instructions remain a part of the x86 processors used in most computers.For more information on the 8087, see my other articles: the two-bit-per-transistor ROM and the substrate bias generator. ↩The 8087's microcode ROM is built with an unusual technique that stores two bits per transistor. ↩The ROM has 134 rows of 21 bits, except there is a 6×6 chunk missing from the upper left. Thus, the physical size is of the constant ROM is 2946 bits.The upper-left corner of the constant ROM, showing the missing 6×6 section.Because of the ROM layout, this missing section means that the first 12 constants are 64 bits long, rather than 67 bits. The following table summarizes the contents of the constant ROM. It's clear from the CORDIC constants that the values in the ROM are not physically stored in order, i.e. sequential rows are not addressed in order. Apart from 0, these constants can be found in the ROM. I'm a bit puzzled why the 8087 doesn't need the constant log2(1 + 2-1), which is used by that algorithm.

As said here by