0% found this document useful (0 votes)
4 views

Unit-8 - Advanced Microprocessor

The document provides an overview of the Microprocessor and Interfacing (MPI) course, focusing on advanced microprocessors, particularly the 8086 architecture. It details the architecture, operation modes, segmentation, and flag registers of the 8086 microprocessor, along with its instruction set and memory management. Additionally, it includes exam questions and references for further reading on the subject.

Uploaded by

jay2001p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Unit-8 - Advanced Microprocessor

The document provides an overview of the Microprocessor and Interfacing (MPI) course, focusing on advanced microprocessors, particularly the 8086 architecture. It details the architecture, operation modes, segmentation, and flag registers of the 8086 microprocessor, along with its instruction set and memory management. Additionally, it includes exam questions and references for further reading on the subject.

Uploaded by

jay2001p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 129

Microprocessor and Interfacing

(MPI)
GTU # 3160712

Unit-8:
Advanced
Microprocessor
Positive Vibes:MPI is the interesting, easiest and scoring subject.
Subject Overview
Positive Vibes:MPI is the interesting, easiest and scoring subject.
Sr. No. Unit % Weightage
1 Introduction to Microprocessor 8%
2 Microprocessor Architecture and Operations 7%
3 8085 Microprocessor 12%
4 Assembly Language Programming Basics 13%
5 8085 Assembly Language Programs 12%
6 Stack & Subroutines 13%
7 I/O Interfacing 20%
8 Advanced Microprocessors 15%

Unit 8 – Advanced Microprocessor 2


Subject Overview
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Sr. Unit Reference Books


1 Introduction to Microprocessor Microprocessor Architecture, Programming,
2 Microprocessor Architecture and Operations and Applications with the 8085
Ramesh S. Gaonkar,
3 8085 Microprocessor Penram International
4 Assembly Language Programming Basics
5 8085 Assembly Language Programs
6 Stack & Subroutines
7 I/O Interfacing
8 Advanced Microprocessors Advanced Microprocessors
Daniel Tabak, TMH

3 Unit 8 – Advanced Microprocessor 3


 Topics
Loopingto be covered
Positive Vibes:MPI is the interesting, easiest and scoring subject.

▪ Introduction to 8086
▪ 8086 logical block diagram
▪ 8086 Segmentation
▪ 8086 Pin functions
▪ Minimum and Maximum mode
▪ 80286/80386:
✓ Overview and architecture
✓ Programming model,
✓ Data types and instruction set,
✓ Segments and its types
✓ Segment descriptor
✓ Descriptor table and selectors
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Introduction to 8086
Introduction to 8086
 8086 is a 16-bit processor, which implies that Positive Vibes:MPI is the interesting, easiest and scoring subject.

 16-bit data bus


 16-bit ALU
 16-bit registers
 8086 has a 20-bit address bus can access up to 220 memory locations.
( 220=1048576 bytes =1 MB)
 It can support up to 64K I/O ports. (216 I/O ports:216=65536)
 8086 has 256 vectored interrupt.
 8086 contains powerful instruction set, that also supports multiply and divide operation.

Unit 8 – Advanced Microprocessor 6


Introduction to 8086
 8086 can operate in two modes: Positive Vibes:MPI is the interesting, easiest and scoring subject.

i. Minimum mode: A system with only one processor i.e.8086


ii. Maximum mode: A system with multiple processors.
e.g. 8086 + math co-processor(8087),
8086+ I/O processor (8089)
 8086 uses memory segmentation. Segmentation means dividing memory into logical
components.
 In 8086 memory is divided into 16 segments of capacity 216 bytes each and used as code,
stack, data and extra segment respectively.

Unit 8 – Advanced Microprocessor 7


Positive Vibes:MPI is the interesting, easiest and scoring subject.

8086 Architecture
Block Diagram
Memory
Interface

Positive Vibes:MPI is the interesting, easiest and scoring subject.

 6
5 Instruction
4 stream BIU
ES 3 byte

8086 Architecture
CS 2 queue
SS 1
DS
IP Control
15 0
System

15 8 7 0
AX AH AL
BX BH BL Arithmetic logic
CX CH CL unit EU
DX DH DL
SP
BP Operands
SI Flags
DI
8086 Architecture
• In 8086 CPU is divided into two independent functional units: Positive Vibes:MPI is the interesting, easiest and scoring subject.

1.BIU (Bus Interface Unit)


2.EU (Execution Unit)
• Dividing the work between these two units speeds up the processing.

Unit 8 – Advanced Microprocessor 10


Components: BIU(Bus Interface Unit)
Instruction Queue: Positive Vibes:MPI is the interesting, easiest and scoring subject.

It holds the instruction bytes of the


Address Generator: Generates next instruction to be executed by
20-bit of physical address. EU(Execution Unit).

 6
5 Instruction
4 stream BIU
ES 3 byte
CS 2 queue
SS 1
DS Segment Register:
IP
15 0 Four 16-bit Pointer:
Instruction register that provides powerful
memory
Registermanagement mechanism
that holds 16-bit address or offset
ES
of (extra segment),
next code CS (code
byte within codesegment),
segment.
SS (stack segment) , DS (data segment).
Unit 8 – Advanced Microprocessor 11
Task of BIU
1. Fetch instructions from memory. Positive Vibes:MPI is the interesting, easiest and scoring subject.

2. Read/write instructions to/from the memory.

3. Input/output of data to/from peripheral ports.

4. Address generation for memory reference.

5. Queuing instructions.

Thus, BIU handles all transfer of data and address.

Unit 8 – Advanced Microprocessor 12


Components: EU(Execution Unit)
Positive Vibes:MPI is the interesting, easiest and scoring subject.

EUContains
has 4 16-bit
general Performs
16-bit various internal operations.
ALU, purpose
that performs
register i.e. AX, BX,
add, subtract, CX, DX decrement,
increment,
each register isshift,
compliment, the combination
AND, OR, XORof etc.
two Control
8-bit register. System

15 8 7 0
AX AH AL
BX BH BL
CX CH CL
Arithmetic logic unit EU
DX DH DL
SP
BP Operands The 16-bit flag
Operand register
register: of 8086
16-bit contains
register used
SI SI (Source Index)
Flags
and DI9(Destination
active flags (6 conditional & 3 hold
control
DI Index) are used for string by the
related control register to the
Stackpointer:
Base pointer:used
It always
for points
flags), to
other
operands
indirect thetemporarily.
7top
addressing. flags
of are undefined.
operation
the stack. and
Usedforfor
moving block ofaccess of
sequential
memory
stack from one location to another.
segment.
Unit 8 – Advanced Microprocessor 13
Task of EU (Execution Unit)
1. Decodes the instruction. Positive Vibes:MPI is the interesting, easiest and scoring subject.

