Anda di halaman 1dari 59

Introduction to Microprocessors

Dr. I. Wanniarachchi
Department of Physics
University of Sri Jayewardenepura
Introduction to Microprocessors(PHY 309 1.0)
Lecture hours - 15 (maximum)
Assignment - 01 or 02

Evaluation Method
The Final Exam will be Comprehensive, i.e. cover everything
we have done during the semester.

Duration : One Hour


Questions : 03 ( Answer all questions Essay/Structured )
Medium : English

Final Examination : 100%


 This course is an introduction to microprocessors and
microprocessor systems. The class covers foundations
of microprocessor architecture and assembly language
programming.
Upon completion of this course, a student:

1. Will have basic knowledge of microprocessor architecture


and microprocessor based system.
2. Will have basic knowledge of the memory and I/O interfaces,
address decoding, and bus transactions in microprocessor
based system.
3. Will be able to write basic assembly programs for
microprocessor based system.
4. Will have basic knowledge of the microcontrollers and their
Applications.
1. Introducing a computer and history

2. Von Nuemann model

3. Microprocessors architecture and operation.

4. Basic memory cell, memory organization, RAM and ROM.

5. Data types, data representations, instruction set, addressing modes

6. Microprocessor programming models

7. Assembly Language Programs, Linkers and Loaders

8. Memory interface, I/O interface

9. Microprocessor vs Microcontroller

10. Applications
 A computer is a machine which can Input the data,
Process the data and Output the results.

Process
Input Output

 The term is used for any computing device that


operates according to a stored program
What is Inputs, Processor and Outputs
World First
transistor
(Bell Labs, 1948) First Integrated
Circuit(1960)

World First
Micro-Processor
(Intel 4004, 1971)
 First generation (1939-1954) - vacuum tube

 Second generation (1954-1959) - transistor

 Third generation (1959-1971) – IC (Integrated circuit)

 Fourth generation (1971-present) - microprocessor


 First generation (1939-1956) - vacuum tube

Vacuum Tubes from an early 1950's


IBM Computer
 Second generation (1956-1964) - transistor

Manchester University Experimental Transistor Computer


 Third generation (1965-1971) - IC
 Microprocessors are normally called what we refer to as a Central
Processing Unit ( CPU ), also commonly known as the heart and
the brain of any computing machine. It fabricated on a single
integrated circuit (IC).

A simple microprocessor architecture 12


History of Microprocessor

First Microprocessor: Intel 4004


The Intel 4004 is a 4-bit A 4-bit processor
introduced in 1971
microprocessor considered to
be the first commercially
available microprocessor.

Clock rate: 740 kHz


4004 chip
Execution speed: 0.07 MIPS
Bus Width: 4 bits
Number of Transistors: 2,300
Addressable Memory: 640 bytes
Program Memory: 4 KB
Calculator built using 4004
Resource Links:
https://www.intel.com/content/www/us/en/history/museum-story-of-intel-4004.html

https://www.intel.com/content/www/us/en/history/history-robert-noyce-man-
behind-microchip-video.html

https://www.intel.com/content/www/us/en/silicon-innovations/22nm-technology-
how-transistors-are-made-video.html

https://www.youtube.com/watch?v=d9SWNLZvA8g

https://www.youtube.com/watch?v=YIkMaQJSyP8

https://www.youtube.com/watch?v=-KTKg0Y1snQ

https://www.youtube.com/watch?v=MpOysiXqROA
Other Intel Processors

8-bit processors 16-bit processors

8086 1978 4.77 MHz with 0.33 MIPS


8008 1972 Bus Width 16 bits data, 20 bits address
8080 1974 Addressable memory 1 megabyte

8085 1976 8088 1979 4.77 MHz with 0.33 MIPS


Internal architecture 16 bits
External bus Width 8 bits data, 20 bits
address
Addressable memory 1 megabyte

80186 1982
80286 1982

These were used in IBM PCs and PC


clones
Other Intel Processors

32-bit processors Pentium II 1997


80386 1985 Pentium III 1999
Up to 33 MHz clock with 11.4 MIPS
Bus Width 32 bit data, 32 bit address Pentium IV 2000
Number of Transistors 275,000
Addressable memory 4 GB

