Intel Microprocessor Architecture
Intel Microprocessor Architecture
MICROPROCESSOR
ARCHITECTURE
1
Features
• It is a 16-bit μp.
• 8086 has a 20 bit address bus can access up
to 220 memory locations (1 MB).
• It can support up to 64K I/O ports.
• It provides 14, 16 -bit registers.
• Word size is 16 bits and double word size is
4 bytes.
• It has multiplexed address and data bus
AD0- AD15 and A16 – A19.
2
• 8086 is designed to operate in two modes,
Minimum and Maximum.
3
Intel 8086 Internal Architecture
4
Internal architecture of 8086
6
EXECUTION UNIT
• Decodes instructions fetched by the BIU
• Generate control signals,
• Executes instructions.
8 bits 8 bits
AH AL
AX Accumulator
BH BL Base
BX
CH CL Count
CX
DX DH DL
Data
SP Stack Pointer
Pointer
BP Base Pointer
SI
Source Index
Index
DI Destination Index
8
EXECUTION UNIT – General Purpose Registers
Register Purpose
AX Word multiply, word divide, word I /O
AL Byte multiply, byte divide, byte I/O, decimal arithmetic
U U U U OF DF IF TF SF ZF U AF U PF U CF
U - Unused 12
EXECUTION UNIT – Flag Register
Flag Purpose
Carry (CF) Holds the carry after addition or the borrow after subtraction.
Also indicates some error conditions, as dictated by some
programs and procedures .
Parity (PF) PF=0;odd parity, PF=1;even parity.
Auxiliary (AF) Holds the carry (half – carry) after addition or borrow after
subtraction between bit positions 3 and 4 of the result
(for example, in BCD addition or subtraction.)
Zero (ZF) Shows the result of the arithmetic or logic operation.
Z=1; result is zero. Z=0; The result is 0
Sign (SF) Holds the sign of the result after an arithmetic/logic
instruction
execution. S=1; negative, S=0 13
Flag Purpose
A control flag.
Trap (TF) Enables the trapping through an on-chip debugging
feature.
A control flag.
Interrupt (IF) Controls the operation of the INTR (interrupt request)
I=0; INTR pin disabled. I=1; INTR pin enabled.
A control flag.
Direction (DF) It selects either the increment or decrement mode for DI
and /or SI registers during the string instructions.
Overflow occurs when signed numbers are added or
Overflow (OF) subtracted. An overflow indicates the result has exceeded
the capacity of the Machine
14
Execution unit – Flag Register
• Six of the flags are status indicators reflecting
properties of the last arithmetic or logical instruction.
• For example, if register AL = 7Fh and the instruction
ADD AL,1 is executed then the following happen
AL = 80h
CF = 0; there is no carry out of bit 7
PF = 0; 80h has an odd number of ones
AF = 1; there is a carry out of bit 3 into bit 4
ZF = 0; the result is not zero
SF = 1; bit seven is one
OF = 1; the sign bit has changed
15
BUS INTERFACE UNIT (BIU)
Contains
• 6-byte Instruction Queue (Q)
• The Segment Registers (CS, DS, ES, SS).
• The Instruction Pointer (IP).
• The Address Summing block (Σ)
16
THE QUEUE (Q)
00000
The memory in an 8086/88
based system is organized as
segmented memory. Code segment (64KB)
1 MB
address 1Mbyte of memory.
Extra segment (64KB)
The Complete physically
available memory may be Stack segment (64KB)
divided into a number of logical
segments.
FFFFF
18
• The size of each segment is 64 KB
• A segment may be located any where in the memory
• Each of these segments can be used for a specific
function.
19
• The 4 segments are Code, Data, Extra and Stack segments.
• A Segment is a 64kbyte block of memory.
• The 16 bit contents of the segment registers in the BIU
actually point to the starting location of a particular segment.
• Segments may be overlapped or non-overlapped
20
Segment registers
21
Memory Address Generation
Offset Value (16 bits)
Adder
22
23
• The following examples shows the CS:IP scheme of
address formation:
34BA0(CS)+
8AB4(IP)
3 D 6 5 4 (next address)
44B9F
24
Segment and Address register
combination
• CS:IP
• SS:SP SS:BP
• DS:BX DS:SI
25
Summary of Registers & Pipeline of 8086 µP
EU BIU
AX AH AL
IP
BX BH BL
Fetch &
CX CH CL D
store code CS DS ES SS
DH DL E
DX bytes in
C C
O PIPELINE C
O D PIPELINE O IP BX DI SP
SP D E (or) D DI BP
E O QUEUE E
BP I SI
R U
SI T N
DI
Default Assignment
Timing
FLAGS ALU control
26
27