Microprocessors
Central Processing Unit (CPU)
Core Components
Concepts
• The CPU (Central
Processing Unit)
works as a very
powerful
calculator
• CPUs are not very
smart…just very
fast at
manipulating
zeroes and ones
Man in the Box
• Visualize the CPU as a man in a box.
– He will gladly perform anything you want him to do, but
he can’t see or hear anything outside the box.
– How can we communicate with him?
Is anyone out
there?
We need some
way to talk to the
guy inside the box
Talking to the Man
• Imagine 16 lights
– 8 on the inside and 8 on the outside
– When an inside light is on, the corresponding
outside light is on. We can switch these lights
on and off.
– This communication system is like the
external data bus
Talking to the Man
• In reality, a lot of little wires flash on or
off
– Voltage is applied or not
– Represented not as on, on, off, off…
but as 1, 1, 0, 0…
On On Off Off Off On On On
1 1 0 0 0 1 1 1
External Data Bus
• The CPU communicates with the outside
world using the external data bus (EDB)
– Instead of light bulbs, the EDB is made up of tiny
wires
– The state of a wire is expressed in a binary format,
with zeroes and ones
– Each discrete setting (series of zeroes and ones
representing the state of the wires) of the EDB is a
line of code in a program
Registers
• Inside the box are registers (temporary storage
locations)
• The four general-purpose registers found in all
CPUs are AX, BX, CX, and DX
10000101 11001001
00110101 10100001
Codebook
• The man in the box needs one more tool:
the codebook or instruction set
– Called machine language
– One command is a line of code
– The complete set of commands for a processor is
its instruction set
Instruction Meaning
1000 0000 Store next line in AX
1001 0000 Store next line in BX
1011 0000 Add AX to BX & store in AX
1100 0000 Place AX on EDB
Codebook (Instruction Set)
Instruction Meaning
1000 0000 Store next line in AX
1001 0000 Store next line in BX
1011 0000 Add AX to BX & store in AX
1100 0000 Place AX on EDB
1000 0000 Instruction (store data in AX)
0000 0001 Data (number 1)
1001 0000 Instruction (store data in BX)
0000 0010 Data (number 2)
1011 0000 Instruction (add AX and BX and place in AX)
1100 0000 Place AX on EDB
Clock
• The CPU does no work
until told to—even
though data may be on z
the EDB z
10000101
00110101
• You need a buzzer to
tell the man in the box
to start
– This is referred to as a
Time to
clock work
– A clock is actually a 10000101
stream of pulses 00110101
Clock
• A clock cycle is the time taken by the
special wire to charge up
– The CPU needs at least two clock cycles to act on
each command
– A cycle is one complete up and down segment of
the sine wave
• The maximum number of clock cycles
that can be handled by the CPU is called
the clock speed
System Crystal
• The system crystal defines the speed at
which the CPU and the rest of the PC
operate
– Quartz oscillator, usually soldered to the
motherboard
• Overheating results from overclocking
the CPU (running it faster than its
maximum clock speed)
In Summary
• The CPU is like a man in a box
• The external data bus gets data in and out of
the CPU
• Registers are used as temporary storage
inside the CPU
• The instruction set is like a codebook
• The clock defines the speed of the CPU
10000101 11001001
00110101 10100001
CompTIA A+
Essentials
Modern CPUs
CPU Overview
• Several specification are used to
describe and compare CPUs:
– Make (Intel, AMD)
– Model (Pentium, Athlon, etc.)
– Packages, or how it’s mounted (PGA, SEC, SEP)
– External speed (speed of crystal)
– Multiplier (applied to crystal)
– Cache (L1 and L2)
– Internal speed (speed when crystal multiplied)
– Pipelining
– Hyper-threading
Manufacturers
• Two main CPU makers
– Intel
– AMD
• CPUs might look similar, but they are not
interchangeable
Common CPU Packages
• Pin grid array (PGA)
– Most common
– Number of pins vary by processor
– Plugs into sockets that vary by processor
• Single edge cartridge (SEC)
– Single edge processor (SEP) is similar
– Processor mounted on board
– Board plugs into motherboard
• Zero insertion force (ZIF)
– Allows processor to be easily inserted
– Arm locks processor in place
Pentium CPU—The Early Years
• CPU makers have added a large number
of improvements over the years
– Larger external data buses
– Larger address buses
– Faster clock speeds
• Intel introduced the Pentium CPU in the
early 1990s
– 32-bit registers
– Speeds up to 300 MHz
– Ability to run multiple programs at once
– Access super-fast cache RAM
– Processes two or more lines of code at the same
time
32-bit Addressing
• Current operating systems are referred
to as 32-bit (232)
– Can directly address 4 GB of memory
• Early Pentiums had 32-bit address bus
• Newer CPUs have 36-bit address bus
– 236 allows addressing 64 GB of RAM
– Some 32-bit operating systems address the extra
memory via “extensions”
– Memory is swapped in and out of the 4 GB base as
needed
Pipelining
• A pipeline is a series of steps taken by the
CPU to process a command
• Pipelining is the process of processing
more than one command at a time through
the use of separate sets of circuitry
– Works like an assembly line
– Commands go through the processor on a
“conveyer belt”
– Enables the processor to work on more than one
thing at a time
Cache
• Cache is separate storage
RAM
area used for quick access
of data 1011 0101 CPU
1100 1010
– CPU runs faster than RAM 1001 1111
1100 0111
– Using a faster RAM cache 1101 1101
close to the CPU helps the 0001 1101
CPU run without waiting 1011 0110
1001 0001
– L1: close to the CPU and
fastest
RAM Cache
– L2: faster than RAM
L2 Cache
• L2 was originally on
the motherboard
– Referred to as external
cache
– Not uncommon on
today’s CPUs
• Size of the cache
varies from 0 to
1 MB
Clock Speed and Multipliers
• The clock is derived from
the crystal
– Referred to as external
speed
Original clock
• Clock is multiplied and
CPU runs at quicker
speed
– CPU runs at much quicker
multiplied speed
• 66 MHz crystal
• Sent through a 2X multiplier Clock with 2x multiplier
• Gives a 132 MHZ CPU Has twice as many cycles
for CPU to operate with
CPU Voltages
• Older CPUs needed 5 volts
– CPU voltage was reduced to 3.3 volts
• Later improvements reduced voltage
even more with no single standard
– Smaller size resulted in lower voltage and smaller
chips
– Voltage regulator module (VRM) is a small card that
enables a CPU to standardize voltage regulators
– CPU reports voltage requirements with CPUID
Older CPUs
Early AMD K5 Pentium
Pentiums Pro
Ext. speed 50–66 MHz 50–75 MHz 60–66 MHz
Int. speed 60–200 MHz 60–150 MHz 166–200 MHz
Multiplier 1x to 3x 1.5x to 2x 2.5x to 3x
L1 16 KB 16 KB 16 KB
L2 256 KB,
512 KB, 1 MB
Package PGA PGA PGA
Socket Socket 4, 5 Socket 7 Socket 8
Remarks High-end
systems
Improvements
• Out-of-order processing
– Enabled processors to predict data that was needed
– 90% accuracy in pulling the correct data
• On-chip L2 cache
– On the same package, but not necessarily on the
same chip
Bus Types
• Frontside bus
– Address bus and external data bus are combined
together between the CPU, MCC, and RAM
• Backside bus
– Connection between the CPU and L2 cache
• Remember that L2 cache used to be external cache but is
now internal to the CPU housing
CPU
MCC RAM
Backside
bus L2 Cache
Frontside bus
Older CPUs
Later Pentium II AMD K6
Pentiums
Ext. speed 66–75 MHz 66–100 MHz 60–100 MHz
Int. speed 166–200 MHz 233–450 MHz 200– 550 MHz
Multiplier 2.5x to 4.5x 3.5x to 4.5x 3.5x to 5.5x
L1 32 KB 32 KB 32 or 64 KB
L2 512 KB 0 to 256 KB
Package PGA SEC PGA
Socket Socket 7 Slot 1 Socket 7
Remarks AMD & Intel
Split
Pentium Improvements
• MMX (multimedia extensions)
– Designed for graphical applications
• Increased clocks and multipliers
– Up to 4.5x
• Pentium II
– Faster than Pentium Pro
– Used SEC
• AMD K6
– Proprietary 3DNow!
– Requires a Super Socket 7
Older CPUs
Intel Celeron Pentium III AMD
(P II) Athlons
Ext. speed 66 MHz 100–133 MHz 100–133 MHz
Int. speed 266–700 MHz 450 MHz–1.2 500MHz–
GHz 1GHz
Multiplier 4x to 10.5x 4x to 10x 5x to 10x
L1 32 KB 32 KB 128 KB
L2 0 to 128 KB 256–512 KB 512 KB
Package SEP, PGA SEC-2, PGA SEC
Socket Slot 1, Slot 1, Slot A7
Socket 370 Socket 370
Older CPUs
• Celeron
– Offshoot of Pentium II for
the low-end PC
• Pentium III
– Intel’s answer to 3DNow! by
AMD
• AMD Athlon
– SEC package used slot A
More Current CPUs
AMD Athlon AMD Duron Pentium 4
Codename Thunderbird Willamette
Process 180 nm 180 nm 180 nm
Wattage 38–75 21–57 49–100
Ext. speed 100–133 MHz 100 MHz 100–133 MHz
Int. speed 650 MHz– 650 MHz– 1.3–2 GHz
1.4 GHz 1.8 GHz
Multiplier 6.5x to 14x 6.5x to 13.5x 13x to 20x
L1 128 KB 128 KB 128 KB
L2 256 KB 64 KB 256 KB
Package PGA PGA PGA
Socket Socket A Socket A Socket 423 or 478
Pentium Competitors
• AMD Athlon Thunderbird
– Double-pumped frontside bus doubled the data rate
without increasing the clock speed
– Returned to PGA with Socket A
• AMD Duron
– Generic name given to all lower-end Athlon processors
– AMD’s competitor to Intel’s Celeron for the low-end PC
• Intel Pentium 4 (Willamette)
– Completely redesigned core called NetBurst
– Used 20-step pipeline
– Quad-pumped frontside bus
More Current CPUs
AMD Athlon AMD Athlon
Codename Palomino Thoroughbred
Process 180 nm 150 nm
Wattage 60–72 49–70
Ext. speed 133 MHz 166 MHz
Int. speed 1.3–2.2 GHz 1.3–2.2 GHz
Multiplier 13x to 16.5x 13x to 16.5x
L1 128 KB 128 KB
L2 256–512 KB 256–512 KB
Package PGA PGA
Socket Socket A Socket A
More Current CPUs
Pentium 4 Pentium 4 Pentium 4
Codename Northwood Prescott Cedar Mill
Process 130 nm 90 nm 65 nm
Wattage 45–68 ~84 86
Ext. speed 100 MHz 133 MHz 200 MHz
Int. speed 1.3–3.8 GHz 1.3–3.8 GHz 1.3–3.8 GHz
Multiplier 13x to 23x 13x to 23x 13x to 23x
L1 128 KB 128 KB 128 KB
L2 256, 512 KB 256, 512 KB 256, 512 KB
Package PGA PGA PGA
Socket Socket 478 or Socket 478 or Socket 478 or
775 775 775
Newer Processors
• AMD Athlon XP (Palomino and Thoroughbred)
– Enhanced version of the Athlon core processor
• Intel Pentium 4 (Northwood, Prescott, Cedar
Mill)
– Increased frontside bus to 800 MHz
– Introduced hyperthreading
• Hyperthreading
– Looks like two CPUs
to the operating system
More Current CPUs
AMD Athlon XP AMD Athlon
Codename Palomino Thoroughbred
Process 180 nm 150 nm
Wattage 60–72 49–70
Ext. speed 133 MHz 166 MHz
Int. speed 1.3–2.2 GHz 1.3–2.2 GHz
Multiplier 13x to 16.5x 13x to 16.5x
L1 128 KB 128 KB
L2 256–512 KB 256–512 KB
Package PGA PGA
Socket Socket A Socket A
More Current CPUs
Athlon XP Pentium 4
Codename Thorton/Barton Extreme Edition
Process 130 nm 130, 90 nm
Wattage 60–70 85–115
Ext. speed 133, 166, 200 MHz 200, 266 MHz
Int. speed 1.6–2.2 GHz 3.2–3.7 GHz
Multiplier 10x to 16x 14x to 17x
L1 128 KB 128 KB
L2 256, 512 KB 512 KB
L3 2 MB
Package PGA PGA
Socket Socket A Socket 478 or 775
Mobile Processors
• Mobile processors
– For laptops
– Use less power to overcome problems of heat and
power requirements
• Utilize throttling
– Previously called system management mode
(SMM)
– Allows a CPU to slow down during low demand
times
– Intel calls it SpeedStep
– AMD calls it PowerNow!
More Processors
• Intel Xeon processors
– Series of powerful CPUs
– Massive L2 caches
– Xeon is codeword for high-end
– Can easily be used in symmetric multiprocessing
systems (multiple physical processors)
– Early Xeon used slots
– Later Xeons went back to PGA packages
64-Bit Processors
• 64-bit processing refers to a 64-bit
address bus
– We already had 64-bit external data buses
• Intel Itanium processors
– Itanium was Intel’s first 64-bit chip
– Itanium II is made for the PC
64-Bit Processors
• AMD Opteron processor
– Runs both 32-bit and 64-bit code
• Athlon 64
– First desktop 64-bit processor
– Backward-compatible with 32-bit programs
– Two main groups (130 nm and 90 nm)
• AMD Sempron CPUs
– Less cache than the Athlon 64
– Offer a tradeoff between price and performance
Dual-core CPUs
• Due to practical limit of ~4 GHz in clock
speeds, alternatives were sought
• Dual core features two CPUs on same
chip
– Pentium D
– Athlon Dual Cores
Dual-core CPUs
Pentium D Athlon Dual Core
Codename Smtihfield/Presler
Process 90, 65 nm 90 nm
Wattage 95–130 89–110
Ext. speed 166, 200 MHz 200 MHz
Int. speed 2.6–3.6 GHz 2–2.4 GHz
Multiplier 14x to 20x 10x to 12x
L1 Two 128 KB 128 KB
L2 Two 1 or 2 MB Two 512 KB or 1 MB
Package 775 LGA PGA
Socket Socket LGA 775 Socket 939 or AM2
Intel Core CPUs
Intel Core Intel Core 2
Codename Yonah
Process 90, 65 nm 90 nm
Wattage 95–130 89–110
Ext. speed 166, 200 MHz 200 MHz
Int. speed 2.6–3.6 GHz 2–2.4 GHz
Multiplier 14x to 20x 10x to 12x
L1 Two 128 KB 128 KB
L2 Two 1 or 2 MB Two 512 KB or 1 MB
Package 775 LGA PGA
Socket Socket LGA 775 Socket 939 or AM2
Installing CPUs
Why Replace a CPU?
• Cost
– Chances are you’ll need to replace the
motherboard as well as the CPU—is it worth it?
• Cooling
– Faster CPUs will probably need better cooling
• Performance
– Faster CPUs may not be the best answer to
speeding up your PC
• Many times you really need more RAM
The Right CPU
• Consult your motherboard manual
– You need a CPU that will fit
in the socket or slot on
your motherboard
• Buying a CPU
– Most stores will not accept
returns
– Retail-boxed CPUs are genuine and come
with a fan
– Lots of illegal CPUs on the market
CPU Installation Guidelines
• Don’t touch the
pins (ESD)
• Match the notch
and dot printed on
the corners of the
CPU…they must
line up
– Incorrectly installing
your CPU may
destroy the CPU
and/or
motherboard!
CPU Installation Guidelines
• Use a heat sink
compound
• Install a fan on top
of the CPU after the
CPU has been
inserted into the
socket
Plugging in the CPU Fan
The Art of Cooling
• Modern CPUs need to
be kept cool
– OEM fans are included in
retail-boxed CPUs
– Specialized fans usually
exceed OEM fans
– Liquid cooling works by
running a liquid (usually
water) through a metal block
that sits on top of your CPU
to absorb heat
Overclocking
• Overclocking is running a CPU at a
speed higher than rated
– Voids the warranty
– Black market exists