80486 1989 64-bit processors

Pentium 1993 Intel Core 2 2006


Bus width 64 bits Two cores on one die
Address bus 32 bits Number of Transistors
clock rate 60 or 66 MHz 291 Million
Addressable Memory 4 GB
http://www.pcgamer.com/a-brief-history-of-cpus-31-awesome-years-of-x86/7/
Intel Microprocessors Progression
Intel Microprocessors Progression

Date
Processor was first
introduced.
Intel Microprocessors Progression

Transistors
Number of transistors on the
chip.
Intel Microprocessors Progression

Microns
Width of the smallest wire on the chip. (
Human hair is 100 microns thick ).
Intel Microprocessors Progression

Clock speed

Maximum rate that the chip


can be clocked
Intel Microprocessors Progression

Data width

Data width of the ALU.


Intel Microprocessors Progression

MIPS

Millions of instructions per second. This is the


rough measurement of microprocessor
performance
Intel Microprocessors Progression
How we calculate the number of clock cycles use
for executing one instruction ( Speed of
instruction execution )
Example -01
8088 Microprocessor has a 5MHz clock speed and 0.33
MIPS value. Calculate the number of clock cycles use for executing
one instruction

Clock speed
Number of clock cycles per one
instruction =
Instructions per second ( MIPS )
Number of clock cycles per one 5 x 106 Hz 500
instruction = = ~ 15
0.33 x 106 33

Answer :
8088 microprocessor use 15 clock cycles for executing one
instruction
Calculate the speed of instruction execution
for 8088 M.P.

Speed of instruction Periodic time


Number of clock cycles per one
execution
instruction

1
15
5 x 106 Hz

3 x 10-6 s
Example -02

Calculate the number of clock cycles use for executing one instruction for
Pentium IV microprocessor.
Clock speed – 1.5GHz
MIPS – 1700

Number of clock cycles per one 1.5 x 109 Hz 1.5


instruction ~1
1700 x 106 1.7

Answer :
Pentium IV microprocessor use 1 clock cycles for executing one instruction

Speed of instruction execution 6.67 x 10-10 s


Comparing the speed of 8088 and Pentium IV
microprocessor.
Speed of instruction execution for 8088 M.P. = 3x 10-6 S

Speed of instruction execution for P-IV M.P. = 6.67 x 10-10 s

3 x 10-6 s

6.67 x 10-10 s

4.5 x 103

Pentium IV M.P. 4500 times faster than


the 8088 M.P.
 Microprocessor-based systems are electrical systems consisting of
microprocessors, memories, I/O units, and other peripherals.
 Microprocessors are the brains of the systems
 Microprocessors access memories and other units through buses
 The operations of microprocessors are controlled by
instructions stored in memories

Microprocessor
Bus
Control
unit

Datapath

ALU
Output Input
Reg. Memory
units units
von Neumann Architecture

Processor

Memory Input/Output

A single computing element with

a processor, memory and I/O


von Neumann Architecture

 A linear organization of fixed size memory cells


A machine language with instructions performing simple
operations on elementary operands
Sequential, centralized control of computation

A linear organization of
fixed size memory cells One byte Memory

1 1
2
3 2
4 3 One bit
5 Memory Address
6 4 Memory Cell
7 5
8 6
9
7
10
11 8
12
9
13
14 10
. 11
.
12
.
.
A machine language with instructions performing simple
operations on elementary operands

MOV A,10 Move value 10 to register A


MOV B,A Move content of register A to register B
MOV [10],A Move content of register A to memory location 10
ADD A, B Add content of B to content of A and store in A
SUB A,B Subtract content of B from content of A and store in A
MUL A,B Multiply content of B by content of A and store in A
JMP 10 Jump to instruction in memory location 10
Sequential, centralized control of computation

Central
Storage Processing
Unit

Input CPU Output

Memory
System Bus Model
Address bus

CPU Memory Storage I/O

Data bus

