226 points · by ingve · 8y ago · 73 comments
https://en.wikipedia.org/wiki/Multi-level_cell#Multi-level_c...
"For example the Intel 8087 used two-bits-per-cell technology, and in 1980 was one of the first devices on the market to use multi-level ROM cells.[9][10]"
...and indeed I thought this article would have a mention of it. Certainly interested in any more exploration you can do about that.
The 80-bit format has an explicit 1, unlike the normal IEEE float and double.
The chip has BCD support.
There was that idea that the OS would emulate an infinite FP stack via an exception handler.
There was that idea that the OS would emulate more exponent bits via an exception handler messing with the exponents.
The exceptions for imprecise results seem so useless.
We got an 80-bit format, but no 16-bit or 128-bit format. Don't we like powers of two?
> The 80-bit format has an explicit 1, unlike the normal IEEE float and double.
Apparently the explicit 1 made the hardware much simpler, and with 80 bits it doesn't cost you much to have an explicit 1.
(To explain for others: in the normal float format, the first bit of the mantissa is assumed to be a 1, so this bit is not explicitly stored. This gains you a "free" bit of precision. But then you needs special handling for zero and denormalized numbers because the first bit isn't a 1. The 8087 stores numbers internally using the 80 bit format for increased accuracy. The 80 bit format stores the first bit explicitly, whether it is a 0 or 1.)
> The chip has BCD support.
BCD was a big thing in the 1970s; look at all the effort in the 6502 for BCD support, for instance. My hypothesis is that cheap memory killed off the benefit of packing two digits in a byte.
> We got an 80-bit format, but no 16-bit or 128-bit format.
They did a lot of mathematical analysis to decide that 80 bits for the internal number format would result in accurate 64 bit results. Something about losing lots of bits of accuracy during exponentiation, so you want extra bits the size of the exponent.
> Don't we like powers of two?
Looking at old computers has shown me that word sizes that are powers of two are really just a custom, not a necessity. In the olden days, if your missile needed 19 bits of accuracy to hit its target, you'd build a computer with 19 bit words. And if your instruction set fit in 11 bits, you'd use 11 bit instructions. Using bytes and larger powers of two for words became popular after Stretch and the IBM 360, but other sizes work just fine.
I'm not sure if it was the reason, but 80-bit intermediate values lets you compute pow(x,y) as exp(y*log(x)) to full precision for the full range of 64-bit floats.
So if your data comes from humans and ends up with humans, and in between you have less than a couple hundred calculations, your program is more efficient with BCD, because you don't have to do a dog-slow repeated long division by 0xa to convert to decimal at the end. Somewhere around 1970, this ceased to actually be a big enough inefficiency to matter, but tradition and backward-combatibility kept BCD hardware alive for another 10 or 20 years.
In my limited understanding, there are a variety of approaches to storing decimal numbers exactly. Some of the newer ones are apparently less likely to lead to errors in representation but are more computationally intensive than BCD.
Circa 1980 having BCD support was not seen as insane. Most IBM systems had BCD support (due to the use of BCD for money computations where the different round-off issues with binary vs base-10 are not well tolerated [1]), in fact, even the lowly 6502 (Apple II, Atari, Commodore systems) had BCD support.
The computing world had not yet coalesced around base-2 binary math at the most common one to utilize, so at that time in the past what would have been likely seen as "insane" would have to have not had BCD support. This is also at the tail end of the time frame where one could still find systems with 15-bit bytes and a whole host of other "differences" from what the computing world of today looks like.
[1] https://en.wikipedia.org/wiki/Binary-coded_decimal#Advantage...
As you say, by the time the 8087 came out you were starting to see some increasing standardization in computer designs (even if systems from different vendors were still incompatible). On the other hand, you still had MPPs, vector supercomputers, Lisp machines, and a bunch of different mainframe designs.
[1] ftp://public.dhe.ibm.com/eserver/zseries/zos/racf/pdf/ny_naspa_2017_10_z14_overview.pdf
Also this was still early days: up until this point, fast floating point was the domain of much more expensive machines. No one had any idea what would be useful in consumer level hardware.
What did they use microcode for in the 8087?
How were the functional units on the die arranged? It looks like that column above and to the right of the "8087" logo could be a shifter.
How many metal layers under the transistors are there for routing around the die?
The functional units are arranged with the 64-bit mantissa datapath at the bottom and the 16-bit exponent on top. The mantissa functional units have the constants at the left, then the bidirectional shifter, then the ALU, then a 2-bit and 1-bit shifter (for multiplication, etc), then three temporary registers, then register buffers and finally the 8 stack registers. The most significant bit is at the bottom. (Which is backwards to how it is stored with the most significant bit next to the exponent.)
You are correct that above the 8087 logo (to the left and a fair bit to the right) is a shifter. Above is a 0-8 bit shifter and to the right is 0/8/16/.../64 bit shifter. Combined, they allow any bit shift. It's bidirectional (with buffers/drivers on both sides), so you put the bits through one way to shift left and the other way to shift right. (Shifting is a big part of floating point. For instance, to add or subtract, you need to shift the numbers so the decimal points line up. And then you need to shift the results to be normalized.)
As far as layers: The bottom is silicon and doped silicon. The polysilicon for wiring / gates is above. On top is a single layer of metal. The metal and polysilicon are used for routing. Typically metal is mostly vertical and polysilicon is mostly horizontal or vice versa, but there are lots of exceptions. Metal is preferred for long routes (and power) because it has much lower resistance.
Wait, really? I'm used to seeing mux circuits like the following, which incur a wee bit of gate delay per stage.
http://www.vlsitechnology.org/html/cells/vsclib013/mxi2.html http://www.vlsitechnology.org/html/cells/vsclib013/mxn2.html
For example, if arithmetic operations are fairly objective, why is microcode needed in between the processor logic and the user-facing pinouts? Or is the microcode not adjustable firmware, but rather a fixed set of routing options to engage components appropriately for a given operation?
As far as the microcode, I'm not sure I understand your question. The microcode is fixed firmware, stepping the 8087 through the procedure for complex operations such as logarithm. Essentially, the microcode has mini-programs that the 8087 runs to perform its functions. I'm still researching how the microcode is actually implemented.
Likewise, the constants log2(1+2^(-2)), ..., log2(1+2^(-15)) are used for logarithm and exponentiation.
https://en.wikipedia.org/wiki/CORDIC
Edit: the constant ROM is the vertical stripe in the lower left in the die photo. You can see each bit in the ROM as a green or purple rectangle: https://lh3.googleusercontent.com/-7S_Q0bzu-7A/W3RDsZwprvI/A...
https://nbickford.wordpress.com/2011/04/03/the-minsky-circle...
(Previously also discussed here at https://news.ycombinator.com/item?id=15266331 )
I'd not ever looked into it, but that neatly explains the existence of the sincos instruction.
If you could over the 8008 and 4004 that'd be awesome :D
There's a bunch of stuff on the 4004 at 4004.com
EDIT: Oh, I'm thinking of the new 8086k. Never mind.
Modern chips are obviously far more complicated than that though.
https://www.edx.org/course/computation-structures-2-computer...
The course starts with making analog transistors and tweaking them into handling digital data. Then making gates and combining them into state machines and ALUs and slowly putting together the pieces of a full CPU.
The last third is adding caches, pipelining, virtual memory, multiprocessing, etc. It's useful too.
Computer Organization and Design by Hennessy and Patterson used to be a standard, if not the standard. The 4th edition is 7 years old now, but if an article about the 8087 caught your eye...
>"The transistor can be viewed as a switch, allowing current to flow between two diffusion regions called the source and drain. The transistor is controlled by the gate, made of a special type of silicon called polysilicon. A high signal voltage on the gate lets current flow between the source and drain, while a low signal voltage blocks current flow."
If current flows from the source to the drain, is the source terminal hardwired to the power rail and always receiving some nominal voltage? Also does the voltage applied to the gate in order to turn the switch on come from the drain of a neighboring transistor? Basically wired in a series?
I always see MOSFET transistors depicted in isolation and then the conventional logic gate shapes used when depicting specific circuits like adder, mux etc. I find it tough to visualize how the gate, source and drain terminals in transistors as they are depicted in this picture physically interconnect to form the logic gate. Is there a separate metal layer for each of source, gate, drain and ground?
Look at the diagram of an inverter in the article, and it should make it clearer how gates are constructed. A NOR gate is similar to the inverter, but with two input transistors in parallel, so either one can pull the output low. A NAND gate has two input transistors in series, so they must both be on to pull the output low.
There's a single metal layer in the 8087 (but many metal layers in modern chips). The transistor can be wired however works best for the layout, with polysilicon or metal. If a transistor's source is connected to a neighboring drain, the silicon regions can just be merged and no wiring is needed.
https://www.allaboutcircuits.com/textbook/digital/chpt-3/cmo...