Alcun Atirutan BBS

The Intel 8086 microprocessor (1978) revolutionized the computer industry and led to the popular x86 architecture. It uses microcode, breaking machine instructions down into simpler micro-instructions. By studying the chip under a microscope, I can explain it. ๐Ÿงต

A die photo of the 8086 microprocessor showing the metal layer on top of the chip. The main functional units are labeled: registers, ALU, microcode, etc.

The 8086 processor's silicon die is a tiny square. Under the microscope, the metal wiring on top is visible. Around the edges, bond wires connect the die to the chip's 40 external pins. Dissolving the metal layer with acid shows the silicon transistors underneath in this photo.

The silicon die of the 8086 with the metal and polysilicon layers removed to show the underlying transistors.

The 8086 uses microcode and each micro-instruction is 21 bits long. 512 micro-instructions are stored in the microcode ROM. Andrew Jenner examined my die photos, extracted the microcode bits, and disassembled the microcode.
https://www.reenigne.org/blog/8086-microcode-disassembled/

The "ADD immediate" machine instruction is implemented by four micro-instructions. The first two get two data bytes from the prefetch queue (Q) and put them in the temporary B register. Next puts AX's value in the tmp A register and starts the ADD (XI). Last, the sum ฮฃ is stored.

Four lines of microcode:

micro-address    move        action
   018    Q โ†’ tmpBL     L8    2
   019    Q โ†’ tmpBH
   01a    M โ†’ tmpA      XI    tmpA, NXT
   01b    Sigma โ†’ M         RNI   FLAGS

The micro-instructions are pipelined since they take more than one clock cycle to execute. The arrows show how processing of micro-instructions flows through the system. The next instruction starts before the current one finishes.

A complex table showing how micro-instructions are processed, broken down by each clock cycle.

The 8086's microcode is somewhat generic, with hardware logic filling in the details. E.g. this microcode implements 8 ALU operations, not just ADD. The hardware looks at the instruction to decide what operation "XI" really is. This makes the microcode much shorter.

The same four lines of microcode as before.

Also, the microcode specifies generic "M" and "N" registers and the hardware decides which registers they really are. This lets the same microcode work for multiple registers and 8 vs 16-bit operations. This die photo shows M and N registers on the chip.

A closeup of the die showing the 5-bit M and N registers implemented with transistors.

With microcode, pipelining, and 16 bits, the 8086 was a large architectural advance over earlier microprocessors e.g. Z80 (1976), 8085 (1977), and 6809 (1978). But the 8086 avoided the excessive architecture of Intel's ill-fated iAPX 432. Although unloved, x86 is a huge success.

For more, see my blog post: https://www.righto.com/2023/01/the-8086-processors-microcode-pipeline.html

@kenshirriff I wonder how close this is to the IBM PALM processor design. "Put All Logic in Microcode"
replies
0
announces
0
likes
1