2. Executes decoded instructions.

3. Tells BIU from where to fetch the instruction.

4. EU takes care of performing operation on the data.

5. EU is also known as execution heart of the processor.

Unit 8 – Advanced Microprocessor 14


Memory
Interface

Positive Vibes:MPI is the interesting, easiest and scoring subject.

 6
5 Instruction
4 stream BIU
ES 3 byte

8086 Architecture
CS 2 queue
SS 1
DS
IP Control
15 0
System

15 8 7 0
AX AH AL
BX BH BL Arithmetic logic
CX CH CL unit EU
DX DH DL
SP
BP Operands
SI Flags
DI
GTU Exam Questions
Sr. Questions Marks
Positive Vibes:MPI is the interesting, easiest and scoring subject. Year
1. Draw and explain internal architecture diagram of 8086 microprocessor. 7 S’18
W’19
2. Differentiate 8085 microprocessor with 8086 microprocessor. 4 S’18
3. What are the addressing capacity of 8085 microprocessor and 8086 microprocessor? 3 S’18

Unit 8 – Advanced Microprocessor 16


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Segment Register in 8086


Segment Register in 8086
1. Code Segment (CS): Stores executable program. Positive Vibes:MPI is the interesting, easiest and scoring subject.

2. Data Segment (DS): Contains data used by a program. Data can be accessed from this by an
offset address.
3. Stack Segment (SS): Defines an area of memory used for the stack.
4. Extra Segment (ES): ES an additional data segment.

Unit 8 – Advanced Microprocessor 18


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Segmentation in 8086
Segmentation in 8086
What is Segment? Positive Vibes:MPI is the interesting, easiest and scoring subject.

An area in memory.
What is Segmentation?
The process of dividing memory into segments of various sizes is called Segmentation.

Unit 8 – Advanced Microprocessor 20


What is need of segmentation in 8086?

What is the need of segmentation in 8086? Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Memory is huge collection of bytes.


 In order to organize these bytes in an efficient manner segmentation is
used.
No. of segments = Total memory available
E.g. size of each segment
1 MB 1024 KB
No. of segments = 64 KB
=
64 KB
= 16 segments

1 MB

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

64KB

Unit 8 – Advanced Microprocessor 21


Segmentation in 8086
 Intel 8086 has 20 lines address bus. Positive Vibes:MPI is the interesting, easiest and scoring subject.

 With 20 address lines, the memory that can be addressed is 220 bytes.
220 = 1,048,576 bytes
1 MB = 1111 1111 1111 1111 1111
= FFFFF H

Unit 8 – Advanced Microprocessor 22


Segmentation in 8086
How many segments can be accessed at a time in 8086? Positive Vibes:MPI is the interesting, easiest and scoring subject.

 In 8086, at a time only 4 segments can be accessed.


i.e. 64 KB * 4 = 256 KB of memory can be accessed at a time.
 In 8086, memory address is ranging from 00000 H to FFFFF H.
 Bit-Size of each Segment Register is of 16-bit.
216 = 65535 bytes = 64 KB [size of each segment ]

64
FFFF H
SEG-1 KB
0000 H
SEG-2
256 KB
SEG-3
SEG-4

Unit 8 – Advanced Microprocessor 23


Segmentation in 8086
How to calculate physical address from segment address? Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Segment Registers are used to hold the upper 16-bit of the starting address for each of the
segment.
 The 16-bit address is starting address of the segment from where the BIU is currently fetching
instruction code bytes.
 The BIU always inserts zero(0) for the LSB(Least Significant Bit) to generate 20-bit address.

Unit 8 – Advanced Microprocessor 24


Segmentation in 8086
How a 20-bit physical address can be obtained, if data bus is of 16-bit? Positive Vibes:MPI is the interesting, easiest and scoring subject.

 20-bit address is known as Physical Address (PA) of memory.


 PA = Base Address : Offset
 Offset is the displacement of the memory location from the starting location of the segment.

Unit 8 – Advanced Microprocessor 25


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Segmentation in 8086
Example
Segmentation in 8086: Example
Example: Base address DS=2222 H Positive Vibes:MPI is the interesting, easiest and scoring subject.

Step-1: Convert DS 16-bit address to 20-bit address

- the BIU appends 0 H to the LSB of the base address.

22220 H

Step-2: Retrieve offset address

- Assuming offset address = 008F H

PA = Base Address : Offset

PA = 2222 H: 008F H

Unit 8 – Advanced Microprocessor 27


Segmentation in 8086: Example
Step-3: To calculate the effective address Positive Vibes:MPI is the interesting, easiest and scoring subject.

Physical Address = Starting Address of Segment(20-bit) + Offset


EA = 22220H
OFFSET= + 008FH
222AFH

DS 2222 H BYTE-0 22220 H


BYTE-1 22221 H

OFFSET=008F H

BYTE-N 222AF H

Unit 8 – Advanced Microprocessor 28


Exercise
1. DS: Offset => 1000:1F00 Positive Vibes:MPI is the interesting, easiest and scoring subject.

Unit 8 – Advanced Microprocessor 29


GTU Exam Questions
Sr. Questions Marks
Positive Vibes:MPI is the interesting, easiest and scoring subject. Year
1. Explain the concept of segmented memory. What are its advantages? 3 W’17
2. How the physical addresses are calculated from segment register in 8086 microprocessor? 4 S’18
3. List down various segment registers of 8086 microprocessor. 3 S’18
S’19

Unit 8 – Advanced Microprocessor 30


Positive Vibes:MPI is the interesting, easiest and scoring subject.

8086 Flag Register


8086 Flag Register
 The 16-bit flag register of 8086 contains 9 active flags (6 conditional & 3 control flags), other 7
Positive Vibes:MPI is the interesting, easiest and scoring subject.

flags are undefined.

Flag Register (16-bit)

Control Flag Status Flag


TF: Trap Flag CF: Carry Flag
IF: Interrupt Flag PF: Parity Flag
DF: Direction Flag AF: Auxiliary Flag
ZF: Zero Flag
SF: Sign Flag
OF: Overflow Flag

Unit 8 – Advanced Microprocessor 32


8086 Flag Register
Positive Vibes:MPI is the interesting, easiest and scoring subject.

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

U U U U OF DF IF TF SF ZF U AF U PF U CF

Overflow Interrupt Flag


