Reverse-Engineering The Polynomial Constants In The Pentium’s FPU

Die photo of the Intel Pentium processor with the floating point constant ROM highlighted in red. (Credit: Ken Shirriff)
Die photo of the Intel Pentium processor with the floating point constant ROM highlighted in red. (Credit: Ken Shirriff)

Released in 1993, Intel’s Pentium processor was a marvel of technological progress. Its floating point unit (FPU) was a big improvement over its predecessors that still used the venerable CORDIC algorithm. In a recent blog post [Ken Shirriff] takes an up-close look at the FPU and associated ROMs in the Pentium die that enable its use of polynomials. Even with 3.1 million transistors, the Pentium die is still on a large enough process node that it can be readily analyzed with an optical microscope.

In the blog post, [Ken] shows how you can see the constants in each ROM section, with each bit set as either a transistor (‘1’) or no transistor (‘0’), making read-out very easy. The example looks at the constant of pi, which the Pentium’s FPU has stored as a version with no fewer than 67 significand bits along with its exponent.

Continue reading “Reverse-Engineering The Polynomial Constants In The Pentium’s FPU”

A Die-Level Look At The Pentium FDIV Bug

The early 1990s were an interesting time in the PC world, mainly because PCs were entering the zeitgeist for the first time. This was fueled in part by companies like Intel and AMD going head-to-head in the marketplace with massive ad campaigns to build brand recognition; remember “Intel Inside”?

In 1993, Intel was making some headway in that regard. The splashy launch of their new Pentium chip in 1993 was a huge event. Unfortunately an esoteric bug in the floating-point division module came to the public’s attention. [Ken Shirriff]’s excellent account of that kerfuffle goes into great detail about the discovery of the bug. The issue was discovered by [Dr. Thomas R. Nicely] as he searched for prime numbers. It’s a bit of an understatement to say this bug created a mess for Intel. The really interesting stuff is how the so-called FDIV bug, named after the floating-point division instruction affected, was actually executed in silicon.

We won’t presume to explain it better than [Professor Ken] does, but the gist is that floating-point division in the Pentium relied on a lookup table implemented in a programmable logic array on the chip. The bug was caused by five missing table entries, and [Ken] was able to find the corresponding PLA defects on a decapped Pentium. What’s more, his analysis suggests that Intel’s characterization of the bug as a transcription error is a bit misleading; the pattern of the missing entries in the lookup table is more consistent with a mathematical error in the program that generated the table.

The Pentium bug was a big deal at the time, and in some ways a master class on how not to handle a complex technical problem. To be fair, this was the first time something like this had happened on a global scale, so Intel didn’t really have a playbook to go by. [Ken]’s account of the bug and the dustup surrounding it is first-rate, and if you ever wanted to really understand how floating-point math works in silicon, this is one article you won’t want to miss.

Looking At Standard-Cell Design In The Pentium Processor

Die photo of the Intel Pentium processor with standard cells highlighted in red. The edges of the chip suffered some damage when I removed the metal layers. (Credit: Ken Shirriff)
Die photo of the Intel Pentium processor with standard cells highlighted in red. The edges of the chip suffered some damage when I removed the metal layers. (Credit: Ken Shirriff)

Whereas the CPUs and similar ASICs of the 1970s had their transistors laid out manually, with the move from LSI to VLSI, it became necessary to optimize the process of laying out the transistors and the metal interconnects between them. This resulted in the development of standard-cells: effectively batches of transistors with each a specific function that could be chained together. First simple and then more advanced auto-routing algorithms handled the placement and routing of these standard elements, leading to dies with easily recognizable structures under an optical microscope. Case in point an original (P54C) Intel Pentium, which [Ken Shirriff] took an in-depth look at.

Using a by now almost unimaginably large 600 nm process, the individual elements of these standard cells including their PMOS and NMOS components within the BiCMOS process can be readily identified and their structure reverse-engineered. What’s interesting about BiCMOS compared to CMOS is that the former allows for the use of bipolar junction transistors, which offer a range of speed, gain and output impedance advantages that are beneficial for some part of a CPU compared to CMOS. Over time BiCMOS’ advantages became less pronounced and was eventually abandoned.

