Lec 04 Computer Hardware (CPU Memory)
Lec 04 Computer Hardware (CPU Memory)
Lecture 04
Computer Hardware
(Microprocessor and Memory)
TODAYS LECTURE
Today we learn about the
microprocessor, the key component,
the brain of a computer.
We will learn about the
function/building blocks of a
microprocessor and its various subsystems.
We also familiarize with memory and
its functions.
MICROPROCESSO
R
MICROPROCESSOR
A microprocessor is a computer processor on a microchip.
Its sometime called logic chips or CPU.
A microprocessor is designed to perform all calculations,
decision making and control functions.
Todays state of the art processors including Pentium,
Athalon, powerpc, etc, they are very complex circuits,
it has tens of millions of transistors.
They work at ultra fast speed, many can perform more
than 1 billions operations per second.
These all microprocessors are made up of same material,
which is semi-conductor means they are made up of
silicon.
INTEGRATED CIRCUITS
A microprocessor is an integrated circuit
made up of silicon.
A chip is also called IC (aka microchip or just
chip).
An IC is collection of several electronic
components and these all components are
miniaturized.
One electronic component is millionth of a
meter, means it is in microns. The thickness of
human hair is 100 um (microns).
TRANSISTORS
In digital circuits, transistors are used
as very fast electrical switches,
and arrangements of transistors can
function as logic gates.
MATERIALS
The materials used in IC are:
Silicon semiconductor
Copper conductor (wires, the
connecting path are made up of
coppers)
Silicon Dioxide - insulator
SILICON
MICROPROCESSOR SYSTEM
Microprocessor System is different then
microprocessor as the body is different
then the brain.
If we have the brain, but do not have
hands, feet, then what is the benefit of this
brain.
Similarly, if we have microprocessor but
do not have input, output and storage
devices then this microprocessor is
useless.
MICRO-CONTROLLERS
Micro-controller is a type of microprocessor
system.
The special thing is in micro-controller system these
are all components i.e. microprocessor, memory of
the program (ROM), memory of the data (RAM),
I/O lines to communicate with peripherals &
complementary recourses is on one chip.
Means a complete computer on a chip.
Micro-controllers are found in almost any
electrical device e.g. washing machines,
microwave ovens and in toaster etc
MAIN MEMORY
BOTTLENECK
Microprocessor speed as compare to memory are
quite faster. Todays microprocessors can perform
1 operation in 1 nanosecond ((10-9) or 1 billionth
of asecond), but the memory is respond in 100
nanosecond.
It means if microprocessor say to memory it needs
data, it can say it in 1 nanosecond, but he will get
the response from memory in 100 nanoseconds or
more. It means todays slow memory making
efficiency of a microprocessor less.
It means microprocessor who are capable to
perform at high speed due to slow memory are
performing at low speed.
Microprocess
Data
or
Cache(L1)
Memory
Bus
RAM
Control
Unit
Bus
Interface
Unit
I/O
Instruction
Decoder
System
Bus
Instruction
Cache(L1)
Arithmetic
& Logic
Unit
Registers
Floating
Point
Unit
Registers
CACHE MEMORY
L2, cache memory, which is on a separate
chip from the microprocessor.
It is the small size and proximity to the
microprocessor makes access times short,
resulting in a boost in performance.
It is an extremely fast, small memory between
CPU and MAIN MEMORY whose access time
is closer to the processing speed of the CPU.
Cache is pronounced as cash.
INSTRUCTION DECODER
Instruction decoder analysis the
instruction, which comes from
instruction cache and decide these
instructions will be send to ALU or
FPU.
It also simplify the instructions so
that ALU or FPU understand it easily.
Means it converts complex
instructions into simple
instructions.
NOTE
FPUs have importance when you are doing
graphics calculations, design engineering
software or scientific software.
All those work which FPU perform, ALU also
perform the difference is if FPU do it 1 machine
cycle, then ALU can perform same job in 100
machine cycles.
So, without FPU, your processor can work, but
it really slow down the speed.
In previous generations many microprocessors
do not have FPU.
REGISTERS
The registers are attached with ALU & FPU, they
are super fast memory like cache.
When ALU & FPU are doing some calculations,
then they store their intermediate calculations
in registers on a temporary basis. Those
calculation, which results you need after some
time.
When the calculation is finished, then this
processed data from registers goes to data
cache and then to bus interface unit from there
either it goes out to memory or I/O devices.
COMMONLY USED
REGISTERS
CONTROL UNIT
Control unit is like a brain or heart of any
microprocessor.
Its most complex element of any
microprocessor.
Control unit is like, in war a field marshal or
general is.
If instructions come, the CU generate its order.
If data have to come, the CU generate its order.
It manages whole process of microprocessors.
PROCESSOR
MANUFACTURERS
Used in
Server
Compute
rs
PROCESSOR HEAT
A processor chip generates heat that
could cause the chip to burn up.
Require additional
cooling:
Heat Sinks Fan
Liquid Cooling Technology
LANGUAGE OF A
MICROPROCESSOR
MACHINE CYCLES
Each time the CPU executes an
instruction. It takes a series of
steps. The completed series of steps
is called a machine cycle.
A machine cycle itself can be broken
down into two smaller cycles:
Instruction cycle
Execution cycle
MACHINE CYCLES
Control
RAM
Play
Sound
Unit
System Bus
Instructi
on 1
Play sound sent over bus
Instructi
to CPU.
on 2
Instructi
on 3
Steps:
1. Play sound is sent from RAM to
CPU.(Fetch)
2. Control Unit breaks the command
into instruction set the CPU can
System Bus
RAMhandle.(Decoding)
Play
Sound
Steps:
1. Control Unit executes
instruction 1-3.
(Executing)
2. Command is sent over
system bus to sound card.
Control
Unit
Instructi
on 1
Instructi
on 2
Instructi
on 3
Sound
Card
PIPELINING
Processors starting from Intel Pentium 3 & 4 support
Pipelining. In some & obsolete computers, the CPU
processes only one instruction at one time. i.e., the CPU
waits until an instruction completes all four stages of the
machine cycle before beginning work on the next
instruction.
With Pipelining, the CPU
begins executing a second
instruction before it completes
the first instruction. Pipelining
results faster processing
because the CPU does not
have to wait for one
instruction to complete
WORD SIZE
The length of register equals the
number of bits it can store. Hence, a
register that can store 8 bits is normally
referred to as 8-bit register.
The size of registers is sometimes
called the word size.
The biggest the word size, the fastest
the computer can process a set of data.
ARCHITECTURE OF
PROCESSOR
Type of
Architect
ure
Usage.
Processo
rs
CISC
(Complex
Instruction Set
Computer)
Mostly used in
Personal
Computers.
32 Bit
microprocesso
r
RISC
(Reduced
Instruction
Set)
Mostly used in
workstations.
32 Bit
microprocesso
r
EPIC
(Explicitly
Parallel
Instruction
Computing)
Mostly used in
high-end
servers and
workstations.
64 Bit
microprocesso
r
Mostly used in
MULTI-CORE PROCESSORS
Dual-core refers to a CPU that includes two
complete execution cores per processor.
It has combine two processors and their
caches and their controllers onto a single chip.
They each have their own datapath and logic
units.
Example: If you are running a virus scan, and
a word processor, you can set the virus scan
to only run through one core, and word
processor to work on the other core.
Multicore
Processo
r
Dualcore
Processo
r
Quadcore
Processo
r
Introduced in 1971.
2250 Transistors
4-bit word length
10-micron process
Size was 1/6th of an inch x 1/8th of an
inch.
As powerful as the ENIAC which has
19000 tubes and occupied a large room.
Cost of this processor was 100 $.
Targeted use: Calculators
ENHANCING THE
CAPABILITY OF A
MICROPROCESSOR
The computing capability of a microprocessor
can be enhanced in many different ways:
By increasing the clock frequency.
By increasing the word-size.
Having more effective caching algorithm and right
cache size.
By increasing the RAM.
By adding more functional units (e.g. ALUs, FPU,
etc)
Improving the architecture (e.g. if a task is perform
in 3, 4 cycles, it performs in 1 or 2 cycles)
MOORES LAW
Gordon Moore who was the cofounder of Intel published a paper in
1965.
Stating in effect that at our rate of
technological development and
advancement in industry the complexity
of integrated circuits double every
year.
Their prediction is still valid.
MEMORY
00000000 00000010
11111111 11111111
TYPES OF RAM
SRAM
SRAM is a type of memory that is faster
and more reliable than the common DRAM
(Dynamic RAM).
The term static is derived from the fact that
it doesnt need to be refreshed like
DRAM.
Access time is around 10 nanoseconds.
Both SRAM and DRAM are volatile, means
that they lose their contents when the power
is turned off.
DRAM
Dynamic RAM needs to be refreshed
thousands of times per second.
The term dynamic indicates that the
memory must be constantly
refreshed.
Access time is around 60-70
nanoseconds.
DRAM is slower than SRAM.
CAPACITY OF RAM
TYPES OF ROMs
Type
Usage.
ManufacturedProgrammed ROM
User-programmed ROM
or Programmable ROM
(PROM)