Trap Flag is used for single step control.
Direction Flag Flag
IF=0 ; Disable
TF=0 ; WholeMaskable Interrupt
DF=0 ;Indicates overflow,
String bytes when
are accessed fromprogram
arithmetic towill
operation
lower beisexecuted
higher carried out.
memory address.
IF=1 ;exceeded
TF=1 Enable Maskable
; Program will Interrupt
run
DF=1 ;OF=0
String; result
bytes has not
are accessed fromthe to in
capacity
higher single
of
lower step mode.
machine.
memory address.
OF=1 ; result has exceeded the capacity of machine.

Unit 8 – Advanced Microprocessor 33


8086 Flag Register
 Carry Flag (CF): Set(1) if arithmetic operation results in carry; otherwise reset(0).
Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Auxiliary Flag (AF): If an operation performed in ALU generates a carry/barrow from lower
nibble (i.e. D0 – D3) to upper nibble (i.e. D4 – D7), the AF flag is set i.e. carry given by D3 bit to D4
is AF flag. This is not a general-purpose flag, it is used internally by the processor to perform
Binary to BCD conversion.
 Parity Flag (PF): This flag is used to indicate the parity of result. If lower order 8-bits of the
result contains even number of 1’s, the Parity Flag is set and for odd number of 1’s, the Parity
Flag is reset.
 Zero Flag (ZF): It is set(1), if the result of arithmetic or logical operation is zero else it is
reset(0).
 Sign Flag (SF): In sign magnitude format the sign of number is indicated by MSB bit. If the
result of operation is negative, sign flag is set(1).

Unit 8 – Advanced Microprocessor 34


Positive Vibes:MPI is the interesting, easiest and scoring subject.

8086 pin diagram


Maximum Mode Minimum Mode
GND 1 40 VCC
AD14 2 39 AD15
AD13 3 38 A16/S3
Positive Vibes:MPI is the interesting, easiest and scoring subject.
AD12 4 37 A17/S4
AD11 5 36 A18/S5
AD10 6 35 A19/S6
8086 Pin Diagram
AD9 7 34 BHE/S7
AD8 8 33 MN/MX
AD7 9 32 RD
AD6 10 31 RQ/GT0 (HOLD)
8086
AD5 11 30 RQ/GT1 (HLDA)
AD4 12 29 LOCK (WR)
AD3 13 28 S2 (M/IO)
AD2 14 27 S1 (DT/ R)
AD1 15 26 S0 (DEN)
AD0 16 25 QS0 (ALE)
NMI 17 24 QS1 (INTA)
INTR 18 23 TEST
CLK 19 22 READY
GND 20 21 RESET
Address and Data pins: AD0-AD15 (bidirectional)
 These lines are multiplexed bidirectional address/data Positive Vibes:MPI is the interesting, easiest and scoring subject.

bus.
 AD0-AD7 carry lower order byte of data and AD8-AD15
carry higher order byte of data.
 When ALE=1, then Address bus gets enabled, else Data
bus will get enabled.

Unit 8 – Advanced Microprocessor 37


Address and Status pins:A16/S3- A19/S6
 Lines are multiplexed and unidirectional address with Positive Vibes:MPI is the interesting, easiest and scoring subject.

status bus.
 During T1, they carry higher order address.
 In the remaining clock cycles, they carry status
signals.
 S5 gives the status of Interrupt Flag (IF)
 S6 goes low, when 8086 controls the shared system
bus.
 S3 and S4 indicates the segment register.

Unit 8 – Advanced Microprocessor 38


Status pins
 Below table indicates, which segment will be accessed Positive Vibes:MPI is the interesting, easiest and scoring subject.

on the basis of S4 & S3 bit value.

S4 S3 Register
0 0 ES

0 1 SS

1 0 CS
1 1 DS

Unit 8 – Advanced Microprocessor 39


BHE/S7
 BHE stands for Bus High Enable is active low output Positive Vibes:MPI is the interesting, easiest and scoring subject.

signal.
 BHE signal is used to indicate the transfer of data over
higher order data bus (D8- D15).
 8-bit I/O devices use this signal.
 S7 is reserved for future development.

Unit 8 – Advanced Microprocessor 40


Interrupt Pins
 NMI Positive Vibes:MPI is the interesting, easiest and scoring subject.

 It is an active high input signal.


 It is a non-maskable interrupt signal.
 INTR
 It is an active high input signal
 It is an interrupt request signal.
 INTA
 It is an active low output signal.
 This is an interrupt acknowledge signal.

Unit 8 – Advanced Microprocessor 41


Clock Pin: CLK
 Generates clock signals that synchronizes the Positive Vibes:MPI is the interesting, easiest and scoring subject.

operation of processor.
 8086 clock frequency: 5MHz-10MHz

Unit 8 – Advanced Microprocessor 42


Clock Pin: RESET
 Active high input signal. Positive Vibes:MPI is the interesting, easiest and scoring subject.

 When high, microprocessor enters into reset


state and terminates all the activities of
processor.
 Processor requires 4 clock cycles to reset.
 Thus, RESET signal must be 1 for at least 4
clock cycles.

Unit 8 – Advanced Microprocessor 43


Clock Pin: READY
 Active high input signal. Positive Vibes:MPI is the interesting, easiest and scoring subject.

 This is an acknowledgement signal from I/O devices


or memory.
 When high, it indicates that device is ready to transfer
data.
 When low, microprocessor is in wait state.

Unit 8 – Advanced Microprocessor 44


Control Pin: Test
 Active low input signal. Positive Vibes:MPI is the interesting, easiest and scoring subject.

 It is used to test the status of math coprocessor 8087.


 The BUSY pin of 8087 is connected to this pin of 8086.
 If low, execution continues, else microprocessor is in
idle state.

Unit 8 – Advanced Microprocessor 45


Control Pin: MN/MX
 8086 works in two modes: Positive Vibes:MPI is the interesting, easiest and scoring subject.

1. Minimum Mode (Active high i/p signal)


2. Maximum Mode (Active low i/p signal)
• Pins from 24 to 31 issue two different sets of signals.
• One set of signals is issued when CPU operates in minimum
mode, while other is issued when CPU operates in maximum
mode.

Unit 8 – Advanced Microprocessor 46


Mode Multiplexed pins: S2, S1, S0
Positive Vibes:MPI is the interesting, easiest and scoring subject.

S2 S1 S0 Indication
0 0 0 Interrupt acknowledgement
0 0 1 Read I/O
0 1 0 Write I/O
0 1 1 HALT
1 0 0 Code Access
1 0 1 Read Memory
1 1 0 Write Memory
1 1 1 Passive

Unit 8 – Advanced Microprocessor 47


Mode Multiplexed pins
 DEN Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Active low output signal.


 This is a Data Enable signal, which is used to enable the
transceiver.

 DT/R
 Data Transmit/Receive signal.
 When high, data is transmitted out else when low, data is
received in.

Unit 8 – Advanced Microprocessor 48