All in all, this glimpse at the internals of a Pentium processor provides a fascinating snapshot of high-end Intel semiconductor prowess in the early 1990s.

(Top image: A D flip-flop in the Pentium. Credit: [Ken Shirriff] )

Weird Al’s Monster Battlestation Is Now Just A Reasonably Fast PC

Wanna be hackers? Code crackers? Slackers. If the vintage computing community ever chooses an official anthem, count my vote for It’s All About The Pentiums by “Weird Al” Yankovic. More than twenty years after its release, this track and its music video (with Drew Carey!) are still just as enjoyable as they ever were, with the track’s stinging barbs and computing references somehow only improving over time.

In the track, Weird Al takes on the role of ‘king of the nerds’ with his rock star-esque portrayal of a nameless personal computing legend, someone who de-fragments their hard drive “for thrills” and upgrades their system “at least twice a day”. The lyrics are a real goldmine for anyone that is a fan of 1990s computing, but what stands out to me is the absurd hardware that Weird Al’s character claims to own.

Absurd by 1990s standards, maybe. Not so much anymore. Even with the ongoing chip shortage and other logistic shortfalls, everyone now has the opportunity to start cruising cyberspace like Weird Al and truly become the “king of the spreadsheets”. However, would it have even been possible to reach these lofty computing goals at the time of the parody’s release? Let’s check out both of these threads.

Continue reading “Weird Al’s Monster Battlestation Is Now Just A Reasonably Fast PC”

Modern Linux Runs On Ancient Toshiba

While Microsoft no longer supports those of its operating systems that were in heavy use into the early 2000s, support for old hardware is not typically something that you will have to worry about if you run Linux on your machines. Sure, there will be driver issues from time to time, and you might have to do some things by hand, but if you’re using legacy hardware you’ll want a Linux distribution of some sort. Especially if you’re running it on one of the first laptops to ever feature a Pentium processor of any kind.

This is a Toshiba T4900CT which [MingcongBai] has been able to spruce up by installing a simplified version of the AOSC OS Linux distribution. The distribution is known for its simplified user interface, and this particular one runs a “Retro” command-line-only version. Upon startup (which takes over two minutes), the user can view the hardware and software specs: Linux kernel 4.19.67 (released within the past year) on a 75 MHz Intel processor.

Getting old equipment to work, even if the software is available, is a challenge and this one stands out for the historical noteworthiness of the laptop. We didn’t see it connect to the Internet, but if it ever does we still keep Retro Hackaday up specifically for situations like this.

Sushi Roll Helps Inspect Your CPU Internals

[Gamozolabs’] post about Sushi Roll — a research kernel for monitoring Intel CPU internals — is pretty long. While we were disappointed at the end that the kernel’s source is not exactly available due to “sensitive features”, we were so impressed with the description of the modern x86 architecture and some of the work done with Sushi Roll, that we just had to post it. If the post gets you wanting to actually try some of this, you can check out another [Gamozolabs] creation, Orange Slice.

While you probably know that a modern Intel CPU bears little resemblance to the old 8086 processor it emulates, it is surprising, sometimes, to realize just how far it has gone. The very first thing the CPU does is to break your instruction up into microoperations. The execution engine uses some sophisticated techniques for register renaming and scheduling that allow you to run instructions out of order and to run more than one instruction per clock cycle.

Continue reading “Sushi Roll Helps Inspect Your CPU Internals”

Intel Edison on a box

Running Golang On The Intel Edison

While most embedded development is still done in C and/or assembly, some people are working with more modern languages. The team over at Gobot has successfully managed to get Go running on the Intel Edison.

The Go programming language, which has been around for about five years, compiles to machine code like C. It has a number of modern features including concurrency, garbage collection, and packages.

We’ve looked at the Edison on Hackaday before, and even took a detailed look at the hardware. It features a Quark SoC, Bluetooth, and WiFi, which makes it well suited for connected devices.

Getting Go to work on the Edison hardware wasn’t particularly difficult, since it supports the Pentium instruction set and MMX. However, a library was needed to interface with the Edison’s peripherals. The Gobot team whipped up gobot-intel-iot, which makes it easy to work with GPIO, I2C, and PWM.

After the break, the team demos PWM on the Edison using Go.
Continue reading “Running Golang On The Intel Edison”