3Simplified block diagram over Intel 8088 (a variant of 8086); 1=main registers; 2=segment registers and IP; 3=address adder; 4=internal address bus; 5=instruction queue; 6=control unit (very simplified!); 7=bus interface; 8=internal data bus; 9=ALU; 10/11/12=external address/data/control bus
4Intel 8086 is a 16 bit processor. It has 16-bit data bus and 20-bit address bus.The lower 16-bit Address lines and 16-bit Data lines are multiplexed (AD0-AD15).Since 20-bit address lines are available, 8086 can access up to 220 or 1 Giga byte of physical memory.
5Internal architecture of 8086 2 units -Bus Interface Unit (BIU)Execution Unit (EU)
6BIU contains Instruction queue, Segment registers, Instruction pointer, Address adder. EU contains Control circuitry, Instruction decoder, ALU, Pointer and Index register, Flag register.
8The Bus Interface Unit (BIU) generates the 20-bit physical memory address &provides the interface with external memory (ROM/RAM) has a single memory interface.The BIU performs all bus operations such as instruction fetching, reading and writing operands for memory and calculating the addresses of the memory operands.
9Instruction Queue To speed up the execution, 6-bytes of instruction are fetched in advance andkept in a 6-byte Instruction Queue while other instructions are being executed in the Execution Unit (EU).Hence after the execution of an instruction, the next instruction is directly fetched from the instruction queue without having to wait for the external memory to send the instruction.This is called pipe-lining and is helpful for speeding up the overall execution process.
10These pre-fetching instructions are held in its FIFO queue. With its 16 bit data bus, the BIU fetches two instruction bytes in a single memory cycle.After a byte is loaded at the input end of the queue, it automatically shifts up through the FIFO to the empty location nearest the output.
12Four 16-bit segment registers, 8086's BIU produces the 20-bit physical memory address by combining a 16-bit segment address with a 16-bit offset address.Four 16-bit segment registers,code segment (CS),stack segment (SS),extra segment (ES), anddata segment (DS).
13We know -These segment registers hold the corresponding 16-bit segment addresses.A segment address the upper 16-bits of the starting address of that segment. The lower 4-bits of the starting address of a segment is always zero.The offset address is held by another 16-bit register.The physical 20-bit address is calculated by shifting the segment address 4-bit left and then adding that to the offset address.
14E.g.,Code segment Register CS holds the segment address 4569h.Instruction pointer IP holds the offset address 10A0hThe physical 20-bit address is calculated as:Segment address : 45690h Offset address : + 10A0h Physical address : 46730h
16The Execution unit is responsible for decoding and executing all instructions. The EUextracts instructions from the top of the queue in the BIU,decodes them,generates operands if necessary,passes them to the BIU andrequests it to perform the read or write to memory or I/O and perform the operation specified by the instruction on the operands.
17During the execution of the instruction, the EU tests the status and control flags andupdates them based on the results of executing the instruction.
18If the queue is empty, the EU waits for the next instruction byte to be fetched and shifted to top of the queue.When the EU executes a branch or jump instruction, it transfers control to a location corresponding to another set of sequential instructions.Whenever this happens, the BIU automatically resets the queue and then begins to fetch instructions from this new location to refill the queue.
19Common issuesInternal bus is a pathway for data transfer between registers and ALU in the µPsExternal bus is available externally to connect to RAM, ROM and I/OInt. and Ext. Bus width may be differentFor exampleIn 8088 Int. Bus is 16-bit , Ext. bus is 8-bitIn 8086 Int. Bus is 16-bit , Ext. bus is 16-bit