Mode Multiplexed pins: M/IO
 This signal is issued by the microprocessor to Positive Vibes:MPI is the interesting, easiest and scoring subject.

distinguish memory access from I/O access.


 When high, memory is accessed, else when low, I/O
devices are accessed.

Unit 8 – Advanced Microprocessor 49


Mode Multiplexed pins: QS1 and QS0
Positive Vibes:MPI is the interesting, easiest and scoring subject.

QS1 QS0 Indication


0 0 No operation
0 1 First byte of opcode from queue
1 0 Empty the queue
1 1 Subsequent byte from queue

Unit 8 – Advanced Microprocessor 50


Mode Multiplexed pins
LOCK Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Active low output signal.


 This signal indicates that other processors should not
ask CPU (8086) to hand over the system bus.
 This pin is activated by using LOCK prefix to any
instruction.

WR
 Active low output signal.
 Used to write data in memory or output signal,
depending on status of M/IO signal.

Unit 8 – Advanced Microprocessor 51


Mode Multiplexed pins
HOLD Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Active high input signal.


 When DMA controller needs to use address/data bus, it
sends a request to the CPU through this pin.
 When microprocessor receives HOLD signal, it issues
HLDA signal to the DMA controller.

HLDA
 Active high Hold Acknowledgement output signal.
 It is issued by 8086 after receiving HOLD signal.

Unit 8 – Advanced Microprocessor 52


Mode Multiplexed pins
RQ/GT0 and RQ/GT1 Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Request/Grant bi-directional pins.


 Other processors request the CPU(8086) through these
lines to release the system bus.
 After receiving the request, CPU sends acknowledge
signal through the same lines.
 RQ/GT0 has higher priority than RQ/GT1.

Unit 8 – Advanced Microprocessor 53


Maximum Mode Minimum Mode
GND 1 40 VCC
AD14 2 39 AD15
AD13 3 38 A16/S3
Positive Vibes:MPI is the interesting, easiest and scoring subject.
AD12 4 37 A17/S4
AD11 5 36 A18/S5
AD10 6 35 A19/S6
8086 Pin Diagram
AD9 7 34 BHE/S7
AD8 8 33 MN/MX
AD7 9 32 RD
AD6 10 31 RQ/GT0 (HOLD)
8086
AD5 11 30 RQ/GT1 (HLDA)
AD4 12 29 LOCK (WR)
AD3 13 28 S2 (M/IO)
AD2 14 27 S1 (DT/ R)
AD1 15 26 S0 (DEN)
AD0 16 25 QS0 (ALE)
NMI 17 24 QS1 (INTA)
INTR 18 23 TEST
CLK 19 22 READY
GND 20 21 RESET
GTU Exam Questions
Sr. Questions Marks Year
Positive Vibes:MPI is the interesting, easiest and scoring subject.

1. Explain the following pins of the 8086 microprocessor: TEST , LOCK , MN/MX. 3 W’17

Unit 8 – Advanced Microprocessor 55


Positive Vibes:MPI is the interesting, easiest and scoring subject.

80286
80286
 The Intel 80286 had a 24-bit address bus and was able to address up to Positive Vibes:MPI is the interesting, easiest and scoring subject.

16 MB of RAM compared to 1 MB of its predecessor (8086).


 It was designed for multi-user systems with multitasking applications,
including communications and real-time process control.
 80286 is the advanced microprocessors with memory management and
protection abilities.
 80286 have two operating modes namely real address mode and virtual
address mode.
 In real address mode, it can address up to 1MB of physical memory
address like 8086.
 In virtual address mode, it can address up to 16 MB of physical memory
address space and 1 GB of virtual memory address space.
 The performance of 80286 is five times faster than 8086.

Unit 8 – Advanced Microprocessor 57


Positive Vibes:MPI is the interesting, easiest and scoring subject.

80286 Architecture
ADDRESS UNIT BUS UNIT 80286 Architecture
A0-A23 80286 contains 4
ADDRESS BHE
PHYSICAL
Positive Vibes:MPI
M/IO separate processing units
is the interesting, easiest and scoring subject.
LATCHES AND DRIVERS
ADDRESS 1. Bus Unit (BU)
ADDER
PROCESSOR PEACK
2. Instruction Unit (IU)
SEGMENT PREFETCHER EXTENSION PEREQ
BASES INTERFACE
3. Address Unit (AU)
READY,
SEGMENT HOLD 4. Execution Unit (EU)
LIMIT SEGMENT BUS CONTROL
SIZE S1,S0,
CHECKER COD/INTA
OFFSET
ADDER DATA TRANSCEIVERS LOCK,HLDA

D15-D0
6-BYTE
PREFETCH
QUEUE

ALU
RESET
REGIS CLK
TERS control 3 DECODED
INSTRUCTION VSS
INSTRUCTION
DECODER VCC
QUEUE
CAP
EXECUTION UNIT INSTRUCTION UNIT
ERROR
BUSY
INTR
NMI
80286 Architecture: Bus Unit (BU)
Components: Positive Vibes:MPI is the interesting, easiest and scoring subject.

1. Address Latches & Drivers


2. Bus Control
3. Instruction Pre-fetcher
4. Processor Extension Interface
5. Data Transceivers
6. 6-byte Instruction Queue

Unit 8 – Advanced Microprocessor 60


80286 Architecture: Bus Unit (BU)
Functions: Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Perform all memory, I/O read and write


operations.
 Pre-fetch the instruction bytes.
 To control transfer of data to and from processor
extension devices like 80287 math co-processor.
 Whenever BU is not using the buses, it pre-
fetches the instruction bytes and put them in 6
byte pre-fetch queue.
 Take care of communication between CPU and a
Co-processor.

Unit 8 – Advanced Microprocessor 61


80286 Architecture: Instruction Unit (IU)
Components: Positive Vibes:MPI is the interesting, easiest and scoring subject.

1. 3 decoded instruction queue


2. Instruction decoder
Functions :
 It fully decodes up to 3 pre-fetched instructions and
holds them in a queue, so that Execution Unit (EU) can
access them.
 It helps processor to speed up by pipelining the
instructions.

Unit 8 – Advanced Microprocessor 62


80286 Architecture: Execution Unit (EU)
Components: Positive Vibes:MPI is the interesting, easiest and scoring subject.

 It includes ALU, registers and control unit.


 Registers are general purpose, index, pointer, flag registers and
Machine Status Word (MSW).
Functions:
 To sequentially execute instructions received from the instruction
unit.
 ALU result is either stored in registers or sent back over data bus.

Unit 8 – Advanced Microprocessor 63


80286 Architecture: Address Unit
Components: Positive Vibes:MPI is the interesting, easiest and scoring subject.

