The Complete Understanding of Microprocessors and Intro To ARM
The Complete Understanding of Microprocessors and Intro To ARM
Architecture
Endiann
ess
Speed
Application Area
X86
Intel
1978
CISC
architecture
little
endian
33MHz Max
Desktop, portable
computer, small servers
MIPS
Microprocessor
without
interlocked
pipeline stages
1981
RISC
processor
bigendian
or littleendian
1.5Ghz Max
Embedded systems
such as Windows CE
devices, routers
residential video game
consoles, Gateways
68K
Motorola
1979
CISC
processor
bigendian
4MHz to
12.5MHz
calculators, control
systems, desktop
computers
ARM
Advanced
RISC Machine
1983
32-bit RISC
processor
bigendian
60MHz
Networking, Mobile
devices, consumer
devices, mass storage
FEATURES OF 80386:
Two versions of 80386 are commonly available:
1) 80386DX
2)80386SX
80386DX
80386SX
package
3) 16 MB of
memory
The 80386 cpu supports 16k no. of segments and thus total
virtual memory space is 4GB *16 k=64 tera bytes
Memory management section supports
Virtual memory
Paging
4 levels of protection
20-33 MHz frequency
Architecture of 80386
The Internal Architecture of 80386 is divided into 3
sections.
1.Central processing unit(CPU)
2.Memory management unit(MMU)
3.Bus interface unit(BIU)
Central processing unit is further divided into
Execution unit(EU) and Instruction unit(IU)
Execution unit has 8 General purpose and 8 Special
purpose registers which are either used for
handling data or calculating offset addresses.
Segmentation unit allows the use of two address components, viz. segment
and offset for relocability and sharing of code and data.
Segmentation unit allows segments of size 4Gbytes at max.
The Paging unit organizes the physical memory in terms of pages of 4kbytes
size each.
Paging unit works under the control of the segmentation unit, i.e. each
segment is further divided into pages. The virtual memory is also organizes in
terms of segments and pages by the memory management unit.
The data buffers interface the internal data bus with the system bus.
Register Organisation:
The 80386 has eight 32 - bit general purpose registers which may be
used as either 8 bit or 16 bit registers.
A 32 - bit register known as an extended register, is represented by the
register name with prefix E.
Example : A 32 bit register corresponding to AX is EAX, similarly BX is
EBX etc.
The 16 bit registers BP, SP, SI and DI in 8086 are now available with their
extended size of 32 bit and are names as EBP,ESP,ESI and EDI.
AX represents the lower 16 bit of the 32 bit register EAX.
0
AX
EAX
BX
EBX
CX
ECX
DX
EDX
SI
ESI
DI
EDI
BP
EBP
SP
ESP
CODE SEGMENT
STACK SEGMENT
DS
ES
FS
GS
INSTRUCTION POINTER AND FLAG REGISTER
31
16 15
0
IP
FLAGS
EIP
EFLAGS
DATA SEGMENT
VM - Virtual Mode Flag: If this flag is set, the 80386 enters the virtual
8086 mode within the protection mode.
This is to be set only when the 80386 is in protected mode. In this mode,
if any privileged instruction is executed an exception 13 is generated.
This bit can be set using IRET instruction or any task switch operation
only in the protected mode.
RF- Resume Flag: This flag is used with the debug register breakpoints.
It is checked at the starting of every instruction cycle and if it is set, any
debug fault is ignored during the instruction cycle.
The D bit specifies the code segment operation size. If D=1, the
segment is a 32-bit operand segment, else, it is a 16-bit operand
segment.
The P bit (present) signifies whether the segment is present in
the physical memory or not. If P=1, the segment is present in the
physical memory.
The G (granularity) bit indicates whether the segment is page
addressable. The zero bit must remain zero for compatibility with
future process.
The AVL (available) field specifies whether the descriptor is for
user or for operating system.
2.System Descriptors.
3.Local descriptors.
4.TSS (Task State Segment) Descriptors.
5.GATE Descriptors.
Paging:
Paging Operation: Paging is one of the memory
management techniques used for virtual memory
multitasking operating system.
The segmentation scheme may divide the physical
memory into a variable size segments but the paging
divides the memory into a fixed size pages.
The segments are supposed to be the logical segments
of the program, but the pages do not have any logical
relation with the program.
The pages are just fixed size portions of the program
module or data.
OS
31 .12
RESERVED
U
S
R
W
U
S
R
W
OS
31 .12
RESERVED
U
S
R
W
PERMITTED FOR
LEVEL
PERMITTED FOR
LEVEL
READ
NONE
NONE
READ
READ ONLY
READ
- WRITE
2 , 1 OR
/ WRITE
/ WRITE
READ
/ WRITE
READ
/ WRITE
The User / Supervisor (U/S) bit and read/write bit are used
to provide protection. These bits are decoded to provide
protection under the 4 level protection model.
The level 0 is supposed to have the highest privilege,
while the level 3 is supposed to have the least privilege.
This protection provide by the paging unit is transparent to
the segmentation unit.
INSIDE
IN THE MEMORY
80386
31
22
12
DIRECTORY
TABLE
0
OFFSET
USER
MEMORY
10
10
12
CR
31 DIRECTORY
CR 1
CR
CR
31
31
2
3
0
+
PAGE TABLE
DBA
CONTROL
REGISTERS
020000000 H
PHYSICAL MEMORY
386
PAGE N
DX CPU OS
MEMORY
TASK
MEMORY
8086OS
TASK
TASK
TASK
2
MEMORY
MEMORY
EMPTY
VIRTUAL MODE
2
TASK
MEMORY
TASK
PAGE N
MEMORY
PAGE1
AVAILABLE
8086OS
`
PAGE
DIRECTORY
ROOT
VIRTUAL MODE
8086 TASK
TASK
MEMORY
EMPTY
8086 OS
TASK 1 PAGE
TABLE
MEMORY
PAGE DIRECTORY TASK
1
000000000 H
Next page
A System with
Physical Memory Only
Examples:
Most Cray machines, early PCs, nearly all embedded systems, etc.
Memory
Physical
Addresses
0:
1:
CPU
N-1:
Memory
0:
1:
Page Table
0:
1:
Physical
Addresses
CPU
P-1:
N-1:
Disk
Superscalar Architecture
THANK YOU!!!