Professional Documents
Culture Documents
⮚ Instruction Queue:
o The Bus Interface Unit of the 8086 microprocessor contains an
instruction queue.
o BIU gets up to six bytes of the next instructions and stores them in
the instruction queue.
o When the Execution unit executes an instruction and is ready for the
next instruction, it simply reads the instruction from the instruction
queue resulting in increased execution speed.
o Pipelining is the process of fetching the next instruction cycle when
the current instruction is being executed.
⮚ Segment Register:
o The BIU of 8086 microprocessor has 4 segment buses i.e. CS, DS, SS &
ES. Ts holds the address of instructions and data in the memory
which are used by the processor to access memory locations. It also
contains one pointer register IP.
⮚ Stack Pointer Register (SP) and Base Pointer Register (BP): Both the SP
and BP registers in the 8086 microprocessors are used to access data in the
stack segment. During the execution of instructions, the SP is used as an
offset from the current stack section. The contents of SP are automatically
updated (increment/decrement) during the execution of a POP and PUSH
instruction. The offset address in the current stack section is stored in the
BP. Instructions that use the based addressing mode make use of this
offset.
⮚ Index Register: The two index registers SI (source index) and DI (destination
index) o the 8086 microprocessors are used in indexed addressing. The
instructions that process data strings use the SI and DI index registers, along
with DS and ES, to differentiate between the source and destination
address.
⮚ Flag Register: The flag register of the 8086 microprocessor is also known as
the status register. It is a 16-bit register that can be used as a flipflop as its
status changes according to the result. The control bit in the flag register
can be set or reset by the programmer. It has 9 flags and they are divided
into two groups: Conditional flags and Control flags.
o Conditional Flags: These flags reflect the outcome of the most recent
arithmetic or logical instruction. Following is the list of conditional
flags of the 8086 microprocessors:
▪ Carry Flag(C): This flag is set in an 8086 microprocessor when
there is a carry out of MSB in addition or borrow in
subtraction.
▪ Parity Flag (P): This flag is set to 1 if the lower byte of the
result contains an even number of 1’s otherwise reset.
▪ Auxiliary Carry Flag (A): This is set if there is carry from the
lowest nibble during addition or borrow from the lowest bibble
during subtraction in an 8086 microprocessor.
▪ Sign Flag (S): This flag bears the result’s symbol. i.e. when the
result of the operation is negative, the sign flag is set to 1 else
it is set 0.
▪ Overflow Flag (O): This flag indicates what happens when the
system’s capability is surpassed.
▪ Trap Flag (T): This flag is used for single-step monitoring and
helps the user to debug by executing one instruction at a time.
If it is set, then the program can run in a single-step mode.
MOV BX,1200h
MOV [BX],65H
MOV [BX+5], DX
MOV [DI]+12, AL
This instruction on execution will copy the content of AL at memory
address 7197 (7040 + 145 + 12)
TYPE 0 INTERRUPT:-
- 8086 supports division (unsigned/signed) instruction. 8086 will automatically do a
type 0 interrupt if the result of DIV or IDIV operation is too large to fit in destination
register.
- Type 0 is automatic and cannot be disabled i.e. non mask-able.
- Users have to account it in the program where he/she uses DIV/IDIV instruction.
- Normally user will write an interrupt service procedure which takes desired action
when an invalid division occurs.
- To avoid this interrupt, user can check before division that divisor is not zero.
INSTRUCTIONS:
→ When type 0 interrupt is internally generated, microprocessor will
- Push flag register.
- Reset TF and IF.
- Push CS and IP (i.e. return address).
- Get NEW CS and NEW IP.
- NEW CS and NEW IP will be loaded into the CS and IP register. Thus we get branching
to ISR routine.
- After returning from ISR, microprocessor will pop CS and IP (OLD CS/OLD IP).
- Microprocessor will also pop flag register.
-
13.What is memory segmentation? Describe physical memory organization.
How to calculate the physical memory address.
Segmentation is the process in which the main memory of the computer is
logically divided into different segments and each segment has its own base
address. It is basically used to enhance the speed of execution of the computer
system, so that the processor is able to fetch and execute the data from the
memory easily and fast. The main advantages of segmentation are as follows:
o It provides a powerful memory management mechanism.
o Data related or stack related operations can be performed in
different segments.
o Code related operation can be done in separate code segments.
o It allows to process to easily share data.
o It allows to extend the address ability of the processor, i.e.,
segmentation allows the use of 16-bit registers to give an addressing
capability of 1 Megabytes. Without segmentation, it would require
20-bit registers.
Here is the way to calculate the physical memory address:
14.What is function of ready pin in 8086. Draw the circuit diagram for wait state
generation between 0 and 7 wait status and draw the corresponding timing
diagram.
READY PIN:-
- It is an active high signal.
- When it is high, it indicates that the device is ready to transfer data.
- When it is low, it indicates wait state.
- It is available at pin 21 and is used to restart the execution….QS1 and QS0.
e) Programmable Chip Select Unit (CSU): This built-in address decoder unit
can be programmed to produce an active low chip select signal when
the memory or port address in a specified range is sent out. This built-in
decoder is to select major blocks of memory. six memory address chip
select signals are available: lower chip selects lines LCS, upper chip
selects lines UCS, and middle chip select lines MCS 0-3 The boundary of
the lower chip select signal begin at location 00000H and the boundary
of the upper chip select signal is ends at location FFFFFH. The sizes of
the memory areas are programmable by some bits put in a control word
and wait states (0-3 waits) can be automatically inserted with the
selection of an area of memory.
In addition to producing memory chip select signals, the 80186 can be
programmed to produce up to seven peripheral chip select signals on its
PCS0 -PCS4, PCS5/A1, and PCS6 /A2 pins. The programmable I/O area
starts at a base I/O address programmed by the user, and all seven 128-
byte blocks are contiguous.
f) Programmable DMA Unit: The DMA unit has two DMA request inputs,
DRQ0 and DRQ1. These inputs allow external devices such as disk
controllers, CRT controllers, etc. to request the use of one of the DMA
channels. For each DMA channel, the 80186 has a full 20-bit register to
hold the source address, a 20-bit register to hold the destination
address, and a 16-bit counter to keep track of how many words or bytes
have been transferred. DMA transfers can be from memory to memory,
I/O to I/O, or between I/O and memory.
22.Explain the protected virtual address mode of 80286 and show how 24 bit
physical address is generated.
23.How many local and global descriptors can be defined in 80286 and
explain how to access them?
80836 MICROPROCESSOR:-
→ A 32-bit microprocessor introduced by Intel in 1985.
→ The chip of 80386 contains 132 pins.
→ It has total 129 instructions.
→ It has 32 bit data bus 32 bit address bus.
→ The execution of the instructions is highly pipelined and the processor is
designed to operate in a multiuser and multitasking.
→ The address bus is capable of addressing over 4 gigabytes of physical
memory.
→ Virtual addressing pushing this over 64 terabytes of storage.
→ 80387 coprocessor is used.
→ 80386 processor is available in 2 different
versions.
- 386DX
- 386SX
PENTIUM PROCESSOR:-
→ The name Pentium is originally derived from the Greek word pente
meaning 'five' as the series was Intel's 5th generation microarchitecture.
→ Upward compatibility has been maintained.
→ It can run all programs written for any 80x86 line, but does so at a
double the speed of fastest 80486.
→ Pentium is mixture of both CISC and RISC technologies.
→ All the prior 80x86 processor are considered as CISC processor.
→ The addition of RISC aspects lead to additional performance
improvement.
→ It uses 64 bit data bus to address memory organized in 8 banks, each
bank contains 512 MB of data.
→ Each bank can store a byte of data.
→ All these bank enable signals are active low.
VIRTUAL 8086:-
→ In the 80386 microprocessor, virtual 8086 mode (also called virtual real mode) allows the
execution of real mode applications that are incapable of running directly in protected mode
while the processor is running a protected mode operating system.
→ It is a hardware virtualization technique that allowed multiple 8086 processors to be
emulated by the 386 chip.
→ It emerged from the painful experiences with the 80286 protected mode, which by itself
was not suitable to run concurrent real-mode applications well
→ VM86 mode uses a segmentation scheme identical to that of real mode (for compatibility
reasons), which creates 20-bit linear addresses in the same manner as 20-bit physical
addresses are created in real mode, but are subject to protected mode's memory paging
mechanism.
→ To use virtual 8086 mode, an operating system sets up a virtual 8086 mode monitor,
which is a program that manages the real-mode program and emulates or filters access to
system hardware and software resources. The monitor must run at privilege level 0 and in
protected mode
26. Draw memory read and write cycle minimum mode timing diagram of
8086.
27. Explain 80486 architecture in detail with a suitable diagram.
The 80486 processor integrated the floating-point unit (FPU) on chip, thus
eliminating overhead of the communication protocol that resulted from using a
coprocessor. The on chip FPU substantially increased the performance in the
80486 processor. The FPU's microarchitecture was based on a partial multiplier
array and a shift-and-add data path controlled by microcode. Floating point
operations could not be pipelined with any other floating-point operations; that
is, once a floating-point instruction is invoked, all other floating-point instructions
freeze until its completion.
28. Described the register details of 80386 microprocessor.
It consists of the following registers:
o Eight 32-bit General Purpose Registers: The 80386 has eight 32-bit
general purpose registers which can also be used as either 8-bit or
16-bit registers. These 32-bit general purpose registers are known as
extended registers and are represented by the register name with
prefix E. These registers are EAX, EBX, ECX, EDX, ESI, EDI, EBP, and
EBP. AX, BX, CX, and DX represent the lower 16-bit of the 32-bit
registers EAX, EBX, ECX, and EDX whereas BP, SP, SI, and DI represent
the lower 16-bit of their 32-bit counterparts and can be used as
independent 16-bit registers.
o Four Control Register: The 80386 has three 32-bit control registers,
CRO, CR2, and CR3 to hold global machine status independent of the
executed task. Load and store instructions are available to access
these registers.
o Four Memory Management Register: Four special registers are
defined to refer to the descriptor tables supported by 80386. The
80386 supports four types of descriptor table, viz. Global Descriptor
Table (GDT), Interrupt Descriptor Table (IDT), Local Descriptor Table
(LDT) and Task State Segment Descriptor (TSS).
o Eight Debug Register: Intel has provided a set of 8 debug registers for
hardware debugging. Out of these eight registers, DR, to DR7, two
registers DR, and DR, are Intel reserved. The initial four registers DR,
to DR3 store four program controllable breakpoint addresses, while
DR, and DR, respectively hold breakpoint status and breakpoint
control information. Two more test registers are provided by 80386
for page caching, namely test control and test status register.
⮚ PEREQ (Processor Extension Request): This is an input signal which tells the
microprocessor to perform a data transfer operation either from memory
or from IO for the requesting coprocessor like 80287.
PAGING UNIT:-
→ The paging unit operates only in protected mode and it changes the linear address into a
physical address.
→ The segmentation unit controls the action of the paging unit, as the segmentation unit
has the ability to convert the logical address into the linear address at the time of executing
an instruction.
→ Basically, it changes the overall task map into pages and each page has a size of 4K.
→ This allows the handling of tasks in the form of pages rather than segments.
→ The paging unit supports multitasking. This is so because the physical memory is not
required to hold the whole segment of any task.
→ Despite this, only that part of the segment which is needed to be currently executed must
be stored in that memory whose physical address is calculated by the paging unit
→ This resultantly reduces the memory requirement and hence this frees the memory for
other tasks.
PIPELINE:-
→ The process of fetching the next instruction when the present instruction is being
executed is called as pipelining
→ Pipelining has become possible due to the use of queue. BIU (Bus Interfacing Unit) fills in
the queue until the entire queue is full
→ The Pipeline has three stages fetch, decode and execute.
→ In this stage the ARM processor fetches the instruction from the memory. In the third
cycle the processor fetches instruction 3 from memory, decodes instruction 2 and executes
instruction 1.
32. Describe main features of 80186, 80286, 80386, 80486 and Pentium processor.
FEATURES OF 80186:-
→ The 80186 contains 16 – bit data bus
→ The internal register structure of 80186 is virtually identical to the 8086
→ About the only difference is that the 80186 contain additional reserved interrupt vectors
and some very powerful built-in I/O features
→ The internal clock generator replaces the external 8284A clock generator
→ The timer section contains three fully programmable 16-bit timers
→ The programmable DMA unit contains two DMA channels, or four DMA channels in some
models
→ The chip selection is a built-in programmable memory and I/O decoder
→ The power save feature allows the system clock to be divided by 4, 8, or 16 to reduce
power consumption
FEATURES OF 80286:-
→ The 80286 microprocessor is an advanced version of the 8086 microprocessor that is
designed for multi user and multitasking environments
→ The 80286 addresses 16 M Byte of physical memory and 1G Bytes of virtual memory by
using its memory-management system
→ The 80286 doesn’t incorporate internal peripherals; instead it contains a memory
management unit (MMU)
→ The 80286 operates in both the real and protected modes
→ In the real mode, the 80286 addresses a 1MByte memory address space and is virtually
identical to 8086
→ In the protected mode, the 80286 addresses a 16MByte memory space
→ The clock is provided by the 82284 clock generator, and the system control signals are
provided by the 82288 system bus controller
FEATURES OF 80386:-
→ The 80386 microprocessor is an enhanced version of the 80286 microprocessor and
includes a memory-management unit is enhanced to provide memory paging
→ The 80386 also includes 32-bit extended registers and a 32-bit address and data bus
→ The 80386 has a physical memory size of 4GBytes that can be addressed as a virtual
memory with up to 64TBytes
→ The 80386 is operated in the pipelined mode, it sends the address of the next instruction
or memory data to the memory system prior to completing the execution of the current
instruction
→ Interrupts, in the 80386 microprocessor, have been expanded to include additional
predefined interrupts in the interrupt vector table
→ The 80386 is also capable of paging
→ The instruction set of the 80386 is enhanced to include instructions that address the
32-bit extended register set
FEATURES OF 80486:-
→ The 80486 microprocessor is an improved version of the 80386 microprocessor that
contains an 8K-byte cache and an 80387 arithmetic co processor; it executes many
instructions in one clocking period
→ The 80486 microprocessor executes a few new instructions that control the internal
cache memory
→ A new feature found in the 80486 in the BIST (builtin self-test) that tests the
microprocessor, coprocessor, and cache at reset time
→ Additional test registers are added to the 80486 to allow the cache memory to be tested
→ These new test registers are TR3 (cache data), TR4 (cache status), and TR5 (cache control)
33. Describe the control word,tag word and status word structure of microprocessor
80386.
34. Discussed virtual and real mode of 80x86 microprocessors
VIRTUAL MODE:-
SAME AS Q.25
REAL MODE:-
35. Explain pipelining and paging concept of 80386 microprocessor
SAME AS Q.31
36. Discussed operating modes of 80486 microprocessors
37.Describe features of Pentium processor
SAME FROM Q.32
38.Discuss the branch prediction logic of Pentium processor?
a) BTB is a lookaside cache that sits to the side of Decode Instruction(DI) stage of 2
pipelines and monitors for branch instructions.
b) The first time that a branch instruction enters the pipeline, the BTB uses its source
memory to perform a lookup in the cache.
c) Since the instruction was never seen before, it is BTB miss. It predicts that the branch
will not be taken even though it is unconditional jump instruction.
d) When the instruction reaches the EU(execution unit), the branch will either be taken
or not taken. If taken, the next instruction to be executed will be fetched from the
branch target address. If not taken, there will be a sequential fetch of instructions.
e) When a branch is taken for the first time, the execution unit provides feedback to the
branch prediction. The branch target address is sent back which is recorded in BTB.
f) A directory entry is made containing the source memory address and history bit is set
as strongly taken.
PIPELINE STAGES:-
→ Pentium uses a 5 stage pipeline with the following stages in the pipeline.
a) Prefetch stage:
- Pentium instructions are variable length and are stored in a prefetch buffer.
There is a 256 bit path from instruction cache to the prefetch buffer.
b) Decode 1 stage:
- In this stage the processor decodes the instruction and finds the opcode and
addressing information, check which instructions can be paired for
simultaneous execution and participates in branch address prediction.
c) Decode 2 stage:
- Addresses for memory reference are found in this stage.
d) Execute stage:
- Data cache fetch or ALU or FPU operation is carried out. Two operations can be
carried out at this stage.
e) Write back stage:
- In this stage the registers and flags are updated on the basis of the results of
execution
40.Different between Pentium processor versions, Pentium; Pentium pro; Pentium P6.