8086 Microprocessor Internal Architecture - Foundation
The Intel 8086 microprocessor employs a sophisticated internal architecture designed around the concept of functional unit separation and pipelining. Understanding this architecture is fundamental to grasping how modern processors achieve high performance through parallel operation of different subsystems.
Architectural Philosophy and Design Principles
The 8086 architecture is built on several key principles:
- Functional Separation: Different units handle specific tasks independently
- Pipelining Concept: Overlapping instruction fetch and execution phases
- Bus Multiplexing: Sharing pins between address and data to reduce package size
- Segmented Memory Model: Efficient memory management through 64KB segments
- Register-Rich Design: Multiple specialized registers for different purposes
Two-Unit Architecture - BIU and EU
The 8086 is fundamentally divided into two independent but cooperating functional units:
Bus Interface Unit (BIU) - External Communication Hub
The BIU serves as the interface between the processor core and the external world, handling all bus operations and memory management:
BIU Components and Functions:
- Instruction Queue (6 bytes): First-In-First-Out buffer storing prefetched instructions
- Segment Registers (16-bit each):
- CS (Code Segment): Points to current code segment
- DS (Data Segment): Points to current data segment
- SS (Stack Segment): Points to current stack segment
- ES (Extra Segment): Additional segment for data operations
- Instruction Pointer (IP): 16-bit register pointing to next instruction
- Address Generation Unit: Combines segment and offset to create 20-bit physical addresses
- Bus Control Logic: Manages external bus operations and timing
Address Generation Process:
Physical Address Calculation Formula:
Physical Address = (Segment Register × 16) + Offset Address
In binary: Physical Address = (Segment << 4) + Offset
Address Range: Each segment can address 64KB (0000H to FFFFH)
Pipelining in 8086 Architecture
The 8086 implements a two-stage pipeline through the separation of BIU and EU, allowing instruction fetch and execution to occur simultaneously. This represents one of the earliest implementations of instruction pipelining in microprocessors.
Pipeline Operation Principles:
- Temporal Parallelism: BIU fetches the next instruction while EU executes the current one
- Instruction Queue: 6-byte buffer allows continuous operation
- Branch Handling: Queue flushed on branch instructions
- Performance Gain: Up to 2× improvement in instruction throughput
Pipeline Performance Analysis:
| Scenario | Without Pipeline | With Pipeline | Improvement |
|---|---|---|---|
| Sequential Instructions | 6 cycles per instruction | 2-3 cycles average | 50-67% faster |
| Branch Instructions | 6 cycles | 6-8 cycles (flush penalty) | No improvement |
Memory Banking and Segmentation Integration
The 8086 architecture supports advanced memory organization through segmentation and banking, enabling efficient memory utilization beyond the basic 1MB addressing limit.
Segmentation Architecture:
Banking Implementation:
Memory banking in 8086 systems allows access to extended memory through bank switching mechanisms:
- Two-Bank System: Even/odd address banking for improved bandwidth
- Interleaved Access: Overlapped memory operations
- Extended Banking: Software-controlled bank switching for >1MB
- Performance Benefits: Reduced memory access latency
Execution Unit (EU) - Computational Core
The EU is responsible for executing instructions and performing all computational operations. It operates independently of the BIU, enabling pipelined operation:
EU Components and Functions:
- 16-bit Arithmetic Logic Unit (ALU): Performs arithmetic and logical operations
- General Purpose Registers (16-bit each):
- AX (Accumulator): Primary register for arithmetic operations
- BX (Base Register): Used as base pointer for memory addressing
- CX (Count Register): Loop counter and shift/rotate operations
- DX (Data Register): I/O operations and multiplication/division
- Index Registers (16-bit each):
- SI (Source Index): Points to source operand in string operations
- DI (Destination Index): Points to destination in string operations
- Pointer Registers (16-bit each):
- SP (Stack Pointer): Points to top of stack
- BP (Base Pointer): Points to base of stack frame
- Flag Register (16-bit): Contains status and control flags
- Control Unit: Decodes instructions and controls execution sequence
Register Subdivision - 8-bit Accessibility:
The general-purpose registers can be accessed as 16-bit words or 8-bit bytes:
| 16-bit Register | High Byte (8-bit) | Low Byte (8-bit) | Usage |
|---|---|---|---|
| AX | AH | AL | Accumulator operations |
| BX | BH | BL | Base register for addressing |
| CX | CH | CL | Counter for loops and shifts |
| DX | DH | DL | Data register for I/O |
General Purpose Registers
- AX (Accumulator): Primary register for arithmetic operations. Can be used as AH (high byte) and AL (low byte)
- BX (Base Register): Used for addressing and as a general-purpose register. BH and BL available
- CX (Count Register): Used as counter in loops and string operations. CH and CL available
- DX (Data Register): Used in I/O operations and multiplication/division. DH and DL available
Segment Registers (16-bit)
- CS: Points to the segment containing the current code
- DS: Points to the segment containing data
- SS: Points to the segment containing the stack
- ES: Extra segment register for string operations