Control bus
Inside a CPU
Early CPUs are split into three main sections:
ALU (Arithmetic & Logic Unit) — this is a circuit that performs calculations and logical
comparisons.
Registers — numbers that are being processed are stored here. Each register is "word"-
sized and can be accessed at high-speed.
Instruction Decoder — this controls all other parts of the CPU, sending signals in preset
patterns to shift data between registers, the ALU and the main data and address buses.

A word is defined by the size of the CPU's


registers. This measurement is also used to
describe the capability of the processor. Thus
a "16-bit CPU" has 16bit-sized registers. The
external data bus is often the same width as
the registers.
The external address bus will have a different
width, depending on the amount of memory
that it may access.
Internal Components of a Microprocessor

 Registers (Special Purpose and General Purpose)


 Arithmetic and Logic Unit (ALU)‫‏‬
 Control Unit
 Bus Interface (Address, Data, Control Busses)
Registers

 A register is a group of memory cells arranged as a


single memory word, typically consisting of 8, 16 or
32 bits. A typical microprocessor has a number of
such registers. They are used for temporary storage
of information within the CPU.

Arithmetic and Logic Unit (ALU)

 The ALU is the part of the CPU that performs arithmetic


and logic operations. It consists of a number of complex
logic circuits for performing operations such as addition,
subtraction, and multiplication on binary numbers.
Bus Interface
 A microprocessor is connected to external components
such as memory and I/O devices through several sets
of signal lines called buses. The bus interface
coordinates the activities related to transferring data
into and out of the microprocessor through these buses.

Control Unit

The entire operation of a microprocessor is managed by


the control unit. During normal operation, the CPU is
engaged in what is called a fetch-execute cycle.
 Instruction Register
In computing, an instruction register (IR) is the part of a
CPU's control unit that stores the address of the next
instruction currently being executed or decoded.

 A, B, C, D Register (A - Accumulator)
Accumulator (A, or ACC)

The accumulator is used to hold the result of operations


performed by the arithmetic and logic unit, as covered in
the section on the ALU.

A, B, C, D Registers

Those Registers is used to store data temporary inside


the Microprocessor.
44
 Status Register

This register is specially designed to contain all the


appropriate 1-bit status flags, which are changed
as a result of operations involving the arithmetic
and logic unit. Further information can be found in
the section on the ALU.

Program Counter (PC)

A program counter is a register in a computer


processor that contains the address (location) of
the instruction being executed at the current time.
As each instruction gets fetched, the program
counter increases its stored value by 1.

45
Important
Characteristics of Microprocessors

Sizes of data and address buses

Clock speed

Speed of instruction execution

Number and size of registers

Instruction set
 Fetch the Instruction from the memory.

 Fetch the operation of the Instruction.

 Decode the Instruction.

 Execute the Instruction.

 Output the results.

47
Fetch an instruction from the memory location
pointed by Program Counter (PC)‫‏‬
Increment PC by 1
Execute instruction

48
 Fetch an instruction from the memory.
( Read instruction from memory )

The CPU puts the address of the instruction to be executed on


the address bus. The address information comes from the
program counter (PC) maintained by the control unit.

 The control bus holds the information for reading the memory
location and the data bus holds the instruction from the
memory which is stored into the instruction register (IR).

 Program counter (PC) is updated to point to the next


instruction.
 Put a plan into action ( Activate the given instruction)

 Instruction in the IR is decoded. (Using Instruction


Decoder ).

 The required data transfer and the required logical and


arithmetic operation are performed.

 The result is written back either to one of the registers or


memory or I/O device
FETCH
EXECUTE

MOV A,5 5

+1 32
FETCH
EXECUTE

MOV B,4 5

+1 3
4
FETCH

ADD A,B 5

4
c

+1 45
EXECUTE

ADD A,B 5
9

4
5 4

+
FETCH

MOV [10],A 95

+1 65
EXECUTE

MOV [10],A 95

65

10
Fetch-Execute Cycle

Fetch an instruction from the memory location pointed


by Program Counter (PC)‫‏‬
Increment PC by 1
Execute instruction
Fetch-Execute Cycle

A computer is always engaged in a

FETCH-EXECUTE CYCLE

unless modified by
an interrupt,
a reset signalinstruction etc.

a HALT
End of Part 1

Anda mungkin juga menyukai