The Pentium processor had a minor error in the division algorithm. This error cost Intel $475 million to replace the faulty chips. I've tracked down the FDIV error to this circuit on the die:
The Pentium processor had a minor error in the division algorithm. This error cost Intel $475 million to replace the faulty chips. I've tracked down the FDIV error to this circuit on the die: 30 comments
@azonenberg The f00f bug is probably in microcode, so here's a random piece of the Pentium's microcode as it appears on the die :-) The circuit is a Programmable Logic Array (PLA) holding a lookup table for the floating-point division unit (FDIV). The circuit is a small part of the Pentium chip, visible in the lower right. This closeup of the PLA shows the individual transistors that define the contents of the lookup table. Five entries were missing from the table, causing very rare errors in division. @kenshirriff If the PLA bits are defined in the long thin structures on the right, I wonder if the missing bits are at the bottom? That section is suspiciously devoid of the various marks the rest of the structure has. Amazing find! @isonno Good eye to spot the unused entries at the bottom! Those aren't the missing entries, though. The mathematical table got encoded into Boolean equations, which are stored in the PLA. There is not easy mapping between the table and what you see on the die. In fact, the fixed Pentiums have *fewer* entries in the PLA due to the way the equations work out. @kenshirriff "Rare" is a bizarre phrasing (clearly one Intel liked to use). It's trivial to reproduce this a few million times a second and indeed, it was original found on a real-world application. @kenshirriff I am Pentium of borg. Division is futile. You will be approximated. @kenshirriff I remember that! Intel was very snooty about replacements. I got 'em to replace mine by pointing out that I was doing medical calculations that could determine whether a person needed surgery or not. @kenshirriff Does this mean the chip has hard-coded division results stored on it? Like 8/3 = 2.66666? @tito_swineflu The lookup table is more complicated than that. The Pentium uses the SRT division algorithm, which does division in base 4, but allows the quotient digits to be -2, -1, 0, 1, or 2. The lookup table determines the quotient digit from the first few bits of the divisor and dividend so you don't need to completely divide. The quotient digit may not be completely accurate, but the negative values let you correct that in the next digit. @kenshirriff several thoughts all at once: oh duh-doy, there it is!! LoL That is one fine feckin needle you got there in yer copper silicon haystack!! This is going to make a killer screen background. I love our world and that we have done this as a people. And last, "COOL!!" Is this the one from the 90s? I was at my first proper grown up job - as an accountant no less - I remember reading about this and going to my boss and telling him we HAD to check all the computers! We did engineering, we HAD to check! (There was some formula you could put into excel to check it.) He told me to knock myself out and go nuts. I checked all our computers (thankfully we were a tiny company) and I found multiple bad processors. @kenshirriff I mean, now that you look at it, it is kinda obvious :neocat_laugh_nervous: /j @kenshirriff I am certain that I have seen that very same diagram carved into an inside wall of an Aztec pyramid. @kenshirriff Minor as it may be: it was easy to create horribly wrong results and led to the urban slogan “Don't divide! Intel inside.” #pentiumbug @kenshirriff a friend of a friend worked for the company that Intel decided to not hire (again) to prove that their float math unit was correct. I can try to put you in touch if you are interested in the human side of things. @kenshirriff At first glance, I thought this was the map screen from the original Pokémon. @kenshirriff oh that looks like my cuircuit making module in factorio :grin: |
@kenshirriff Show us the f00f