Intel 8086
From Wikipedia, the free encyclopedia
Intel 8086 Central processing unit |
|
Produced: | From 1978 to Present |
Manufacturer: | Intel |
CPU Speeds: | 4.77 MHz to 10 MHz |
Instruction Set: | x86 |
Socket: | 40 pin DIP |
The 8086 is a 16-bit microprocessor chip designed by Intel in 1978, which gave rise to the x86 architecture. Intel 8088, released in 1979, was essentially the same chip, but with an external 8-bit data bus (allowing the use of cheaper and fewer supporting logic chips[1]), and is notable as the processor used in the original IBM PC.
Contents |
[edit] Background
The 8086 was intended as a temporary substitute for the ambitious iAPX 432 project in an attempt to draw attention from other manufacturers (such as Motorolas, Zilogs, and National Semiconductors) less delayed 16 and 32-bit processors. Both the architecture and the physical chip were therefore developed very quickly, and were based on the earlier 8080 and 8085 designs with a similar register set. The chip had around 29,000 transistors (many for microcode) and would also function as a continuation of the 8085; although not directly source code compatible, it was designed so that assembly language for the 8085 could be automatically converted into (sub-optimal) 8086 assembly source, usually with little or no hand-editing. However, the 8086 design was expanded to support full 16-bit processing instead of the fairly basic 16-bit capabilities of the Intel 8080/8085.
[edit] Buses and operation
- Address Bus - 20-bit address bus. Can access 220 memory locations i.e 1 MiB of memory.
- Data Bus - 16 bit data bus. Can access 16 bit data in one operation. (All registers of the 8086 are 16 bits wide, further contributing to the moniker of "16-bit microprocessor".)
- Control buses - Carries the essential signals for various operations.
8086 instructions varied from 1 to 6 bytes. Therefore, fetch and execution were (and still are) concurrent: The bus interface unit feeds the instruction stream to the execution unit through a 6 byte prefetch queue, a form of loosely coupled pipelining.
[edit] Registers and instructions
The processor featured eight 16-bit registers including the stack pointer. Four of them could also be accessed as eight 8-bit registers.
Due to a compact encoding inspired by 8085 and other 8-bit processors, most instructions were one- or two-address operations which means that the result were stored in one of the operands. A single memory location could also often be used as both source and destination operand which, among other factors, could further contribute to a rather small executable code foot-print.
Although the degree of orthogonality between registers and operations were greater than in 8085, it is still low, and data registers were also sometimes used implicitly by instructions. While perfectly sensible for the assembly programmer, this complicates register allocation for compilers.
8086 also featured 64K 8-bit I/O ports (or 32K 16 bit), and fixed vectored interrupts.
[edit] Segmentation
There were also four segment registers that could be set from index registers. The segment registers allowed the CPU to access one mebibyte + 64 KiB - 16 bytes of memory in an odd way. Rather than just supplying missing bytes, as in most segmented processors, the 8086 shifted the segment register left 4 bits and added it to the offset address, thus:
- physical address = segment×16 + offset
The physical memory address was therefore 20 bits wide (while both segment and offset were 16 bits). As a result of this scheme, segments overlapped, making it possible to have up to 4096 different pointers addressing the same location. While acceptable, and even useful, for assembly language programming (where control of the segments was complete) it caused confusion and was considered poor design by most people, forcing entirely new concepts (near and far keywords) into languages such as Pascal and C.
Although this scheme made expanding the address space to more than 220 bytes more difficult, it was newertheless soon expanded by a new MMU-controlled addressing scheme in the 80286's protected mode. Later, and on top of this, 80386 expanded the whole general purpose registers set (and hence, the offsets) to 32 bits, thereby enabling a linear addressing range of 232 bytes (with a total range of 236). However, those chips were, for a long period of time, often used in real mode, remaining compatible with older OSes.
In a similar way, early programs could ignore the segments, and just use plain 16-bit addressing, which allowed 8-bit software to be easily ported to the 8086. The authors of MS-DOS took advantage of this by providing an API very similar to CP/M. This was important when the 8086 was new, because it allowed many existing CP/M applications to be quickly made available on the new platform, which greatly eased the transition.
[edit] Performance
Execution times for typical instructions (in clock cycles):
Timings are best case, depending on prefetch status, instruction alignment, and other factors.
MOV reg,reg: 2, reg,im: 4, reg,mem: 8+EA, mem,reg: 9+EA, mem,im: 10+EA cycles ALU reg,reg: 3, reg,im: 4, reg,mem: 9+EA, mem,reg: 16+EA, mem,im: 17+EA cycles
JMP reg: 11, JMP label: 15, Jcc label: 16 (cc = condition code)
MUL reg: 70..118 cycle
EA: time to compute effective address, ranging from 5 to 12 cycles.
As can be seen from these tables, operations on registers and immediates were fast (between 2 and 4 cycles), while memory-operand instructions and jumps were quite slow; jumps took even more cycles than on the simple 8080 and 8085, and the 8088 (used in the IBM PC) were slower still, due to its narrower bus. The reson why most memory related instructions were so slow were twofold:
- the address and data buses were multiplexed in order to fit a standard 40-pin dual in-line package.
- address generation (calculation) were largely performed by microcode routines.
It should be noted, however, that the memory access performance were drastically enhanced already with Intels next generation chips, the 80186 and 80286; they both had non-multiplexed buses as well as address calculation in hardware, saving many cycles.
[edit] Chip versions
The clock frequency was originally limited to 5 MHz (IBM PC used 4.77MHz), but the last versions in HMOS were specified for 10 MHz. CMOS-versions were manufactured for a long time (at least a while into the 1990s) for embedded systems although its successor, the 80186/80188, has been more popular for embedded use.
Compatible and, in many cases, enhanced versions were manufactured by Fujitsu, Harris/Intersil, OKI, Siemens AG, Texas Instruments, NEC, and AMD. For example, NEC's series of efficiently implemented 8086 compatible processors (NEC V20, V25, V30, etc) are still used in embedded systems, as are Intel 80186.
The 8086/8088 could be connected to a mathematical coprocessor to add floating point capability. The Intel 8087 was the standard math-coprocessor, operating on 80-bit numbers, but manufacturers like Weitek soon offered higher performance alternatives.
[edit] Clones
Electronic industry of Soviet Union was able to replicate Intel 8086 through both industrial espionage and reverse-engineering. The resulting chip, K1810BM86, was a pin-compatible with original Intel 8086 and had the same instruction set. This IC was the core of Soviet-made PC-compatible ES1840 and ES1841 desktops. However, in hardware these computers had significant differencies from their authentic prototypes PC and PC/XT respectively - K1810BM86 was a copy from Intel 8086, not Intel 8088 and the data/address bus circuitry was designed independently from original IBM products.
[edit] Notable bugs
8086 CPUs produced prior to 1982 had a severe interrupt bug. IBM provided a free of charge upgrade to affected PCs. Processors remaining with original 1979 markings are quite rare; some people consider them collector's items.
[edit] Microcomputers using the 8086
The most influential microcomputer of all, the IBM PC, used the Intel 8088, a version of the 8086 with a narrower memory bus.
The first commercial microcomputer built on the basis of the 8086 was the Mycron 2000.
The IBM Displaywriter word processing machine and Wang Professional Computer also used the 8086. This chip could also be found in the AT&T 6300 PC (built by Olivetti).
The Compaq Deskpro used an 8086 running at 7.14 MHz, but was capable of running add-in cards designed for the 4.77 MHz IBM PC XT.
[edit] Notes and references
- ^ It also allowed using earlier 8080-family chips such as 8254 CTC, 8255 PIO, and 8259 PIC which were subsequently used in the IBM PC design.
[edit] See also
[edit] External Links
List of 8086 CPU's and their clones at CPUworld.com
Intel processors (italics indicate non-x86 processors)
4004 | 4040 | 8008 | 8080 | 8085 | 8086 | 8088 | iAPX 432 | 80186 | 80188 | 80286 | 80386 | 80486 | i860 | i960 | Pentium | Pentium Pro | Pentium II | Celeron | Pentium III | XScale | Pentium 4 | Pentium M | Pentium D | Pentium Extreme Edition | Pentium Dual Core | Pentium E | Xeon | Core | Core 2 | Itanium | Itanium 2 List of Intel microprocessors | List of Intel CPU slots and sockets |