1. Segment Bases
2. Segment Limit Checker
3. Segment Size
4. Offset address
5. Physical address adder
Functions:
 It computes physical address
that will be sent out to the memory
or I/O by Bus Unit (BU).
 80286 operate in two different modes
1. Real address mode
2. Protected Virtual Address Mode.
Unit 8 – Advanced Microprocessor 64
ADDRESS UNIT BUS UNIT 80286 Architecture
A0-A23 80286 contains 4
ADDRESS BHE
PHYSICAL
Positive Vibes:MPI
M/IO separate processing units
is the interesting, easiest and scoring subject.
LATCHES AND DRIVERS
ADDRESS 1. Bus Unit (BU)
ADDER
PROCESSOR PEACK
2. Instruction Unit (IU)
SEGMENT PREFETCHER EXTENSION PEREQ
BASES INTERFACE
3. Address Unit (AU)
READY,
SEGMENT HOLD 4. Execution Unit (EU)
LIMIT SEGMENT BUS CONTROL
SIZE S1,S0,
CHECKER COD/INTA
OFFSET
ADDER DATA TRANSCEIVERS LOCK,HLDA

D15-D0
6-BYTE
PREFETCH
QUEUE

ALU
RESET
REGIS CLK
TERS control 3 DECODED
INSTRUCTION VSS
INSTRUCTION
DECODER VCC
QUEUE
CAP
EXECUTION UNIT INSTRUCTION UNIT
ERROR
BUSY
INTR
NMI
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Register Organization of 80286


Register Organization of 80286
 Eight 16-bit general purpose registers (AX, BX, Positive Vibes:MPI is the interesting, easiest and scoring subject.

CX, DX, SP, BP, SI, DI).


 Four 16-bit segment registers (CS, SS, DS, ES).
 16-bit Instruction Pointer (IP).
 16-bit Flag Register.
 Additionally, one new 16-bit Machine Status
Word (MSW) register.

Flag Register

MSW

Unit 8 – Advanced Microprocessor 67


Positive Vibes:MPI is the interesting, easiest and scoring subject.

80286 Flag Register


80286 Flag Register
Positive Vibes:MPI is the interesting, easiest and scoring subject.

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

U NT IOPL OF DF IF TF SF ZF U AF U PF U CF

Nested Task (NT) flag


Input Output Privilege Level flag (IOPL)
• It is used in protected mode.
• Used in protected mode operation to select the privilege level
• Bit is set when one task invokes another task.
for I/O devices.
• 00, 01, 10 and 11 are various bits of privilege level; 00 is the
highest and 11 is the lowest privilege level respectively.

Unit 8 – Advanced Microprocessor 69


80286 Flag Register: Machine Status Word (MSW)
Positive Vibes:MPI is the interesting, easiest and scoring subject.

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

TS EM MP PE

Task Switch
EMulateMonitor
processor extension
Processor flag
extension
TS is automatically
If SET, EMulate
If SET,SET
thiswhenever
coprocessor
flag allowsabittask
WAIT switch
is set to cause all
instruction to generate
operation Used
is performed.
coprocessor to
opcodesindicate whether
to generate a processor
a Coprocessor extension
a processor extension
(co-processor) is not
present present
in the exception.
system or not.
Not Available fault.
Protected Mode Enable
PE=1; Places 80286 in protected mode
PE=0; It can be only RESET by resetting CPU

Unit 8 – Advanced Microprocessor 70


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Real Address Mode


80286
80286: Real Address Mode
Real Mode Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Address Unit computes the address with segment base and offset like 8086.
 Maximum physical space allowed in this mode is 1MB.
 When 80286 get RESET, it always starts execution in real mode.
Task of 80286 in Real Mode
 Initializes Instruction Pointer(IP) and other registers of 80286.
 Initializes the peripheral.
 Enable Interrupts.
 Set up descriptor table.
 Prepares for entering in PVAM (Protected Virtual Address Mode).

Unit 8 – Advanced Microprocessor 72


Physical Address calculation in Real Address Mode
Address Calculation 15 0
Positive Vibes:MPI is the interesting, easiest and scoring subject.
OFFSET
 Total 1MB of Memory, divided among 16-segments with 0000 OFFSET
ADDRESS
each of size 64kb.
 80286 reserves two fixed areas for 15 0
SEGMENT
i. System Initialization 0000 SEGMENT
SELECTION ADDRESS
ii. IVT (Interrupt Vector Table)

IVT-1KB of Starting 00000H – 003FFH


ADDER
address
System Initialization FFFF0H – FFFFFH

20-BIT PHYSICAL
MEMORY ADDRESS

Unit 8 – Advanced Microprocessor 73


Physical Address calculation in Real Address Mode
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Physical Address = Starting Address of Segment(20-bit) + Offset


EA = 22220H
OFFSET= + 008FH
222AFH

DS 2222 H BYTE-0 22220 H


BYTE-1 22221 H

OFFSET=008F H

BYTE-N 222AF H

Unit 8 – Advanced Microprocessor 74


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Protected Virtual Address Mode


80286
What is the role of MMU?
 Memory Management Unit (MMU) translates the virtual memory address into the physical
Positive Vibes:MPI is the interesting, easiest and scoring subject.

memory address.
 Virtual memory can be many times larger than physical memory.
 Only programs that are currently required brought from the secondary storage such as a hard
disk to the physical memory (RAM) for execution.
 This is desirable as a microprocessor is supposed to store large programs and data can’t be
accommodated in the physical memory space.

Unit 8 – Advanced Microprocessor 76


What is the role of MMU?
 The hard disk is in the virtual or logical address space but not in the physical address space.
Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Faster memory such as RAM is used as the physical memory.


 Before microprocessor executes a program, it checks whether the program is available in
physical memory (RAM) or not.
 If program is not available in the physical memory, it is brought from the secondary memory to
the physical memory.
 If available space is inadequate in the physical memory, some less important/unused program
can be swapped back to the secondary memory to create space.

Unit 8 – Advanced Microprocessor 77


80286: Protected Virtual Address Mode
 286 is the 1st processor to support the concept of Virtual Memory and Memory Management.
Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Here, the address unit acts as Memory Management Unit (MMU).


 All 24 address lines are used and can access up to 16MB of physical memory.
 If descriptor table scheme is used it can address up to 1GB of virtual memory.
 The complete virtual memory is mapped with the 16MB of physical memory.
 If a program is larger than 16MB, it is stored in the hard disk and will be executed by swapping
as per sequence of execution.
 The huge programs are divided in smaller segments or pages arranged in appropriate
sequence.

Unit 8 – Advanced Microprocessor 78


