Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 42

EEE 431

Microprocessors
(2 0 3 3 units)
Prof G. A. Chukwudebe
Course Content
• Introduction to Microprocessors and Microcomputers.
• Basic architecture of the 8 bit Microprocessor, the Intel 8085/86
and the Motorola 6800 and 68000;
• Instruction set and addressing scheme. Microprogramming and
Assembly language instructions.
• Interfacing to the real world and embedded system design with
microcontrollers.
Background
• The advent of low-cost computers and integrated circuits has
transformed modern society.
• General-purpose microprocessors in personal computers are used
for
 computation,
 text editing,
 multimedia display,
 communication over the Internet, etc.
• Many more microprocessors are part of embedded systems,
providing digital control of a myriad of functions:
 Home appliances
 automobiles
 cellular phones
 industrial process control, etc.
HISTORICAL DEVELOPMENT OF COMPUTERS
• First Generation Computers
 ENIAC and UNIVAC were built with vacuum tubes in the 1940s.
 Their power consumption was high and their reliability was very poor.
 They were also very expensive.

• Second Generation Computers


 With the discovery of transistors in 1948, the second generation of
computers performed better because they were built with transistors.
 Although their size was still massive occupying a whole building, they
could perform processing operations at amazing speed.
 They were called mainframes.
 Mainframe computers were very expensive only very few rich
organisations were able to own it.
HISTORICAL DEVELOPMENT OF COMPUTERS ctd
• Third Generation Computers
 By 1958, integrated circuits had been developed so all computers were
manufactured thereafter with integrated circuit technology.
 This caused a dramatic reduction in the size of computers, they were
called minicomputers because of their size.
 Minicomputers were still expensive and only big organisations could
afford minicomputers.

• Fourth generation Computers


 In 1971, the Central Processing Unit (CPU) of a computer was successfully
