Reverse Engineering Intel 8086 Microprocessor
The photo below shows the crystal of the Intel 8086 processor. The photo shows a metal layer of the chip hiding silicon under it. On the edges of the matrix are thin wires that provide a connection between the pads on the chip and external contacts. Power and grounding platforms have two connecting wires to maintain a higher current. The chip was very complex for its time and contained 29 thousand transistors. Pay attention to the marking of the crystal at the very bottom - it shows the Intel logo, processor model and year of manufacture of the chip.
Intel 8086 Processor Crystal
To study the crystal, the processor must be carefully prepared. Most integrated circuits are packed in epoxy, so dangerous acids are needed to dissolve the case. To avoid damage to the crystal, an 8086 was used with a ceramic body, the lid of which is easy to open, exposing the shameless beauty of all its insides.
The photograph shows a silicon matrix located in the center. The matrix is connected to the metal contacts of the microcircuit using tiny connecting wires. This is a 40-pin DIP package, the standard form factor for microprocessors of the time. Please note that the silicon matrix itself occupies a small part of the case size.
Using a metallurgical microscope, dozens of photos of the chip matrix were made, stitched into one high-resolution image using the program Hugin .
Below is a photograph of a crystal in which layers of metal and polysilicon have been removed, exposing silicon underneath with its 29,000 transistors. The main functional blocks based on reverse engineering by Ken Shirriff are indicated on the chip. The left side of the chip contains a 16-bit data channel: chip registers and arithmetic circuits. The adder and upper registers form a bus interface module that interacts with external memory, while the lower registers and ALU form an execution unit that processes the data. The right side of the chip has a control and decoding circuitry, as well as ROM microcode that controls each instruction.
8086 Main Function Blocks
One of the features of the 8086 was prefetching instructions, which improves performance by retrieving instructions from memory before they are used. This was implemented by the bus interface unit in the upper left corner, which accessed external memory. Upper registers include 8086 segment registers, which provide access to a larger address space than 64 kilobytes allowed by a 16-bit address. For each memory access, a segment register and a memory offset were added to form the final memory address. Instead of ALU, 8086 used a separate adder to calculate memory addresses, which increased its performance.Upper case also includes six bytes of prefetch buffer and instruction counter.
In the lower left corner of the microcircuit there is an executive unit that performs data operations. Lower case registers include general purpose registers and index registers, such as a stack pointer. 16-bit ALU performs arithmetic operations (addition and subtraction), Boolean logic operations and shifts. ALU does not perform multiplication or division; these operations are performed through a sequence of shifts and addition/subtraction, so they are relatively slow.
One of the most difficult parts of computer design is the creation of control logic, which dictates to each part of the processor what to do in order to execute a specific command. In 1951, Maurice Wilkes came up with the idea of a microcode: instead of constructing control logic from complex circuits of logic elements, control logic can be replaced with a special code - microcode. To follow the instructions, the computer performs several simple micro-instructions that are set by microcode. Using microcode, building processor control logic becomes a programming task, not a logical design task.
Firmware was common on 60s mainframes, but early microprocessors such as the 6502 and Z-80 did not use the firmware because they did not have space to store it. However, later processors, such as the 8086 and 68000, used microcode, taking advantage of the increase in chip density. This allowed the 8086 to implement complex instructions (such as multiplying and copying strings), without complicating the scheme. The disadvantage was that the microcode occupied most of the area of the crystal: the microcode scheme is shown in the lower right corner of the matrix photo.
The photo above shows part of the ROM microcode. The contents of the microcode are visible under the microscope; bits can be read depending on the presence or absence of transistors at each position. The ROM consists of 512 micro-instructions, each 21 bits wide. Each microinstruction defines the movement of data between the source and the receiver. It also defines microoperation, which can be a transition instruction, an ALU operation, a memory operation, a microcode subroutine call, or its accounting. The microcode is pretty efficient; simple instructions, such as increment or decrement (increment or decrement variables, respectively), consist of two microinstructions, while a more complex line copy command is implemented using eight microinstructions.
The path to 8086 was not as direct and planned as you might expect. His earliest ancestor was the Datapoint 2200, a desktop computer/terminal released in June 1970. It appeared before the term “microprocessor” came into use and was based on an 8-bit board full of separate TTL integrated circuits. In parallel, Datapoint was negotiating with Intel and Texas Instruments to replace the board with a single chip, which includes all components. By copying the Datapoint 2200 architecture, Texas Instruments created the TMX 1795 processor (in 1971) and Intel the 8008 processor (in 1972).
However, Datapoint rejected these processors, which was a fatal decision. Although TI was unable to find a buyer on the TMX 1795 and abandoned it, Intel decided to bring 8008 to the mass market and followed by 808 followed by 8080 and 8085.
In 1975, the next close-up of Intel was the 8800 processor, which was to become the main architecture of the company in the 80s. This processor was called the "microframework" because of its planned high performance.It was supposed to have a completely new set of instructions designed for high-level programming languages such as Ada and support object-oriented programming and garbage collection at the hardware level. Unfortunately, and maybe fortunately, this chip was too ambitious for that time and lagged behind the schedule. In the end, it was released in 1981 as an iAPX 432 with disappointing performance and failed commercially.
Since the iAPX 432 was behind schedule, Intel decided in 1975 that they needed a simple processor-gag for sale until the iAPX 432 was ready. Intel quickly developed the 16-bit 8086th compatible with the 8080th, having released it in 1978. The 8086 was a big success due to the advent of the IBM PC in 1981. By 1983, the IBM PC was the best-selling computer and became the standard for personal computers. The IBM PC used the cheaper version of 8086 - 8088 with an 8-bit data bus. The success of the IBM PC has made the 8086 architecture the industry standard that is still 42 years later.
The 1984 IBM PC AT was upgraded to a compatible but more powerful processor 80286. In 1985, with the release of 80386, the x86 line switched to 32-bit computing, and then to 64-bit in 2003 with the release of AMD64 and the first Athlon 64 processors. The x86 architecture is still expanding with many additional instructions, such as the AVX-512, but even with all these changes, the x86 remains compatible with the original 8086.
The 8086 chip was built using N-MOS transistors. The transistor can be considered as a switch that controls the current between two areas called the drain and source. These transistors are constructed by doping the regions of the silicon substrate with impurities to create “diffusion” regions with different electrical properties. The transistor is activated by a gate made of a special type of silicon, called polysilicon, located above the silicon substrate. Transistors are interconnected by a metal layer on top, forming a solid integrated circuit. Modern processors can have more than a dozen metal layers, while the 8086 had only one.
The silicon photograph below shows some transistors from ALU in close-up. Doped conductive silicon has a dark purple color. White stripes are those places where polysilicon lines cross silicon, forming a transistor gate. You can count 23 transistors, forming 7 gates. Transistors have a complex shape for more efficient use. In addition, transistors have different sizes to provide high power where necessary. Please note that transistors located next to each other can share a drain or source. Circles are compounds between a silicon layer and metal, while small squares are compounds between a silicon layer and polysilicon.
Photo of some 8086 transistors. Metal and polysilicon layers removed in the image
The 8086 was originally conceived as a processor-gag during Intel until it released its flagship iAPX 432 chip, and was a descendant of a processor built from a board full of TTL chips. But from this humble beginning, the x86 architecture has unexpectedly been dominant in desktop and server computing to date.