Physical Address calculation in PVAM
PHYSICAL MEMORY
Positive Vibes:MPI is the interesting, easiest and scoring subject.

CPU
POINTER

SELECTOR OFFSET

SEGMENT
MEMORY
OPERAND
PHYSICAL
ADDRESS
ADDER
SEGMENT
DESCRIPTOR
SEGMENT TABLE
DESCRIPTOR
SEGMENT BASE 24-bit
ADDRESS

Unit 8 – Advanced Microprocessor 79


Real mode vs PVAM
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Real Address Mode Protected Virtual Address Mode


Can only address up to 1MB of system memory and Can address up to 16MB of System Memory.
act as fast 8086.
Doesn’t Support the concept of Virtual Memory. Supports the concept of Virtual Memory.
Real mode provides no support for memory protection, Protected mode provides support for memory
multitasking, or code privilege levels. protection, multitasking, or code privilege levels.
Initially every processor is in Real Mode i.e MSW PE- Microprocessor will switch to PVAM mode by setting
bit to 0. MSW PE-bit to 1.

Unit 8 – Advanced Microprocessor 80


Positive Vibes:MPI is the interesting, easiest and scoring subject.

80286 Privilege Level


80286 Privilege Level
11 Positive Vibes:MPI is the interesting, easiest and scoring subject.

Applications
(Lowest Privilege
Level) 01
OS Service

00
Kernel
Level
(highest)

10
OS
Extension

Unit 8 – Advanced Microprocessor 82


Positive Vibes:MPI is the interesting, easiest and scoring subject.

PVAM : Selector
PVAM : Selector
TI-Table Indicator Positive Vibes:MPI is the interesting, easiest and scoring subject.

TI=0 : GDT(Global Descriptor Table)


TI=1 : LDT(Local Descriptor Table)

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Selector TI RPL

00 Kernel Level
Bit 3-15 points to the
Entry of Descriptor Table 01 OS Services
10 OS Extension
11 Application Level

Unit 8 – Advanced Microprocessor 84


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Segment Descriptor: PVAM


Descriptor
80286
Segment Descriptor: PVAM Descriptor
 This smaller segments or pages have been associated with data structure called a Descriptor.
Positive Vibes:MPI is the interesting, easiest and scoring subject.

 It contains information of program segment or pages.


 The data structure Descriptor is essentially one such identifier of particular program or
segment.
 The set of such descriptor arranged in a proper sequence describes the complete program.

Types of Segment Descriptor


Data Segment Descriptor Used for Data Segment
Code Segment Descriptor Used for Code Segment
System Segment Descriptor Used for System Programs
Gate Segment Descriptor Used for Subroutine and ISR

Unit 8 – Advanced Microprocessor 86


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Descriptor Table
GDT & LDT
What is Descriptor Table?
Definition Positive Vibes:MPI is the interesting, easiest and scoring subject.

 The descriptor is a block of contiguous memory location containing information of a segment,


like
i. Segment base address
ii. Segment limit
iii. Segment type
iv. Privilege level – prevents unauthorized access
v. Segment availability in physical memory
vi. Descriptor type
vii. Segment use by another task

Unit 8 – Advanced Microprocessor 88


Descriptor Table: GDT & LDT
 A segment cannot be accessed, if its descriptor does not exist in either LDT (Local Descriptor
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Table) or GDT (Global Descriptor Table).


 Set of descriptor arranged in a proper sequence describes the complete program.
 Each Descriptor is 8-byte long.

Unit 8 – Advanced Microprocessor 89


Descriptor Table: GDT & LDT
 The GDT contains information about segments that are global in nature, that is, available to all
Positive Vibes:MPI is the interesting, easiest and scoring subject.

programs and normally used most heavily by the operating system.


 The LDT contains descriptors that are application specific.
 A global descriptor is also known as System Descriptor, and local descriptor is know as
Application Descriptor.
 The global descriptor table’s base address is stored in GDTR.
 The local descriptor table’s base address is stored in LDTR.

Unit 8 – Advanced Microprocessor 90


Descriptor Table: GDT & LDT
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Unit 8 – Advanced Microprocessor 91


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Differentiate GDT and LDT


Differentiate GDT and LDT
 LDT (Local Descriptor Table), acts similar to GDT, which also Positive Vibes:MPI is the interesting, easiest and scoring subject.

saves segments descriptor.


 The main differences between GDT and LDT is:
1. GDT have only one copy in system while LDT can have
many.
2. GDT may not changed during execution, while LDT often
changes when task switches.
3. Entry of LDT is saved in GDT.
4. Entries in GDT and LDT have the same structure.

Unit 8 – Advanced Microprocessor 93


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Data/Code Segment Descriptor


Data/Code Segment Descriptor
Positive Vibes:MPI is the interesting, easiest and scoring subject.

15 8 7 0

7 INTEL RESERVED 8

5 P DPL S TYPE A BASE 23-16 6

3 BASE 15-0 4

1 LIMIT 15-0 2

Unit 8 – Advanced Microprocessor 95


Data/Code Segment Descriptor
Positive Vibes:MPI is the interesting, easiest and scoring subject.

7 6 5 4 3 2 1 0
P DPL S E ED/C R/W A

Read : Code
Expansion Segment
Direction: Executable
Data Segment {when E=0}
R=0Segment
Code Segment execute Accessed
only,
E=0: Data TYPE
Segment
ED=0 expands upward (Data segment)
ED=1
Sets the not readable
Segment expands
Descriptor downward
Privilege Level A=0
E=1:(Stack
(DPL) Segment
Code not
Segment
Segment)
necessary accessed
for
P=0: Descriptor is undefined, noA=1 mapping to
Segment has been accessed
R=1
protection Code Segment both
physical memory exists.
executable & readable
P=1: Segment is mapped
S=0:Conforming:
System into Segment
Code physical {when E=1}
descriptor(GDT)
memory.
S=1:C=0 Ignore DPL
Application Descriptor(LDT)
Write : Data Segment
C=1 Code segment will only be executed when
W=0 Data segment not writable
CPL > DPL
W=1 Data segment writable

Unit 8 – Advanced Microprocessor 96


Positive Vibes:MPI is the interesting, easiest and scoring subject.

80386
80386: Introduction
 80386 is 32-bit microprocessor. Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Address Bus: 32-bit


 Data Bus: 32-bit
 Physical memory : 4GB
 Virtual memory : 64TB
 80386 supports variety of operating clock frequency, which are 16 MHz, 20 MHz, 25 MHz and
33 MHz.
 80386 supports 3 operating modes: real, protected and virtual real mode.
 Key characteristics: Multitasking and protection capability.
 80386 has an internal dedicated hardware that permits multitasking.
 3 stage pipeline: fetch, decode and execute.
 it supports simultaneous fetching, decoding and execution inside the system.