integrated on a single silicon chip while trying to make a calculator on a chip.
 This chip was called a microprocessor (4004) by Intel Corp. (U.S. Patent
#3,821,715),
 the Intel engineers Federico Faggin, Ted Hoff, and Stanley.
 8008, then 8080, 8085 Microprocessors followed.
 IBM bought the idea and used the microprocessor to make small size computers
called Microcomputers .
 Microcomputers were affordable by individuals, hence they were called Personal
Computers (PCs).
Microcomputer evolution
• The microcomputer industry has gone through a revolution,
consequently there are various configurations:
• Desktop PC,
• Laptop,
• Notebook
• and Palmtop PCs.
VON NEUMANN COMPUTER ARCHITECTURE

• The architecture of mainframe,


minicomputers and CENTRAL
INPUT PROCESSING OUTPUT
microcomputers has remained UNIT UNIT UNIT
similar i.e
• the von Neumann architecture.
• Von Neumann proposed
 a one processor computer MEMORY
architecture with UNIT

 memory elements
 and input/output ports for Von Neumann Architecture
interfacing to the peripherals
Von Neumann contribution-
• Early computer programs were hard wired.
• To reprogram a computer meant changing the hardware switches manually,
that took a long time with potential errors.
• Computer memory was only used for storing data.

• John von Neumann suggested that data and programs should be stored
together in memory.
• Programs are fetched from memory for execution by a central unit that we
call the CPU.
• Basically programs and data are represented in memory in the same way.

Fetch and Execute Cycle of the Computer System


• Fetch - An instruction and the necessary data are obtained from memory.
• Decode- The instruction and data are separated, and the components and
pathways required to execute the instruction are activated.
• Execute- The instruction is performed, the data is manipulated, and the
results are stored.
Control and the Datapath
• This pattern is typically implemented by separating the task into two
components, the control, and the datapath.
Control
• The control unit reads the instruction, and activates the appropriate parts of
the datapath.
Datapath
• The datapath is the pathway that the data takes through the microprocessor.
• As the data travels to different parts of the datapath, the command signals
from the control unit cause the data to be manipulated in specific ways,
according to the instruction.
• The datapath consists of the circuitry for transforming data and for storing
temporary data.
 It contains ALUs capable of transforming data through operations such as
addition, subtraction, logical AND, OR, inverting, and shifting.
Harvard Architecture or Princeton Architecture
• In a Harvard Architecture machine, the computer system's memory is separated into two
discrete parts: data and instructions.
• In a pure Harvard system, the two different memories occupy separate memory modules,
and instructions can only be executed from the instruction memory.

• In a "Princeton Architecture" machine, the computer system's memory comprises one


uniform address space: data and instructions may be placed anywhere in this single
memory.

• Many DSPs are modified Harvard architectures, designed to simultaneously access three
distinct memory areas:
• the program instructions, the signal data samples, and the filter coefficients (often called
the P, X, and Y memories).

• In theory, such three-way Harvard architectures can be three times as fast as a Princeton
architecture that is forced to read the instruction, the data sample, and the filter
coefficient, one at a time.

• In Princeton architecture systems, there is only one memory area. Any particular memory
location that can be written to and read as data at any one time can also be executed as
an instruction at other times.
Non-von Neumann architectures use more
than one processor eg
• Systolic Array- Single Instruction Multiple Data (SIMD)
• MIMD- Multicore
• Manycore

• Systolic Array- Single Instruction


Multiple Data (SIMD)
• a parallel computer
architectures, .
 A set of simple Processing
Elements with regular and local
connections which takes external
inputs and processes them in a
predetermined manner in a
pipelined fashion.
• MIMD- Multicore

Many Core CPU

Core 1 Core 2 Core 3 Core 4


COMPUTER SIGNAL ORGANIZATION - BUSES
• Wires that carry similar
signals in the computer is
called a bus. CONTROL CONTROL

• There are three buses in the INPUT


CENTRAL PROCESSING
computer: UNIT ADDRESS
UNIT
ADDRESS OUTPUT
UNIT

• Control bus.
DATA DATA
• Data bus.
• Address bus. D A C

• Thus communication
D O
A D N
T R T
E R

between the CPU, Memory A


O
L

unit and I/O units are


organised through the three
buses (Fig.3). MEMORY UNIT

• Inside the CPU the signals are


also arranged as three buses:
Fig.3: The Bus architecture of Computer system.
control, data and address.
I/O and MU
INPUT UNIT
• The input unit comprises of the input ports that have become
standardised to work with various types of input peripherals such as
the
 keyboard, mouse, joystick etc.
OUTPUT UNIT
• Similarly, the output ports have also been standardised to work well
with output peripherals such as the
 monitor, printer, speakers, etc.
MEMORY UNIT(MU)
• Computer memory is classified into
 primary e.g.: RAM, ROM
 and secondary e.g. : CD, harddisk
CENTRAL PROCESSING UNIT (CPU)
• The CPU is presently integrated on a chip called microprocessor.
• Although there are various types and manufacturers, Intel’s
product, the Pentium processor has dominated the market.

CPU of Main Frame

CPU inside system unit of


a desktop

CPU - Microprocessor
A microprocessor system?
• Microprocessors are powerful pieces of
hardware, but not much useful on their own

• Just as the human brain needs hands, feet, eyes,


ears, mouth to be useful; so does the
microprocessor

• A microprocessor system is
• microprocessor plus all the components it
requires to do a certain task.

• A microcomputer is an example of a
microprocessor system.
The Microprocessor?
• CPU integrated on a chip

 A tiny piece of Silicon that has several electronic parts on it.

• Most of the size of an IC comes form the pins and packaging; the
actual Silicon occupies a very small piece of the volume.

• The smallest components on an IC are much smaller than the


thickness of a human hair.
The 1st Microprocessor : Intel
4004
• Introduced 1971
• 2250 transistors
• 108 kHz, 60,000 ops/sec
• 16 pins
• 10-micron process
• As powerful as the ENIAC which had 18000 tubes and
occupied a large room
• Targeted use: Calculators
• Cost: less than $100
Types of microprocessors
• Intel is the industry leader in manufacturing microprocessors.

• After 4004, Intel produced 8008 1972.

• The first microprocessor to make it into a home computer was the


Intel 8080, a complete 8-bit computer on one chip, introduced in
1974.

• The first microprocessor to make a real splash in the market was the
Intel 8088, introduced in 1979 and incorporated into the IBM PC
(which first appeared around 1982).

• The PC market moved from the 8088 to the 80286 to the 80386 to the
80486 to the Pentium, Pentium Pro to the Pentium II to the Pentium
III to the Pentium 4.
Types of Microprocessors ctd
• All of these microprocessors are made by Intel and all of them are
improvements on the basic design of the 8088.

• The Pentium 4 can execute any piece of code that ran on the original 8088,
but it does it about 5,000 times faster!

• Intel launched a new improved microprocessor that was compatible with


the previous one every other year;

• 8008
• 8080,
• 8085,
• 8086,
• 80125,
• 80286,
• 80386,
• 80486,
• 80586,
• PentuimPro,
• Pentium I, II, III & IV, Itanium.
Other microprocessors
• Zilog Z80 (1976),
• Motorola 6800 was released August 1974 and the similar MOS
Technology 6502.
• 68000
Inside an 8 bit Microprocessor
Arithmetic and Logic Unit (ALU):
• The ALU performs the numerical
calculations and comparative logic
functions, including all add, subtract, INSTRUCTION REGISTER
divide, multiply, equal to, greater than, A Register
less than, and other arithmetic and logic INSTRUCTION DECODER 8 bits.
operations. B Register C Register

Control Unit (CU): It may sound obvious, but 8 bits. 8 bits.


the control unit controls the processor's D Register E Register

functions Control
8 bits. 8 bits.

• by telling the other parts of the CPU unit H Register L Register

how to operate, what data to use, and ALU


8 bits. 8 bits.
Stack pointer
where to put the results.
16 bits.
Decoder Unit: Most program instructions Program counter
are combinations of simpler instructions.
16 bits.
• The decoder unit decodes incoming
instructions into individual CPU
commands.
Registers: used to temporarily hold data,
addresses, and instructions being passed
around between the CPU's components. Inside an 8 bit microprocessor.
INSTRUCTION REGISTER
A Register
INSTRUCTION DECODER 8 bits.
B Register C Register

8 bits. 8 bits.

D Register E Register

Control ALU
8 bits.
H Register
8 bits.

L Register

unit 8 bits. 8 bits.

Stack pointer

16 bits.

Program counter
16 bits.

Inside an 8 bit microprocessor.


How do you use Microprocessors?
• Every CPU/Microprocessor has its own
Instruction set.
• The instruction set is the list of machine
instructions it can execute.
• The 8085 for instance has 74 instructions in its
set.
• For convenience, the instruction set is written in
Assembly language.
• Assembly language is a short hand/mnemonic
representation of machine code.
CISC or RISC
• The type of instructions and addressing modes are used
to also classify CPUs (microprocessors) as
CISC – Complex Instruction Set Computer
Architecture
or RISC- Reduced Instruction Set Computer
Architecture.

• Intel and many early CPUs were designed with CISC


architecture.

• PowerPC, ARM, MIPS and SPARC architectures. are


examples of RISC processors.
CISC and RISC
CISC
• CISC systems have more instructions, but typically pay
a steep performance penalty for the added versatility.
• CISC systems actually have "complex instructions", in
the sense that at least one instruction takes a long time
to execute -- for example, the "double indirect"
addressing mode inherently requires two memory
cycles to execute, and a few CPUs have a "string copy"
instruction that may require hundreds of memory
cycles to execute.
RISC
RISC
• Reduced Instruction Set Computer (RISC) was realized in the
late 1970s by IBM.
• Researchers discovered that most programs did not take
advantage of all the various address modes that could be
used with the instructions.
• By reducing the number of address modes and breaking
down multi-cycle instructions into multiple single-cycle
instructions several advantages were realized:
• compilers were easier to write (easier to optimize)
• performance is increased for programs that did simple operations
• the clock rate can be increased since the minimum cycle time was
determined by the longest running instruction
• RISC system actually have "reduced instructions", in the
sense that each instruction does so little that it takes very
little time to execute it.
Advances in Microprocessors
Word size
• As integrated circuit technology advanced, it was feasible to
manufacture more and more complex processors on a single chip.
• allowing more transistors on a chip allowed word sizes to increase from 4- and 8-bit
words up to today's 64-bit words.
• Additional features were added to the processor architecture; more on-
chip registers speeded up programs, and complex instructions could be
used to make more compact programs.
• Floating-point arithmetic, for example, was often not available on 8-bit
microprocessors, but had to be carried out in software.
• Integration of the floating point unit first as a separate integrated circuit and then as
part of the same microprocessor chip, speeded up floating point calculations.
• Historically, microprocessors and microcontrollers have come in
"standard sizes" of 8 bits, 16 bits, 32 bits, and 64 bits.
• These sizes are common, but that does not mean that other sizes are not
available.
Word size- Microprocessors ctd
• The number of bits represent how much physical memory can be
directly addressed by the CPU.
• It also represents the amount of bits that can be read by one
read/write operation.
• In some circumstances, these are different;
• for instance, many 8 bit microprocessors have an 8 bit data bus and a 16
bit address bus.
• 8 bit processors can read/write 1 byte at a time and can directly
address 256 bytes
• 16 bit processors can read/write 2 bytes at a time, and can address
65,536 bytes (64 Kilobytes)
• 32 bit processors can read/write 4 bytes at a time, and can address
4,294,967,295 bytes (4 Gigabytes)
• 64 bit processors can read/write 8 bytes at a time, and can address
18,446,744,073,709,551,616 bytes (16Exabytes)
CACHE
• With the ability to put large numbers of transistors on one chip, it
becomes feasible to integrate memory on the same die as the
processor.
• This CPU cache has the advantage of faster access than off-chip
memory, and increases the processing speed of the system for many
applications.
• Generally, processor speed has increased more rapidly than external
memory speed, so cache memory is necessary if the processor is not
to be delayed by slower external memory.

PROCESSOR
cache
Packaging of microprocessors
• Dual in line packages -8080, 8086.

• With advances in VLSI, it was possible to package millions of


transistors on a chip. To solve the pin out and power dissipation
problems, Pin Grid Array (PGA)was developed with a cooling fan.

• Example Pentium-class processors.


• 273-pin PGA package
• 320-pin staggered pin grid array (SPGA)
More on Pentium-class processors
• Pentium: This processor features 32-bit multitasking using RISC design techniques
and a superscalar architecture that executes two instructions in the same clock cycle.
• Pentium Pro: The Pentium Pro was developed as a network server processor
specially designed to support 32-bit network operating systems, such as Windows
NT, and to be used in configurations of one, two, or four processors, with 1 megabit
of advanced second level (L2) cache.
• Pentium II: The Pentium II is the Pentium Pro with MMX technology added.
• The P–II, as it is commonly referred to, is excellent for multimedia work that requires
support for full-motion video and 3D images.
• Celeron: Developed for use in desktop and portable computers, the Celeron is a
low-cost version
• of the Pentium II.
• Pentium III: Although later surpassed by the Pentium IV, had 9.5 million transistors,
a 32K L1 cache, 512K of L2 cache, and clock speeds of 450MHz to 1GHz.
• Xeon: -is a network server processor that is capable of addressing and caching up to
64GB of memory with its 36-bit memory address bus.
• Xeon processors can be configured with 4 to 8 CPUs in one server.
Other 32-bit Processors designs
• Motorola MC68000 was introduced in 1979.
• The 68000 had 32-bit registers in its
programming model but used 16-bit internal
data paths,
• 3 16-bit Arithmetic Logic Units,
• and a 16-bit external data bus (to reduce pin
count),
• and externally supported only 24-bit
addresses (internally it worked with full 32 bit
addresses).
Other 64-bit Microprocessors
• Sixty-four-bit processors have 64-bit ALUs, 64-bit registers, 64-bit
buses and so on.
• One reason why the world needs 64-bit processors is because of
their enlarged address spaces.
• Thirty-two-bit chips are often constrained to a maximum of 2 GB
or 4 GB of RAM access.
• A 64-bit chip has none of these constraints because a 64-bit RAM
address space is essentially infinite for the foreseeable future --
2^64 bytes of RAM is something on the order of a billion
gigabytes of RAM.
• With a 64-bit address bus , high-speed data buses on the motherboard, 64-bit
machines offer faster I/O (input/output) speeds to things like hard disk drives
and video cards.
• Useful for graphic applications, High-end video games
• But the average user who is reading e-mail, browsing the Web and editing Word
documents is not really using the processor in that way.
Examples
• AMD64 a 64-bit architecture was in September 2003 it was
backwards-compatible with x86, x86.
• Another example is the PowerPC processors.
Improvements in Microprocessor design

• Multicore designs
• A different approach to improving a computer's performance is to add extra
processors, as in symmetric multiprocessing designs, which have been popular in
servers and workstations since the early 1990s.
• A multi-core processor is simply a single chip containing more than one
microprocessor core.
• This effectively multiplies the processor's potential performance by the number of
cores (as long as the operating system and software is designed to take advantage of
more than one processor core).
• Some components, such as bus interface and cache, may be shared between cores.
• Because the cores are physically very close to each other, they can communicate with
each other much faster than separate processors in a multiprocessor system, which
improves overall system performance.
• In 2005, the first personal computer dual-core processors were announced.
• As of 2012, dual-core and quadcore processors are widely used in home PCs and
laptops while quad, six, eight, ten, twelve, and sixteen-core processors are common
in the professional and enterprise markets with workstations and servers.
• Sun Microsystems has released the Niagara and Niagara 2 chips, both of which feature
an eight-core design.
• The Niagara 2 supports more threads and operates at 1.6 GHz.
Microprocessor Memory
ROM chip
• ROM stands for read-only memory.
• A ROM chip is programmed with a permanent collection of
pre-set bytes. The address bus tells the ROM chip which byte
to get and place on the data bus.
RAM stands for random-access memory.
• contains bytes of information, and the microprocessor can
read or write to
• RAM chips are volatile- they forget everything once the power
goes off.
• There are two types
• DRAMs and SRAMS.
How Microprocessor uses the ROM
and RAM
• On a PC, there is a ROM BIOS (Basic Input/Output System).
• When the microprocessor starts, it begins executing instructions it
finds in the BIOS.
• The BIOS instructions do things like test the hardware in the
machine, and then it goes to the hard disk to fetch the boot sector
• This boot sector is another small program, and the BIOS stores it in
RAM after reading it off the disk.
• The microprocessor then begins executing the boot sector's
instructions from RAM.
• The boot sector program will tell the microprocessor to fetch
operating system from the hard disk into RAM, which the
microprocessor then executes, and so on.
• This is how the microprocessor loads and executes the entire
operating system.
Microprocessor Instructions
Examples of assembly language instructions:
• LOAD A mem - Load register A from memory address
• LOAD B mem - Load register B from memory address
• SAVE B mem - Save register B to memory address
• SAVE C mem - Save register C to memory address
• JUMP addr - Jump to an address
• JEQ addr - Jump, if equal, to address
• JNEQ addr - Jump, if not equal, to address
• STOP - Stop execution

• An assembler (program) translates assembly language instructions into


machine code before the microprocessor can execute.
• Every microprocessor has its own assembly language code.
RECAP
• Microprocessor is the CPU of the computer integrated on a chip.
• Three basic characteristics are used to differentiate microprocessors:
• Instruction set: The set of instructions that the microprocessor can
• execute.
• Word size/bandwidth : The number of bits processed in a single instruction.
• Clock speed : Given in megahertz (MHz),
• The clock speed determines how many instructions per second the processor
can execute.
• In both cases, the higher the value, the more powerful the CPU.
• For example,
• a 32-bit microprocessor that runs at 50MHz is more powerful than a 16-bit
microprocessor that runs at 25MHz.
• In addition to bandwidth and clock speed, microprocessors are classified as
being either RISC (reduced instruction set computer) or CISC (complex
instruction set computer).
• Processor architecture can be Single core, multi core or many core.
• The dat path architecture can be Pipeline, Super-pipeline, super-scaler, etc
Intel Corporation
• Microprocessors made by Intel Corporation form the foundation
of all PCs.
• Models after the 8086 are often referred to by the last three digits
(for example,
• the 286, 386, and 486 ).
• Many of the microprocessors come in different varieties that run
at various clock rates. The 80486 architecture, for example,
supports clock rates of from 33 to 66 MHz.
• All Intel microprocessors are backward compatible, which means
that they can run programs written for a less powerful processor.
• The 80386, for example, can run programs written for the 8086,
8088, and 80286.
• The common architecture behind all Intel microprocessors is
known as the x86 architecture.
General Purpose Versus Specific Use
General Purpose Microprocessors
• Microprocessors that are capable of performing a wide range of tasks are
called general purpose microprocessors.
• General purpose microprocessors are typically the kind of CPUs found in
desktop computer systems.
• These chips typically are capable of a wide range of tasks (integer and
floating point arithmetic, external memory interface, general I/O, etc).

General Purpose
• A general purpose processing unit, typically referred to as a
"microprocessor" is a chip that is designed to be
 integrated into a larger system with peripherals and external RAM.
 These chips can typically be used with a very wide array of software.
Application Specific Processors
A Digital Signal Processor -DSP
• A Digital Signal Processor, or DSP for short, is a chip that is specifically designed for fast
arithmetic operations, especially addition and multiplication.
• These chips are designed with processing speed in mind, and don't typically have the same
flexibility as general purpose microprocessors.
• DSPs also have special address generation units that can manage circular buffers, perform bit-
reversed addressing, and simultaneously access multiple memory spaces with little to no
overhead.
• They also support zero-overhead looping, and a single-cycle multiply-accumulate instruction.
• They are not typically more powerful than general purpose microprocessors, but can perform
signal processing tasks using far less power (as in watts).
Embedded Controller
• Embedded controllers, or "microcontrollers" are microprocessors with additional hardware
integrated into a single chip.
• Many microcontrollers have RAM, ROM, A/D and D/A converters, interrupt controllers, timers,
and even oscillators built into the chip itself.
• These controllers are designed to be used in situations where a whole computer system isn't
available, and only a small amount of simple processing needs to be performed.

You might also like