notes unit 1 part 1
notes unit 1 part 1
Notes unit 1
History of Intel processors
Summary ( you can remember easily by this table , draw it in exam also )
year processor cores Size Speed / clock No. of transistors Technology Instructions per
bits ( micron) second
1971 4004 1 4 740KHz 2300 10 µ 600
1972 4040 1 4
1972 8008 1 8 800KHz 3500 10 µ 5lakh
1974 8080 1 8 2MHz 4500 6µ
1976 8085 1 8 3MHz 6500 7.7 lakh
1978 8086 1 16 5M , 10M 29000 3µ 2.5 million
1982 80186 1 16 6-25M 55000 2µ
1982 80286 1 16 6M 134000 1.5 µ
1985 80386 1 32 16M 275000 1.5 µ
1989 80486 1 32 25M 1.2 million 1µ
1993 Pentium 1 32 66M 3.1milion 0.8 µ
2001 Xeon 1 32 1.7GHz 42 million 0.18 µ
2008 Core2duo 1,2,4 64 2.4G 291million 45nm
2008 Core i7 4 to10 64 2.66 – 3.2G 731M 45nm
2009 Core i5 2,4 64 2.66G 774M 45nm
2010 Core i3 2-4 64 2.93-3.07G 382 M 32nm
2017 Core i9 10-18 64 2.6-4G undisclosed 14-10nm
Each of the above core processors ( brand modifiers ) have various generations (1 to 13)
The main difference between different generations is the architecture. They also got better RAM
support, cache support, and overclocking capabilities
Feature of 80386 DX
Flexible 32-Bit Microprocessor
— allows 8, 16, 32-Bit Data Type
Very Large Address Space
— 4 Gigabyte Physical
— 64 Terabyte Virtual
— 4 Gigabyte Maximum Segment Size
Integrated ( on chip)Memory Management Unit
— Virtual Memory Support
— Optional On-Chip Paging ( can be enabled or disabled)
— 4 Levels of Protection
designed for single-user applications and operating systems such as MS-DOS and Windows.
Functional block diagram /architecture of 80386
OR
80386 contains following units
1. Bus unit
2. Central processing unit ( consists of Instruction unit& execution unit)
3. Memory management unit (Consists of asegmentation unit and a paging unit )
1.Bus unit
provides the interface between the 80386 and system around it.
It gets requests for code fetches (from the Code Prefetch Unit) and data transfers (from the Execution
Unit), accordingly it generates signals to read/write data & read instructions(code)
2. Central processing unit
consists of the i) execution unit and ii) instruction unit.
i)The execution unit contains the eight 32-bit general purpose registers which are used for both address
calculation, data operations. A 64-bit barrel shifter used for fast shift, rotate, multiply, and divide
operations. The multiply and divide logic makes multiply & divide in less than one microsecond.
Execution Unit executes the instructions from the Instruction Queue.
It has three subunits :
I. The Control Unit contains microcode for each instruction and effective address calculation.
II. The Data Unit contains the ALU, a file of eight 32-bit general-purpose registers, and a 64-bit
barrel shifter (which performs multiple bit shifts in one clock). The Data Unit performs data
operations requested by the Control Unit.
III. The Protection Test Unit checks for segmentation violations under the control of the
microcode.
ii) The instruction unit :
It has two parts i) Code Pre-fetch Unit& ii) pre-decode unit
i) Code Pre-fetch Unit: When the Bus Unit is not accessing bus, the Code Pre-fetch Unit uses
the Bus Unit to fetch next instructions,
ii) pre-decode unit; decodes up to 3 the instruction opcodes and stores them in a queue called pre-
decoded instruction queue , which can be directly executed by the execution unit.
These two units makes processing faster.
3.The memory management unit (MMU)
Consists of i) a segmentation unit and ii) a paging unit.
i) Segmentation Unit
The Segmentation Unit translates logical addresses into linear addresses
The translated linear address is forwarded to the Paging Unit( if it is enabled) ,else directly
sent to bus unit.
The segmentation unit provides four-levels of protection for isolating and protecting
applications and the operating system from each other.
ii) Paging Unit
When the 80386 paging mechanism is enabled, then Each segment is divided into one or
more 4Kbyte pages. The Paging Unit translates linear addresses generated by the
Segmentation Unit or the Code Prefetch Unit into physical addresses. (If paging is not
enabled, the physical address is the same as the linear address, and no translation is
necessary.) The Page Descriptor Cache stores recently used Page Directory and Page Table
entries in its Translation Lookaside Buffer (TLB) to speed this translation.
The Paging Unit forwards physical addresses to the Bus Interface Unit to perform memory
and I/O accesses
Operatingmodes of80386
• Segment registers : memory is divided in segments which are used to store different parts of
program i.e. code (CS), stack (SS)&data( DS, ES, FS,GS)
• Flags register: control certain operations and indicate some special status of the result after
some arithmetic or logical operations
• Control Registers
The Intel386 DX has three control registers of 32 bits, CR0, CR2 and CR3, These registers, hold
machine status that for all tasks in the system.
• System Address Registers used to access the tables or segments when 80386 is operating in
protection model.
• Debug Registers:
The six debug registers provide on-chip support for debugging.
• Test Registers: used to control the testing of the Translation Lookaside Buffer
AddressingModes
It is the way the operands are specified in an instruction
Control unit decides from where to take operand and where to store the result operand based on
addressing mode used in instruction.
TheIntel386DXprovidesatotalof 11addressing modes for instructions to specify operands
1.Register Operand Mode:
• The operand is located in one of the8-, 16-or 32-bitgeneral registers.
• Eg ADD EAX,ECX
• Contents of CX are added to AX ( and result is stored in AX)
3. Direct Mode:
The operand‘s offset is contained as part of the instruction as an 8,16 or 32 bit displacement.
EXAMPLE: ADD EAX,[500E]
Offset=500E
5. Based Mode:
A BASE register‘s contents is added with a DISPLACEMENT to form the operands offset.
EXAMPLE:MOVECX,[EAX+24]
Suppose EAX contains 1000Sooffset =1024
6. Index Mode:
• An INDEX register‘s contents is added with a DISPLACEMENT to form the operands offset.
• EXAMPLE:ADD EAX,[ESI+FD]
• Suppose ESI contains 2000
• So offset=20FD
7. Scaled Index Mode:
An INDEX register‘s contents is multiplied by a scaling factor( which can either 1,2,4or8) which is
added to a DISPLACEMENT to form the operands offset.
EXAMPLE :IMULEBX,[EDI*2]+7
Suppose EDI contains 2000; So offset =4007
15. Pointer: consists of a16-bit segment selector and either a 16-or32-bit offset which
references another memory location in the different segment
These instructions are used for moving bytes, words, or double words of data between memory and the
registers of the basic architecture( real mode).
Eg MOV EAX,EBX
The contents of register EBX are copied into EAX.
Flag control instructions
Contents of some bits of flag register can be changed ( set or reset)
Eg STC
This instruction sets carry flag to 1
Eg CLC
This instruction clears carry flag to 0
Arithmetic instructions
Logical Instructions
Following Logical operations are possible AND, OR, NOT, XOR, rotate, shift , test
Eg
AND EAX, EBX
Each bit of EBX is ANDed with corresponding bit of EAX and the result of ANDing is stored in EAX.
Control transfer
Processor executes instructions in sequence, but control transfer instructions executes instruction
which is not the next in the sequence based on some decision
Eg JMP2100
1000 Instruction n
1001 Instructionn+1
1002 Instructionn+2
1003 JMP 1000
1004
1005
….
2003 Instruction z
2004 Instructionz+1
When IP(instruction pointer)is1003, theJMP1000instruction will be executed. The offset 1000 in the
instruction is added in current IP to find the address of instruction which will be executed next . The
next instruction that will executed is from address 2003
On similar lines you can write for other types of instructions namely