Unit 8 – Advanced Microprocessor 98


Positive Vibes:MPI is the interesting, easiest and scoring subject.

80386 Architecture
80386 Architecture
Execution Unit Segment Unit Paging Unit
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Segment Page
Register File Descriptor Descriptor
Barrel Shifter Cache Cache
ALU Segment Unit Page Unit

Instruction Queue Pre-fetch Pre-fetch


BUS UNIT
Queue Unit

Instruction Unit

Instruction Decoder Unit Code Pre-fetch Unit Bus Interface Unit

Unit 8 – Advanced Microprocessor 100


Bus Interface Unit
 The Bus Interface Unit connects 80386 with memory and I/O.
Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Based on internal requests for fetching instructions and transferring


data from the code pre-fetch unit, 80386 generates the address, data BUS UNIT
and control signals for the current bus cycles.

Bus Interface Unit

Unit 8 – Advanced Microprocessor 101


Code Pre-fetch Unit
 The code pre-fetch unit pre-fetches instructions when the bus interface Positive Vibes:MPI is the interesting, easiest and scoring subject.

unit is not executing the bus cycles.


Pre-fetch Pre-fetch
 It then stores them in a 16-byte instruction queue for decoding by the Queue Unit
instruction decode unit.
Code Pre-fetch Unit

Unit 8 – Advanced Microprocessor 102


Instruction Decoder Unit
 The Instruction Decoder Unit translates instructions from the pre-fetch Positive Vibes:MPI is the interesting, easiest and scoring subject.

queue into micro-codes. Instruction Queue


 The decoded instructions are then stored in an instruction queue (FIFO)
for processing by the execution unit. Instruction Unit

Instruction Decoder Unit

Unit 8 – Advanced Microprocessor 103


Execution unit
 Execution unit has 8 General purpose registers which are either used for Execution Unit
Positive Vibes:MPI is the interesting, easiest and scoring subject.

handling data or calculating offset addresses.


Register File
 The execution unit processes the instructions from the instruction
queue. Barrel Shifter
ALU
 It contains a control unit, a data unit and a protection test unit.
 The barrel shifter increases the speed of all shift and rotate operations.

Unit 8 – Advanced Microprocessor 104


Segment Unit
 The segment unit calculates and translates the logical address into Segment Unit
Positive Vibes:MPI is the interesting, easiest and scoring subject.

linear addresses at the request of the execution unit. Segment


Descriptor
Cache

Segment Unit

Unit 8 – Advanced Microprocessor 105


Paging Unit
 The translated linear address is sent to the Paging Unit. Paging Unit
Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Upon enabling the paging mechanism, the 80386 translates these linear Page
Descriptor
addresses into physical addresses. Cache
 If paging is not enabled, the physical address is identical to the linear
Page Unit
address and no translation is required.

Unit 8 – Advanced Microprocessor 106


80386 Architecture
Execution Unit Segment Unit Paging Unit
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Segment Page
Register File Descriptor Descriptor
Barrel Shifter Cache Cache
ALU Segment Unit Page Unit

Instruction Queue Pre-fetch Pre-fetch


BUS UNIT
Queue Unit

Instruction Unit

Instruction Decoder Unit Code Pre-fetch Unit Bus Interface Unit

Unit 8 – Advanced Microprocessor 107


Positive Vibes:MPI is the interesting, easiest and scoring subject.

80386 Register Organization


80386 Register Organization
31 0 SEGMENT REGISTER
Positive Vibes:MPI is the interesting, easiest and scoring subject.

EAX AX ACCUMULATOR CS
EBX BX BASE INDEX SS
ECX CX COUNT DS
EDX DX DATA ES Data
ESP SP STACK POINTER FS Segment
EBP BP BASE POINTER GS
ESI SI SOURCE INDEX 15 0
EDI DI DESTINITION INDEX

31 0
EIP IP
EFLAGS FLAGS

Unit 8 – Advanced Microprocessor 109


80386 Register Organization: Flag Register
Positive Vibes:MPI is the interesting, easiest and scoring subject.

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

U NT IOPL OF DF IF TF SF ZF U AF U PF U CF

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

VM RF

Resume Flag
Virtual
• It is used in Mode Enable
conjunction with the debug register breakpoints.
• When RF isWhen VM=1;
set(1), 386 will
it causes anyswitch
debug from
fault Protected to virtual
to be ignored on themode
next instruction.
• The RF flag temporarily disables debug exceptions so that an instruction can be
restarted.
• RF is then automatically reset at the successful completion of every instruction.
Unit 8 – Advanced Microprocessor 110
Operating Modes of 80386
1. Real Address Mode Positive Vibes:MPI is the interesting, easiest and scoring subject.

2. Protected Virtual Address Mode


3. Virtual Mode

Unit 8 – Advanced Microprocessor 111


80386: Real Address Mode
 When 80386 resets, the initial operating mode is Real Address Mode. Positive Vibes:MPI is the interesting, easiest and scoring subject.

 In real address mode, 80386 works as a fast 8086 with 32-bit registers and data types.
 Real-address mode is in effect after a signal on the RESET pin.
 Even if the system is going to be used in protected mode, the start-up program will execute in
real mode temporarily while initializing for protected mode.
 The addressing techniques, memory size, interrupt handling in this mode of 80386 are similar
to the real addressing mode of 80286.
 In real address mode, the default operand size is 16-bit but 32-bit operands and addressing
modes may be used with the help of override prefixed instructions.
 Maximum physical memory = 1MB.

Unit 8 – Advanced Microprocessor 112


80386 :PVAM
 MMU operates similar to 80286. Positive Vibes:MPI is the interesting, easiest and scoring subject.

 Virtual addresses are represented with a selector component and an offset component.
 The selector component is used to index a descriptor in a descriptor table.
 The descriptor contains the 32-bit physical base address for the segment.
 The offset part of the virtual address is added to the base address to produce the actual
physical address.
 The offset part of a virtual address can be 16-bit or 32-bit, so segment can be as large as 4GB.
 Hence the virtual memory size is 64TB.

Unit 8 – Advanced Microprocessor 113


Operating Modes of 80386 :PVAM
 Advantage of segmentation of memory: Segments corresponds to code and data structures in
Positive Vibes:MPI is the interesting, easiest and scoring subject.

the program. Hence segmentation is useful.

 Limitation of segmentation of memory: If we need only a part of memory, even then we have to
swap the whole segment content. This will increase the time for execution.

Unit 8 – Advanced Microprocessor 114


80386:Virtual Mode
Virtual Mode (Paged Mode) Positive Vibes:MPI is the interesting, easiest and scoring subject.

 In virtual mode, 8086 can address 1MB of physical memory that may be anywhere in the
4Gbytes address space of the protected mode of 80386.
 In this mode, instead of segments, 4KB of fixed page length are used.

Unit 8 – Advanced Microprocessor 115


80386:Virtual Mode
Total memory available for paging = 1MB = 1024KB Positive Vibes:MPI is the interesting, easiest and scoring subject.

Size of one page = 4KB

How many pages can be addressable with 1MB of memory?

Total pages= 1024KB/4KB = 256 pages(4KB each)

Paged Mode

 Limitation : Pages do not correspond to the logical structure of the program.

 Advantage : Pages can be quickly swapped.

Unit 8 – Advanced Microprocessor 116


Positive Vibes:MPI is the interesting, easiest and scoring subject.

80386 Memory Access in


Virtual Mode
80386 Memory Access in Virtual Mode
Positive Vibes:MPI is the interesting, easiest and scoring subject.

Selector
Segmentation Linear Address Paging Physical Address
Offset
Mechanism Mechanism

Unit 8 – Advanced Microprocessor 118


Operating Modes of 80386:VM
Page Directory Entry Positive Vibes:MPI is the interesting, easiest and scoring subject.

Each directory entry is of 4 byte


31 12 11 10 9 8 7 6 5 4 3 2 1 0
U R
Page Table Address
Reserved 0 0 D A 0 0 / / P
(A31-A12) S W

The upper 20-bit


D:A(A 31-AU/S
Dirty 21) are
:Accessed
bit R/W used
bit to by 80386
is set
Permitted for before any access
Permitted to the page
for Level
P:
select 1024 page Present bit
Atable
Dirty =bit
0, isentries.
page
set is
beforePage
not Level
accessed.
any 3 operation to2,1
write theorpage.
0
P=0, indicates
• shared
Tables can beDirty entry
theforcannot be used for address translation.
A =bit 0between
1, are
page undefined
is0 accessed.
None page directory entries.
Read/Write
task. • P=1, indicates entry can be used for address translation.
0 currently
P-bit of 1 None
executed page is Read/Write
always high.
1 0 Read-only Read/Write
1 1 Read-Write Read/Write

Unit 8 – Advanced Microprocessor 119


Operating Modes of 80386:VM
 Page Table Entry Positive Vibes:MPI is the interesting, easiest and scoring subject.

Each page table is of 4KB in size and contain maximum 1024 pages.

31 12 11 10 9 8 7 6 5 4 3 2 1 0
U R
Page Frame Address
Reserved 0 0 D A 0 0 / / P
(A31-A12) S W

The upper 20-bit (A31-A


D:A12 ):Accessed
DirtyareU/S
usedR/W
bit to
bit is set by 80386
Permitted for before any access
Permitted to the page
for Level
select 1024 page DirtyP: Present
entries. bit
Page
A =bit0, is
page
set is
before anyLevel
not accessed. 3 operation to2,1
write theorpage.
0
Tables can be shared • P=0,
between indicates
the entry cannot be used for address translation.
Dirty
A =bit1, are
page
0 undefined
is0 accessed.
for page directory
None entries.
Read/Write
task. • P=1, indicates entry can be used for address translation. P-
bit of0currently 1 executed
None page is Read/Write
always high.
1 0 Read-only Read/Write
1 1 Read-Write Read/Write

Unit 8 – Advanced Microprocessor 120


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Page Translation Mechanism in


80386
Page Translation Mechanism in 80386
Format of Linear Address Positive Vibes:MPI is the interesting, easiest and scoring subject.

A linear address refers indirectly to a physical address by specifying a page table, a page within
that table, and an offset for that page.

31 22 21 12 11 0
DIRECTORY TABLE OFFSET

Unit 8 – Advanced Microprocessor 122


Linear Address
31 22 21 12 11 0
DIRECTORY TABLE OFFSET Positive Vibes:MPI is the interesting, easiest and scoring subject.

USER MEMORY

80386
+ Memory
31 PAGE TABLE 0

31 DIRECTORY 0 +

CONTROL
+
REGISTERS
CR3
80386:Page Translation Mechanism
80386:Page Translation Mechanism
CR3: Enables processor to translate linear addresses into physical addresses by locating the
Positive Vibes:MPI is the interesting, easiest and scoring subject.

page directory and page tables for the current task.


 Here processor converts the DIRECTORY, TABLE, and OFFSET fields of a linear address into the
physical address by consulting two levels.

Unit 8 – Advanced Microprocessor 124


GTU Exam Questions
Sr. Questions Marks
Positive Vibes:MPI is the interesting, easiest and scoring subject. Year
1. Explain the paging mechanism in an 80386 microprocessor. 7 S’18
S’19
2. What is a descriptor table? What is its use? Differentiate between GDT and LDT. 4 S’18
S’19
3. Differentiate 80286 with 80386 microprocessor. 7 S’18
4. Explain the real mode and protected mode of the 80286 microprocessor. 7 W’17
S’19
5. Briefly explain the architecture of the 80386 microprocessor. 4 W’17

Unit 8 – Advanced Microprocessor 125


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Comparison of different Intel


Processors
Comparison of different Intel Processors
Parameter 8085 8086 80286 80386 80486 Pentium
Positive Vibes:MPI is the interesting, easiest and scoring subject.

N-bit Processor (data bus) 8-bit 16-bit 16-bit 32-bit 32-bit 64-bit
Address bus 16-bit 20-bit 24-bit 32-bit 32-bit 32-bit
Addressable Memory 64KB 1MB 16MB 4GB 4GB 4GB
Introduced in Year 1976 1978 1982 1985 1989 1993
Support Virtual Memory NO NO YES YES YES YES
Support Segmentation NO YES YES YES YES YES
Supports Paging NO NO NO YES YES YES
Operating Modes 1 2 3 3 3 3
Support Cache Memory NO NO NO NO YES YES
Contains on-chip FPU NO NO NO NO YES YES
Supports Instruction Queue NO YES YES YES YES YES

Unit 8 – Advanced Microprocessor 127


References
Positive Vibes:MPI is the interesting, easiest and scoring subject.
Books: Advanced Microprocessors, Daniel Tabak, McGrawHill

8086 Programming and Advance Processor Architecture, Savaliya M. T., WileyIndia

The 8088 and 8086 Microprocessors, Triebel & Singh, Pearson Education

Mobile Application: 8085 and 8086 Microprocessor Opcodes app from Play Store:

http://tiny.cc/aopcodes

Unit 8 – Advanced Microprocessor 128


Positive Vibes:MPI is the interesting, easiest and scoring subject.

Thank You

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy